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
16 changes: 16 additions & 0 deletions arena-artifacts/charts/cron-operator/templates/operator-dp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ spec:
- containerPort: 8443
name: metrics
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
24 changes: 24 additions & 0 deletions arena-artifacts/charts/cron-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,27 @@ resources:

# -- Tolerations for cron-operator pods.
tolerations: []

# -- Liveness probe configuration.
# The operator pod will be restarted if the liveness probe fails.
livenessProbe:
# -- Number of seconds after the container has started before liveness probes are initiated.
initialDelaySeconds: 15
# -- How often (in seconds) to perform the probe.
periodSeconds: 30
# -- Number of seconds after which the probe times out.
timeoutSeconds: 3
# -- Minimum consecutive failures for the probe to be considered failed.
failureThreshold: 3

# -- Readiness probe configuration.
# The operator pod will not receive traffic if the readiness probe fails.
readinessProbe:
# -- Number of seconds after the container has started before readiness probes are initiated.
initialDelaySeconds: 10
# -- How often (in seconds) to perform the probe.
periodSeconds: 15
# -- Number of seconds after which the probe times out.
timeoutSeconds: 3
# -- Minimum consecutive failures for the probe to be considered failed.
failureThreshold: 3
86 changes: 86 additions & 0 deletions arena-artifacts/tests/cron-operator/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,89 @@ tests:
- key: key4
operator: Exists
effect: NoSchedule

- it: Should have livenessProbe with default values
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe.httpGet.path
value: /metrics
- equal:
path: spec.template.spec.containers[0].livenessProbe.httpGet.port
value: metrics
- equal:
path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds
value: 15
- equal:
path: spec.template.spec.containers[0].livenessProbe.periodSeconds
value: 30
- equal:
path: spec.template.spec.containers[0].livenessProbe.timeoutSeconds
value: 3
- equal:
path: spec.template.spec.containers[0].livenessProbe.failureThreshold
value: 3

- it: Should have readinessProbe with default values
asserts:
- equal:
path: spec.template.spec.containers[0].readinessProbe.httpGet.path
value: /metrics
- equal:
path: spec.template.spec.containers[0].readinessProbe.httpGet.port
value: metrics
- equal:
path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds
value: 10
- equal:
path: spec.template.spec.containers[0].readinessProbe.periodSeconds
value: 15
- equal:
path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds
value: 3
- equal:
path: spec.template.spec.containers[0].readinessProbe.failureThreshold
value: 3

- it: Should allow customizing livenessProbe values
set:
cron:
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 5
failureThreshold: 5
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds
value: 30
- equal:
path: spec.template.spec.containers[0].livenessProbe.periodSeconds
value: 60
- equal:
path: spec.template.spec.containers[0].livenessProbe.timeoutSeconds
value: 5
- equal:
path: spec.template.spec.containers[0].livenessProbe.failureThreshold
value: 5

- it: Should allow customizing readinessProbe values
set:
cron:
readinessProbe:
initialDelaySeconds: 20
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 5
asserts:
- equal:
path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds
value: 20
- equal:
path: spec.template.spec.containers[0].readinessProbe.periodSeconds
value: 30
- equal:
path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds
value: 5
- equal:
path: spec.template.spec.containers[0].readinessProbe.failureThreshold
value: 5