Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2aa5c46
define the CompatibilityMode field
ftl Jun 11, 2026
34b1e30
add the default value for CSI.CompatibilityMode
ftl Jun 11, 2026
b26aa99
provide access to the new CompatibilityMode field
ftl Jun 12, 2026
92697d7
render the second DaemonSet in compatibility mode, if parameterized a…
ftl Jun 12, 2026
05cd918
install control-plane stackit-blockstorage chart (compat) as ManagedR…
nschad Jun 15, 2026
3703159
fix chart path
nschad Jun 15, 2026
3c1fef4
fix chart path and releaseName
nschad Jun 15, 2026
2f32d47
fix path?
nschad Jun 15, 2026
8dc17ef
Move some things around
nschad Jun 15, 2026
a03c8df
fix values?
nschad Jun 15, 2026
4c59bcd
fix type assertion
nschad Jun 15, 2026
f46ef40
fix namespace
nschad Jun 15, 2026
5d15fee
use different name for MR release
nschad Jun 15, 2026
f6b0a54
apply fixes and inject images manually
nschad Jun 15, 2026
c923b5d
remove the duplicated DaemonSet as it is not needed
ftl Jun 16, 2026
96a59fd
add a symmetric method for the Shoot controlplane in Compatibility Mode
ftl Jun 17, 2026
00827ca
use the correct image vector for the Shoot controlplane
ftl Jun 17, 2026
5b71759
delete compatibility mode managed resources when not needed
ftl Jun 18, 2026
14e2fcc
control the legacy-volume-creation flag
ftl Jun 18, 2026
6f82793
make sure to use the correct namespace and origin
ftl Jun 18, 2026
b353e21
make generate
ftl Jun 19, 2026
2853620
extract the CSI compatibility related code and use dependency injecti…
ftl Jun 22, 2026
ce762b9
fix typo
ftl Jun 22, 2026
a8ed75e
add a unit test scaffolding
ftl Jun 23, 2026
16445c6
add checks for the relevant command line flags in the DaemonSets
ftl Jun 23, 2026
0fe7653
extract function
ftl Jun 23, 2026
f5bc131
separate chart rendering and deployment
ftl Jun 23, 2026
cb98a89
create the renderer only once
ftl Jun 23, 2026
2ca5373
fix the compatibility mode accessor
ftl Jun 23, 2026
802210a
simplify test assertions
ftl Jun 24, 2026
2c7b98f
extract helper methods and constants
ftl Jun 24, 2026
5c464af
handle unset compatibility mode
ftl Jun 24, 2026
e6f1909
go mod tidy
ftl Jun 24, 2026
d5cc0b4
modernize
ftl Jun 24, 2026
bcf30d3
move the legacy-volume-creation flag to the seed control plane
ftl Jun 25, 2026
5d45900
use a different healthz port in the second csi drive instance, also i…
ftl Jun 25, 2026
2c876d0
fix typo
ftl Jun 25, 2026
1dc86cd
use a better prefix
ftl Jun 25, 2026
4051952
fix: deploy seed part in correct namespace; findImage by specific ver…
nschad Jun 25, 2026
64ca6f6
make stackit-blockstorage-csi-driver (shoot) chart customizable for d…
nschad Jun 25, 2026
d3e7c7a
make health-port of CSI livenessprobe configurable
nschad Jun 25, 2026
cfb6787
only deploy snapshot-controller once
nschad Jun 25, 2026
e966458
use the correct namespace
ftl Jun 26, 2026
08f1015
fix: deploy snapshotcontroller by default; but NOT if in compatibilit…
nschad Jun 26, 2026
2787b75
check the liveness-probe healthz port
ftl Jun 29, 2026
913f3da
check the csi drive name in COMPAT(BLOCK) mode
ftl Jun 29, 2026
c047568
check that there is no snapshot controller deployed with the
ftl Jun 29, 2026
eef3bdd
create an integration test that checks if the compatibility related
ftl Jun 29, 2026
5677f76
add test to cover the transition from compat to default
ftl Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.csi.enableCompatibilityMode }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we dont deploy the PodDisruptionBudget when enable the CompatibilityMode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dergeberl We only need one snapshot controller per cluster. It would just be duplicated doing nothing.

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand All @@ -13,3 +14,4 @@ spec:
app: {{.Values.prefix}}-csi-snapshot-controller
role: controller
unhealthyPodEvictionPolicy: AlwaysAllow
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
{{- if not .Values.csi.enableCompatibilityMode }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we dont deploy the VerticalPodAutoscaler when enable the CompatibilityMode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. One snapshot-controller is suffice.

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
Expand All @@ -15,3 +15,4 @@ spec:
name: {{.Values.prefix}}-csi-snapshot-controller
updatePolicy:
updateMode: Auto
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ spec:
{{- end }}
- --v=3
- --provide-node-service=false
{{- if .Values.csi.enableCompatibilityMode }}
- --legacy-storage-mode=true
{{- end }}
{{- if .Values.csi.blockLegacyCreation }}
- --legacy-volume-creation=false
{{- end }}
env:
- name: CSI_ENDPOINT
value: unix://{{ .Values.socketPath }}/csi.sock
Expand All @@ -69,7 +75,7 @@ spec:
{{- end }}
ports:
- name: healthz
containerPort: 9808
containerPort: {{ .Values.healthzPort }}
protocol: TCP
livenessProbe:
httpGet:
Expand Down Expand Up @@ -251,6 +257,7 @@ spec:
args:
- --probe-timeout=3m
- --csi-address=/csi/csi.sock
- --health-port={{.Values.healthzPort}}
{{- if .Values.resources.livenessProbe }}
resources:
{{ toYaml .Values.resources.livenessProbe | indent 10 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.csi.enableCompatibilityMode }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed as the snapshot-controller dont use the driverName right? Snapshots can be still created for both drivernames?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct. The leader of the controller is also hard-coded so it wouldn't even bring you anything if you have multiple controllers running.

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -70,3 +71,4 @@ spec:
path: token
name: shoot-access-csi-snapshot-controller
optional: false
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ kubernetesVersion: 1.30.0
prefix: stackit-blockstorage
projectID: ""

healthzPort: 9808

csi:
enableCompatibilityMode: false
blockLegacyCreation: false

images:
csi-driver-stackit: image-repository:image-tag
csi-provisioner: image-repository:image-tag
Expand All @@ -12,7 +18,6 @@ images:
csi-resizer: image-repository:image-tag
csi-liveness-probe: image-repository:image-tag
csi-snapshot-controller: image-repository:image-tag
csi-snapshot-validation-webhook: image-repository:image-tag

socketPath: /var/lib/csi/sockets/pluginproxy
region: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ spec:
metadata:
annotations:
checksum/configmap-cloud-provider-config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
node.gardener.cloud/wait-for-csi-node-stackit: block-storage.csi.stackit.cloud
{{- if eq .Values.driverName "cinder.csi.openstack.org" }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use the enableCompatibilityMode instead if the driver here

Suggested change
{{- if eq .Values.driverName "cinder.csi.openstack.org" }}
{{- if .Values.csi.enableCompatibilityMode }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is then also needed to switch the annotations in the if/else

node.gardener.cloud/wait-for-csi-node-openstack: {{ .Values.driverName }}
{{- else }}
node.gardener.cloud/wait-for-csi-node-stackit: {{ .Values.driverName }}
{{- end }}
labels:
node.gardener.cloud/critical-component: "true"
app: {{ .Values.prefix }}-csi
Expand Down Expand Up @@ -48,6 +52,9 @@ spec:
{{- end }}
- --v=2
- --provide-controller-service=false
{{- if .Values.csi.enableCompatibilityMode }}
- --legacy-storage-mode=true
{{- end }}
env:
- name: CSI_ENDPOINT
value: unix://{{ .Values.socketPath }}
Expand All @@ -62,7 +69,7 @@ spec:
allowPrivilegeEscalation: true
ports:
- name: healthz
containerPort: 9908
containerPort: {{ .Values.healthzPort }}
protocol: TCP
livenessProbe:
httpGet:
Expand Down Expand Up @@ -94,7 +101,7 @@ spec:
- name: ADDRESS
value: {{ .Values.socketPath }}
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/block-storage.csi.stackit.cloud/csi.sock
value: /var/lib/kubelet/plugins/{{ .Values.driverName }}/csi.sock
{{- if .Values.resources.nodeDriverRegistrar }}
resources:
{{ toYaml .Values.resources.nodeDriverRegistrar | indent 10 }}
Expand All @@ -112,7 +119,7 @@ spec:
args:
- --probe-timeout=3m
- --csi-address={{ .Values.socketPath }}
- --health-port=9908
- --health-port={{ .Values.healthzPort }}
{{- if .Values.resources.livenessProbe }}
resources:
{{ toYaml .Values.resources.livenessProbe | indent 10 }}
Expand All @@ -130,7 +137,7 @@ spec:
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/block-storage.csi.stackit.cloud/
path: /var/lib/kubelet/plugins/{{ .Values.driverName }}/
type: DirectoryOrCreate
- name: registration-dir
hostPath:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ driverName: block-storage.csi.stackit.cloud

rescanBlockStorageOnResize: "true"

healthzPort: 9908

csi:
enableCompatibilityMode: false

images:
csi-driver-stackit: image-repository:image-tag
csi-node-driver-registrar: image-repository:image-tag
Expand Down
17 changes: 16 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ require (
k8s.io/utils v0.0.0-20260507154919-ff6756f316d2
sigs.k8s.io/controller-runtime v0.23.3
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231015215740-bf15e44028f9
sigs.k8s.io/yaml v1.6.0
)

require (
Expand All @@ -53,6 +54,7 @@ require (
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/PaesslerAG/gval v1.2.4 // indirect
github.com/PaesslerAG/jsonpath v0.1.2-0.20240726212847-3a740cf7976f // indirect
github.com/VictoriaMetrics/VictoriaLogs v1.36.2-0.20251008164716-21c0fb3de84d // indirect
Expand Down Expand Up @@ -83,13 +85,15 @@ require (
github.com/brunoga/deep v1.3.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/elastic/crd-ref-docs v0.3.0 // indirect
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fluent/fluent-operator/v3 v3.7.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
Expand All @@ -113,6 +117,7 @@ require (
github.com/go-openapi/swag/typeutils v0.25.5 // indirect
github.com/go-openapi/swag/yamlutils v0.25.5 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-test/deep v1.1.1 // indirect
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-yaml v1.19.2 // indirect
Expand All @@ -125,6 +130,7 @@ require (
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -134,6 +140,7 @@ require (
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/labstack/echo/v4 v4.15.1 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
Expand All @@ -160,6 +167,7 @@ require (
github.com/prometheus/otlptranslator v1.0.0 // indirect
github.com/prometheus/procfs v0.20.1 // indirect
github.com/prometheus/sigv4 v0.3.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
Expand All @@ -175,7 +183,12 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/zitadel/oidc/v3 v3.45.4 // indirect
github.com/zitadel/schema v1.3.2 // indirect
go.etcd.io/etcd/api/v3 v3.6.5 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect
go.etcd.io/etcd/client/v3 v3.6.5 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/contrib/otelconf v0.23.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 // indirect
Expand Down Expand Up @@ -218,6 +231,7 @@ require (
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
helm.sh/helm/v4 v4.1.4 // indirect
Expand All @@ -228,14 +242,15 @@ require (
k8s.io/component-helpers v0.35.5 // indirect
k8s.io/gengo/v2 v2.0.0-20251215205346-5ee0d033ba5b // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kms v0.35.5 // indirect
k8s.io/kube-aggregator v0.35.5 // indirect
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
k8s.io/metrics v0.35.5 // indirect
k8s.io/pod-security-admission v0.35.5 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
sigs.k8s.io/controller-tools v0.20.1 // indirect
sigs.k8s.io/gateway-api v1.5.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading