Skip to content

Commit 2b010fd

Browse files
Merge pull request #1700 from TrilokGeer/tags-addendum
CFE-1162: Updates enhancement to reflect hcp usecase and with latest information on aws tags support
2 parents c840af2 + 287c7c9 commit 2b010fd

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

enhancements/api-review/custom-tags-aws.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ status: implementable
3939
This enhancement describes a proposal to allow an administrator of OpenShift to
4040
have the ability to apply user defined tags to many resources created by OpenShift in AWS.
4141

42-
Note: this enhancement is slightly retroactive. Work has already begun on this. See
43-
- https://github.com/openshift/api/pull/864
44-
- https://github.com/openshift/cluster-ingress-operator/pull/578
45-
- https://github.com/openshift/api/pull/1064/
42+
Note: The work is carried out as part of
43+
- https://issues.redhat.com/browse/RFE-1101
44+
- https://issues.redhat.com/browse/RFE-2012
45+
- https://issues.redhat.com/browse/RFE-3677
4646

4747
## Motivation
4848

@@ -62,22 +62,21 @@ list of user-defined tags to the OpenShift Installer, and everything created by
6262
bootstrapped components will apply those tags to all resources created in AWS, for the life of the cluster, and where supported by AWS.
6363
- Tags must be applied at creation time, in an atomic operation. It isn't acceptable to create an object and,
6464
after some period of time, apply the tags post-creation.
65+
- Tags can be updated day2 on the AWS resources.
6566

6667
### Non-Goals
6768

68-
- To reduce initial scope, tags are applied only at creation time and not reconciled. If an administrator manually
69-
changes the tags stored in the infrastructure resource, behavior is undefined. See below.
70-
- To reduce initial scope, we are not implementing this for clouds other than AWS. We will not take any actions
69+
- To reduce initial scope, in case of standalone OpenShift, tags are applied only at creation time and not reconciled. If an administrator manually
70+
changes the tags stored in the infrastructure resource, behavior is undefined.
71+
- To reduce initial scope, for hosted control plane deployments, we are not implementing this for clouds other than AWS. We will not take any actions
7172
to prohibit that later.
7273

7374
## Proposal
7475

75-
### Existing design details
76-
77-
New `experimentalPropagateUserTags` field added to `.platform.aws` of install config to indicate that the user tags should be applied to AWS
76+
New `propagateUserTags` field added to `.platform.aws` of install config to indicate that the user tags should be applied to AWS
7877
resources created by in-cluster operators.
7978

80-
If `experimentalPropagateUserTags` is true, install validation will fail if there is any tag that starts with `kubernetes.io` or `openshift.io`.
79+
If `propagateUserTags` is true, install validation will fail if there is any tag that starts with `kubernetes.io` or `openshift.io`.
8180

8281
Add a new field `resourceTags` to `.status.aws` of the `infrastructure.config.openshift.io` type. Tags included in the
8382
`resourceTags` field will be applied to new resources created for the cluster. The `resourceTags` field will be populated by the installer only if the `experimentalPropagateUserTags` field is true.
@@ -91,19 +90,20 @@ userTags that are specified in the infrastructure resource will merge with userT
9190

9291
The userTags field is intended to be set at install time and is considered immutable. Components that respect this field must only ever add tags that they retrieve from this field to cloud resources, they must never remove tags from the existing underlying cloud resource even if the tags are removed from this field(despite it being immutable).
9392

94-
If the userTags field is changed post-install, there is no guarantee about how an in-cluster operator will respond to the change. Some operators may reconcile the change and change tags on the AWS resource. Some operators may ignore the change. However, if tags are removed from userTags, the tag will not be removed from the AWS resource.
95-
96-
### Updated design details
93+
In case of hosted control plane deployments, the userTags field is updated with latest updates requested by user. The merge logic gives higher precedence to userTags when there is duplicate tag found on the AWS resource.
9794

98-
A new field `propagateUserTags` is added in GA release version. The `experimentalPropagateUserTags` field will be deprecated. In future release versions, `experimentalPropagateUserTags` will be removed.
99-
When both fields are set, `experimentalPropagateUserTags` takes precedence.
95+
If the userTags field is changed post-install, all AWS resources created and managed by in-cluster and RedHat supported operators will be reconciled. Non-redhat supported operators may reconcile the change and change tags on the AWS resource or may ignore the change. However, if tags are removed from userTags, the tag will not be removed from the AWS resource.
10096

97+
For the resources created and managed by hosted control plane, cluster api provider for aws reconciles the user tags on AWS resources. The hosted control plane updates the `infrastructure.config.openshift.io` resource to reflect new tags in `resourceTags`. The OpenShift operators, both core and non-core (managed by RedHat), reconcile the respective AWS resources created and managed by them.
98+
Given that, there is no universal controller to update all resources created by OpenShift, the day2 updates of tags is not supported for standalone OpenShift deployments.
10199
### User Stories
102100

103-
https://issues.redhat.com/browse/SDE-1146 - IAM users and roles can only operate on resources with specific tags
101+
1. https://issues.redhat.com/browse/SDE-1146 - IAM users and roles can only operate on resources with specific tags
104102
As a security-conscious ROSA customer, I want to restrict the permissions granted to Red Hat in my AWS account by using
105103
AWS resource tags.
106104

105+
2. https://issues.redhat.com/browse/OCPSTRAT-787 - As a user of ROSA with HCP, I want to add and update tags on all AWS resources created by OpenShift, given that there is security limitation on direct access to update to AWS resources.
106+
107107
### API Extensions
108108

109109
```yaml
@@ -119,17 +119,14 @@ apiVersion: apiextensions.k8s.io/v1
119119
properties:
120120
platform:
121121
aws:
122-
experimentalPropagateUserTags:
123-
description: ExperimentalPropagateUserTags is an experimental
124-
flag that directs in-cluster operators to include the specified
125-
user tags in the tags of the AWS resources that the operators
126-
create. The field is deprecated.
127-
type: boolean
128122
propagateUserTags:
129123
description: PropagateUserTags is a flag that directs in-cluster operators to include the specified
130124
user tags in the tags of the AWS resources that the operators create.
131125
type: boolean
132126
```
127+
### Implementation constraints
128+
- The NLB is not reconciled with tag updates from service annotations by cloud-provider-aws controller. The [possible mitigations](https://github.com/openshift/cluster-ingress-operator/pull/1148#issuecomment-2423161470) are in discussions by stakeholders on possible actions.
129+
- The AWS load balancer controller implementation considers tag information arguments as single source of truth. Hence, removes any differing tag keys set on the load balancer. As a mitigation, it is suggested for user to set the tags on service annotations rather than AWS resource directly.
133130
134131
### Risks and Mitigations
135132
@@ -157,7 +154,6 @@ This enhancement updates `experimentalPropagateUserTags` field.
157154
On upgrade:
158155

159156
- The new status field won't be populated since it is only populated by the installer and that can't have happened if the cluster was installed from a prior version. Components that consume the new field should take no action since they will see no additional tags.
160-
- The `experimentalPropagateUserTags` field will be deprecated in the GA release version to support updates to existing usages in scripts or configs and will be removed in the version after the GA release version.
161157

162158
On downgrade:
163159

@@ -552,3 +548,5 @@ As AWS considers empty string as a valid tag value, the behaviour becomes ambigu
552548

553549
## Infrastructure Needed [optional]
554550

551+
552+

0 commit comments

Comments
 (0)