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.
*/}}
{{- 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

View File

@ -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