Skip to content

Commit

Permalink
fix swapped liveness/readiness http paths. (#4541)
Browse files Browse the repository at this point in the history
* created changelog fragment
* fixed scaffold template for the manager resource (ansible/helm)
* fixed testdata (ansible/helm)

Signed-off-by: Florin Hillebrand <flozzone@gmail.com>
  • Loading branch information
flozzone committed Feb 17, 2021
1 parent 7dc62b5 commit d27c46d
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 12 deletions.
29 changes: 29 additions & 0 deletions changelog/fragments/swap-readiness-liveness-paths-4541.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# issue #4541
entries:
- description: >
For Ansible/Helm-based operators, fix swapped readinessProbe/livenessProbe in manager
kind: "bugfix"
breaking: false
migration:
header: For Ansible/Helm-based operators, swap the paths of the probes in config/manager/manager.yaml.
body: >
If the project structure has been scaffolded with operator-sdk >= v1.4.0, then the
HTTP paths for the `readinessProbe` and `livenessProbe` in the manager resource are wrong.
To fix this, swap both HTTP paths `config/manager/manager.yaml`. At the end you should have the
following probes in the deployment resource for the manager:
```
livenessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
```
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ spec:
image: {{ .Image }}
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ spec:
name: manager
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ spec:
image: quay.io/example/memcached-operator:v0.0.1
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ spec:
image: controller:latest
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ spec:
image: quay.io/example/memcached-operator:v0.0.1
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
4 changes: 2 additions & 2 deletions testdata/helm/memcached-operator/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ spec:
name: manager
livenessProbe:
httpGet:
path: /readyz
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
Expand Down

0 comments on commit d27c46d

Please sign in to comment.