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

Are CSV paths for readinessProbe and livenessProbe reversed? #4601

Closed
jwalcorn opened this issue Mar 4, 2021 · 3 comments
Closed

Are CSV paths for readinessProbe and livenessProbe reversed? #4601

jwalcorn opened this issue Mar 4, 2021 · 3 comments
Labels
language/helm Issue is related to a Helm operator project

Comments

@jwalcorn
Copy link

jwalcorn commented Mar 4, 2021

Bug Report

Looking at the generated CSV yaml, under spec.install.spec.deployments, there are two containers: kube-rbac-proxy
and manager. The latter has a livenessProbe and a readinessProbe defined. But the paths look swapped: the /readyz path is on the livenessProbe, not on the readinessProbe as you'd expect from a path named "readyz". The path on the readinessProbe is /healthz. I'm wondering if a copy/paste typo got made here, swapping the two paths.

What did you do?

Generated a helm-based operator and looked at the yaml for the CSV.

What did you expect to see?

                livenessProbe:
                  httpGet:
                    path: /healthz
                    port: 8081
                  initialDelaySeconds: 15
                  periodSeconds: 20
                readinessProbe:
                  httpGet:
                    path: /readyz
                    port: 8081
                  initialDelaySeconds: 5
                  periodSeconds: 10

What did you see instead? Under which circumstances?

                livenessProbe:
                  httpGet:
                    path: /readyz
                    port: 8081
                  initialDelaySeconds: 15
                  periodSeconds: 20
                readinessProbe:
                  httpGet:
                    path: /healthz
                    port: 8081
                  initialDelaySeconds: 5
                  periodSeconds: 10

Environment

Operator type:

/language helm

Kubernetes cluster type:

OpenShift

$ operator-sdk version

v1.4.0

$ go version (if language is Go)

$ kubectl version

v1.17.2

Possible Solution

Swap the paths for the readinessProbe and the livenessProbe

Additional context

If the values are somehow correct, perhaps at least generate a comment explaining the confusion

@openshift-ci-robot openshift-ci-robot added the language/helm Issue is related to a Helm operator project label Mar 4, 2021
@jwalcorn
Copy link
Author

jwalcorn commented Mar 4, 2021

BTW, I'm getting an image pull error on that manager container. The image field is set to just controller:latest, without a registry or org specified. When I install my operator, I see the following in the events for the pod for my operator:

Failed to pull image "controller:latest": rpc error: code = Unknown desc = Error reading manifest latest in docker.io/library/controller: errors: denied: requested access to the resource is denied unauthorized: authentication required

Do we have to have our users create an ImagePullSecret in order to get our operators working? If so, is there a way I can get my install plan to make that for the user? Thanks.

image

My CSV is here: https://github.com/IBMStockTrader/stocktrader-operator/blob/master/bundle/manifests/stocktrader-operator.clusterserviceversion.yaml

@estroz
Copy link
Member

estroz commented Mar 4, 2021

@jwalcorn the endpoint mixup was fixed in #4546. The v1.5 migration guide, when released, will discuss swapping them.

The intent is to run make bundle IMG=<registry>/<repo>/your-operator:vX.Y.Z so kustomize can substitute the default image name controller:latest for your remote image. If you still have questions about this, open another issue. Thanks!

@estroz estroz closed this as completed Mar 4, 2021
@jwalcorn
Copy link
Author

jwalcorn commented Mar 4, 2021

Thanks, glad to hear the swapped endpoints will be fixed in 1.5. And yes, I had separately figured out what value needed to be in that image field for the manager container, by looking at the sample at https://github.com/operator-framework/operator-sdk/tree/master/testdata/helm/memcached-operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/helm Issue is related to a Helm operator project
Projects
None yet
Development

No branches or pull requests

3 participants