Skip to content

Commit

Permalink
Externalise liveness and readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
rvowles committed Feb 17, 2024
1 parent d357417 commit 8f4d067
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
3 changes: 3 additions & 0 deletions helm/featurehub/templates/global-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.global.ingress.ingressClassName }}
ingressClassName: "{{ .Values.global.ingress.ingressClassName }}"
{{- end }}
rules:
- http:
paths:
Expand Down
17 changes: 2 additions & 15 deletions helm/featurehub/templates/management-repository/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,9 @@ spec:
containerPort: 8701
protocol: TCP
livenessProbe:
initialDelaySeconds: 20
periodSeconds: 20
failureThreshold: 2
timeoutSeconds: 3
httpGet:
path: {{ include "featurehub.liveness.url" . | quote }}
port: metrics
{{- toYaml .Values.managementRepository.livenessProbe | nindent 12 }}
readinessProbe:
initialDelaySeconds: 20
periodSeconds: 20
successThreshold: 2
failureThreshold: 2
timeoutSeconds: 3
httpGet:
path: {{ include "featurehub.readiness.url" . | quote }}
port: metrics
{{- toYaml .Values.managementRepository.readinessProbe | nindent 12 }}
volumeMounts:
{{- if gt ( len .Values.global.extraCommonConfigFiles ) 0 -}}
{{- range $cm := .Values.global.extraCommonConfigFiles }}
Expand Down
24 changes: 24 additions & 0 deletions helm/featurehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ global:
ingress:
enabled: true
annotations: []
# -- specify the ingress class name if thats what makes yor ingress work. E.g. in AWS its "alb"
ingressClassName: ""

# -- If `true`, entries from `environmentVars` will be mapped to /etc/app-config/common.properties file
# To mount secret settings as /etc/app-config/common.properties see volume fields
Expand Down Expand Up @@ -128,6 +130,28 @@ managementRepository:
# cpu: 100m
# memory: 128Mi

# -- this allows you to override the values of the liveness probe for MR
livenessProbe:
initialDelaySeconds: 20
periodSeconds: 20
failureThreshold: 2
timeoutSeconds: 3
httpGet:
path: "/health/liveness"
port: metrics

# -- this allows you to override the readiness probe
readinessProbe:
initialDelaySeconds: 20
periodSeconds: 20
successThreshold: 2
failureThreshold: 2
timeoutSeconds: 3
httpGet:
path: "/health/readiness"
port: metrics


serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 8f4d067

Please sign in to comment.