From 6f6c9b4aecf064d76547a2bb54c2ea54c8cf316c Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Sat, 13 Jun 2020 06:48:53 +0000 Subject: [PATCH] Fix rendering of obscure MAAS file drivers.yaml The existing drivers.yaml rendered by the MAAS chart is missing the top-level 'drivers' key, so it doesn't actually work. This change fixes the rendering of the file, and adds a comment in values.yaml about where to look for additional information about where and how the file is used: https://github.com/maas/maas/blob/2.3.5/src/maasserver/third_party_drivers.py Change-Id: I940c8a57d3e404a101de5c1ea92f8a467319dbaa --- charts/maas/templates/etc/_drivers.yaml.tpl | 8 +++++++- charts/maas/values.yaml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/maas/templates/etc/_drivers.yaml.tpl b/charts/maas/templates/etc/_drivers.yaml.tpl index 8bf1bf3..2f8a828 100644 --- a/charts/maas/templates/etc/_drivers.yaml.tpl +++ b/charts/maas/templates/etc/_drivers.yaml.tpl @@ -14,10 +14,16 @@ # limitations under the License. */}} {{- if .Values.conf.drivers }} -{{- range .Values.conf.drivers -}} +drivers: +{{- range .Values.conf.drivers }} - comment: {{ .comment }} +{{- if .key_binary }} key_binary: !!binary | {{ .key_binary | indent 4 }} +{{- end }} +{{- if .repository }} + repository: {{ .repository }} +{{- end }} modaliases: {{ .modaliases | toYaml | indent 4 }} module: {{ .module }} diff --git a/charts/maas/values.yaml b/charts/maas/values.yaml index 63535d1..3ed06c7 100644 --- a/charts/maas/values.yaml +++ b/charts/maas/values.yaml @@ -257,6 +257,8 @@ conf: drivers: null #### If you populates drivers, it will replace the 3rd party driver #### info that comes with MaaS. see structure below if it is needed + #### Additional context about the use of this file can be found here: + #### https://github.com/maas/maas/blob/2.3.5/src/maasserver/third_party_drivers.py # - blacklist: string # a kernel module to blacklist from loading if needed # comment: string # free form comment # key_binary: | # The GPG key for the repo holding the package, base64 encoded, non-ascii armored