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 apiVersion: v1
description: Chart to run Canonical MaaS description: Chart to run Canonical MaaS
name: maas name: maas
version: 0.1.4 version: 0.1.5
home: https://docs.ubuntu.com/maas home: https://docs.ubuntu.com/maas
sources: sources:
- https://git.launchpad.net/maas - 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 }} value: {{ .Values.conf.maas.credentials.secret.name }}
command: command:
- /tmp/export-api-key.sh - /tmp/export-api-key.sh
readinessProbe: {{ dict "envAll" $envAll "component" "export-api-key" "container" "exporter" "type" "readiness" "probeTemplate" (include "jobreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
exec:
command:
- /tmp/job-readiness.sh
initialDelaySeconds: 60
volumeMounts: volumeMounts:
- name: maas-bin - name: maas-bin
mountPath: /tmp/export-api-key.sh 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 }} {{ dict "envAll" $envAll "application" "import_resources" "container" "region_import_resources" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command: command:
- /tmp/import-boot-resources.sh - /tmp/import-boot-resources.sh
readinessProbe: {{ 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 }}
exec:
command:
- /tmp/job-readiness.sh
initialDelaySeconds: 60
volumeMounts: volumeMounts:
- name: maas-bin - name: maas-bin
mountPath: /tmp/import-boot-resources.sh 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. limitations under the License.
*/}} */}}
{{- if .Values.manifests.rack_statefulset }}
{{- $envAll := . }} {{- $envAll := . }}
{{- define "maasrackreadinessProbeTemplate" }}
exec:
command:
- ls
- /tmp/maas-rack.done
{{- end }}
{{- if .Values.manifests.rack_statefulset }}
{{- $serviceAccountName := "maas-rack" }} {{- $serviceAccountName := "maas-rack" }}
{{- $mounts_maas_rack := .Values.pod.mounts.maas_rack }} {{- $mounts_maas_rack := .Values.pod.mounts.maas_rack }}
{{- $mounts_maas_rack_init := .Values.pod.mounts.maas_rack.init_container }} {{- $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 }} {{ tuple $envAll $envAll.Values.pod.resources.maas_rack | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/start.sh - /tmp/start.sh
readinessProbe: {{ dict "envAll" $envAll "component" "rack" "container" "maas-rack" "type" "readiness" "probeTemplate" (include "maasrackreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 60
exec:
command:
- ls
- /tmp/maas-rack.done
volumeMounts: volumeMounts:
- mountPath: /sys/fs/cgroup - mountPath: /sys/fs/cgroup
name: host-sys-fs-cgroup name: host-sys-fs-cgroup

View File

@ -592,6 +592,31 @@ pod:
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" 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: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local