ROX-16205: Add Operator Version label to Centrals#909
Conversation
| } | ||
|
|
||
| if r.labelOperatorVersionEnabled { | ||
| labels := central.ObjectMeta.Labels |
There was a problem hiding this comment.
Does this need a nil check ?
e.g.
if labels == nil { labels = map[string]string{} }
There was a problem hiding this comment.
No, because it is set hardcoded above and not returned.
Even as a return value from the k8s API it is guaranteed to be set, except if nil is returned.
SimonBaeumer
left a comment
There was a problem hiding this comment.
What is the value of this PR?
It applies the default operator version, but what does it change?
The label should be dervied the remoteCentral variable because the version is different for very tenant.
The default version will be applied from fleet-manager to central instances.
| } | ||
|
|
||
| if r.labelOperatorVersionEnabled { | ||
| labels := central.ObjectMeta.Labels |
There was a problem hiding this comment.
No, because it is set hardcoded above and not returned.
Even as a return value from the k8s API it is guaranteed to be set, except if nil is returned.
59c7e96 to
68a4ce8
Compare
SimonBaeumer
left a comment
There was a problem hiding this comment.
As discussed offline with @kurlov, @ludydoo and @johannes94 we agreed this can be merged as an intermediate step.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kurlov, SimonBaeumer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Add an Operator Version label to Central instances. It will be used for Canary Upgrades.
Additional note: k8s Label, selector, and annotation conventions
Checklist (Definition of Done)
Test manual- [ ] Documentation added if necessary (i.e. changes to dev setup, test execution, ...)ROX-12345: ...- [ ] Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.Test manual