From f79a3e1f837f07c6a78dbfe80a651bdc22399312 Mon Sep 17 00:00:00 2001 From: Connor Catlett Date: Wed, 14 Aug 2024 18:13:08 +0000 Subject: [PATCH 1/2] Auto-enable VAC on clusters with beta API version Signed-off-by: Connor Catlett --- charts/aws-ebs-csi-driver/templates/controller.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/aws-ebs-csi-driver/templates/controller.yaml b/charts/aws-ebs-csi-driver/templates/controller.yaml index 4053ee1807..f5d42f89ca 100644 --- a/charts/aws-ebs-csi-driver/templates/controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/controller.yaml @@ -231,6 +231,9 @@ spec: {{- if not (regexMatch "(-retry-interval-max)" (join " " .Values.sidecars.provisioner.additionalArgs)) }} - --retry-interval-max=30m {{- end }} + {{- if .Capabilities.APIVersions.Has "storage.k8s.io/v1beta1/VolumeAttributesClass" }} + - --feature-gates=VolumeAttributesClass=true + {{- end }} {{- range .Values.sidecars.provisioner.additionalArgs }} - {{ . }} {{- end }} @@ -287,6 +290,9 @@ spec: {{- if not (regexMatch "(-retry-interval-max)" (join " " .Values.sidecars.attacher.additionalArgs)) }} - --retry-interval-max=5m {{- end }} + {{- if .Capabilities.APIVersions.Has "storage.k8s.io/v1beta1/VolumeAttributesClass" }} + - --feature-gates=VolumeAttributesClass=true + {{- end }} {{- range .Values.sidecars.attacher.additionalArgs }} - {{ . }} {{- end }} From 4d14b6d92d5a5e97b2edd24cddc60e8161fde0a4 Mon Sep 17 00:00:00 2001 From: Connor Catlett Date: Wed, 14 Aug 2024 18:13:29 +0000 Subject: [PATCH 2/2] Update VAC documentation for Kubernetes 1.31 and tagging modification feature Signed-off-by: Connor Catlett --- docs/modify-volume.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/modify-volume.md b/docs/modify-volume.md index d31310f43d..ea0820129d 100644 --- a/docs/modify-volume.md +++ b/docs/modify-volume.md @@ -12,12 +12,14 @@ The EBS CSI Driver (starting from v1.19.0) supports volume modification through To use this feature, it must be enabled in the following places: - `VolumeAttributesClass` feature gate on `kube-apiserver` (consult your Kubernetes distro's documentation) -- `storage.k8s.io/v1alpha1` enabled in `kube-apiserver` via [`runtime-config`](https://kubernetes.io/docs/tasks/administer-cluster/enable-disable-api/) (consult your Kubernetes distro's documentation) +- `storage.k8s.io/v1alpha1` (Kubernetes 1.30 and before) or `storage.k8s.io/v1alpha1` (Kubernetes 1.31 and later) enabled in `kube-apiserver` via [`runtime-config`](https://kubernetes.io/docs/tasks/administer-cluster/enable-disable-api/) (consult your Kubernetes distro's documentation) - `VolumeAttributesClass` feature gate on `kube-controller-manager` (consult your Kubernetes distro's documentation) -- `VolumeAttributesClass` feature gate on `external-provisioner` (add `--feature-gates=VolumeAttributesClass=true` to `sidecars.provisioner.additionalArgs` when using the EBS CSI Helm chart) -- `VolumeAttributesClass` feature gate on `kube-controller-manager` (add `--feature-gates=VolumeAttributesClass=true` to `sidecars.resizer.additionalArgs` when using the EBS CSI Helm chart) +- `VolumeAttributesClass` feature gate on `external-provisioner` sidecar +- `VolumeAttributesClass` feature gate on `external-resizer` sidecar -For more information, see the [Kubernetes documentation for the feature](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/). +The EBS CSI Driver Helm chart will automatically enable the `VolumeAttributesClass` feature gate on the sidecars if `VolumeAttributesClass` object is detected with a beta API version (Kubernetes 1.31 and later). You (or your Kubernetes distro, on your behalf) are responsible for enabling the feature gate on the control plane components (`kube-apiserver` and `kube-controller-manager`). + +For more information, see the [Kubernetes documentation for Volume Attributes Classes](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/). ### `volume-modifier-for-k8s` @@ -33,6 +35,8 @@ Users can specify the following modification parameters: - `iops`: to update the IOPS - `throughput`: to update the throughput +The EBS CSI Driver also supports modifying tags of existing volumes (only available for `VolumeAttributesClass`), see [the modification section in the tagging documentation](tagging.md#adding-modifying-and-deleting-tags-of-existing-volumes) for more information. + ## Considerations - Keep in mind the [6 hour cooldown period](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyVolume.html) for EBS ModifyVolume. Multiple ModifyVolume calls for the same volume within a 6 hour period will fail.