Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion cmd/kops/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ func TestMinimalGCE(t *testing.T) {
withAddons(
dnsControllerAddon,
gcpCCMAddon,
gcpPDCSIAddon,
).
runTestTerraformGCE(t)
}
Expand Down
9 changes: 9 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,18 @@ spec:
gcpPDCSIDriver:
description: GCPPDCSIDriver is the config for the GCP PD CSI driver
properties:
defaultStorageClassName:
description: Default StorageClassName is the name of the default
StorageClass created for GCP PD CSI driver.
type: string
enabled:
description: Enabled enables the GCP PD CSI driver
type: boolean
version:
description: |-
Version is the container image tag used.
Default: The latest stable release which is compatible with your Kubernetes version
type: string
type: object
manageStorageClasses:
description: |-
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,11 @@ type EBSCSIDriverSpec struct {
type PDCSIDriver struct {
// Enabled enables the GCP PD CSI driver
Enabled *bool `json:"enabled,omitempty"`
// Version is the container image tag used.
// Default: The latest stable release which is compatible with your Kubernetes version
Version *string `json:"version,omitempty"`
// Default StorageClassName is the name of the default StorageClass created for GCP PD CSI driver.
DefaultStorageClassName *string `json:"defaultStorageClassName,omitempty"`
}

// SnapshotControllerConfig is the config for the CSI Snapshot Controller
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,11 @@ type EBSCSIDriverSpec struct {
type PDCSIDriver struct {
// Enabled enables the GCP PD CSI driver
Enabled *bool `json:"enabled,omitempty"`
// Version is the container image tag used.
// Default: The latest stable release which is compatible with your Kubernetes version
Version *string `json:"version,omitempty"`
// Default StorageClassName is the name of the default StorageClass created for GCP PD CSI driver.
DefaultStorageClassName *string `json:"defaultStorageClassName,omitempty"`
}

// SnapshotControllerConfig is the config for the CSI Snapshot Controller
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha3/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,11 @@ type EBSCSIDriverSpec struct {
type PDCSIDriver struct {
// Enabled enables the GCP PD CSI driver
Enabled *bool `json:"enabled,omitempty"`
// Version is the container image tag used.
// Default: The latest stable release which is compatible with your Kubernetes version
Version *string `json:"version,omitempty"`
// Default StorageClassName is the name of the default StorageClass created for GCP PD CSI driver.
DefaultStorageClassName *string `json:"defaultStorageClassName,omitempty"`
}

// SnapshotControllerConfig is the config for the CSI Snapshot Controller
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion pkg/model/components/gcppdcsidriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ func (b *GCPPDCSIDriverOptionsBuilder) BuildOptions(o *kops.Cluster) error {

if gce.PDCSIDriver == nil {
gce.PDCSIDriver = &kops.PDCSIDriver{
Enabled: fi.PtrTo(true),
Enabled: fi.PtrTo(true),
DefaultStorageClassName: fi.PtrTo("balanced-csi"),
}
} else if gce.PDCSIDriver.DefaultStorageClassName != nil && gce.PDCSIDriver.Enabled == nil {
gce.PDCSIDriver.Enabled = fi.PtrTo(true)
}

if gce.PDCSIDriver.Version == nil {
gce.PDCSIDriver.Version = fi.PtrTo("v1.22.1")
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ spec:
cloudConfig:
gceServiceAccount: default
gcpPDCSIDriver:
defaultStorageClassName: balanced-csi
enabled: true
version: v1.22.1
manageStorageClasses: true
multizone: true
nodeTags: ha-gce-example-com-k8s-io-role-node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
version: 9.99.0
- id: k8s-1.23
manifest: gcp-pd-csi-driver.addons.k8s.io/k8s-1.23.yaml
manifestHash: 7e2de94f2da0fcc49117a4bba5e90718c1ebd802b4e59a3ae7160f0e141f971f
manifestHash: b0d1b75a405846ae0716a86d9d38eb5da6bc2b708ef8fead88bf8e55fdac5da3
name: gcp-pd-csi-driver.addons.k8s.io
selector:
k8s-addon: gcp-pd-csi-driver.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ volumeBindingMode: WaitForFirstConsumer

---

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
labels:
addon.kops.k8s.io/name: gcp-pd-csi-driver.addons.k8s.io
app.kubernetes.io/managed-by: kops
k8s-addon: gcp-pd-csi-driver.addons.k8s.io
kubernetes.io/cluster-service: "true"
name: balanced-storage
Copy link
Member

Choose a reason for hiding this comment

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

Do you happen to know if GKE does the same thing? We don't need to follow GKE, but it would probably be easier for users if they are the same...

Copy link
Member

Choose a reason for hiding this comment

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

(I can take a look if needed)

Copy link
Member Author

@upodroid upodroid Oct 27, 2025

Choose a reason for hiding this comment

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

GKE doesn't add it by default; users need to create it but the one created by default is broken on C4 nodes. If we ran the k8s test-suite all the pvc tests will fail.

parameters:
provisioned-iops-on-create: "5000"
provisioned-throughput-on-create: 250Mi
type: hyperdisk-balanced
provisioner: pd.csi.storage.gke.io
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

---

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
Expand Down Expand Up @@ -583,16 +603,6 @@ spec:
values:
- linux
containers:
- args:
- --v=5
- --endpoint=unix:/csi/csi.sock
- --extra-labels=k8s-io-cluster-name=ha-gce-example-com
env: []
image: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.10.1
name: gce-pd-driver
volumeMounts:
- mountPath: /csi
name: socket-dir
- args:
- --v=5
- --csi-address=/csi/csi.sock
Expand All @@ -609,7 +619,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0
image: registry.k8s.io/sig-storage/csi-provisioner:v6.0.0
livenessProbe:
failureThreshold: 1
httpGet:
Expand Down Expand Up @@ -638,7 +648,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.k8s.io/sig-storage/csi-attacher:v4.2.0
image: registry.k8s.io/sig-storage/csi-attacher:v4.8.1
livenessProbe:
failureThreshold: 1
httpGet:
Expand Down Expand Up @@ -667,7 +677,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.k8s.io/sig-storage/csi-resizer:v1.7.0
image: registry.k8s.io/sig-storage/csi-resizer:v2.0.0
livenessProbe:
failureThreshold: 1
httpGet:
Expand All @@ -691,18 +701,34 @@ spec:
- --leader-election
- --leader-election-namespace=$(PDCSI_NAMESPACE)
- --timeout=300s
- --retry-interval-max=60s
env:
- name: PDCSI_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.1
name: csi-snapshotter
volumeMounts:
- mountPath: /csi
name: socket-dir
- args:
- --v=5
- --endpoint=unix:/csi/csi.sock
- --extra-labels=k8s-io-cluster-name=ha-gce-example-com
- --supports-dynamic-iops-provisioning=hyperdisk-balanced,hyperdisk-extreme
- --supports-dynamic-throughput-provisioning=hyperdisk-balanced,hyperdisk-throughput,hyperdisk-ml
- --enable-data-cache
- --run-node-service=false
env: []
image: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.22.1
name: gce-pd-driver
volumeMounts:
- mountPath: /csi
name: socket-dir
hostNetwork: true
nodeSelector: null
nodeSelector:
kubernetes.io/os: linux
priorityClassName: csi-gce-pd-controller
serviceAccountName: csi-gce-pd-controller-sa
tolerations:
Expand Down Expand Up @@ -754,7 +780,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.7.0
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0
name: csi-driver-registrar
volumeMounts:
- mountPath: /csi
Expand All @@ -765,7 +791,8 @@ spec:
- --v=5
- --endpoint=unix:/csi/csi.sock
- --run-controller-service=false
image: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.10.13
- --enable-data-cache
image: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.22.1
name: gce-pd-driver
securityContext:
privileged: true
Expand All @@ -786,7 +813,8 @@ spec:
- mountPath: /sys
name: sys
hostNetwork: true
nodeSelector: null
nodeSelector:
kubernetes.io/os: linux
priorityClassName: csi-gce-pd-node
serviceAccountName: csi-gce-pd-node-sa
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ spec:
channel: stable
cloudConfig:
gcpPDCSIDriver:
defaultStorageClassName: balanced-csi
enabled: true
version: v1.22.1
manageStorageClasses: true
multizone: true
nodeTags: minimal-example-com-k8s-io-role-node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
version: 9.99.0
- id: k8s-1.23
manifest: gcp-pd-csi-driver.addons.k8s.io/k8s-1.23.yaml
manifestHash: b565f0905b27e405ac3855bed4231f766e0068833c62ad7abcb408612ca19943
manifestHash: 6feff18c6ec4651da2eccc5a8ed76408cf1fcd78d76dc2f3ffdce3d8c983df09
name: gcp-pd-csi-driver.addons.k8s.io
selector:
k8s-addon: gcp-pd-csi-driver.addons.k8s.io
Expand Down
Loading
Loading