From a73babe7fd7a8e707d9d9667ad2cbbaafc1b0d1a Mon Sep 17 00:00:00 2001 From: Ismail Alidzhikov Date: Mon, 11 Sep 2023 14:18:00 +0300 Subject: [PATCH] Improve the skaffold setup of the extension. Fix `make extension-down` (#40) * This PR improves the skaffold setup of the extension The change incorporates the changes from https://github.com/gardener/gardener/pull/7757 and https://github.com/gardener/gardener-extension-shoot-rsyslog-relp/pull/5. It simplifies the skaffold setup and drops the ControllerRegistration chart (`./charts/registration`). The `make extension-up` target is now fixed and invoked by the `make ci-e2e-kind` target now. * Add docs * Drop the `make start`, `make start-admission` and `make debug-admission` targets Dropping these targets makes sense because: - similar to gardener we have skaffold setup and gardener dropped `make start-*` targets - some of these targets were already outdated, hence, it means that they are not used - the setup required for these targets is not easy (compared to the skaffold setup), or at least not documented We already have the skaffold-based local setup. --- Makefile | 64 -------------- .../charts/runtime/templates/deployment.yaml | 1 + .../gardener-extension-registry-cache/doc.go | 5 +- .../templates/_helpers.tpl | 8 -- .../templates/deployment.yaml | 4 +- .../values.yaml | 6 +- charts/registration/Chart.yaml | 5 -- .../templates/controller-registration.yaml | 25 ------ charts/registration/values.yaml | 1 - docs/development/getting-started-locally.md | 35 ++++++++ example/00-config.yaml | 3 - .../40-validatingwebhookconfiguration.yaml | 30 ------- example/admission/tls.crt | 26 ------ example/admission/tls.key | 27 ------ example/controller-registration.yaml | 24 ++++++ .../registration/controller-registration.yaml | 25 ------ example/registration/kustomization.yaml | 9 -- example/registration/patch-deployment.yaml | 9 -- example/registration/patch-registration.yaml | 7 -- hack/ci-e2e-kind.sh | 3 +- hack/dev-setup-admission-registry-cache.sh | 85 ------------------- skaffold-admission.yaml | 23 ----- skaffold.yaml | 38 +++++++-- 23 files changed, 96 insertions(+), 367 deletions(-) delete mode 100644 charts/registration/Chart.yaml delete mode 100644 charts/registration/templates/controller-registration.yaml delete mode 100644 charts/registration/values.yaml create mode 100644 docs/development/getting-started-locally.md delete mode 100644 example/00-config.yaml delete mode 100644 example/40-validatingwebhookconfiguration.yaml delete mode 100644 example/admission/tls.crt delete mode 100644 example/admission/tls.key create mode 100644 example/controller-registration.yaml delete mode 100644 example/registration/controller-registration.yaml delete mode 100644 example/registration/kustomization.yaml delete mode 100644 example/registration/patch-deployment.yaml delete mode 100644 example/registration/patch-registration.yaml delete mode 100755 hack/dev-setup-admission-registry-cache.sh delete mode 100644 skaffold-admission.yaml diff --git a/Makefile b/Makefile index 0a4458a5..099d4b4c 100644 --- a/Makefile +++ b/Makefile @@ -20,22 +20,9 @@ REPO_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_ HACK_DIR := $(REPO_ROOT)/hack VERSION := $(shell cat "$(REPO_ROOT)/VERSION") LD_FLAGS := "-w -X github.com/gardener/$(EXTENSION_PREFIX)-$(NAME)/pkg/version.Version=$(IMAGE_TAG)" -LEADER_ELECTION := false -IGNORE_OPERATION_ANNOTATION := true PARALLEL_E2E_TESTS := 2 -WEBHOOK_CONFIG_PORT := 8444 -WEBHOOK_CONFIG_MODE := url -WEBHOOK_CONFIG_URL := host.docker.internal:${WEBHOOK_CONFIG_PORT} -WEBHOOK_CERT_DIR := ./example/admission -EXTENSION_NAMESPACE := - -WEBHOOK_PARAM := --webhook-config-url=${WEBHOOK_CONFIG_URL} -ifeq (${WEBHOOK_CONFIG_MODE}, service) - WEBHOOK_PARAM := --webhook-config-namespace=${EXTENSION_NAMESPACE} -endif - ######################################### # Tools # ######################################### @@ -43,44 +30,6 @@ endif TOOLS_DIR := hack/tools include $(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/tools.mk -######################################### -# Rules for local development scenarios # -######################################### - -.PHONY: start -start: - @LEADER_ELECTION_NAMESPACE=garden GO111MODULE=on go run \ - -mod=vendor \ - -ldflags $(LD_FLAGS) \ - ./cmd/$(EXTENSION_PREFIX)-$(NAME) \ - --ignore-operation-annotation=$(IGNORE_OPERATION_ANNOTATION) \ - --leader-election=$(LEADER_ELECTION) \ - --config=./example/00-config.yaml \ - --gardener-version="v1.39.0" - - -.PHONY: start-admission -start-admission: - @LEADER_ELECTION_NAMESPACE=garden GO111MODULE=on go run \ - -mod=vendor \ - -ldflags ${LD_FLAGS} \ - ./cmd/${EXTENSION_PREFIX}-${ADMISSION_NAME} \ - --kubeconfig=dev/garden-kubeconfig.yaml \ - --webhook-config-server-host=0.0.0.0 \ - --webhook-config-server-port=9443 \ - --webhook-config-cert-dir=${WEBHOOK_CERT_DIR} - -.PHONY: debug-admission -debug-admission: - LEADER_ELECTION_NAMESPACE=garden dlv debug \ - ./cmd/${EXTENSION_PREFIX}-${ADMISSION_NAME} -- \ - --leader-election=${LEADER_ELECTION} \ - --kubeconfig=dev/garden-kubeconfig.yaml \ - --webhook-config-server-host=0.0.0.0 \ - --webhook-config-server-port=9443 \ - --health-bind-address=:8085 \ - --webhook-config-cert-dir=${WEBHOOK_CERT_DIR} - ################################################################# # Rules related to binary build, Docker image build and release # ################################################################# @@ -177,16 +126,3 @@ extension-dev: $(SKAFFOLD) $(HELM) extension-down: $(SKAFFOLD) $(HELM) $(SKAFFOLD) delete - -# use static label for skaffold to prevent rolling all gardener components on every `skaffold` invocation -admission-up admission-down: export SKAFFOLD_LABEL = skaffold.dev/run-id=admission-local -admission-%: export SKAFFOLD_FILENAME = skaffold-admission.yaml - -admission-up: $(SKAFFOLD) $(KIND) $(HELM) - $(SKAFFOLD) run - -admission-dev: $(SKAFFOLD) $(HELM) - $(SKAFFOLD) dev --cleanup=false --trigger=manual - -admission-down: $(SKAFFOLD) $(HELM) - $(SKAFFOLD) delete diff --git a/charts/admission/charts/runtime/templates/deployment.yaml b/charts/admission/charts/runtime/templates/deployment.yaml index 7e25d1ad..9e5cfc0b 100644 --- a/charts/admission/charts/runtime/templates/deployment.yaml +++ b/charts/admission/charts/runtime/templates/deployment.yaml @@ -23,6 +23,7 @@ spec: # TODO(ialidzhikov): Double check whether we need these NetworkPolicy labels. networking.gardener.cloud/to-dns: allowed networking.resources.gardener.cloud/to-virtual-garden-kube-apiserver-tcp-443: allowed + networking.gardener.cloud/to-runtime-apiserver: allowed {{ include "labels" . | indent 8 }} spec: {{- if not .Values.global.virtualGarden.enabled }} diff --git a/charts/gardener-extension-registry-cache/doc.go b/charts/gardener-extension-registry-cache/doc.go index fc8c4af5..fb990747 100644 --- a/charts/gardener-extension-registry-cache/doc.go +++ b/charts/gardener-extension-registry-cache/doc.go @@ -12,10 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate sh -c "../../vendor/github.com/gardener/gardener/hack/generate-controller-registration.sh extension-registry-cache . $(cat ../../VERSION) ../../example/registration/controller-registration.yaml Extension:registry-cache" -//go:generate cp ../../example/registration/controller-registration.yaml ../../charts/registration/templates/controller-registration.yaml -//go:generate sh -c "sed -i 's/ image:/{{ toYaml .Values.values | indent 4 }}/g' ../../charts/registration/templates/controller-registration.yaml" -//go:generate sh -c "sed -i 's/ tag: .*//g' ../../charts/registration/templates/controller-registration.yaml" +//go:generate sh -c "../../vendor/github.com/gardener/gardener/hack/generate-controller-registration.sh extension-registry-cache . $(cat ../../VERSION) ../../example/controller-registration.yaml Extension:registry-cache" // Package chart enables go:generate support for generating the correct controller registration. package chart diff --git a/charts/gardener-extension-registry-cache/templates/_helpers.tpl b/charts/gardener-extension-registry-cache/templates/_helpers.tpl index 4be46364..bef67c54 100644 --- a/charts/gardener-extension-registry-cache/templates/_helpers.tpl +++ b/charts/gardener-extension-registry-cache/templates/_helpers.tpl @@ -7,14 +7,6 @@ apiVersion: config.registry.extensions.gardener.cloud/v1alpha1 kind: Configuration {{- end }} -{{- define "image" -}} - {{- if hasPrefix "sha256:" .Values.image.tag }} - {{- printf "%s@%s" .Values.image.repository .Values.image.tag }} - {{- else }} - {{- printf "%s:%s" .Values.image.repository .Values.image.tag }} - {{- end }} -{{- end }} - {{- define "leaderelectionid" -}} extension-registry-cache-leader-election {{- end -}} diff --git a/charts/gardener-extension-registry-cache/templates/deployment.yaml b/charts/gardener-extension-registry-cache/templates/deployment.yaml index 5d1a7648..34b2e7f1 100644 --- a/charts/gardener-extension-registry-cache/templates/deployment.yaml +++ b/charts/gardener-extension-registry-cache/templates/deployment.yaml @@ -39,8 +39,8 @@ spec: serviceAccountName: gardener-extension-registry-cache containers: - name: gardener-extension-registry-cache - image: {{ include "image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: {{ .Values.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} args: - --config=/etc/registry-cache/config.yaml - --max-concurrent-reconciles={{ .Values.controllers.concurrentSyncs }} diff --git a/charts/gardener-extension-registry-cache/values.yaml b/charts/gardener-extension-registry-cache/values.yaml index da64482e..ef6ba447 100644 --- a/charts/gardener-extension-registry-cache/values.yaml +++ b/charts/gardener-extension-registry-cache/values.yaml @@ -1,7 +1,5 @@ -image: - repository: eu.gcr.io/gardener-project/gardener/extensions/registry-cache - tag: latest - pullPolicy: IfNotPresent +image: eu.gcr.io/gardener-project/gardener/extensions/registry-cache:latest +imagePullPolicy: IfNotPresent leaderElection: resourceLock: leases diff --git a/charts/registration/Chart.yaml b/charts/registration/Chart.yaml deleted file mode 100644 index 5713e5b4..00000000 --- a/charts/registration/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for the Gardener registry cache extension registration -name: gardener-extension-registry-cache-registration -version: 0.1.0 diff --git a/charts/registration/templates/controller-registration.yaml b/charts/registration/templates/controller-registration.yaml deleted file mode 100644 index 413d91e7..00000000 --- a/charts/registration/templates/controller-registration.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerDeployment -metadata: - name: extension-registry-cache -type: helm -providerConfig: - chart: H4sIAAAAAAAAA+0c/W/bNnY/66/gqTe0HSrJdhy3p0OB85LcFlybGHHWYTgMBS3RthZZ1JGSM6/r/e33+CGZkr+TLLlieghimyIfH9/j++AjqQlmIUkIc8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4io15qwOW564WDcZ7oT/4SbQFxb/FAk4dUhOhzXng5X02+OmBcvdtgNOWxUbHrqO7HdlU3DdTnd1o62yq7Nlk28F9c4zAKsbemrGHrQ/+NRuq4EHgjvEf1itEvYPA3fe/+jU479uu9dr4r/HgPoavR4DFkvCL2Pf51F8FazIqdyzr7Lomt4QYOAYx5x8OfbxEP2fp/hO74Hbof/tTruu/+3XR91G/x8DapGNELGKasLarS8x63kAoT3EsvWsHVTKIng2oGFfV4Pw5A4mw4H+9zQbRcS4ZgBFqG2e/K2WKVtjHI2Cwsg8MlM+Uoefn3/z3CoOlMyipK/CdPOIygzWI0wdQS7fz2RvJspdYnFVU7EGKlraW4azpmX9ZQFFRFeeLFx3wUeUr1zyWR622cd0qnSvyVFVos7aGJGkGIVZ2V3Wq73c4KnV4U8Hu+2/eg3TfV4Ausv+947q539a3ePm/X+PAuqqhTSQxetIfERydxIwYeLL6aFfebt8HZqxs7xiGOSrs2TMIExKatzQOB9f0Gwg3hcI1saqnp/3DTMtjtD7xe6VZV55E4dyrOUuF/r02bKeIU4ysbnM5Zuz9Or6FSLuxEW8WJ6PFkjmaZZXlixdU/RcXcuXZyyfFQcIC6zCUqVU3PWSbwVcvvNL3QuyiiX5m9ablmWB5VsiDw2sq/7o2YpveVbxLO3Om/fRTqtrCwdsW9by2LEkBXhmXKbQL2Awr6OoI8YbL1kUca0IsfXen6+uh6y7O+KjoxayrEoCwbfKe0WKqm73SBcVZ5Pbrc6xFK6aTst2uqT00A5yXdeyVq+c+OjfP4vpsO5MqriwLTiqjrH71jPt6pW/KzrVxUCYFM+VoRXG2wHLNySKV8CZP8rmpjqt4Jb6YXfcN24bRFWolK82U/XLd+3GFzbQQAMNNNBAAw000EADDTTQQAMNNNBAAw000EADd4P/AXifyUQAeAAA - values: -{{ toYaml .Values.values | indent 4 }} - ---- -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerRegistration -metadata: - name: extension-registry-cache - annotations: - security.gardener.cloud/pod-security-enforce: baseline -spec: - deployment: - deploymentRefs: - - name: extension-registry-cache - resources: - - kind: Extension - type: registry-cache diff --git a/charts/registration/values.yaml b/charts/registration/values.yaml deleted file mode 100644 index d6212f29..00000000 --- a/charts/registration/values.yaml +++ /dev/null @@ -1 +0,0 @@ -values: {} diff --git a/docs/development/getting-started-locally.md b/docs/development/getting-started-locally.md new file mode 100644 index 00000000..780580ca --- /dev/null +++ b/docs/development/getting-started-locally.md @@ -0,0 +1,35 @@ +# Deploying Registry Cache Extension Locally + +## Prerequisites + +- Make sure that you have a running local Gardener setup. The steps to complete this can be found in the [Deploying Gardener Locally guide](https://github.com/gardener/gardener/blob/master/docs/deployment/getting_started_locally.md). + +## Setting up the Registry Cache Extension + +Make sure that your `KUBECONFIG` environment variable is targeting the local Gardener cluster. When this is ensured, run: + +```bash +make extension-up +``` + +The corresponding make target will build the extension image, load it into the kind cluster Nodes, and deploy the registry-cache ControllerDeployment and ControllerRegistration resources. The container image in the ControllerDeployment will be the image that was build and loaded into the kind cluster Nodes. + +The make target will then deploy then registry-cache admission component. It will build the admission image, load it into the kind cluster Nodes, and finally install the admission component charts to the kind cluster. + +## Creating a `Shoot` Cluster + +Once the above step is completed you can create a Shoot cluster. Review the Shoot specification in [`example/shoot.yaml`](../../example/shoot.yaml). Create the Shoot: + +```bash +kubectl create -f example/shoot.yaml +``` + +## Tearing Down the Dev Environment + +To tear down the development environment delete the Shoot cluster or disable the `registry-cache` extension in the Shoot's specification. When the extension is not used by the Shoot anymore, you can run: + +```bash +make extension-down +``` + +The make target will delete the ControllerDeployment and ControllerRegistration of the extension, and the registry-cache admission helm deployment. diff --git a/example/00-config.yaml b/example/00-config.yaml deleted file mode 100644 index 92966768..00000000 --- a/example/00-config.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -apiVersion: config.registry.extensions.gardener.cloud/v1alpha1 -kind: Configuration diff --git a/example/40-validatingwebhookconfiguration.yaml b/example/40-validatingwebhookconfiguration.yaml deleted file mode 100644 index af357691..00000000 --- a/example/40-validatingwebhookconfiguration.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: gardener-extension-registry-cache-admission -webhooks: -- name: validation.registry.cache.extension.gardener.cloud - rules: - - apiGroups: - - "core.gardener.cloud" - apiVersions: - - v1alpha1 - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - shoots - failurePolicy: Fail - # Please make sure you are running `gardener@v1.42` or later before enabling this object selector. - objectSelector: - matchLabels: - extensions.extensions.gardener.cloud/registry-cache: "true" - namespaceSelector: {} - sideEffects: None - admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - url: "https://host.docker.internal:9443/webhooks/validate" - caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMrakNDQWVLZ0F3SUJBZ0lRRmtkOUZJWUFiV2tXQUtTRjY5bW5ZVEFOQmdrcWhraUc5dzBCQVFzRkFEQVgKTVJVd0V3WURWUVFERXd4bllYSmtaVzVsY2kxa1pYWXdIaGNOTWpJd09USTNNVE15T1RJMVdoY05Nekl3T1RJMApNVE15T1RJMVdqQVhNUlV3RXdZRFZRUURFd3huWVhKa1pXNWxjaTFrWlhZd2dnRWlNQTBHQ1NxR1NJYjNEUUVCCkFRVUFBNElCRHdBd2dnRUtBb0lCQVFER0JrNkdtMCtFVEg5WlFlanlYa2RGMUViU2VmTGxBaENLZTRWbk9SWUEKakgwTFlrRDZMYis3VDc3Y2piTHFBbDJZQU1JTzVVd0NlR0NXdnZIWHA1RHkxV1k2eW9EVHZxT2JtZFV2WXEzawpPTU1qRnQyTkl4dVRQNFVFcDlpemxQUWhuUml4bms4N0pDajRocS9VZUIyVkxtUm1uVVQyWU5md3NCcXlMbmZSCks4NTNKNXZ3ZWNFU1hVdlgxbmZLb1dFemFMWmVqbndsc3JHaEppNCtTZ0hPMWtmZVdxaEhtdFJUek8wa0UybnEKQWExUmZRMFhVMVYxR0tlUHJUQjBWQ01yS2F4bmNqaC9IY3NWOXhDZ1RRd3ZVdGJYQmo0ek9QYmRReVh4L3RuKwpNTmpTUU5mVzdRbWRkK1ZiUnhaMDZjMmM0YzYwcSt2ZkR6eWlKVnlSc2pBbEFnTUJBQUdqUWpCQU1BNEdBMVVkCkR3RUIvd1FFQXdJQ3BEQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUVU0MHlHVkxBYnNHMjAKWG5pRkZQTWpYa2Q1cERBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQUNaL0ovWVVNejY3d0M2SitzUk1HOS9YNwpxejQ5TXJkdmQ4MGpkZUlPYXYwR2U0bzlCSEFSODZMb053bzdaK0xuRG1NWXJIK3dyaklObDBMdE4yQURtR1BxCmZDbndlR3c2NmUvdmJ3WVRBRmlwREZlUDFwenNQcEJWbGtsSTdFRStIcmRWUTNDSUljeFhwdHpGaVJpNXRhMDQKa252SmNrQTVPeFRQQ2I5dG9hV21MdDVDVk5Id0RiTko3Q1NXK3RBT0pLcGZaTEtxd1lqOXlGWXhhcE5COVU4Ygpwek56WGhGUkJZUVpXT3ZNbGxrdzBxa09TV0Q5Ri9LQVdlVWNUeDk0NFkrTEErL1RxS1NVY2JKSHVmc0luL1RqClFyb3hMVXA5djRiencwZVZnZmhjZExhdXFwaEZ3WVZuaXp2ZWJLNmdUYVZiTmFETmlWZXlhY0dMQi9TSXlnPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ== diff --git a/example/admission/tls.crt b/example/admission/tls.crt deleted file mode 100644 index 12668176..00000000 --- a/example/admission/tls.crt +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEUjCCAzqgAwIBAgIQTbMH1D2iQzqVtcTsmg8ZaTANBgkqhkiG9w0BAQsFADAX -MRUwEwYDVQQDEwxnYXJkZW5lci1kZXYwHhcNMjIwOTI3MTMzMDE5WhcNMzIwOTI0 -MTMzMDE5WjAUMRIw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f4PZuUejMGovgFTEAMfvgJmEaFLfLqMD -yphypP5EmpM52dy08p45r85vUJpvRy4b8XTdl6ZGmhdorWaOfw9+HB6UgKmKB43t -oZkrJQI1BsvP/tiRAVYFrD792uRavm1fbmFErvakotN/gtH4eT9RsXI6q3iPnN34 -/VNid37lqQV0amEDNS/izIRcgXrqy6yZSMVHxUE8EYSeQujRAcBO5nBJ6SRLgRnd -8ffccD8IM2syxm0Ld/0dxOmIzjSWrfrumdry1RveOX31x8MTHhRzuptUgPHd4PQ1 -ePZ8nPE+ ------END CERTIFICATE----- \ No newline at end of file diff --git a/example/admission/tls.key b/example/admission/tls.key deleted file mode 100644 index 4dff97d5..00000000 --- a/example/admission/tls.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAxV0hHr6NmAegH0Lw29wzi7lCfa4Sg3zv4e8rGRN6cWfMJA3U -12JCrLU7ONN+bN9RCfeinVqCWjqq3dDB2ZOEnHkXfYaSD8SbxCHOR/XytrII2yEK -cGmDDqGgcslNQj+zsV3O/RZ2I5dB0/dBPzCuRfuNGs2TcCdK8jOuUrzdnhVYRPPS -+Eq/nabHWphmlinn+X56af80Px9oMMKIIHziuUjILqKcp12uuaW+owd4XsggAJ80 -QjoReXAk01yvrfeXLtD9BJMOqCJcLw+0hee5ksYeZcfeidc1arwndugkIU5ZTYNT -/3GVEbI4PHFECvbNYJqPumnRLWhqP0SW5y5TMwIDAQABAoIBAB+oIHfd+Lg6AOUC -x798QohW3uNp2G5ey9thkXgkN6+ZBpWB4nHpwOgS6bzjr5Om/kiq/9pdeise3elW -YsGTd+HhSnNH8oW084cyJPRF7vh+9gyv8Ay3392o7yN6Rnop3ZjFgz31LF3pFRX6 -wuxv0oRHJQr3jn6eztaqk3uR77o7Sh+0lxEnmYHhHbYLboD3g0dyd5R7QgI6GT6I -0MWL7actRJx2atJk+4SsnoMfXfTqcje14INPB91BRZkb75Vk6UvPR/hUIJkJC3Wm -vNWjwu+Q0MD5YQKr7jcyaix90Vjk4LUxvcsNQxHTEKh3jhf4hHwNOmRQ77oKvw4i -Ih0deIECgYEA3cUWxie0g4pTuoASuniCu2yDCWqauYKChQ5n63duSFbBjJGE+mjl -Hjb9hZtxfFDeOHJyhnKlRpKBb7QgrMKeCZN4kbH0uZeXlsSFMBM4SxteN+hZvIvk -+3Vc8g1ItD3i81ml7BfWTai9dn9tkoy5cxPKLXbWpz22/ZY67tMkgU8CgYEA49Or -Zktb6swmQBzt/NxvWcaCrHHhZiWGAhiQAsneNWPSJfIuNhit/1NPsdPQZ+IReZ8f -OwezsUaQV74smnX0qmxg5kRL5hVfaRnUfYXDfAXtJyDWHviQytUD/0cjlL3cjXOc -QvdQH0xcu5zc9U3DFseDE4Re2i4r8VCO6SsJrt0CgYEAiTrubswfDc7JJP0fmbf8 -3dG1/Fu1RtoVvhQ+Bh0vZyAYQM3Dhdjm/p10n/qibRT1jeR0LfI/h74czmyeU4lS -lgZlc3K1RyshKLCO4kLicMeMs/fZn6zJkzj6vOWvealaCNAOtlvBxuiF5Q/RVAA0 -uZsjXqLNDUxJMf6GlUaerk0CgYBST+F3PfbhqAyR0WHyn7njV6NSpnpnK1t1WmZ9 -e227IGuGpi8oAFatDu6WMw7y2Wyy4lioPSog/HueF+mJjOBuymVgDIDXihVEpb5t -82wjXQjHwEdcPTYi8j9VdeBXFxmeSYzFbREXncFLT2tNfWDk1AR5grO6ZEAgGZjo -iVIgSQKBgQCQd+27REdF+BRcIyJWQRbAKc0u7osObKdtnULvokTkCozRD3BI4eKk -PLCd1OqUZOrtM17HXw0fB5Cs3CMnUxNkVSwURZ1keso+/avzF1ZG8w0kzl3JP6PY -T5jXLPiMTOQwgnJ2e+DufN/h1KOS0aM1BkbByaaxsMP27VoqIN3Few== ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/example/controller-registration.yaml b/example/controller-registration.yaml new file mode 100644 index 00000000..e2c11fc7 --- /dev/null +++ b/example/controller-registration.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: core.gardener.cloud/v1beta1 +kind: ControllerDeployment +metadata: + name: extension-registry-cache +type: helm +providerConfig: + chart: H4sIAAAAAAAAA+0ca2/bOLKf9St4zgFtF5H8iOP0fChw3iTbBtcmRpzNYrFYFLRE29rIoo6UnHrb3m+/4UMyJdmxnWSdy64GgWNT5HA4w3lwSGqMmUdCwmzyOSYh92loMzL2eczmtovdCam/eDA0AI4OD+V/gOJ/+b150G62Dludjihvdlqdgxfo8OFdr4eEx5gh9IJRGt9Vb93zZwrjtfJ3JiSY+uOQMnLPPoSAO+32SvmD2PPybzXarcYL1HjUka6Av7j891AfxzFhIUcxRUrM6HZCQjRM/MDzwzGKsHuDx4Q71h66mvgc8SSKKIvhC0yNAI0DOkRTHLsTqL2PGAlw7M8ItIsnRjkOPUAQkjE8pSF6FTEy8j8TD936UO9vrx10EQZzREPZUpCEIsJQ4IfEsZyTwadBDLQBimM6nQKC6+MB8nzGLWfsx3X5qci3nOHvrC4/04LJuC4+0p98FtYXiIYwviRCIz8g3PrO4bcRfA7xDXzGU/j+X6h6jZlPE47OTk6hw4jR34gbW47vEVxX9aDIcmbcpR6pW08t1c1hvf4fTzCLnTmeBvftY53+tw4Oi/rfalb6vxPAkX9NmJB7F82aFo6i7Get6TRqlke4y/wolkU99B6cAXLFlEAjylA8IeidnkLoUk8cdCwmDspmlGOFeEq6aO1cs2Zp3w0HOn9GavRsYb3+e9R1xvQhfazR/1bjqBj/HR0cdir93wXU6+AGozl4ykmMXrmvEdjeFhr0+mhwikDBcSh/4BG4Rx/HBLl0GuFw7qAeuH7ZjIPL54TNiOeo+EB4UgT/A9+FKQUePgk9omxFL5KmYUBH8S2GSOODqrKPZg5qgcVwSRQjzFFIY2hHoQm79TlgC2XzD2fHp+dAmOjBqtfhL8WwpJMMt7ZoqOU00CtRoaYf1V7/U6CY0wTilLnoFCXQWZwNQhMEvYthAwNCl6h4JV504AgcP2scdBhjqI6hQQS/RmZFhGNNtIRJHEf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4mr1JhdHrY8cbFsMtwL/+NNoGcW/6QJOHVIToc1Z/1S+m23acFsy22L01bproeuI/st7Qwu2+7O77bltnbu2OkroV57EKC8q6dm7FabhE/ttip4JLhH/IfVKmHzMHDt/Y9WMf5rNzvV+z92AsU1ejEGTJeEz2PfZye+ClbkVG7c51l0RW8IMHCEA06ej33cRv9nEb7Xe8DW6H+z1Szqf/Oouv+xGyhENkLEKqrxCre+xKznLoT2EMsWs3ZQKfbhWZ96PV0NwpN7mAwb+t/QbKQR45IBpKG2efw3X6ZsjXE+Cgp989xM9kgdfn753UsrPVUy9cOeCtPNcypTWI8wdQw5ez9PbTVRzgKLo5qKNVDasnbHcJa0lAPMBYwqosuOFy674CPKS5d8FiduNjGdKt1rclSVqAM3RiQpRmFWdhb18hfjno/d/LPAevs/UzJ8wAsg19n/TrNZev9rdf93N6CvWpDEGbtMGPVsQuiXnC5egGXsJeenSFeGB7FVupNxNjqncV+8HQ5si5U/Mt81jLI4Nd9N96os84KbOIJjLfa00JdvlrWHOInFVjKX77HSa+l9RJyxg3i6GB/OkczKLC4oWbqm6Dm/cs+OVe6lZwZTrMIuRVTc7JLvgFu8mkvdArLSBfibxpuGZYGdWyD3DKxl77NX8iR7OT/SbL356K+1sTXhbmuWtThpLEkBnhn3J/TrFswbKOpU8cp7FWkUKwJqvdPXVTdCll0X6aKDBrKsXLqga2W3iBRV7faBLkqPIzcbrUMpXDWVFu10SeaPbeQ4jmWVb5l00S+/iumw7BiquJ4tOKpOrnetPe3YlXdLO9XFQJgUzyWJKPdjKQDjXXDZ+/CANbkfWXNmNCzhjjFMsFrLeeM0QVSpOnXV1ql+1Wqt8nwVVFBBBRVUUEEFFVRQQQUVVFBBBRVUUEEFFVRQQQUVPAb8DwPyxs8AeAAA + values: + image: eu.gcr.io/gardener-project/gardener/extensions/registry-cache:v0.2.0-dev +--- +apiVersion: core.gardener.cloud/v1beta1 +kind: ControllerRegistration +metadata: + name: extension-registry-cache + annotations: + security.gardener.cloud/pod-security-enforce: baseline +spec: + deployment: + deploymentRefs: + - name: extension-registry-cache + resources: + - kind: Extension + type: registry-cache diff --git a/example/registration/controller-registration.yaml b/example/registration/controller-registration.yaml deleted file mode 100644 index d0970d17..00000000 --- a/example/registration/controller-registration.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerDeployment -metadata: - name: extension-registry-cache -type: helm -providerConfig: - chart: H4sIAAAAAAAAA+0c/W/bNnY/66/gqTe0HSrJdhy3p0OB85LcFlybGHHWYTgMBS3RthZZ1JGSM6/r/e33+CGZkr+TLLlieghimyIfH9/j++AjqQlmIUkIc8ivGUl4RBOHkUnEM7ZwAhxMiffVvaEF8Pr4WH4C1D/l9/ZRt9057vR6orzd6/SOvkLH9+96N+Q8wwyhrxil2bZ6u55/oTDZKX93SuJZNEkoI3fsQwi41+1ulD+IvSr/TqvbaX2FWg860g3wJ5f/MzTAWUZYwlFGkRIzup2SBI3yKA6jZIJSHNzgCeGu9QxdTyOOeJ6mlGXwBaZGjCYxHaEZzoIp1H6FGIlxFs0JtMumRjlOQkCQkAk8pQl6kTIyjn4lIbqNoN5fXrroMokXiCaypSAJpYShOEqIa7mnw4/DDGgDFCd0NgMEH06GKIwYt9xJlHnyvyLfcke/MU/+LwqmE0/8K37yeeItEY1gfHmKxlFMuPWNy29T+D/CN/A/m8H3/0LVD5hFNOfo/PQMOkwZ/YUEmeVGIcGeqgdFljvnAQ2JZz21VPeH3fp/MsUscxd4Ft+1j1363zk6rut/p93o/6MATqMPhAm5+2jetnCalj/tttuyrZDwgEVpJov66HtwBigQUwKNKUPZlKDv9BRCV3rioBMxcVA5o1wrwTPio51zzZoXfbdc6PwLUqMvFnbrf0gDd0Lv08cO/e+8PqrHf6+Peu1G/x8DPA/cYLoATznN0IvgJQLb20HD/gANzxAoOE7kDzwG9xjhjKCAzlKcLFzUB9cvm3Fw+ZywOQldFR8IT4rgM44CmFLg4fMkJMpW9FNpGoZ0nN1iiDT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L2Awr6OoI8YbL1kUca0IsfXen6+uh6y7O+KjoxayrEoCwbfKe0WKqm73SBcVZ5Pbrc6xFK6aTst2uqT00A5yXdeyVq+c+OjfP4vpsO5MqriwLTiqjrH71jPt6pW/KzrVxUCYFM+VoRXG2wHLNySKV8CZP8rmpjqt4Jb6YXfcN24bRFWolK82U/XLd+3GFzbQQAMNNNBAAw000EADDTTQQAMNNNBAAw000EADd4P/AXifyUQAeAAA - values: - image: - tag: v0.2.0-dev ---- -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerRegistration -metadata: - name: extension-registry-cache - annotations: - security.gardener.cloud/pod-security-enforce: baseline -spec: - deployment: - deploymentRefs: - - name: extension-registry-cache - resources: - - kind: Extension - type: registry-cache diff --git a/example/registration/kustomization.yaml b/example/registration/kustomization.yaml deleted file mode 100644 index 80cd76ba..00000000 --- a/example/registration/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- controller-registration.yaml - -patchesStrategicMerge: -- patch-registration.yaml -- patch-deployment.yaml diff --git a/example/registration/patch-deployment.yaml b/example/registration/patch-deployment.yaml deleted file mode 100644 index 2da37120..00000000 --- a/example/registration/patch-deployment.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerDeployment -metadata: - name: extension-registry-cache -type: helm -providerConfig: - values: - image: - tag: latest diff --git a/example/registration/patch-registration.yaml b/example/registration/patch-registration.yaml deleted file mode 100644 index 208d0bb2..00000000 --- a/example/registration/patch-registration.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: core.gardener.cloud/v1beta1 -kind: ControllerRegistration -metadata: - name: extension-registry-cache -spec: - deployment: - policy: Always diff --git a/hack/ci-e2e-kind.sh b/hack/ci-e2e-kind.sh index e94757ec..a5ac6dcd 100755 --- a/hack/ci-e2e-kind.sh +++ b/hack/ci-e2e-kind.sh @@ -46,6 +46,5 @@ trap '{ make -C "$REPO_ROOT/gardener" gardener-up make extension-up make test-e2e-local -# TODO: make extension-down currently fails. When we fix it, we can execute it during the tear down. -# make extension-down +make extension-down make -C "$REPO_ROOT/gardener" gardener-down diff --git a/hack/dev-setup-admission-registry-cache.sh b/hack/dev-setup-admission-registry-cache.sh deleted file mode 100755 index 3add2be3..00000000 --- a/hack/dev-setup-admission-registry-cache.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -# -# 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 - -is_nodeless() { - nodes_len=$(kubectl get node -o json | jq '.items | length') - if [[ "$nodes_len" == "0" ]]; then - return 0 - fi - - return 1 -} - -IP_ROUTE=$(ip route get 1) -IP_ADDRESS=$(echo ${IP_ROUTE#*src} | awk '{print $1}') - -ADMISSION_SERVICE_NAME="gardener-extension-registry-cache-admission" -ADMISSION_ENDPOINT_NAME="gardener-extension-registry-cache-admission" - -ADMISSION_EXTERNAL_NAME=gardener.localhost -if [[ "$(uname -s)" == *"Darwin"* ]] || [[ "$(uname -s)" == "Linux" && "$(uname -r)" =~ "microsoft-standard" ]] ; then - ADMISSION_EXTERNAL_NAME=host.docker.internal -fi - -if kubectl -n garden get service "$ADMISSION_SERVICE_NAME" &> /dev/null; then - kubectl -n garden delete service $ADMISSION_SERVICE_NAME -fi -if kubectl -n garden get endpoints "$ADMISSION_ENDPOINT_NAME" &> /dev/null; then - kubectl -n garden delete endpoints $ADMISSION_ENDPOINT_NAME -fi - -if is_nodeless; then - cat <