[libvirt] Make readiness probe more tiny

Use virsh connect instead of list which is heavy and may
stuck for a while when libvirt creating domains.

Change-Id: I515c70b0b3a050599726ca2548eeeb7fd3f3e6ea
This commit is contained in:
Vasyl Saienko 2024-09-17 06:51:32 +00:00
parent 96e9104066
commit 6fb6253bfb
3 changed files with 6 additions and 12 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm libvirt
name: libvirt
version: 0.1.36
version: 0.1.37
home: https://libvirt.org
sources:
- https://libvirt.org/git/?p=libvirt.git;a=summary

View File

@ -12,19 +12,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "libvirtReadinessProbeTemplate" }}
{{- define "libvirtProbeTemplate" }}
exec:
command:
- bash
- -c
- /usr/bin/virsh list
{{- end }}
{{- define "libvirtLivenessProbeTemplate" }}
exec:
command:
- bash
- -c
- /usr/bin/virsh list
- /usr/bin/virsh connect
{{- end }}
{{- define "libvirt.daemonset" }}
@ -225,8 +218,8 @@ spec:
- name: LIBVIRT_EXTERNAL_CEPH_CINDER_SECRET_UUID
value: "{{ .Values.conf.ceph.cinder.external_ceph.secret_uuid }}"
{{ end }}
{{ dict "envAll" . "component" "libvirt" "container" "libvirt" "type" "readiness" "probeTemplate" (include "libvirtReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "libvirt" "container" "libvirt" "type" "liveness" "probeTemplate" (include "libvirtLivenessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "libvirt" "container" "libvirt" "type" "readiness" "probeTemplate" (include "libvirtProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "libvirt" "container" "libvirt" "type" "liveness" "probeTemplate" (include "libvirtProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command:
- /tmp/libvirt.sh
lifecycle:

View File

@ -37,4 +37,5 @@ libvirt:
- 0.1.34 Remove hugepages creation test
- 0.1.35 Allow to initialize virtualization modules
- 0.1.36 Allow to generate dynamic config options
- 0.1.37 Make readiness probes more tiny
...