diff --git a/Makefile b/Makefile index b2a5a9f6ce..028e30fe31 100644 --- a/Makefile +++ b/Makefile @@ -60,8 +60,9 @@ HELM_DOCS ?= $(TOOLS_DIR)/helm-docs HELM_DOCS_VERSION ?= v1.11.0 KO ?= $(TOOLS_DIR)/ko KO_VERSION ?= v0.17.1 +API_GROUP_RESOURCES ?= $(TOOLS_DIR)/api-group-resources KUBE_VERSION ?= v1.25.0 -TOOLS := $(KIND) $(CONTROLLER_GEN) $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) $(OPENAPI_GEN) $(REGISTER_GEN) $(DEEPCOPY_GEN) $(DEFAULTER_GEN) $(GEN_CRD_API_REFERENCE_DOCS) $(GENREF) $(GO_ACC) $(GOIMPORTS) $(HELM) $(HELM_DOCS) $(KO) +TOOLS := $(KIND) $(CONTROLLER_GEN) $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) $(OPENAPI_GEN) $(REGISTER_GEN) $(DEEPCOPY_GEN) $(DEFAULTER_GEN) $(GEN_CRD_API_REFERENCE_DOCS) $(GENREF) $(GO_ACC) $(GOIMPORTS) $(HELM) $(HELM_DOCS) $(KO) $(API_GROUP_RESOURCES) ifeq ($(GOOS), darwin) SED := gsed else @@ -133,6 +134,10 @@ $(KO): @echo Install ko... >&2 @GOBIN=$(TOOLS_DIR) go install github.com/google/ko@$(KO_VERSION) +$(API_GROUP_RESOURCES): + @echo Install api-group-resources... >&2 + @cd ./hack/api-group-resources && GOBIN=$(TOOLS_DIR) go install + .PHONY: install-tools install-tools: $(TOOLS) ## Install tools @@ -426,7 +431,9 @@ $(PACKAGE_SHIM): $(GOPATH_SHIM) @mkdir -p $(GOPATH_SHIM)/src/github.com/kyverno && ln -s -f ${PWD} $(PACKAGE_SHIM) .PHONY: codegen-client-clientset -codegen-client-clientset: $(PACKAGE_SHIM) $(CLIENT_GEN) ## Generate clientset +codegen-client-clientset: ## Generate clientset +codegen-client-clientset: $(PACKAGE_SHIM) +codegen-client-clientset: $(CLIENT_GEN) @echo Generate clientset... >&2 @rm -rf $(CLIENTSET_PACKAGE) && mkdir -p $(CLIENTSET_PACKAGE) @GOPATH=$(GOPATH_SHIM) $(CLIENT_GEN) \ @@ -437,7 +444,9 @@ codegen-client-clientset: $(PACKAGE_SHIM) $(CLIENT_GEN) ## Generate clientset --input $(CLIENT_INPUT_DIRS) .PHONY: codegen-client-listers -codegen-client-listers: $(PACKAGE_SHIM) $(LISTER_GEN) ## Generate listers +codegen-client-listers: ## Generate listers +codegen-client-listers: $(PACKAGE_SHIM) +codegen-client-listers: $(LISTER_GEN) @echo Generate listers... >&2 @rm -rf $(LISTERS_PACKAGE) && mkdir -p $(LISTERS_PACKAGE) @GOPATH=$(GOPATH_SHIM) $(LISTER_GEN) \ @@ -446,7 +455,9 @@ codegen-client-listers: $(PACKAGE_SHIM) $(LISTER_GEN) ## Generate listers --input-dirs $(CLIENT_INPUT_DIRS) .PHONY: codegen-client-informers -codegen-client-informers: $(PACKAGE_SHIM) $(INFORMER_GEN) ## Generate informers +codegen-client-informers: ## Generate informers +codegen-client-informers: $(PACKAGE_SHIM) +codegen-client-informers: $(INFORMER_GEN) @echo Generate informers... >&2 @rm -rf $(INFORMERS_PACKAGE) && mkdir -p $(INFORMERS_PACKAGE) @GOPATH=$(GOPATH_SHIM) $(INFORMER_GEN) \ @@ -457,21 +468,27 @@ codegen-client-informers: $(PACKAGE_SHIM) $(INFORMER_GEN) ## Generate informers --listers-package $(LISTERS_PACKAGE) .PHONY: codegen-client-wrappers -codegen-client-wrappers: codegen-client-clientset $(GOIMPORTS) ## Generate client wrappers +codegen-client-wrappers: ## Generate client wrappers +codegen-client-wrappers: codegen-client-clientset +codegen-client-wrappers: $(GOIMPORTS) @echo Generate client wrappers... >&2 @go run ./hack/main.go @$(GOIMPORTS) -w ./pkg/clients @go fmt ./pkg/clients/... .PHONY: codegen-register -codegen-register: $(PACKAGE_SHIM) $(REGISTER_GEN) ## Generate types registrations +codegen-register: ## Generate types registrations +codegen-register: $(PACKAGE_SHIM) +codegen-register: $(REGISTER_GEN) @echo Generate registration... >&2 @GOPATH=$(GOPATH_SHIM) $(REGISTER_GEN) \ --go-header-file=./scripts/boilerplate.go.txt \ --input-dirs=$(INPUT_DIRS) .PHONY: codegen-deepcopy -codegen-deepcopy: $(PACKAGE_SHIM) $(DEEPCOPY_GEN) ## Generate deep copy functions +codegen-deepcopy: ## Generate deep copy functions +codegen-deepcopy: $(PACKAGE_SHIM) +codegen-deepcopy: $(DEEPCOPY_GEN) @echo Generate deep copy functions... >&2 @GOPATH=$(GOPATH_SHIM) $(DEEPCOPY_GEN) \ --go-header-file=./scripts/boilerplate.go.txt \ @@ -479,7 +496,9 @@ codegen-deepcopy: $(PACKAGE_SHIM) $(DEEPCOPY_GEN) ## Generate deep copy function --output-file-base=zz_generated.deepcopy .PHONY: codegen-defaulters -codegen-defaulters: $(PACKAGE_SHIM) $(DEFAULTER_GEN) ## Generate defaulters +codegen-defaulters: ## Generate defaulters +codegen-defaulters: $(PACKAGE_SHIM) +codegen-defaulters: $(DEFAULTER_GEN) @echo Generate defaulters... >&2 @GOPATH=$(GOPATH_SHIM) $(DEFAULTER_GEN) --go-header-file=./scripts/boilerplate.go.txt --input-dirs=$(INPUT_DIRS) @@ -560,6 +579,12 @@ codegen-api-docs: $(PACKAGE_SHIM) $(GEN_CRD_API_REFERENCE_DOCS) $(GENREF) ## Gen -o crd \ -f html +.PHONY: codegen-api-group-resources +codegen-api-group-resources: ## Generate API group resources +codegen-api-group-resources: $(API_GROUP_RESOURCES) + @echo Generate API group resources... >&2 + @$(API_GROUP_RESOURCES) > cmd/cli/kubectl-kyverno/data/api-group-resources.json + .PHONY: codegen-cli-api-docs codegen-cli-api-docs: $(PACKAGE_SHIM) $(GEN_CRD_API_REFERENCE_DOCS) $(GENREF) ## Generate CLI API docs @echo Generate CLI api docs... >&2 @@ -608,7 +633,13 @@ codegen-fix-policies: $(CLI_BIN) ## Fix CLI policy files @KYVERNO_EXPERIMENTAL=true $(CLI_BIN) fix policy . --save .PHONY: codegen-cli-all -codegen-cli-all: codegen-cli-crds codegen-cli-docs codegen-cli-api-docs codegen-fix-tests ## Generate all CLI related code and docs +codegen-cli-all: ## Generate all CLI related code and docs +codegen-cli-all: codegen-cli-crds +codegen-cli-all: codegen-api-group-resources +codegen-cli-all: codegen-cli-api-docs +codegen-cli-all: codegen-cli-docs +codegen-cli-all: codegen-cli-api-docs +codegen-cli-all: codegen-fix-tests define generate_crd @echo "{{- if .Values.groups.$(4).$(5) }}" > ./charts/kyverno/charts/crds/templates/$(3)/$(1) @@ -624,7 +655,8 @@ define generate_crd endef .PHONY: codegen-helm-crds -codegen-helm-crds: codegen-crds-all ## Generate helm CRDs +codegen-helm-crds: ## Generate helm CRDs +codegen-helm-crds: codegen-crds-all @echo Generate helm crds... >&2 @rm -rf ./charts/kyverno/charts/crds/templates/kyverno.io && mkdir -p ./charts/kyverno/charts/crds/templates/kyverno.io @rm -rf ./charts/kyverno/charts/crds/templates/reports.kyverno.io && mkdir -p ./charts/kyverno/charts/crds/templates/reports.kyverno.io @@ -645,10 +677,13 @@ codegen-helm-crds: codegen-crds-all ## Generate helm CRDs $(call generate_crd,wgpolicyk8s.io_policyreports.yaml,policyreport,wgpolicyk8s.io,wgpolicyk8s,policyreports) .PHONY: codegen-helm-all -codegen-helm-all: codegen-helm-crds codegen-helm-docs ## Generate helm docs and CRDs +codegen-helm-all: ## Generate helm docs and CRDs +codegen-helm-all: codegen-helm-crds +codegen-helm-all: codegen-helm-docs .PHONY: codegen-manifest-install-latest -codegen-manifest-install-latest: $(HELM) ## Create install_latest manifest +codegen-manifest-install-latest: ## Create install_latest manifest +codegen-manifest-install-latest: $(HELM) @echo Generate latest install manifest... >&2 @$(HELM) template kyverno --kube-version $(KUBE_VERSION) --namespace kyverno --skip-tests ./charts/kyverno \ --set templating.enabled=true \ @@ -662,7 +697,8 @@ codegen-manifest-install-latest: $(HELM) ## Create install_latest manifest > ./config/install-latest-testing.yaml .PHONY: codegen-manifest-debug -codegen-manifest-debug: $(HELM) ## Create debug manifest +codegen-manifest-debug: ## Create debug manifest +codegen-manifest-debug: $(HELM) @echo Generate debug manifest... >&2 @mkdir -p ./.manifest @$(HELM) template kyverno --kube-version $(KUBE_VERSION) --namespace kyverno --skip-tests ./charts/kyverno \ @@ -677,7 +713,8 @@ codegen-manifest-debug: $(HELM) ## Create debug manifest > ./.manifest/debug.yaml .PHONY: codegen-manifest-release -codegen-manifest-release: $(HELM) ## Create release manifest +codegen-manifest-release: ## Create release manifest +codegen-manifest-release: $(HELM) @echo Generate release manifest... >&2 @mkdir -p ./.manifest @$(HELM) template kyverno --kube-version $(KUBE_VERSION) --namespace kyverno --skip-tests ./charts/kyverno \ @@ -691,7 +728,9 @@ codegen-manifest-release: $(HELM) ## Create release manifest > ./.manifest/release.yaml .PHONY: codegen-manifest-all -codegen-manifest-all: codegen-manifest-install-latest codegen-manifest-debug ## Create all manifests +codegen-manifest-all: ## Create all manifests +codegen-manifest-all: codegen-manifest-install-latest +codegen-manifest-all: codegen-manifest-debug .PHONY: codegen-helm-update-versions codegen-helm-update-versions: ## Update helm charts versions diff --git a/cmd/cli/kubectl-kyverno/data/api-group-resources.json b/cmd/cli/kubectl-kyverno/data/api-group-resources.json new file mode 100644 index 0000000000..f713f492c6 --- /dev/null +++ b/cmd/cli/kubectl-kyverno/data/api-group-resources.json @@ -0,0 +1,2605 @@ +[ + { + "Group": { + "name": "", + "versions": [ + { + "groupVersion": "v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "bindings", + "singularName": "binding", + "namespaced": true, + "kind": "Binding", + "verbs": [ + "create" + ] + }, + { + "name": "componentstatuses", + "singularName": "componentstatus", + "namespaced": false, + "kind": "ComponentStatus", + "verbs": [ + "get", + "list" + ], + "shortNames": [ + "cs" + ] + }, + { + "name": "configmaps", + "singularName": "configmap", + "namespaced": true, + "kind": "ConfigMap", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "cm" + ] + }, + { + "name": "endpoints", + "singularName": "endpoints", + "namespaced": true, + "kind": "Endpoints", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ep" + ] + }, + { + "name": "events", + "singularName": "event", + "namespaced": true, + "kind": "Event", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ev" + ] + }, + { + "name": "limitranges", + "singularName": "limitrange", + "namespaced": true, + "kind": "LimitRange", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "limits" + ] + }, + { + "name": "namespaces", + "singularName": "namespace", + "namespaced": false, + "kind": "Namespace", + "verbs": [ + "create", + "delete", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ns" + ] + }, + { + "name": "namespaces/finalize", + "singularName": "namespace", + "namespaced": false, + "kind": "Namespace", + "verbs": [ + "update" + ] + }, + { + "name": "namespaces/status", + "singularName": "namespace", + "namespaced": false, + "kind": "Namespace", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "nodes", + "singularName": "node", + "namespaced": false, + "kind": "Node", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "no" + ] + }, + { + "name": "nodes/proxy", + "singularName": "node", + "namespaced": false, + "kind": "NodeProxyOptions", + "verbs": [ + "create", + "delete", + "get", + "patch", + "update" + ] + }, + { + "name": "nodes/status", + "singularName": "node", + "namespaced": false, + "kind": "Node", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "persistentvolumeclaims", + "singularName": "persistentvolumeclaim", + "namespaced": true, + "kind": "PersistentVolumeClaim", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "pvc" + ] + }, + { + "name": "persistentvolumeclaims/status", + "singularName": "persistentvolumeclaim", + "namespaced": true, + "kind": "PersistentVolumeClaim", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "persistentvolumes", + "singularName": "persistentvolume", + "namespaced": false, + "kind": "PersistentVolume", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "pv" + ] + }, + { + "name": "persistentvolumes/status", + "singularName": "persistentvolume", + "namespaced": false, + "kind": "PersistentVolume", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "pods", + "singularName": "pod", + "namespaced": true, + "kind": "Pod", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "po" + ], + "categories": [ + "all" + ] + }, + { + "name": "pods/attach", + "singularName": "pod", + "namespaced": true, + "kind": "PodAttachOptions", + "verbs": [ + "create", + "get" + ] + }, + { + "name": "pods/binding", + "singularName": "pod", + "namespaced": true, + "kind": "Binding", + "verbs": [ + "create" + ] + }, + { + "name": "pods/ephemeralcontainers", + "singularName": "pod", + "namespaced": true, + "kind": "Pod", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "pods/eviction", + "singularName": "pod", + "namespaced": true, + "group": "policy", + "version": "v1", + "kind": "Eviction", + "verbs": [ + "create" + ] + }, + { + "name": "pods/exec", + "singularName": "pod", + "namespaced": true, + "kind": "PodExecOptions", + "verbs": [ + "create", + "get" + ] + }, + { + "name": "pods/log", + "singularName": "pod", + "namespaced": true, + "kind": "Pod", + "verbs": [ + "get" + ] + }, + { + "name": "pods/portforward", + "singularName": "pod", + "namespaced": true, + "kind": "PodPortForwardOptions", + "verbs": [ + "create", + "get" + ] + }, + { + "name": "pods/proxy", + "singularName": "pod", + "namespaced": true, + "kind": "PodProxyOptions", + "verbs": [ + "create", + "delete", + "get", + "patch", + "update" + ] + }, + { + "name": "pods/status", + "singularName": "pod", + "namespaced": true, + "kind": "Pod", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "podtemplates", + "singularName": "podtemplate", + "namespaced": true, + "kind": "PodTemplate", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "replicationcontrollers", + "singularName": "replicationcontroller", + "namespaced": true, + "kind": "ReplicationController", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "rc" + ], + "categories": [ + "all" + ] + }, + { + "name": "replicationcontrollers/scale", + "singularName": "replicationcontroller", + "namespaced": true, + "group": "autoscaling", + "version": "v1", + "kind": "Scale", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "replicationcontrollers/status", + "singularName": "replicationcontroller", + "namespaced": true, + "kind": "ReplicationController", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "resourcequotas", + "singularName": "resourcequota", + "namespaced": true, + "kind": "ResourceQuota", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "quota" + ] + }, + { + "name": "resourcequotas/status", + "singularName": "resourcequota", + "namespaced": true, + "kind": "ResourceQuota", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "secrets", + "singularName": "secret", + "namespaced": true, + "kind": "Secret", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "serviceaccounts", + "singularName": "serviceaccount", + "namespaced": true, + "kind": "ServiceAccount", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "sa" + ] + }, + { + "name": "serviceaccounts/token", + "singularName": "serviceaccount", + "namespaced": true, + "group": "authentication.k8s.io", + "version": "v1", + "kind": "TokenRequest", + "verbs": [ + "create" + ] + }, + { + "name": "services", + "singularName": "service", + "namespaced": true, + "kind": "Service", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "svc" + ], + "categories": [ + "all" + ] + }, + { + "name": "services/proxy", + "singularName": "service", + "namespaced": true, + "kind": "ServiceProxyOptions", + "verbs": [ + "create", + "delete", + "get", + "patch", + "update" + ] + }, + { + "name": "services/status", + "singularName": "service", + "namespaced": true, + "kind": "Service", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "apiregistration.k8s.io", + "versions": [ + { + "groupVersion": "apiregistration.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "apiregistration.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "apiservices", + "singularName": "apiservice", + "namespaced": false, + "kind": "APIService", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "api-extensions" + ] + }, + { + "name": "apiservices/status", + "singularName": "apiservice", + "namespaced": false, + "kind": "APIService", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "apps", + "versions": [ + { + "groupVersion": "apps/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "apps/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "controllerrevisions", + "singularName": "controllerrevision", + "namespaced": true, + "kind": "ControllerRevision", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "daemonsets", + "singularName": "daemonset", + "namespaced": true, + "kind": "DaemonSet", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ds" + ], + "categories": [ + "all" + ] + }, + { + "name": "daemonsets/status", + "singularName": "daemonset", + "namespaced": true, + "kind": "DaemonSet", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "deployments", + "singularName": "deployment", + "namespaced": true, + "kind": "Deployment", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "deploy" + ], + "categories": [ + "all" + ] + }, + { + "name": "deployments/scale", + "singularName": "deployment", + "namespaced": true, + "group": "autoscaling", + "version": "v1", + "kind": "Scale", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "deployments/status", + "singularName": "deployment", + "namespaced": true, + "kind": "Deployment", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "replicasets", + "singularName": "replicaset", + "namespaced": true, + "kind": "ReplicaSet", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "rs" + ], + "categories": [ + "all" + ] + }, + { + "name": "replicasets/scale", + "singularName": "replicaset", + "namespaced": true, + "group": "autoscaling", + "version": "v1", + "kind": "Scale", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "replicasets/status", + "singularName": "replicaset", + "namespaced": true, + "kind": "ReplicaSet", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "statefulsets", + "singularName": "statefulset", + "namespaced": true, + "kind": "StatefulSet", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "sts" + ], + "categories": [ + "all" + ] + }, + { + "name": "statefulsets/scale", + "singularName": "statefulset", + "namespaced": true, + "group": "autoscaling", + "version": "v1", + "kind": "Scale", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "statefulsets/status", + "singularName": "statefulset", + "namespaced": true, + "kind": "StatefulSet", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "events.k8s.io", + "versions": [ + { + "groupVersion": "events.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "events.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "events", + "singularName": "event", + "namespaced": true, + "kind": "Event", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ev" + ] + } + ] + } + }, + { + "Group": { + "name": "authentication.k8s.io", + "versions": [ + { + "groupVersion": "authentication.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "authentication.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "selfsubjectreviews", + "singularName": "selfsubjectreview", + "namespaced": false, + "kind": "SelfSubjectReview", + "verbs": [ + "create" + ] + }, + { + "name": "tokenreviews", + "singularName": "tokenreview", + "namespaced": false, + "kind": "TokenReview", + "verbs": [ + "create" + ] + } + ] + } + }, + { + "Group": { + "name": "authorization.k8s.io", + "versions": [ + { + "groupVersion": "authorization.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "authorization.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "localsubjectaccessreviews", + "singularName": "localsubjectaccessreview", + "namespaced": true, + "kind": "LocalSubjectAccessReview", + "verbs": [ + "create" + ] + }, + { + "name": "selfsubjectaccessreviews", + "singularName": "selfsubjectaccessreview", + "namespaced": false, + "kind": "SelfSubjectAccessReview", + "verbs": [ + "create" + ] + }, + { + "name": "selfsubjectrulesreviews", + "singularName": "selfsubjectrulesreview", + "namespaced": false, + "kind": "SelfSubjectRulesReview", + "verbs": [ + "create" + ] + }, + { + "name": "subjectaccessreviews", + "singularName": "subjectaccessreview", + "namespaced": false, + "kind": "SubjectAccessReview", + "verbs": [ + "create" + ] + } + ] + } + }, + { + "Group": { + "name": "autoscaling", + "versions": [ + { + "groupVersion": "autoscaling/v2", + "version": "v2" + }, + { + "groupVersion": "autoscaling/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "autoscaling/v2", + "version": "v2" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "horizontalpodautoscalers", + "singularName": "horizontalpodautoscaler", + "namespaced": true, + "kind": "HorizontalPodAutoscaler", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "hpa" + ], + "categories": [ + "all" + ] + }, + { + "name": "horizontalpodautoscalers/status", + "singularName": "horizontalpodautoscaler", + "namespaced": true, + "kind": "HorizontalPodAutoscaler", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v2": [ + { + "name": "horizontalpodautoscalers", + "singularName": "horizontalpodautoscaler", + "namespaced": true, + "kind": "HorizontalPodAutoscaler", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "hpa" + ], + "categories": [ + "all" + ] + }, + { + "name": "horizontalpodautoscalers/status", + "singularName": "horizontalpodautoscaler", + "namespaced": true, + "kind": "HorizontalPodAutoscaler", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "batch", + "versions": [ + { + "groupVersion": "batch/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "batch/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "cronjobs", + "singularName": "cronjob", + "namespaced": true, + "kind": "CronJob", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "cj" + ], + "categories": [ + "all" + ] + }, + { + "name": "cronjobs/status", + "singularName": "cronjob", + "namespaced": true, + "kind": "CronJob", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "jobs", + "singularName": "job", + "namespaced": true, + "kind": "Job", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "all" + ] + }, + { + "name": "jobs/status", + "singularName": "job", + "namespaced": true, + "kind": "Job", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "certificates.k8s.io", + "versions": [ + { + "groupVersion": "certificates.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "certificates.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "certificatesigningrequests", + "singularName": "certificatesigningrequest", + "namespaced": false, + "kind": "CertificateSigningRequest", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "csr" + ] + }, + { + "name": "certificatesigningrequests/approval", + "singularName": "certificatesigningrequest", + "namespaced": false, + "kind": "CertificateSigningRequest", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "certificatesigningrequests/status", + "singularName": "certificatesigningrequest", + "namespaced": false, + "kind": "CertificateSigningRequest", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "networking.k8s.io", + "versions": [ + { + "groupVersion": "networking.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "networking.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "ingressclasses", + "singularName": "ingressclass", + "namespaced": false, + "kind": "IngressClass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "ingresses", + "singularName": "ingress", + "namespaced": true, + "kind": "Ingress", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "ing" + ] + }, + { + "name": "ingresses/status", + "singularName": "ingress", + "namespaced": true, + "kind": "Ingress", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "networkpolicies", + "singularName": "networkpolicy", + "namespaced": true, + "kind": "NetworkPolicy", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "netpol" + ] + } + ] + } + }, + { + "Group": { + "name": "policy", + "versions": [ + { + "groupVersion": "policy/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "policy/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "poddisruptionbudgets", + "singularName": "poddisruptionbudget", + "namespaced": true, + "kind": "PodDisruptionBudget", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "pdb" + ] + }, + { + "name": "poddisruptionbudgets/status", + "singularName": "poddisruptionbudget", + "namespaced": true, + "kind": "PodDisruptionBudget", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "rbac.authorization.k8s.io", + "versions": [ + { + "groupVersion": "rbac.authorization.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "rbac.authorization.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "clusterrolebindings", + "singularName": "clusterrolebinding", + "namespaced": false, + "kind": "ClusterRoleBinding", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "clusterroles", + "singularName": "clusterrole", + "namespaced": false, + "kind": "ClusterRole", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "rolebindings", + "singularName": "rolebinding", + "namespaced": true, + "kind": "RoleBinding", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "roles", + "singularName": "role", + "namespaced": true, + "kind": "Role", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + } + ] + } + }, + { + "Group": { + "name": "storage.k8s.io", + "versions": [ + { + "groupVersion": "storage.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "storage.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "csidrivers", + "singularName": "csidriver", + "namespaced": false, + "kind": "CSIDriver", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "csinodes", + "singularName": "csinode", + "namespaced": false, + "kind": "CSINode", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "csistoragecapacities", + "singularName": "csistoragecapacity", + "namespaced": true, + "kind": "CSIStorageCapacity", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "storageclasses", + "singularName": "storageclass", + "namespaced": false, + "kind": "StorageClass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "sc" + ] + }, + { + "name": "volumeattachments", + "singularName": "volumeattachment", + "namespaced": false, + "kind": "VolumeAttachment", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "volumeattachments/status", + "singularName": "volumeattachment", + "namespaced": false, + "kind": "VolumeAttachment", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "admissionregistration.k8s.io", + "versions": [ + { + "groupVersion": "admissionregistration.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "admissionregistration.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "mutatingwebhookconfigurations", + "singularName": "mutatingwebhookconfiguration", + "namespaced": false, + "kind": "MutatingWebhookConfiguration", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "api-extensions" + ] + }, + { + "name": "validatingadmissionpolicies", + "singularName": "validatingadmissionpolicy", + "namespaced": false, + "kind": "ValidatingAdmissionPolicy", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "api-extensions" + ] + }, + { + "name": "validatingadmissionpolicies/status", + "singularName": "validatingadmissionpolicy", + "namespaced": false, + "kind": "ValidatingAdmissionPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "validatingadmissionpolicybindings", + "singularName": "validatingadmissionpolicybinding", + "namespaced": false, + "kind": "ValidatingAdmissionPolicyBinding", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "api-extensions" + ] + }, + { + "name": "validatingwebhookconfigurations", + "singularName": "validatingwebhookconfiguration", + "namespaced": false, + "kind": "ValidatingWebhookConfiguration", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "categories": [ + "api-extensions" + ] + } + ] + } + }, + { + "Group": { + "name": "apiextensions.k8s.io", + "versions": [ + { + "groupVersion": "apiextensions.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "apiextensions.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "customresourcedefinitions", + "singularName": "customresourcedefinition", + "namespaced": false, + "kind": "CustomResourceDefinition", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "crd", + "crds" + ], + "categories": [ + "api-extensions" + ] + }, + { + "name": "customresourcedefinitions/status", + "singularName": "customresourcedefinition", + "namespaced": false, + "kind": "CustomResourceDefinition", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "scheduling.k8s.io", + "versions": [ + { + "groupVersion": "scheduling.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "scheduling.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "priorityclasses", + "singularName": "priorityclass", + "namespaced": false, + "kind": "PriorityClass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ], + "shortNames": [ + "pc" + ] + } + ] + } + }, + { + "Group": { + "name": "coordination.k8s.io", + "versions": [ + { + "groupVersion": "coordination.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "coordination.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "leases", + "singularName": "lease", + "namespaced": true, + "kind": "Lease", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + } + ] + } + }, + { + "Group": { + "name": "node.k8s.io", + "versions": [ + { + "groupVersion": "node.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "node.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "runtimeclasses", + "singularName": "runtimeclass", + "namespaced": false, + "kind": "RuntimeClass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + } + ] + } + }, + { + "Group": { + "name": "discovery.k8s.io", + "versions": [ + { + "groupVersion": "discovery.k8s.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "discovery.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "endpointslices", + "singularName": "endpointslice", + "namespaced": true, + "kind": "EndpointSlice", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + } + ] + } + }, + { + "Group": { + "name": "flowcontrol.apiserver.k8s.io", + "versions": [ + { + "groupVersion": "flowcontrol.apiserver.k8s.io/v1", + "version": "v1" + }, + { + "groupVersion": "flowcontrol.apiserver.k8s.io/v1beta3", + "version": "v1beta3" + } + ], + "preferredVersion": { + "groupVersion": "flowcontrol.apiserver.k8s.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "flowschemas", + "singularName": "flowschema", + "namespaced": false, + "kind": "FlowSchema", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "flowschemas/status", + "singularName": "flowschema", + "namespaced": false, + "kind": "FlowSchema", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "prioritylevelconfigurations", + "singularName": "prioritylevelconfiguration", + "namespaced": false, + "kind": "PriorityLevelConfiguration", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "prioritylevelconfigurations/status", + "singularName": "prioritylevelconfiguration", + "namespaced": false, + "kind": "PriorityLevelConfiguration", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v1beta3": [ + { + "name": "flowschemas", + "singularName": "flowschema", + "namespaced": false, + "kind": "FlowSchema", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "flowschemas/status", + "singularName": "flowschema", + "namespaced": false, + "kind": "FlowSchema", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "prioritylevelconfigurations", + "singularName": "prioritylevelconfiguration", + "namespaced": false, + "kind": "PriorityLevelConfiguration", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, + { + "name": "prioritylevelconfigurations/status", + "singularName": "prioritylevelconfiguration", + "namespaced": false, + "kind": "PriorityLevelConfiguration", + "verbs": [ + "get", + "patch", + "update" + ] + } + ] + } + }, + { + "Group": { + "name": "kyverno.io", + "versions": [ + { + "groupVersion": "kyverno.io/v2", + "version": "v2" + }, + { + "groupVersion": "kyverno.io/v1", + "version": "v1" + }, + { + "groupVersion": "kyverno.io/v2beta1", + "version": "v2beta1" + }, + { + "groupVersion": "kyverno.io/v1beta1", + "version": "v1beta1" + }, + { + "groupVersion": "kyverno.io/v2alpha1", + "version": "v2alpha1" + } + ], + "preferredVersion": { + "groupVersion": "kyverno.io/v2", + "version": "v2" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "clusterpolicies", + "singularName": "clusterpolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v1", + "kind": "ClusterPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "clusterpolicies/status", + "singularName": "clusterpolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v1", + "kind": "ClusterPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "policies", + "singularName": "policy", + "namespaced": true, + "group": "kyverno.io", + "version": "v1", + "kind": "Policy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "pol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "policies/status", + "singularName": "policy", + "namespaced": true, + "group": "kyverno.io", + "version": "v1", + "kind": "Policy", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v1beta1": [ + { + "name": "updaterequests", + "singularName": "updaterequest", + "namespaced": true, + "group": "kyverno.io", + "version": "v1beta1", + "kind": "UpdateRequest", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "ur" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "updaterequests/status", + "singularName": "updaterequest", + "namespaced": true, + "group": "kyverno.io", + "version": "v1beta1", + "kind": "UpdateRequest", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v2": [ + { + "name": "cleanuppolicies", + "singularName": "cleanuppolicy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2", + "kind": "CleanupPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cleanpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "cleanuppolicies/status", + "singularName": "cleanuppolicy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2", + "kind": "CleanupPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "clustercleanuppolicies", + "singularName": "clustercleanuppolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2", + "kind": "ClusterCleanupPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "ccleanpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "clustercleanuppolicies/status", + "singularName": "clustercleanuppolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2", + "kind": "ClusterCleanupPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "policyexceptions", + "singularName": "policyexception", + "namespaced": true, + "group": "kyverno.io", + "version": "v2", + "kind": "PolicyException", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "polex" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "updaterequests", + "singularName": "updaterequest", + "namespaced": true, + "group": "kyverno.io", + "version": "v2", + "kind": "UpdateRequest", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "ur" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "updaterequests/status", + "singularName": "updaterequest", + "namespaced": true, + "group": "kyverno.io", + "version": "v2", + "kind": "UpdateRequest", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v2alpha1": [ + { + "name": "globalcontextentries", + "singularName": "globalcontextentry", + "namespaced": false, + "group": "kyverno.io", + "version": "v2alpha1", + "kind": "GlobalContextEntry", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "gctxentry" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "globalcontextentries/status", + "singularName": "globalcontextentry", + "namespaced": false, + "group": "kyverno.io", + "version": "v2alpha1", + "kind": "GlobalContextEntry", + "verbs": [ + "get", + "patch", + "update" + ] + } + ], + "v2beta1": [ + { + "name": "cleanuppolicies", + "singularName": "cleanuppolicy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "CleanupPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cleanpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "cleanuppolicies/status", + "singularName": "cleanuppolicy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "CleanupPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "clustercleanuppolicies", + "singularName": "clustercleanuppolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "ClusterCleanupPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "ccleanpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "clustercleanuppolicies/status", + "singularName": "clustercleanuppolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "ClusterCleanupPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "clusterpolicies", + "singularName": "clusterpolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "ClusterPolicy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cpol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "clusterpolicies/status", + "singularName": "clusterpolicy", + "namespaced": false, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "ClusterPolicy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "policies", + "singularName": "policy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "Policy", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "pol" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "policies/status", + "singularName": "policy", + "namespaced": true, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "Policy", + "verbs": [ + "get", + "patch", + "update" + ] + }, + { + "name": "policyexceptions", + "singularName": "policyexception", + "namespaced": true, + "group": "kyverno.io", + "version": "v2beta1", + "kind": "PolicyException", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "polex" + ], + "categories": [ + "kyverno" + ] + } + ] + } + }, + { + "Group": { + "name": "policies.kyverno.io", + "versions": [ + { + "groupVersion": "policies.kyverno.io/v1alpha1", + "version": "v1alpha1" + } + ], + "preferredVersion": { + "groupVersion": "policies.kyverno.io/v1alpha1", + "version": "v1alpha1" + } + }, + "VersionedResources": { + "v1alpha1": [ + { + "name": "celpolicyexceptions", + "singularName": "celpolicyexception", + "namespaced": true, + "group": "policies.kyverno.io", + "version": "v1alpha1", + "kind": "CELPolicyException", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ] + } + ] + } + }, + { + "Group": { + "name": "reports.kyverno.io", + "versions": [ + { + "groupVersion": "reports.kyverno.io/v1", + "version": "v1" + } + ], + "preferredVersion": { + "groupVersion": "reports.kyverno.io/v1", + "version": "v1" + } + }, + "VersionedResources": { + "v1": [ + { + "name": "clusterephemeralreports", + "singularName": "clusterephemeralreport", + "namespaced": false, + "group": "reports.kyverno.io", + "version": "v1", + "kind": "ClusterEphemeralReport", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cephr" + ], + "categories": [ + "kyverno" + ] + }, + { + "name": "ephemeralreports", + "singularName": "ephemeralreport", + "namespaced": true, + "group": "reports.kyverno.io", + "version": "v1", + "kind": "EphemeralReport", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "ephr" + ], + "categories": [ + "kyverno" + ] + } + ] + } + }, + { + "Group": { + "name": "wgpolicyk8s.io", + "versions": [ + { + "groupVersion": "wgpolicyk8s.io/v1alpha2", + "version": "v1alpha2" + } + ], + "preferredVersion": { + "groupVersion": "wgpolicyk8s.io/v1alpha2", + "version": "v1alpha2" + } + }, + "VersionedResources": { + "v1alpha2": [ + { + "name": "clusterpolicyreports", + "singularName": "clusterpolicyreport", + "namespaced": false, + "group": "wgpolicyk8s.io", + "version": "v1alpha2", + "kind": "ClusterPolicyReport", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "cpolr" + ] + }, + { + "name": "policyreports", + "singularName": "policyreport", + "namespaced": true, + "group": "wgpolicyk8s.io", + "version": "v1alpha2", + "kind": "PolicyReport", + "verbs": [ + "delete", + "deletecollection", + "get", + "list", + "patch", + "create", + "update", + "watch" + ], + "shortNames": [ + "polr" + ] + } + ] + } + } +] diff --git a/hack/api-group-resources/go.mod b/hack/api-group-resources/go.mod new file mode 100644 index 0000000000..39bf8429ec --- /dev/null +++ b/hack/api-group-resources/go.mod @@ -0,0 +1,51 @@ +module github.com/kyverno/kyverno/hack/api-group-resources + +go 1.22.4 + +require k8s.io/client-go v0.31.4 + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/onsi/ginkgo/v2 v2.20.1 // indirect + github.com/onsi/gomega v1.34.2 // indirect + github.com/spf13/pflag v1.0.6 // indirect + github.com/x448/float16 v0.8.4 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/term v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.29.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.31.4 // indirect + k8s.io/apimachinery v0.31.4 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/utils v0.0.0-20240821151609-f90d01438635 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) diff --git a/hack/api-group-resources/go.sum b/hack/api-group-resources/go.sum new file mode 100644 index 0000000000..6f0a0e502b --- /dev/null +++ b/hack/api-group-resources/go.sum @@ -0,0 +1,154 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= +github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.31.4 h1:I2QNzitPVsPeLQvexMEsj945QumYraqv9m74isPDKhM= +k8s.io/api v0.31.4/go.mod h1:d+7vgXLvmcdT1BCo79VEgJxHHryww3V5np2OYTr6jdw= +k8s.io/apimachinery v0.31.4 h1:8xjE2C4CzhYVm9DGf60yohpNUh5AEBnPxCryPBECmlM= +k8s.io/apimachinery v0.31.4/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.4 h1:t4QEXt4jgHIkKKlx06+W3+1JOwAFU/2OPiOo7H92eRQ= +k8s.io/client-go v0.31.4/go.mod h1:kvuMro4sFYIa8sulL5Gi5GFqUPvfH2O/dXuKstbaaeg= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240821151609-f90d01438635 h1:2wThSvJoW/Ncn9TmQEYXRnevZXi2duqHWf5OX9S3zjI= +k8s.io/utils v0.0.0-20240821151609-f90d01438635/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/api-group-resources/main.go b/hack/api-group-resources/main.go new file mode 100644 index 0000000000..df99adcc51 --- /dev/null +++ b/hack/api-group-resources/main.go @@ -0,0 +1,41 @@ +package main + +import ( + "encoding/json" + "flag" + "fmt" + "path/filepath" + + // "k8s.io/apimachinery/pkg/util/json" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/restmapper" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" +) + +func main() { + var kubeconfig *string + if home := homedir.HomeDir(); home != "" { + kubeconfig = flag.String("kubeconfig", filepath.Join(home, ".kube", "config"), "(optional) absolute path to the kubeconfig file") + } else { + kubeconfig = flag.String("kubeconfig", "", "absolute path to the kubeconfig file") + } + flag.Parse() + + // use the current context in kubeconfig + config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig) + if err != nil { + panic(err.Error()) + } + + client := kubernetes.NewForConfigOrDie(config) + groupResources, err := restmapper.GetAPIGroupResources(client.Discovery()) + if err != nil { + panic(err) + } + bytes, err := json.MarshalIndent(groupResources, "", " ") + if err != nil { + panic(err) + } + fmt.Println(string(bytes)) +}