diff --git a/templates/stateful_editoast/deployment.yaml b/templates/stateful_editoast/deployment.yaml index 86ae6d8..4321dd4 100644 --- a/templates/stateful_editoast/deployment.yaml +++ b/templates/stateful_editoast/deployment.yaml @@ -38,18 +38,24 @@ spec: containerPort: {{ .Values.services.statefulEditoast.service.port }} protocol: TCP + {{- if not .Values.services.statefulEditoast.livenessProbe.disabled }} livenessProbe: - httpGet: - path: /health - port: http + exec: + command: + - /bin/sh + - "-c" + - 'ps ax | grep -q "editoast" && /usr/local/bin/editoast healthcheck' initialDelaySeconds: {{ .Values.services.statefulEditoast.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.services.statefulEditoast.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.services.statefulEditoast.livenessProbe.timeoutSeconds }} + {{- end }} + {{- if not .Values.services.statefulEditoast.readinessProbe.disabled }} readinessProbe: httpGet: path: /health port: http + {{- end }} env: - name: EDITOAST_PORT @@ -95,7 +101,7 @@ spec: {{- with .Values.services.statefulEditoast.env | default dict }} {{- toYaml . | nindent 12 }} {{- end }} - + resources: {{- toYaml .Values.services.statefulEditoast.resources | nindent 12 }} diff --git a/values.yaml b/values.yaml index 0ab8010..1730920 100644 --- a/values.yaml +++ b/values.yaml @@ -50,7 +50,7 @@ services: api_address: "0.0.0.0:80" default_message_ttl: max_length: - max_length_bytes: + max_length_bytes: annotations: {} labels: {} nodeSelector: {} @@ -87,26 +87,6 @@ services: autoscaling: type: NoScaling - statefulEditoast: - enabled: true - replicaCount: 1 - service: - type: ClusterIP - port: 80 - targetPort: 80 - livenessProbe: - disabled: false - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 1 - annotations: {} - labels: {} - nodeSelector: {} - tolerations: [] - affinity: {} - resources: {} - env: [] - gateway: enabled: true replicaCount: 1 @@ -180,3 +160,25 @@ services: affinity: {} resources: {} env: [] + + statefulEditoast: + enabled: true + replicaCount: 1 + service: + type: ClusterIP + port: 80 + targetPort: 80 + livenessProbe: + disabled: false + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + readinessProbe: + disabled: false + annotations: {} + labels: {} + nodeSelector: {} + tolerations: [] + affinity: {} + resources: {} + env: []