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

Upgrade from 1.32.0 to 1.33.0 fails #1870

Closed
kevinearls opened this issue Apr 26, 2022 · 10 comments · Fixed by #1920
Closed

Upgrade from 1.32.0 to 1.33.0 fails #1870

kevinearls opened this issue Apr 26, 2022 · 10 comments · Fixed by #1920
Labels
bug Something isn't working

Comments

@kevinearls
Copy link
Contributor

kevinearls commented Apr 26, 2022

Describe the bug
I tried to upgrade from Jaeger Operator v1.32.0 to 1.33.0 and it failed.

To Reproduce
Steps to reproduce the behavior:

  1. Start minikube
  2. kubectl create observability
  3. kubectl apply --namespace observability -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.32.0/jaeger-operator.yaml
  4. Wait till the operator finishes deploying
  5. kubectl apply --namespace observability -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.33.0/jaeger-operator.yaml

This gave me:

[validatingwebhookconfiguration.admissionregistration.k8s.io/jaeger-operator-validating-webhook-configuration](http://validatingwebhookconfiguration.admissionregistration.k8s.io/jaeger-operator-validating-webhook-configuration) configured
The Deployment "jaeger-operator" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"[app.kubernetes.io/name](http://app.kubernetes.io/name)":"jaeger-operator", "name":"jaeger-operator"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

Expected behavior
The operator should upgrade to 1.33.0

@kevinearls kevinearls added the bug Something isn't working label Apr 26, 2022
@frzifus
Copy link
Member

frzifus commented Apr 26, 2022

thx for reporting, I'll try to take a closer look during the week.

@ivaske
Copy link

ivaske commented Apr 29, 2022

I get the same error but i'm upgrading from 1.31.0

@frzifus
Copy link
Member

frzifus commented Apr 29, 2022

@ivaske did you use OLM or also just a deployment?

@ivaske
Copy link

ivaske commented Apr 29, 2022

@frzifus
I just installed the deployment like that:
kubectl apply -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.33.0/jaeger-operator.yaml -n observability

A few weeks ago i did the same with Version 1.31.0 and wanted to update now.

@jkandasa
Copy link
Member

@frzifus root cause for this issue, we have introduced extra match selector label in deployment of the recent build. As per the k8s doc, Deployment's label selector is immutable

new selector label:

app.kubernetes.io/name: jaeger-operator

k8s doc

image
Source: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates

@frzifus
Copy link
Member

frzifus commented May 30, 2022

But how do you add more labels via operator sdk? Maybe we want to add more common labels in the future.

I expected that a deployment is replaced. Is there an csv option to overwrite deployments?

Found this in kubectl:

$ kubectl apply -h | grep overwrite
      --overwrite=true: Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration

@frzifus
Copy link
Member

frzifus commented May 30, 2022

we could solve the issue temporarily by simply removing the label, what do you think? @jkandasa @rubenvp8510

@jkandasa
Copy link
Member

@frzifus I am fine with removing the label

@rubenvp8510
Copy link
Collaborator

I'm fine with removing the label too.

@frzifus
Copy link
Member

frzifus commented May 30, 2022

Would like to briefly check if the problem also occurs with olm too. If not, we should extend the documentation that kubectl apply ... --overwrite ... is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants