fix: refactor nova-compute probes (#768)
Co-authored-by: okozachenko1203 <okozachenko1203@users.noreply.github.com>
diff --git a/charts/nova/templates/daemonset-compute.yaml b/charts/nova/templates/daemonset-compute.yaml
index f6bab51..e1125f9 100644
--- a/charts/nova/templates/daemonset-compute.yaml
+++ b/charts/nova/templates/daemonset-compute.yaml
@@ -41,6 +41,21 @@
{{- end }}
{{- end }}
+{{- define "novaComputeStartupProbeTemplate" }}
+exec:
+ command:
+ - python
+ - /tmp/health-probe.py
+ - --config-file
+ - /etc/nova/nova.conf
+ - --service-queue-name
+ - compute
+ - --liveness-probe
+ {{- if .Values.pod.use_fqdn.compute }}
+ - --use-fqdn
+ {{- end }}
+{{- end }}
+
{{- define "nova.compute.daemonset" }}
{{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }}
@@ -282,6 +297,7 @@
{{- end }}
{{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "liveness" "probeTemplate" (include "novaComputeLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "readiness" "probeTemplate" (include "novaComputeReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
+{{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "startup" "probeTemplate" (include "novaComputeStartupProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command:
- /tmp/nova-compute.sh
terminationMessagePath: /var/log/termination-log
diff --git a/charts/nova/values.yaml b/charts/nova/values.yaml
index 771b0ee..df2e2ff 100644
--- a/charts/nova/values.yaml
+++ b/charts/nova/values.yaml
@@ -2010,15 +2010,20 @@
liveness:
enabled: True
params:
- initialDelaySeconds: 120
periodSeconds: 90
timeoutSeconds: 70
readiness:
enabled: True
params:
- initialDelaySeconds: 80
periodSeconds: 90
timeoutSeconds: 70
+ startup:
+ enabled: True
+ params:
+ failureThreshold: 120
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 70
api-metadata:
default:
liveness:
diff --git a/hack/sync-charts.sh b/hack/sync-charts.sh
index 2040a23..535e0dc 100755
--- a/hack/sync-charts.sh
+++ b/hack/sync-charts.sh
@@ -82,6 +82,12 @@
| filterdiff -p2 -x 'Chart.yaml' \
| filterdiff -p1 -i 'nova/*' \
| patch -p2 -d ${ATMOSPHERE}/charts/nova
+curl 'https://review.opendev.org/changes/openstack%2Fopenstack-helm~904250/revisions/3/patch?download' \
+ | base64 --decode \
+ | filterdiff -p1 -x 'releasenotes/*' \
+ | filterdiff -p2 -x 'Chart.yaml' \
+ | filterdiff -p1 -i 'nova/*' \
+ | patch -p2 -d ${ATMOSPHERE}/charts/nova
# Senlin
curl 'https://review.opendev.org/changes/openstack%2Fopenstack-helm~899913/revisions/1/patch?download' \