-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Adding a new field to clustermanager API to pass list of aws tags to be added to aws resources #358
✨ Adding a new field to clustermanager API to pass list of aws tags to be added to aws resources #358
Conversation
…added to aws resources Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nit comments.
I am ok with this but maybe consider the option of just use the cluster manager CR's labels/annotations (maybe follow some predefined regex/key). Let see what Qiu Jian thinks.
operator/v1/types_clustermanager.go
Outdated
@@ -125,7 +125,7 @@ type RegistrationDriverHub struct { | |||
// +kubebuilder:validation:Enum=csr;awsirsa | |||
AuthType string `json:"authType,omitempty"` | |||
|
|||
// This represents the hub cluster ARN | |||
// This represents the hub cluster ARN. Applicable to only awsirsa authentication type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could you group the Applicable to only awsirsa authentication type
fields together.
To me the order should be: AuthType, AutoApprovedIdentities, HubClusterArn, Tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't resolve this thread. Please feel free to resolve it if you are able to. Thanks.
|
||
// List of tags to be added to AWS resources created by hub while processing awsirsa registration request. | ||
// Applicable to only awsirsa authentication type. | ||
// Example - "product:v1:tenant:app-name=My-App" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just wondering is app-name=My-App
close to the real usage of this field? If it is, please ignore this comment. Is better to have example like primary/secondary hub? Just guessing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes appname is the real usage, we have tags like appname, createdby, deptname etc
We are planning to reuse same roles for both primary and secondary, which is why we are not adding primary/secondary for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't resolve this thread. Please feel free to resolve it if you are able to. Thanks.
We thought about it. In our case the keys for k8s labels and aws tags and complete different to the extent that regex cannot be used to replace them. Otherwise it was easier for us to just copy the labels from registration controller and use them as tags. |
hrm I was thinking the API should look like:
It means in RegistrationDriverHub we had a wrapped configuration struct for different drivers, which easily separated the configurations for different drivers. |
#359 as an example |
Signed-off-by: Alex <alexchan2988@gmail.com>
9bc6d6a
to
a47331a
Compare
|
||
// AwsIrsa represents the configuration for awsisra driver. | ||
// +optional | ||
AwsIrsa *AwsIrsaConfig `json:"awsisra,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AwsIrsa *AwsIrsaConfig `json:"awsisra,omitempty"` | |
AwsIrsa *AwsIrsaDriverConfig `json:"awsisra,omitempty"` |
To match the pattern of above CSRDriverConfig
. I think both should either include "Driver" or both should omit it. Same comment for the other occurrences.
Signed-off-by: Alex <alexchan2988@gmail.com>
6ec5650
to
b1c4e9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jaswalkiranavtar, mikeshng, qiujian16 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8c97932
into
open-cluster-management-io:main
Summary
Tags are required on all resources for cost attribution and identification purpose.
Related issue(s)
Fixes #open-cluster-management-io/ocm#514