Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/helm-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.13.3
version: v3.16.4

- name: Install helm-unittest plugin
run: helm plugin install https://github.com/helm-unittest/helm-unittest
run: helm plugin install https://github.com/helm-unittest/helm-unittest --version v0.6.0

- name: Lint Helm chart
run: helm lint charts/iag4
Expand Down
9 changes: 5 additions & 4 deletions charts/iag4/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,11 @@ spec:
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
path: {{ .Values.livenessProbe.path }}
port: {{ .Values.applicationPort }}
scheme: {{ ternary "HTTPS" "HTTP" .Values.useTLS }}
exec:
command:
- sh
- -c
- 'test $(pgrep -f automation-gateway | wc -l) -ge 2'
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
Expand Down
26 changes: 21 additions & 5 deletions charts/iag4/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,28 +285,44 @@ tests:
set:
statefulset.enabled: true
serviceAccount.name: "test-sa"
applicationPort: 8080
useTLS: false
livenessProbe:
enabled: true
periodSeconds: 20
timeoutSeconds: 10
failureThreshold: 5
successThreshold: 1
path: "/health"
applicationSettings:
enabled: true
env: {}
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe.httpGet.scheme
value: "HTTP"
path: spec.template.spec.containers[0].livenessProbe.exec.command
value:
- sh
- -c
- 'test $(pgrep -f automation-gateway | wc -l) -ge 2'
- equal:
path: spec.template.spec.containers[0].livenessProbe.periodSeconds
value: 20
- equal:
path: spec.template.spec.containers[0].livenessProbe.failureThreshold
value: 5
- notExists:
path: spec.template.spec.containers[0].livenessProbe.httpGet

# Test 12b: Test liveness probe is not created when disabled
- it: should not configure liveness probe when disabled
set:
statefulset.enabled: true
serviceAccount.name: "test-sa"
livenessProbe:
enabled: false
applicationSettings:
enabled: true
env: {}
asserts:
- notExists:
path: spec.template.spec.containers[0].livenessProbe

# Test 13: Test readiness probe
- it: should configure readiness probe when enabled
Expand Down
6 changes: 3 additions & 3 deletions charts/iag4/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ external-dns:
# The image name will depend on the entitlement that has been granted.
image:
# -- The image repository
repository: 497639811223.dkr.ecr.us-east-2.amazonaws.com/automation-gateway
# -- Contact Itential to get the correct image repository for your entitlement.
repository:
# -- The image pull policy
pullPolicy: IfNotPresent
# -- The image tag
Expand Down Expand Up @@ -159,15 +160,14 @@ livenessProbe:
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
path: "/api/v2.0/poll"

# The readiness probe used to determine if the container is ready to accept requests. If the
# readiness probe fails, the endpoints controller removes the pod’s IP address from the
# endpoints of all services that match the pod. The default state of readiness before the
# initial delay is failure. If a container does not provide a readiness probe, the default
# state is success. These are suggested values.
readinessProbe:
readinessProbe: false
enabled: false
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
Expand Down