diff --git a/libvirt/Chart.yaml b/libvirt/Chart.yaml index 8e3eb6219..950099649 100644 --- a/libvirt/Chart.yaml +++ b/libvirt/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm libvirt name: libvirt -version: 0.1.5 +version: 0.1.6 home: https://libvirt.org sources: - https://libvirt.org/git/?p=libvirt.git;a=summary diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index ca9f633c4..2c0ccda84 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -12,6 +12,21 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "libvirtReadinessProbeTemplate" }} +exec: + command: + - bash + - -c + - /usr/bin/virsh list +{{- end }} +{{- define "libvirtLivenessProbeTemplate" }} +exec: + command: + - bash + - -c + - /usr/bin/virsh list +{{- end }} + {{- define "libvirt.daemonset" }} {{- $daemonset := index . 0 }} {{- $configMapName := index . 1 }} @@ -134,18 +149,8 @@ spec: value: "{{ .Values.conf.ceph.cinder.external_ceph.secret_uuid }}" {{ end }} {{ end }} - readinessProbe: - exec: - command: - - bash - - -c - - /usr/bin/virsh list - livenessProbe: - exec: - command: - - bash - - -c - - /usr/bin/virsh list +{{ 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 }} command: - /tmp/libvirt.sh lifecycle: diff --git a/libvirt/values.yaml b/libvirt/values.yaml index 0c03f51e8..b6cab8dbe 100644 --- a/libvirt/values.yaml +++ b/libvirt/values.yaml @@ -102,6 +102,21 @@ conf: cgroup: "kubepods" pod: + probes: + libvirt: + libvirt: + liveness: + enabled: true + params: + initialDelaySeconds: 30 + periodSeconds: 60 + timeoutSeconds: 5 + readiness: + enabled: true + params: + initialDelaySeconds: 15 + periodSeconds: 60 + timeoutSeconds: 5 security_context: libvirt: pod: diff --git a/releasenotes/notes/libvirt.yaml b/releasenotes/notes/libvirt.yaml index 65f958507..a46d6a7c8 100644 --- a/releasenotes/notes/libvirt.yaml +++ b/releasenotes/notes/libvirt.yaml @@ -6,4 +6,5 @@ libvirt: - 0.1.3 Create override for external ceph cinder backend - 0.1.4 Set unix socket auth method as none - 0.1.5 Use full image ref for docker official images + - 0.1.6 Enhancement to enable probes override from values.yaml ...