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.
|
||||
*/}}
|
||||
|
||||
listen_tcp = 1
|
||||
auth_tcp = "none"
|
||||
ca_file = ""
|
||||
log_level = {{ .Values.conf.libvirt.log_level }}
|
||||
log_outputs = "{{ .Values.conf.libvirt.log_level }}:stderr"
|
||||
listen_addr = "{{ .Values.conf.libvirt.listen_addr }}"
|
||||
{{- define "helm-toolkit.utils.to_kv_list" -}}
|
||||
{{- range $key, $value := . -}}
|
||||
{{- if regexMatch "^[0-9]+$" $value }}
|
||||
{{ $key }} = {{ $value }}
|
||||
{{- else }}
|
||||
{{ $key }} = {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
@ -23,7 +23,7 @@ metadata:
|
||||
name: libvirt-etc
|
||||
data:
|
||||
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: |+
|
||||
{{ 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 }}
|
||||
|
@ -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:
|
||||
libvirt:
|
||||
listen_tcp: "1"
|
||||
auth_tcp: "none"
|
||||
ca_file: ""
|
||||
listen_addr: 0.0.0.0
|
||||
log_level: 3
|
||||
log_level: "3"
|
||||
qemu:
|
||||
stdio_handler: "file"
|
||||
user: "nova"
|
||||
group: "kvm"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user