-
Notifications
You must be signed in to change notification settings - Fork 13
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
ROX-16205: Add Operator Version label to Centrals #909
ROX-16205: Add Operator Version label to Centrals #909
Conversation
@@ -196,6 +200,12 @@ func (r *CentralReconciler) Reconcile(ctx context.Context, remoteCentral private | |||
}, | |||
} | |||
|
|||
if r.labelOperatorVersionEnabled { | |||
labels := central.ObjectMeta.Labels |
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.
Does this need a nil check ?
e.g.
if labels == nil { labels = map[string]string{} }
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.
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.
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.
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.
@@ -196,6 +200,12 @@ func (r *CentralReconciler) Reconcile(ctx context.Context, remoteCentral private | |||
}, | |||
} | |||
|
|||
if r.labelOperatorVersionEnabled { | |||
labels := central.ObjectMeta.Labels |
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.
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
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.
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
Needs 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