Skip to content

Commit

Permalink
feat(helm): move health checks to service
Browse files Browse the repository at this point in the history
  • Loading branch information
evegufy committed Mar 20, 2024
1 parent 913c837 commit 7b92236
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 6 additions & 6 deletions charts/policy-hub/templates/deployment-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ spec:
value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.username }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};"
{{- end }}
- name: "HEALTHCHECKS__0__PATH"
value: "{{ .Values.healthChecks.startup.path}}"
value: "{{ .Values.policyhub.healthChecks.startup.path}}"
{{- if .Values.policyhub.healthChecks.startup.tags }}
{{- toYaml .Values.policyhub.healthChecks.startup.tags | nindent 8 }}
{{- end }}
- name: "HEALTHCHECKS__1__PATH"
value: "{{ .Values.healthChecks.readyness.path}}"
value: "{{ .Values.policyhub.healthChecks.readyness.path}}"
- name: "HEALTHCHECKS__2__PATH"
value: "{{ .Values.healthChecks.liveness.path}}"
value: "{{ .Values.policyhub.healthChecks.liveness.path}}"
- name: "JWTBEAREROPTIONS__METADATAADDRESS"
value: "{{ .Values.centralidpAddress }}{{ .Values.keycloak.central.jwtBearerOptions.metadataPath }}"
- name: "JWTBEAREROPTIONS__REQUIREHTTPSMETADATA"
Expand All @@ -99,7 +99,7 @@ spec:
protocol: TCP
startupProbe:
httpGet:
path: {{ .Values.healthChecks.startup.path }}
path: {{ .Values.policyhub.healthChecks.startup.path }}
port: {{ .Values.portContainer }}
scheme: HTTP
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
Expand All @@ -109,7 +109,7 @@ spec:
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
livenessProbe:
httpGet:
path: {{ .Values.healthChecks.liveness.path }}
path: {{ .Values.policyhub.healthChecks.liveness.path }}
port: {{ .Values.portContainer }}
scheme: HTTP
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
Expand All @@ -119,7 +119,7 @@ spec:
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: {{ .Values.healthChecks.readyness.path }}
path: {{ .Values.policyhub.healthChecks.readyness.path }}
port: {{ .Values.portContainer }}
scheme: HTTP
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
Expand Down
12 changes: 5 additions & 7 deletions charts/policy-hub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ keycloak:
tokenPath: "/auth/realms/CX-Central/protocol/openid-connect/token"
# -- Flag if the api should be used with an leading /auth path
useAuthTrail: true
healthChecks:
startup:
path: "/health/startup"
liveness:
path: "/healthz"
readyness:
path: "/ready"

policyhub:
image: "docker.io/tractusx/policy-hub-service:0.1.0"
Expand All @@ -88,9 +81,14 @@ policyhub:
default: "Information"
healthChecks:
startup:
path: "/health/startup"
tags:
- name: "HEALTHCHECKS__0__TAGS__1"
value: "policyhubdb"
liveness:
path: "/healthz"
readyness:
path: "/ready"
swaggerEnabled: false

policyhubmigrations:
Expand Down

0 comments on commit 7b92236

Please sign in to comment.