Merge pull request #45564 from whitlockjc/admission-api-group
Automatic merge from submit-queue (batch tested with PRs 45996, 46121, 45707, 46011, 45564) add "admission" API group This commit is an initial pass at providing an admission API group. The API group is required by the webhook admission controller being developed as part of https://github.com/kubernetes/community/pull/132 and could be used more as that proposal comes to fruition. **Note:** This PR was created by following the [Adding an API Group](https://github.com/kubernetes/community/blob/master/contributors/devel/adding-an-APIGroup.md) documentation. cc @smarterclayton
This commit is contained in:
@@ -79,6 +79,7 @@ KUBE_NONSERVER_GROUP_VERSIONS="
|
||||
abac.authorization.kubernetes.io/v1beta1 \
|
||||
componentconfig/v1alpha1 \
|
||||
imagepolicy.k8s.io/v1alpha1\
|
||||
admission.k8s.io/v1alpha1\
|
||||
"
|
||||
|
||||
# This emulates "readlink -f" which is not available on MacOS X.
|
||||
|
||||
@@ -69,6 +69,7 @@ groups_without_codegen=(
|
||||
"abac"
|
||||
"componentconfig"
|
||||
"imagepolicy"
|
||||
"admission"
|
||||
)
|
||||
client_gen_file="${KUBE_ROOT}/cmd/libs/go2idl/client-gen/main.go"
|
||||
|
||||
@@ -92,6 +93,7 @@ done
|
||||
# them. This happens for types that aren't served from the API server
|
||||
packages_without_install=(
|
||||
"k8s.io/kubernetes/pkg/apis/abac"
|
||||
"k8s.io/kubernetes/pkg/apis/admission"
|
||||
)
|
||||
known_version_files=(
|
||||
"pkg/master/import_known_versions.go"
|
||||
@@ -116,7 +118,7 @@ for expected_install_package in "${expected_install_packages[@]}"; do
|
||||
done
|
||||
done
|
||||
|
||||
# check all groupversions to make sure they're in the init.sh file. This isn't perfect, but its slightly
|
||||
# check all groupversions to make sure they're in the init.sh file. This isn't perfect, but its slightly
|
||||
# better than nothing
|
||||
for external_group_version in "${external_group_versions[@]}"; do
|
||||
if ! grep -q "${external_group_version}" "${KUBE_ROOT}/hack/lib/init.sh" ; then
|
||||
|
||||
@@ -26,7 +26,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
kube::golang::verify_go_version
|
||||
|
||||
cd "${KUBE_ROOT}"
|
||||
if git --no-pager grep -E $'^(import |\t)[a-z]+[A-Z_][a-zA-Z]* "[^"]+"$' -- '**/*.go' ':(exclude)vendor/*' ':(exclude)staging/src/k8s.io/client-go/*vendor/*' ':(exclude)staging/src/k8s.io/metrics/*'; then
|
||||
if git --no-pager grep -E $'^(import |\t)[a-z]+[A-Z_][a-zA-Z]* "[^"]+"$' -- '**/*.go' ':(exclude)vendor/*' ':(exclude)staging/src/k8s.io/client-go/*vendor/*' ':(exclude)staging/src/k8s.io/metrics/*' ':(exclude)pkg/apis/admission/v1alpha1/zz_generated.conversion.go'; then
|
||||
echo "!!! Some package aliases break go conventions."
|
||||
echo "To fix these errors, do not use capitalized or underlined characters"
|
||||
echo "in pkg aliases. Refer to https://blog.golang.org/package-names for more info."
|
||||
|
||||
Reference in New Issue
Block a user