From 0e90d2623186c24c2c894989fa70170869e415ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:00:48 +0000 Subject: [PATCH 1/2] webhosting-operator Update dependency GoogleContainerTools/skaffold to v2.9.0 --- webhosting-operator/tools.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webhosting-operator/tools.mk b/webhosting-operator/tools.mk index 2e7a9889..b2bc20ce 100644 --- a/webhosting-operator/tools.mk +++ b/webhosting-operator/tools.mk @@ -49,7 +49,7 @@ $(SETUP_ENVTEST): go.mod SKAFFOLD := $(TOOLS_BIN_DIR)/skaffold # renovate: datasource=github-tags depName=GoogleContainerTools/skaffold -SKAFFOLD_VERSION ?= v2.6.1 +SKAFFOLD_VERSION ?= v2.9.0 $(SKAFFOLD): $(call tool_version_file,$(SKAFFOLD),$(SKAFFOLD_VERSION)) curl -Lo $(SKAFFOLD) https://storage.googleapis.com/skaffold/releases/$(SKAFFOLD_VERSION)/skaffold-$(shell uname -s | tr '[:upper:]' '[:lower:]')-$(shell uname -m | sed 's/x86_64/amd64/') chmod +x $(SKAFFOLD) From 0995a61f892fb56e70a70ea9c491477527f99e5c Mon Sep 17 00:00:00 2001 From: Tim Ebert Date: Fri, 22 Dec 2023 12:27:55 +0100 Subject: [PATCH 2/2] Upgrade skaffold config --- webhosting-operator/skaffold.yaml | 245 +++++++++++++++--------------- 1 file changed, 122 insertions(+), 123 deletions(-) diff --git a/webhosting-operator/skaffold.yaml b/webhosting-operator/skaffold.yaml index 31b9125d..a393f3b4 100644 --- a/webhosting-operator/skaffold.yaml +++ b/webhosting-operator/skaffold.yaml @@ -1,160 +1,159 @@ ---- -apiVersion: skaffold/v4beta6 +apiVersion: skaffold/v4beta8 kind: Config metadata: name: policy profiles: -- name: shoot - activation: - - kubeContext: .*--sharding.* - manifests: - kustomize: - paths: - - config/policy - deploy: - kubectl: - defaultNamespace: "" - flags: - apply: - - --server-side - - --force-conflicts - statusCheck: false + - name: shoot + activation: + - kubeContext: .*--sharding.* + manifests: + kustomize: + paths: + - config/policy + deploy: + kubectl: + flags: + apply: + - --server-side + - --force-conflicts + defaultNamespace: "" + statusCheck: false --- -apiVersion: skaffold/v4beta6 +apiVersion: skaffold/v4beta8 kind: Config metadata: name: webhosting-operator build: + artifacts: + - image: ghcr.io/timebertt/kubernetes-controller-sharding/webhosting-operator + ko: + dependencies: + paths: + - go.mod + - '**/*.go' + - ../../../../sigs.k8s.io/controller-runtime/**/*.go + main: ./cmd/webhosting-operator local: concurrency: 0 - artifacts: - - image: ghcr.io/timebertt/kubernetes-controller-sharding/webhosting-operator - ko: - main: ./cmd/webhosting-operator - dependencies: - paths: - - go.mod - - '**/*.go' - - ../../../../sigs.k8s.io/controller-runtime/**/*.go manifests: kustomize: paths: - # default configuration: only run operator shards and use external sharding implementation via ClusterRing - - config/manager/overlays/default + # default configuration: only run operator shards and use external sharding implementation via ClusterRing + - config/manager/overlays/default deploy: kubectl: - defaultNamespace: "" flags: apply: - - --server-side - - --force-conflicts + - --server-side + - --force-conflicts + defaultNamespace: "" hooks: before: - - host: - command: - # ensure CRDs and RBAC are up-to-date - - make - - manifests + - host: + # ensure CRDs and RBAC are up-to-date + command: + - make + - manifests profiles: -- name: debug - activation: - - command: debug - patches: - - op: replace - path: /manifests/kustomize/paths/0 - value: config/manager/overlays/debug -- name: sharder - patches: - - op: replace - path: /manifests/kustomize/paths/0 - # legacy implementation for comparision: don't use external sharding implementation, run shards and sharder in operator - value: config/manager/overlays/sharder -- name: non-sharded - patches: - - op: replace - path: /manifests/kustomize/paths/0 - # singleton controller without sharding for comparison - value: config/manager/overlays/non-sharded -# The following profiles are variants of the default, sharder, and non-sharded profiles for running on the shoot cluster -# with dns for websites enabled. -- name: shoot - activation: - - kubeContext: .*--sharding.* - patches: - - op: replace - path: /manifests/kustomize/paths/0 - # default configuration: only run operator shards and use external sharding implementation via ClusterRing - value: config/manager/overlays/shoot/default -- name: shoot-sharder - patches: - - op: replace - path: /manifests/kustomize/paths/0 - value: config/manager/overlays/shoot/sharder -- name: shoot-non-sharded - patches: - - op: replace - path: /manifests/kustomize/paths/0 - # singleton controller without sharding for comparison - value: config/manager/overlays/shoot/non-sharded + - name: debug + activation: + - command: debug + patches: + - op: replace + path: /manifests/kustomize/paths/0 + value: config/manager/overlays/debug + - name: sharder + patches: + - op: replace + path: /manifests/kustomize/paths/0 + # legacy implementation for comparision: don't use external sharding implementation, run shards and sharder in operator + value: config/manager/overlays/sharder + - name: non-sharded + patches: + - op: replace + path: /manifests/kustomize/paths/0 + # singleton controller without sharding for comparison + value: config/manager/overlays/non-sharded + # The following profiles are variants of the default, sharder, and non-sharded profiles for running on the shoot cluster + # with dns for websites enabled. + - name: shoot + activation: + - kubeContext: .*--sharding.* + patches: + - op: replace + path: /manifests/kustomize/paths/0 + # default configuration: only run operator shards and use external sharding implementation via ClusterRing + value: config/manager/overlays/shoot/default + - name: shoot-sharder + patches: + - op: replace + path: /manifests/kustomize/paths/0 + value: config/manager/overlays/shoot/sharder + - name: shoot-non-sharded + patches: + - op: replace + path: /manifests/kustomize/paths/0 + # singleton controller without sharding for comparison + value: config/manager/overlays/shoot/non-sharded --- -apiVersion: skaffold/v4beta6 +apiVersion: skaffold/v4beta8 kind: Config metadata: name: experiment profiles: -- name: expirement - activation: - - env: EXPERIMENT_SCENARIO=.+ - build: - local: - concurrency: 0 - artifacts: - - image: ghcr.io/timebertt/kubernetes-controller-sharding/experiment - ko: - main: ./cmd/experiment - dependencies: - paths: - - go.mod - - '**/*.go' - - ../../../../sigs.k8s.io/controller-runtime/**/*.go - manifests: - kustomize: - paths: - - config/experiment/{{ .EXPERIMENT_SCENARIO }} - deploy: - kubectl: - hooks: - before: - - host: - command: - - /usr/bin/env - - bash - - -c - - | - active_pods="$(kubectl -n experiment get job experiment -ojsonpath='{.status.active}' 2>dev/null)" - if [ "${active_pods:-0}" -gt 0 ] && [ -z "$EXPERIMENT_DELETE_FORCE" ] ; then - echo "Experiment is running currently, refusing to delete the job. Set EXPERIMENT_DELETE_FORCE to override." - exit 1 - fi - kubectl -n experiment delete job experiment --ignore-not-found --wait=true - defaultNamespace: "" - flags: - apply: - - --server-side - - --force-conflicts + - name: expirement + activation: + - env: EXPERIMENT_SCENARIO=.+ + build: + artifacts: + - image: ghcr.io/timebertt/kubernetes-controller-sharding/experiment + ko: + dependencies: + paths: + - go.mod + - '**/*.go' + - ../../../../sigs.k8s.io/controller-runtime/**/*.go + main: ./cmd/experiment + local: + concurrency: 0 + manifests: + kustomize: + paths: + - config/experiment/{{ .EXPERIMENT_SCENARIO }} + deploy: + kubectl: + flags: + apply: + - --server-side + - --force-conflicts + defaultNamespace: "" + hooks: + before: + - host: + command: + - /usr/bin/env + - bash + - -c + - | + active_pods="$(kubectl -n experiment get job experiment -ojsonpath='{.status.active}' 2>dev/null)" + if [ "${active_pods:-0}" -gt 0 ] && [ -z "$EXPERIMENT_DELETE_FORCE" ] ; then + echo "Experiment is running currently, refusing to delete the job. Set EXPERIMENT_DELETE_FORCE to override." + exit 1 + fi + kubectl -n experiment delete job experiment --ignore-not-found --wait=true --- -apiVersion: skaffold/v4beta6 +apiVersion: skaffold/v4beta8 kind: Config metadata: name: monitoring manifests: kustomize: paths: - - config/monitoring/default + - config/monitoring/default deploy: kubectl: - defaultNamespace: "" flags: apply: - - --server-side - - --force-conflicts + - --server-side + - --force-conflicts + defaultNamespace: ""