diff --git a/keystone/templates/deployment-api.yaml b/keystone/templates/deployment-api.yaml index f1ee117913..afa78f1a4a 100644 --- a/keystone/templates/deployment-api.yaml +++ b/keystone/templates/deployment-api.yaml @@ -14,6 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "apiProbeTemplate" }} +httpGet: + scheme: HTTP + path: /v3/ + port: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} +{{- end }} + {{- if .Values.manifests.deployment_api }} {{- $envAll := . }} @@ -70,24 +77,10 @@ spec: - /tmp/keystone-api.sh - stop ports: - {{- $portInt := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - name: ks-pub - containerPort: {{ $portInt }} - readinessProbe: - httpGet: - scheme: HTTP - path: /v3/ - port: {{ $portInt }} - initialDelaySeconds: 15 - periodSeconds: 10 - livenessProbe: - httpGet: - scheme: HTTP - path: /v3/ - port: {{ $portInt }} - initialDelaySeconds: 50 - periodSeconds: 20 - timeoutSeconds: 5 + containerPort: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} +{{ dict "envAll" $envAll "component" "api" "container" "api" "type" "readiness" "probeTemplate" (include "apiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }} +{{ dict "envAll" $envAll "component" "api" "container" "api" "type" "liveness" "probeTemplate" (include "apiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }} volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/keystone/values.yaml b/keystone/values.yaml index 6ff6daef67..8207b7dd56 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -354,7 +354,20 @@ pod: limits: memory: "1024Mi" cpu: "2000m" - + probes: + api: + api: + readiness: + enabled: true + params: + initialDelaySeconds: 15 + periodSeconds: 10 + liveness: + enabled: true + params: + initialDelaySeconds: 50 + periodSeconds: 20 + timeoutSeconds: 5 jobs: fernet_setup: user: keystone