Bug 1956411

Summary: Apply custom tags to AWS EBS volumes
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: StorageAssignee: Jan Safranek <jsafrane>
Storage sub component: Operators QA Contact: Qin Ping <piqin>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:05:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.

Comment 5 errata-xmlrpc 2021-07-27 23:05:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438