From 6476348da2444aa5e0c524b8214b0a05a876954f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:31:26 +0000 Subject: [PATCH 1/7] deps: update registry.k8s.io/sig-storage/csi-resizer docker tag to v1.13.1 --- chart/.snapshots/default.yaml | 2 +- chart/.snapshots/example-prod.yaml | 2 +- chart/.snapshots/full.yaml | 2 +- chart/values.yaml | 2 +- deploy/kubernetes/hcloud-csi.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index ccc0bf4b..10961f03 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -290,7 +290,7 @@ spec: mountPath: /run/csi - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 imagePullPolicy: IfNotPresent resources: limits: {} diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index 0acbf89c..b40403d1 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -383,7 +383,7 @@ spec: mountPath: /run/csi - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 imagePullPolicy: IfNotPresent resources: limits: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index b0d3b0ce..6f3ad62d 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -505,7 +505,7 @@ spec: mountPath: /run/csi - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 imagePullPolicy: Always resources: limits: diff --git a/chart/values.yaml b/chart/values.yaml index 36342062..459ba3dc 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -86,7 +86,7 @@ controller: csiResizer: name: registry.k8s.io/sig-storage/csi-resizer - tag: v1.12.0 # renovate: datasource=docker depName=registry.k8s.io/sig-storage/csi-resizer + tag: v1.13.1 # renovate: datasource=docker depName=registry.k8s.io/sig-storage/csi-resizer ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index 55bd4f35..796fffc7 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -323,7 +323,7 @@ spec: mountPath: /run/csi - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 imagePullPolicy: IfNotPresent resources: limits: {} From 225d1ed0e3b6dab42b0d21c8c22472f72a2eb8bb Mon Sep 17 00:00:00 2001 From: lukasmetzner Date: Tue, 28 Jan 2025 13:13:33 +0100 Subject: [PATCH 2/7] fix(helm-chart): incompatible default feature gate --- chart/templates/controller/deployment.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chart/templates/controller/deployment.yaml b/chart/templates/controller/deployment.yaml index b8bf966e..aaa9379d 100644 --- a/chart/templates/controller/deployment.yaml +++ b/chart/templates/controller/deployment.yaml @@ -94,8 +94,11 @@ spec: {{- if .Values.controller.resources.csiResizer }} resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }} {{- end }} - {{- if $enableLeaderElection }} args: + {{- if semverCompare "<1.32-0" .Capabilities.KubeVersion.Version }} + - -feature-gates=RecoverVolumeExpansionFailure=false + {{- end }} + {{- if $enableLeaderElection }} - --leader-election - --leader-election-namespace={{ include "common.names.namespace" . }} {{- end}} From c4429ac4053f9f6a71f3ec9ae02554660cdcd9c8 Mon Sep 17 00:00:00 2001 From: lukasmetzner Date: Tue, 28 Jan 2025 13:17:07 +0100 Subject: [PATCH 3/7] fix(helm-charts): updated snapshots --- chart/.snapshots/default.yaml | 2 ++ chart/.snapshots/example-prod.yaml | 1 + chart/.snapshots/full.yaml | 1 + deploy/kubernetes/hcloud-csi.yml | 2 ++ 4 files changed, 6 insertions(+) diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index 10961f03..f9dc49e2 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -295,6 +295,8 @@ spec: resources: limits: {} requests: {} + args: + - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index b40403d1..286fe16e 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -393,6 +393,7 @@ spec: cpu: 10m memory: 20Mi args: + - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=kube-system volumeMounts: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index 6f3ad62d..3c3dfc37 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -515,6 +515,7 @@ spec: cpu: 12m memory: 22Mi args: + - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=namespace-override volumeMounts: diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index 796fffc7..ed4925c1 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -328,6 +328,8 @@ spec: resources: limits: {} requests: {} + args: + - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi From 640b7009d4258a130ffcb077f7403205e6c8a60f Mon Sep 17 00:00:00 2001 From: lukasmetzner Date: Tue, 28 Jan 2025 13:21:40 +0100 Subject: [PATCH 4/7] fix(helm-chart): fix linting errors --- chart/.snapshots/default.yaml | 1 - chart/.snapshots/example-prod.yaml | 1 - chart/.snapshots/full.yaml | 1 - deploy/kubernetes/hcloud-csi.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index f9dc49e2..54180f68 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -296,7 +296,6 @@ spec: limits: {} requests: {} args: - - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index 286fe16e..b40403d1 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -393,7 +393,6 @@ spec: cpu: 10m memory: 20Mi args: - - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=kube-system volumeMounts: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index 3c3dfc37..6f3ad62d 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -515,7 +515,6 @@ spec: cpu: 12m memory: 22Mi args: - - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=namespace-override volumeMounts: diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index ed4925c1..533b05cb 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -329,7 +329,6 @@ spec: limits: {} requests: {} args: - - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi From f56bdc876ca467a17bff0bddad2bb22e187fdedf Mon Sep 17 00:00:00 2001 From: lukasmetzner Date: Wed, 29 Jan 2025 15:09:07 +0100 Subject: [PATCH 5/7] fix(helm-chart): render args empty if no condition applies --- chart/.snapshots/default.yaml | 1 + chart/.snapshots/example-prod.yaml | 1 + chart/.snapshots/full.yaml | 1 + chart/templates/controller/deployment.yaml | 7 +++++-- deploy/kubernetes/hcloud-csi.yml | 1 + hack/update-deployment-yamls.sh | 2 +- hack/update-helm-snapshots.sh | 6 +++--- skaffold.yaml | 2 +- 8 files changed, 14 insertions(+), 7 deletions(-) diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index 54180f68..1b468bc4 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -296,6 +296,7 @@ spec: limits: {} requests: {} args: + - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index b40403d1..59d61a52 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -393,6 +393,7 @@ spec: cpu: 10m memory: 20Mi args: + - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=kube-system volumeMounts: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index 6f3ad62d..6d19e849 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -515,6 +515,7 @@ spec: cpu: 12m memory: 22Mi args: + - -feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=namespace-override volumeMounts: diff --git a/chart/templates/controller/deployment.yaml b/chart/templates/controller/deployment.yaml index aaa9379d..e5910399 100644 --- a/chart/templates/controller/deployment.yaml +++ b/chart/templates/controller/deployment.yaml @@ -1,4 +1,5 @@ {{ $enableLeaderElection := gt (int .Values.controller.replicaCount) 1 }} +{{ $isKubeVersionBelow132 := semverCompare "<1.32-0" .Capabilities.KubeVersion.Version }} apiVersion: apps/v1 kind: Deployment @@ -94,9 +95,11 @@ spec: {{- if .Values.controller.resources.csiResizer }} resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }} {{- end }} + {{- if or $isKubeVersionBelow132 $enableLeaderElection }} args: - {{- if semverCompare "<1.32-0" .Capabilities.KubeVersion.Version }} - - -feature-gates=RecoverVolumeExpansionFailure=false + {{- end }} + {{- if $isKubeVersionBelow132 }} + - -feature-gates=RecoverVolumeExpansionFailure=false {{- end }} {{- if $enableLeaderElection }} - --leader-election diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index 533b05cb..55baba53 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -329,6 +329,7 @@ spec: limits: {} requests: {} args: + - -feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi diff --git a/hack/update-deployment-yamls.sh b/hack/update-deployment-yamls.sh index dbf7914a..f939e152 100755 --- a/hack/update-deployment-yamls.sh +++ b/hack/update-deployment-yamls.sh @@ -3,7 +3,7 @@ set -ueo pipefail # Template the chart with pre-built values to get the legacy deployment files # Also remove labels that are Helm specific -helm template hcloud-csi chart \ +helm template --kube-version v1.31.4 hcloud-csi chart \ --namespace kube-system \ --set metrics.enabled=true \ --set controller.matchLabelsOverride.app=hcloud-csi-controller \ diff --git a/hack/update-helm-snapshots.sh b/hack/update-helm-snapshots.sh index de2865da..b7a1f0db 100755 --- a/hack/update-helm-snapshots.sh +++ b/hack/update-helm-snapshots.sh @@ -1,18 +1,18 @@ #!/usr/bin/env bash set -ueo pipefail -helm template hcloud-csi chart \ +helm template --kube-version v1.31.4 hcloud-csi chart \ --namespace kube-system | grep -v helm.sh/chart \ > chart/.snapshots/default.yaml -helm template hcloud-csi chart \ +helm template --kube-version v1.31.4 hcloud-csi chart \ --namespace kube-system \ -f chart/example-prod.values.yaml | grep -v helm.sh/chart \ > chart/.snapshots/example-prod.yaml -helm template hcloud-csi chart \ +helm template --kube-version v1.31.4 hcloud-csi chart \ --namespace kube-system \ -f chart/.snapshots/full.values.yaml | grep -v helm.sh/chart \ diff --git a/skaffold.yaml b/skaffold.yaml index b9831bae..b471ed8c 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -12,7 +12,7 @@ build: insecureRegistries: - localhost:30666 -manifests: +deploy: helm: releases: - name: hcloud-csi From 7d24f915621068a19bf960c38b26ed441dc71c80 Mon Sep 17 00:00:00 2001 From: Lukas Metzner Date: Mon, 3 Feb 2025 09:34:09 +0100 Subject: [PATCH 6/7] Update chart/templates/controller/deployment.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julian Tölle --- chart/templates/controller/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/controller/deployment.yaml b/chart/templates/controller/deployment.yaml index e5910399..a7b52d08 100644 --- a/chart/templates/controller/deployment.yaml +++ b/chart/templates/controller/deployment.yaml @@ -99,7 +99,7 @@ spec: args: {{- end }} {{- if $isKubeVersionBelow132 }} - - -feature-gates=RecoverVolumeExpansionFailure=false + - --feature-gates=RecoverVolumeExpansionFailure=false {{- end }} {{- if $enableLeaderElection }} - --leader-election From 13d779196592657f68082ec602f2062b3f65f575 Mon Sep 17 00:00:00 2001 From: lukasmetzner Date: Mon, 3 Feb 2025 09:42:41 +0100 Subject: [PATCH 7/7] chore(helm-chart): updated snapshots --- chart/.snapshots/default.yaml | 2 +- chart/.snapshots/example-prod.yaml | 2 +- chart/.snapshots/full.yaml | 2 +- deploy/kubernetes/hcloud-csi.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index 1b468bc4..78f6dcbe 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -296,7 +296,7 @@ spec: limits: {} requests: {} args: - - -feature-gates=RecoverVolumeExpansionFailure=false + - --feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index 59d61a52..44b2c75f 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -393,7 +393,7 @@ spec: cpu: 10m memory: 20Mi args: - - -feature-gates=RecoverVolumeExpansionFailure=false + - --feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=kube-system volumeMounts: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index 6d19e849..0183acc4 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -515,7 +515,7 @@ spec: cpu: 12m memory: 22Mi args: - - -feature-gates=RecoverVolumeExpansionFailure=false + - --feature-gates=RecoverVolumeExpansionFailure=false - --leader-election - --leader-election-namespace=namespace-override volumeMounts: diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index 55baba53..0640e7e8 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -329,7 +329,7 @@ spec: limits: {} requests: {} args: - - -feature-gates=RecoverVolumeExpansionFailure=false + - --feature-gates=RecoverVolumeExpansionFailure=false volumeMounts: - name: socket-dir mountPath: /run/csi