Cause:
Bucket tags were being overwritten during a subsequent operator sync cycle.
Consequence:
Bucket was loosing user provided tags.
Fix:
A patch was placed making the operator to start to respect spec.storage.managementState when setting the tags. This way users can now clearly inform their intention on who/what is managing the remote storage (aws bucket on this case).
Result:
User provided tags are always set in the bucket if user sets spec.storage.managementState to "Managed".
Description of problem:
Launch a cluster with userTags in install-config defined, tags can be seen in S3 level when cluster is ready; but when set spec.managementState from Managed-> Removed-> Managed in configs.imageregistry, tags are gone in S3 level.
Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-30-201824
How reproducible:
60%
Steps to Reproduce:
1.Launch a cluster with userTags defined in install-config, below values can be seen in infrastructure.config.openshift.io:
status:
platformStatus:
aws:
region: us-east-2
resourceTags:
- key: adminContact
value: wzheng
- key: costCenter
value: qe
type: AWS
2.Check the tags in S3 level from AWS console
3.Set spec.managementState from Managed-> Removed-> Managed in configs.imageregistry
Actual results:
2. Tags can be seen and they are the same with the ones defined in install-config.
3. Tags are gone.
Expected results:
Tags should exist when image registry is restarted.
Additional info:
Definition in install-config:
platform:
aws:
region: us-east-2
experimentalPropagateUserTags: yes
userTags:
adminContact: wzheng
costCenter: qe
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
Description of problem: Launch a cluster with userTags in install-config defined, tags can be seen in S3 level when cluster is ready; but when set spec.managementState from Managed-> Removed-> Managed in configs.imageregistry, tags are gone in S3 level. Version-Release number of selected component (if applicable): 4.8.0-0.nightly-2021-04-30-201824 How reproducible: 60% Steps to Reproduce: 1.Launch a cluster with userTags defined in install-config, below values can be seen in infrastructure.config.openshift.io: status: platformStatus: aws: region: us-east-2 resourceTags: - key: adminContact value: wzheng - key: costCenter value: qe type: AWS 2.Check the tags in S3 level from AWS console 3.Set spec.managementState from Managed-> Removed-> Managed in configs.imageregistry Actual results: 2. Tags can be seen and they are the same with the ones defined in install-config. 3. Tags are gone. Expected results: Tags should exist when image registry is restarted. Additional info: Definition in install-config: platform: aws: region: us-east-2 experimentalPropagateUserTags: yes userTags: adminContact: wzheng costCenter: qe