diff --git a/Makefile b/Makefile index 580227a3..536bd8c7 100644 --- a/Makefile +++ b/Makefile @@ -144,6 +144,7 @@ ci-e2e-kind: $(KIND) $(YQ) export SKAFFOLD_BUILD_CONCURRENCY = 0 extension-up extension-dev: export SKAFFOLD_DEFAULT_REPO = localhost:5001 extension-up extension-dev: export SKAFFOLD_PUSH = true +extension-up extension-dev: export EXTENSION_VERSION = $(VERSION) # use static label for skaffold to prevent rolling all gardener components on every `skaffold` invocation extension-up extension-dev extension-down: export SKAFFOLD_LABEL = skaffold.dev/run-id=extension-local diff --git a/skaffold.yaml b/skaffold.yaml index e5c66439..9d476c11 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -1,8 +1,17 @@ -apiVersion: skaffold/v4beta3 +apiVersion: skaffold/v4beta7 kind: Config metadata: name: rsyslog-relp-echo-server build: + tagPolicy: + customTemplate: + template: "{{.version}}-{{.sha}}" + components: + - name: version + envTemplate: + template: "{{.EXTENSION_VERSION}}" + - name: sha + inputDigest: {} artifacts: - image: local-skaffold/gardener-extension-shoot-rsyslog-relp-echo-server docker: @@ -22,11 +31,20 @@ deploy: setValues: service.clusterIP: 10.2.64.54 --- -apiVersion: skaffold/v4beta3 +apiVersion: skaffold/v4beta7 kind: Config metadata: name: extension build: + tagPolicy: + customTemplate: + template: "{{.version}}-{{.sha}}" + components: + - name: version + envTemplate: + template: "{{.EXTENSION_VERSION}}" + - name: sha + inputDigest: {} artifacts: - image: local-skaffold/gardener-extension-shoot-rsyslog-relp ko: @@ -69,13 +87,31 @@ manifests: paths: - local-setup deploy: - kubectl: {} + # --server-side apply is a workaround for https://github.com/gardener/gardener/issues/10267. + # kubectl apply attempts a strategic merge patch which fails for a ControllerDeployment. + # For more details, see https://github.com/gardener/gardener/issues/10267. + # + # TODO: Switch back to "kubectl: {}" when the above issue is resolved. + kubectl: + flags: + apply: + - --server-side + - --force-conflicts --- -apiVersion: skaffold/v4beta3 +apiVersion: skaffold/v4beta7 kind: Config metadata: name: admission build: + tagPolicy: + customTemplate: + template: "{{.version}}-{{.sha}}" + components: + - name: version + envTemplate: + template: "{{.EXTENSION_VERSION}}" + - name: sha + inputDigest: {} artifacts: - image: local-skaffold/gardener-extension-shoot-rsyslog-relp-admission ko: