mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #36268 from mbohlool/h2o2
Automatic merge from submit-queue Add verify script for federation OpenAPI spec generation We are missing hack/verify-federation-openapi-spec.sh. It should be something similar to hack/verify-openapi-spec.sh.
This commit is contained in:
commit
a764b1fe82
@ -675,6 +675,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -1037,6 +1051,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -1399,6 +1427,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -1761,6 +1803,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -2067,6 +2123,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -4193,6 +4263,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -4682,6 +4766,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -5359,6 +5457,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -5848,6 +5960,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -7574,6 +7700,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/v1.DeleteOptions"
|
"$ref": "#/definitions/v1.DeleteOptions"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
|
||||||
|
"name": "gracePeriodSeconds",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueItems": true,
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
|
||||||
|
"name": "orphanDependents",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
47
hack/verify-federation-openapi-spec.sh
Executable file
47
hack/verify-federation-openapi-spec.sh
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2016 The Kubernetes Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
|
kube::golang::setup_env
|
||||||
|
|
||||||
|
SPECROOT="${KUBE_ROOT}/federation/apis/openapi-spec"
|
||||||
|
TMP_SPECROOT="${KUBE_ROOT}/_tmp_federation/openapi-spec"
|
||||||
|
_tmp="${KUBE_ROOT}/_tmp_federation"
|
||||||
|
|
||||||
|
mkdir -p "${_tmp}"
|
||||||
|
cp -a "${SPECROOT}" "${TMP_SPECROOT}"
|
||||||
|
trap "cp -a ${TMP_SPECROOT} ${SPECROOT}/..; rm -rf ${_tmp}" EXIT SIGINT
|
||||||
|
rm ${SPECROOT}/*
|
||||||
|
|
||||||
|
"${KUBE_ROOT}/hack/update-federation-openapi-spec.sh"
|
||||||
|
echo "diffing ${SPECROOT} against freshly generated federation openapi spec"
|
||||||
|
ret=0
|
||||||
|
diff -Naupr -I 'Auto generated by' "${SPECROOT}" "${TMP_SPECROOT}" || ret=$?
|
||||||
|
if [[ $ret -eq 0 ]]
|
||||||
|
then
|
||||||
|
echo "${SPECROOT} up to date."
|
||||||
|
else
|
||||||
|
echo "${SPECROOT} is out of date. Please run hack/update-federation-openapi-spec.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
@ -170,6 +170,18 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "${reset}"
|
echo "${reset}"
|
||||||
|
|
||||||
|
echo -ne "Checking for federation openapi spec that need updating... "
|
||||||
|
if ! hack/verify-federation-openapi-spec.sh > /dev/null; then
|
||||||
|
echo "${red}ERROR!"
|
||||||
|
echo "Federation OpenAPI spec needs to be updated."
|
||||||
|
echo "To regenerate the spec, run:"
|
||||||
|
echo " hack/update-federation-openapi-spec.sh"
|
||||||
|
exit_code=1
|
||||||
|
else
|
||||||
|
echo "${green}OK"
|
||||||
|
fi
|
||||||
|
echo "${reset}"
|
||||||
|
|
||||||
if [[ "${exit_code}" != 0 ]]; then
|
if [[ "${exit_code}" != 0 ]]; then
|
||||||
echo "${red}Aborting commit${reset}"
|
echo "${red}Aborting commit${reset}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user