Enable probes override from values.yaml for libvirt

This PS enables overriding liveness/readiness probes configurations
for libvirt pods via values.yaml. In addition, updating the values
for some of the fields of the probes as the default values seem to
be too aggresive.

Change-Id: I64033a1d67461851d8f2d86905ef7068c2ec43b6

Co-authored-by: Huy Tran <ht095u@att.com>
Change-Id: Ib10379829e2989d3de385ad6d1944565b2f9953f
This commit is contained in:
Anjeev Kumar 2021-07-08 14:14:27 +05:30 committed by Huy Tran
parent 3c4828935a
commit b11b4ae6c3
4 changed files with 34 additions and 13 deletions

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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
...