Parametrise readiness probe

Change-Id: I358ae8307799fff0674a428c42b90381d6d3a631
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
This commit is contained in:
Anselme, Schubert (sa246v) 2023-08-23 14:11:24 -04:00
parent eaabbb2722
commit 736c936394
No known key found for this signature in database
GPG Key ID: 4E0F7ECFE90D344C
6 changed files with 57 additions and 20 deletions

View File

@ -15,7 +15,7 @@
apiVersion: v1
description: Chart to run Canonical MaaS
name: maas
version: 0.1.4
version: 0.1.5
home: https://docs.ubuntu.com/maas
sources:
- https://git.launchpad.net/maas

View File

@ -0,0 +1,21 @@
{{/*
Copyright 2023 The Openstack-Helm Authors.
Copyright (c) 2023 AT&T Intellectual Property. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "jobreadinessProbeTemplate" }}
exec:
command:
- /tmp/job-readiness.sh
{{- end }}

View File

@ -104,11 +104,7 @@ spec:
value: {{ .Values.conf.maas.credentials.secret.name }}
command:
- /tmp/export-api-key.sh
readinessProbe:
exec:
command:
- /tmp/job-readiness.sh
initialDelaySeconds: 60
{{ dict "envAll" $envAll "component" "export-api-key" "container" "exporter" "type" "readiness" "probeTemplate" (include "jobreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
volumeMounts:
- name: maas-bin
mountPath: /tmp/export-api-key.sh

View File

@ -98,11 +98,7 @@ spec:
{{ dict "envAll" $envAll "application" "import_resources" "container" "region_import_resources" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/import-boot-resources.sh
readinessProbe:
exec:
command:
- /tmp/job-readiness.sh
initialDelaySeconds: 60
{{ dict "envAll" $envAll "component" "import-resources" "container" "region-import-resources" "type" "readiness" "probeTemplate" (include "jobreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
volumeMounts:
- name: maas-bin
mountPath: /tmp/import-boot-resources.sh

View File

@ -15,8 +15,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.rack_statefulset }}
{{- $envAll := . }}
{{- define "maasrackreadinessProbeTemplate" }}
exec:
command:
- ls
- /tmp/maas-rack.done
{{- end }}
{{- if .Values.manifests.rack_statefulset }}
{{- $serviceAccountName := "maas-rack" }}
{{- $mounts_maas_rack := .Values.pod.mounts.maas_rack }}
{{- $mounts_maas_rack_init := .Values.pod.mounts.maas_rack.init_container }}
@ -86,14 +92,7 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.maas_rack | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/start.sh
readinessProbe:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 60
exec:
command:
- ls
- /tmp/maas-rack.done
{{ dict "envAll" $envAll "component" "rack" "container" "maas-rack" "type" "readiness" "probeTemplate" (include "maasrackreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
volumeMounts:
- mountPath: /sys/fs/cgroup
name: host-sys-fs-cgroup

View File

@ -592,6 +592,31 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
probes:
rack:
maas-rack:
readiness:
enabled: true
params:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 60
export-api-key:
exporter:
readiness:
enabled: true
params:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 60
import-resources:
region-import-resources:
readiness:
enabled: true
params:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 60
endpoints:
cluster_domain_suffix: cluster.local