Skip to content
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

fix: remove extra selector from network-operator Deployment #654

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

ykulazhenkov
Copy link
Collaborator

@ykulazhenkov ykulazhenkov commented Oct 30, 2023

Remove control-plane: {{ .Release.Name }}-controller selector from the network-operator object in the helm chart
to fix helm upgrade behaviour.

With the current selector we will have the following error when trying to upgrade from the latest GA version (23.7)

helm upgrade -n nvidia-network-operator network-operator ./network-operator -f myvalues.yaml 
Error: UPGRADE FAILED: cannot patch "network-operator" with kind Deployment: Deployment.apps "network-operator" is i
nvalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/instance":"n
etwork-operator", "app.kubernetes.io/name":"network-operator", "control-plane":"network-operator-controller"}, Match
Expressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable       

The extra selector was added as a part of #645

Remove `control-plane: {{ .Release.Name }}-controller` selector from the
network-operator object in the helm chart
to fix helm upgrade behaviour.

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
@@ -25,7 +25,6 @@ spec:
replicas: 1
selector:
matchLabels:
control-plane: {{ .Release.Name }}-controller
{{- include "network-operator.selectorLabels" . | nindent 6 }}
Copy link
Collaborator

@adrianchiris adrianchiris Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so any change to this line will also break upgrade ? i guess so...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like so

@adrianchiris
Copy link
Collaborator

/retest-nic_operator_helm

@adrianchiris adrianchiris merged commit a71eb8e into Mellanox:master Oct 31, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants