diff --git a/libvirt/Chart.yaml b/libvirt/Chart.yaml index 19296ae5f..4922359de 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.37 +version: 0.1.38 home: https://libvirt.org sources: - https://libvirt.org/git/?p=libvirt.git;a=summary diff --git a/libvirt/templates/configmap-bin.yaml b/libvirt/templates/configmap-bin.yaml index ef3b650ee..22e99db50 100644 --- a/libvirt/templates/configmap-bin.yaml +++ b/libvirt/templates/configmap-bin.yaml @@ -12,13 +12,15 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.configmap_bin }} -{{- $envAll := . }} +{{- define "libvirt.configmap.bin" }} +{{- $configMapName := index . 0 }} +{{- $envAll := index . 1 }} +{{- with $envAll }} --- apiVersion: v1 kind: ConfigMap metadata: - name: libvirt-bin + name: {{ $configMapName }} data: {{- if .Values.images.local_registry.active }} image-repo-sync.sh: | @@ -39,3 +41,7 @@ data: {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.init_modules.script "key" "libvirt-init-modules.sh") | indent 2 }} {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.dynamic_options.script "key" "init-dynamic-options.sh") | indent 2 }} {{- end }} +{{- end }} +{{- if .Values.manifests.configmap_bin }} +{{- list "libvirt-bin" . | include "libvirt.configmap.bin" }} +{{- end }} diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index b12463a64..48c16b04c 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -407,8 +407,8 @@ spec: {{- $_ := include "helm-toolkit.utils.dependency_resolver" $dependencyOpts | toString | fromYaml }} {{ tuple $envAll "pod_dependency" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} -{{- $daemonset_yaml := list $daemonset $configMapName $serviceAccountName . | include "libvirt.daemonset" | toString | fromYaml }} {{- $configmap_yaml := "libvirt.configmap.etc" }} -{{- list $daemonset $daemonset_yaml $configmap_yaml $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{/* Preffer using .Values.overrides rather than .Values.conf.overrides */}} +{{- list $daemonset "libvirt.daemonset" $serviceAccountName $configmap_yaml $configMapName "libvirt.configmap.bin" "libvirt-bin" . | include "helm-toolkit.utils.daemonset_overrides_root" }} {{- end }} diff --git a/libvirt/values_overrides/node_overrides.yaml b/libvirt/values_overrides/node_overrides.yaml new file mode 100644 index 000000000..1464fec52 --- /dev/null +++ b/libvirt/values_overrides/node_overrides.yaml @@ -0,0 +1,21 @@ +--- +# We have two nodes labeled with node-nics-type=4nics and node-nics-type=2nics +# on first node we pick up libvirt bind address from ens3 interface +# on second node we pick up libvirt bind address from ens0 interface +overrides: + libvirt_libvirt: + overrides_default: false + labels: + node-nics-type::4nics: + values: + conf: + dynamic_options: + libvirt: + listen_interface: ens3 + node-nics-type::2nics: + values: + conf: + dynamic_options: + libvirt: + listen_interface: ens0 +... diff --git a/releasenotes/notes/libvirt.yaml b/releasenotes/notes/libvirt.yaml index e016a4e8d..de8fbd5f2 100644 --- a/releasenotes/notes/libvirt.yaml +++ b/releasenotes/notes/libvirt.yaml @@ -38,4 +38,5 @@ libvirt: - 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 + - 0.1.38 Implement daemonset overrides for libvirt ...