- Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug Report
What did you do?
Generated a ansible based operator with operator-sdk 1.4.2
What did you expect to see?
'config/manager/manager.yaml' containing the livenessProbe and readinessProbe from the upgrade guide:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.4.0/#for-ansible-based-operators-add-liveness-and-readiness-probe
livenessProbe: httpGet: path: /healthz port: 6789 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: 6789 initialDelaySeconds: 5 periodSeconds: 10 What did you see instead? Under which circumstances?
livenessProbe using /readyz endpoint and readinessProbe using /healthz endpoint. Should be the other way around.
livenessProbe: httpGet: path: /readyz port: 6789 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /healthz port: 6789 initialDelaySeconds: 5 periodSeconds: 10 Environment
Operator type:
/language ansible
/language helm
Kubernetes cluster type:
Openshift
Server Version: 4.6.15
Kubernetes Version: v1.19.0+1833054
$ operator-sdk version
operator-sdk version: "v1.4.2", commit: "4b083393be65589358b3e0416573df04f4ae8d9b", kubernetes version: "1.19.4", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-18T12:09:25Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0+1833054", GitCommit:"183305424c91636d683dfb4a379204c313976be2", GitTreeState:"clean", BuildDate:"2021-01-22T14:47:21Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Possible Solution
Swap the two endpoints
Additional context
Added a code review to PR #4326 regarding this.
Please see also the wrong path to the manager resource file in the upgrade guide https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.4.0/#for-ansible-based-operators-add-liveness-and-readiness-probe
config/default/manager/manager.yaml -> 'config/manager/manager.yaml'