You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supporting String Interpolation for Modifying Tags On Existing Volumes Through VAC (#2093)
* Supporting String Interpolation for Modifying Tags On Existing Volumes Through VAC
* Bumped external resizer version
* Bumped eks-distro versions to 1.32
* oc update + Making --extra-modify-metadata flag default
* Ran make update
* Removed extra parameter + Addressed doc feedback
Copy file name to clipboardexpand all lines: docs/tagging.md
+27-3
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ To help manage volumes in the aws account, CSI driver will automatically add tag
11
11
12
12
# StorageClass Tagging
13
13
14
-
The AWS EBS CSI Driver supports tagging through `StorageClass.parameters` (in v1.6.0 and later).
14
+
The AWS EBS CSI Driver supports tagging through `StorageClass.parameters`.
15
15
16
16
If a key has the prefix `tagSpecification`, the CSI driver will treat the value as a key-value pair to be applied to the dynamically provisioned volume as tags.
17
17
@@ -97,8 +97,26 @@ billingID=ABCDEF
97
97
```
98
98
99
99
# Adding, Modifying, and Deleting Tags Of Existing Volumes
100
-
The AWS EBS CSI Driver supports the modifying of tags of existing volumes through `VolumeAttributesClass.parameters` the examples below show the syntax for addition, modification, and deletion of tags within the `VolumeAttributesClass.parameters`. For a walkthrough on how to apply these modifications to a volume follow the [walkthrough for Volume Modification via VolumeAttributeClass](../examples/kubernetes/modify-volume)
101
-
100
+
The AWS EBS CSI Driver supports the modifying of tags of existing volumes through `VolumeAttributesClass.parameters` the examples below show the syntax for addition, modification, and deletion of tags within the `VolumeAttributesClass.parameters`. The driver also supports runtime string interpolation on tag values for a volume upon modification, which allows the specification of placeholder values for the PVC namespace, PVC name, and PV name, which will then be dynamically computed at runtime.
101
+
102
+
**Note: Interpolated tags require the `--extra-modify-metadata` flag to be enabled on the `external-resizer` sidecar. To modify Amazon EBS resource tags through VACs, ensure that you attach the following IAM Policy to the role used by your Amazon EBS CSI driver:**
103
+
```
104
+
{
105
+
"Version": "2012-10-17",
106
+
"Statement": [
107
+
{
108
+
"Effect": "Allow",
109
+
"Action": [
110
+
"ec2:CreateTags"
111
+
],
112
+
"Resource": [
113
+
"arn:aws:ec2:*:*:volume/*",
114
+
"arn:aws:ec2:*:*:snapshot/*"
115
+
]
116
+
}
117
+
]
118
+
}
119
+
```
102
120
**Syntax for Adding or Modifying a Tag**
103
121
104
122
If a key has the prefix `tagSpecification`, the CSI driver will treat the value as a key-value pair to be added to the existing volume. If there is already an existing tag with the specified key, the CSI driver will overwrite the value of that tag with the new value specified.
@@ -111,6 +129,12 @@ driverName: ebs.csi.aws.com
111
129
parameters:
112
130
tagSpecification_1: "location=Seattle"
113
131
tagSpecification_2: "cost-center=" // If the value is left blank, tag is created with an empty value
0 commit comments