Keystone: allow probes configuration

Probe configuration is now available for keystone for both liveness and
readiness checks.

Change-Id: I1f0e0a1ff9cd10c5acbec33af87aa9e59959b2d2
This commit is contained in:
Itxaka 2019-09-19 21:30:54 +02:00
parent a6ccab5270
commit b4eaa63548
No known key found for this signature in database
GPG Key ID: 0FFB0E56C3539E24
2 changed files with 24 additions and 18 deletions

View File

@ -14,6 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. 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 }} {{- if .Values.manifests.deployment_api }}
{{- $envAll := . }} {{- $envAll := . }}
@ -70,24 +77,10 @@ spec:
- /tmp/keystone-api.sh - /tmp/keystone-api.sh
- stop - stop
ports: ports:
{{- $portInt := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- name: ks-pub - name: ks-pub
containerPort: {{ $portInt }} containerPort: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe: {{ dict "envAll" $envAll "component" "api" "container" "api" "type" "readiness" "probeTemplate" (include "apiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
httpGet: {{ dict "envAll" $envAll "component" "api" "container" "api" "type" "liveness" "probeTemplate" (include "apiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
scheme: HTTP
path: /v3/
port: {{ $portInt }}
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
httpGet:
scheme: HTTP
path: /v3/
port: {{ $portInt }}
initialDelaySeconds: 50
periodSeconds: 20
timeoutSeconds: 5
volumeMounts: volumeMounts:
- name: pod-tmp - name: pod-tmp
mountPath: /tmp mountPath: /tmp

View File

@ -354,7 +354,20 @@ pod:
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
probes:
api:
api:
readiness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 10
liveness:
enabled: true
params:
initialDelaySeconds: 50
periodSeconds: 20
timeoutSeconds: 5
jobs: jobs:
fernet_setup: fernet_setup:
user: keystone user: keystone