Libvirt: move configuration to be generated directly from values
This PS moves the configuration files used by libvirt to be generated directly from the values, rather than being templated. Change-Id: I8ab2783c9d1d5d815cc02eccafa21058ff3acead
This commit is contained in:
parent
6e70733dc7
commit
dade748dcf
@ -14,9 +14,12 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
listen_tcp = 1
|
{{- define "helm-toolkit.utils.to_kv_list" -}}
|
||||||
auth_tcp = "none"
|
{{- range $key, $value := . -}}
|
||||||
ca_file = ""
|
{{- if regexMatch "^[0-9]+$" $value }}
|
||||||
log_level = {{ .Values.conf.libvirt.log_level }}
|
{{ $key }} = {{ $value }}
|
||||||
log_outputs = "{{ .Values.conf.libvirt.log_level }}:stderr"
|
{{- else }}
|
||||||
listen_addr = "{{ .Values.conf.libvirt.listen_addr }}"
|
{{ $key }} = {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
@ -23,7 +23,7 @@ metadata:
|
|||||||
name: libvirt-etc
|
name: libvirt-etc
|
||||||
data:
|
data:
|
||||||
libvirtd.conf: |+
|
libvirtd.conf: |+
|
||||||
{{ tuple "etc/_libvirtd.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{- include "helm-toolkit.utils.to_kv_list" .Values.conf.libvirt | indent 4 }}
|
||||||
qemu.conf: |+
|
qemu.conf: |+
|
||||||
{{ tuple "etc/_qemu.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{- include "helm-toolkit.utils.to_kv_list" .Values.conf.qemu | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
{{/*
|
|
||||||
Copyright 2017 The Openstack-Helm Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/}}
|
|
||||||
|
|
||||||
# The backend to use for handling stdout/stderr output from
|
|
||||||
# QEMU processes.
|
|
||||||
#
|
|
||||||
# 'file': QEMU writes directly to a plain file. This is the
|
|
||||||
# historical default, but allows QEMU to inflict a
|
|
||||||
# denial of service attack on the host by exhausting
|
|
||||||
# filesystem space
|
|
||||||
#
|
|
||||||
# 'logd': QEMU writes to a pipe provided by virtlogd daemon.
|
|
||||||
# This is the current default, providing protection
|
|
||||||
# against denial of service by performing log file
|
|
||||||
# rollover when a size limit is hit.
|
|
||||||
#
|
|
||||||
stdio_handler = "file"
|
|
||||||
{{ if not .Values.conf.qemu.user }}#{{ end }}user = {{ .Values.conf.qemu.user | default "nova" | quote }}
|
|
||||||
{{ if not .Values.conf.qemu.group }}#{{ end }}group = {{ .Values.conf.qemu.group | default "kvm" | quote }}
|
|
@ -40,9 +40,13 @@ ceph:
|
|||||||
|
|
||||||
conf:
|
conf:
|
||||||
libvirt:
|
libvirt:
|
||||||
|
listen_tcp: "1"
|
||||||
|
auth_tcp: "none"
|
||||||
|
ca_file: ""
|
||||||
listen_addr: 0.0.0.0
|
listen_addr: 0.0.0.0
|
||||||
log_level: 3
|
log_level: "3"
|
||||||
qemu:
|
qemu:
|
||||||
|
stdio_handler: "file"
|
||||||
user: "nova"
|
user: "nova"
|
||||||
group: "kvm"
|
group: "kvm"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user