Skip to content

Commit aa79a73

Browse files
committed
config: add aws usertags to infrastructure
Add a new field userTags to `.spec.aws` of the infrastructure.config.openshift.io type. Tags included in the userTags field will be applied to new resources created for the cluster. https://issues.redhat.com/browse/CORS-1657
1 parent 4b79815 commit aa79a73

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

config/v1/0000_10_config-operator_01_infrastructure.crd.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,24 @@ spec:
9999
empty.
100100
type: string
101101
pattern: ^https://
102+
userTags:
103+
description: userTags is a list of additional tags to apply
104+
to AWS resources created for the cluster. Changes made to
105+
userTags will not be reflected in existing AWS resources.
106+
The userTags are only applied to an AWS resource when the
107+
resource is created.
108+
type: array
109+
items:
110+
description: AWSUserTag is a tag to apply to AWS resources
111+
created for the cluster.
112+
type: object
113+
properties:
114+
key:
115+
description: key is the key of the tag
116+
type: string
117+
value:
118+
description: value is the value of the tag
119+
type: string
102120
azure:
103121
description: Azure contains settings specific to the Azure infrastructure
104122
provider.

config/v1/types_infrastructure.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ type AWSPlatformSpec struct {
301301
// There must be only one ServiceEndpoint for a service.
302302
// +optional
303303
ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`
304+
305+
// userTags is a list of additional tags to apply to AWS resources created for the cluster. Changes made to userTags
306+
// will not be reflected in existing AWS resources. The userTags are only applied to an AWS resource when the
307+
// resource is created.
308+
// +optional
309+
UserTags []AWSUserTag `json:"userTags,omitempty"`
304310
}
305311

306312
// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.
@@ -315,6 +321,14 @@ type AWSPlatformStatus struct {
315321
ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`
316322
}
317323

324+
// AWSUserTag is a tag to apply to AWS resources created for the cluster.
325+
type AWSUserTag struct {
326+
// key is the key of the tag
327+
Key string `json:"key"`
328+
// value is the value of the tag
329+
Value string `json:"value"`
330+
}
331+
318332
// AzurePlatformSpec holds the desired state of the Azure infrastructure provider.
319333
// This only includes fields that can be modified in the cluster.
320334
type AzurePlatformSpec struct{}

config/v1/zz_generated.swagger_doc_generated.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)