Bug 1956411 - Apply custom tags to AWS EBS volumes
Summary: Apply custom tags to AWS EBS volumes
Keywords:
Status: VERIFIED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Jan Safranek
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 16:07 UTC by Jan Safranek
Modified: 2021-05-07 06:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift aws-ebs-csi-driver-operator pull 116 0 None open Bug 1956411: Add custom tags from Infrastructure 2021-05-03 16:07:49 UTC

Description Jan Safranek 2021-05-03 16:07:21 UTC
Description of problem:

As described in https://github.com/openshift/enhancements/pull/706 (and its implementation in https://github.com/openshift/api/pull/864), we want to allow users to configure custom tags that should be applied to a newly created AWS EBS volume.

Since in-tree volume plugin is deprecated and required changes would be too large, we decided to update only the CSI driver.

Steps to Reproduce:

1. edit Infrastructure CR and set Infrastructure.Status.PlatformStatus.AWS.ResourceTags:
- key: foo
  value: bar
- key: baz
  value: xyz

(note: oc edit does not allow to edit status subresource!)

2. create a new PVC + Pod using the AWS EBS CSI driver

Expected results:
Newly provisioned EBS volume has required tags. Already existing volumes are not affected!

Comment 2 Qin Ping 2021-05-07 06:32:11 UTC
Verified with: 4.8.0-0.nightly-2021-05-06-210840

Setting user tags like:
$ oc get infrastructures.config.openshift.io cluster -ojson|jq .status.platformStatus.aws.resourceTags
[
  {
    "key": "adminContact",
    "value": "wzheng"
  },
  {
    "key": "costCenter",
    "value": "7536"
  }
]

1. Created PVC + Pod, checked from the aws web console, ebs volume has these tags.
2. Created a volumesnapshot, checked from the aws web console, snapshot has these tags too.
3. Enabled CSI migration, created PVC + Pod, checked from the aws web console, ebs volume has these tags.


Note You need to log in before you can comment on or make changes to this bug.