-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: support adding labels and annotations to cluster secret (#7115) #7139
Conversation
@alexmt I assumed we need this feature only while creating clusters. Should there be a provision to update them as well using |
9dbb0c0
to
52f7bc6
Compare
Codecov Report
@@ Coverage Diff @@
## master #7139 +/- ##
==========================================
- Coverage 41.06% 41.04% -0.03%
==========================================
Files 158 158
Lines 21274 21300 +26
==========================================
+ Hits 8736 8742 +6
- Misses 11285 11305 +20
Partials 1253 1253
Continue to review full report at Codecov.
|
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.
Thank you @chetan-rns ! Please address one comment about Equals
method and it is good to go.
// Labels for cluster secret metadata | ||
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,12,opt,name=labels"` | ||
// Annotations for cluster secret metadata | ||
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,13,opt,name=annotations"` |
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.
Please update Equals method in types.go as well:
argo-cd/pkg/apis/application/v1alpha1/types.go
Line 1281 in bd7f8c8
func (c *Cluster) Equals(other *Cluster) bool { |
It is used by Create API method to detect difference if cluster is already registered.
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.
Thanks! Updated Equals to return false on the mismatch of labels/annotations
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
52f7bc6
to
95c5807
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
…oj#7139) Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com> Signed-off-by: viktorplakida <plakyda1@gmail.com>
Signed-off-by: Chetan Banavikalmutt chetanrns1997@gmail.com
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Introduces flags to add labels and annotations while creating cluster secrets.
Example:
Closes: #7115