refactor(charts): BREAKING CHANGE (#2836)

* Update Apps with new Common version

* Patch with the secret fixes from common

* fix amd
This commit is contained in:
Kjeld Schouten-Lebbing
2022-06-07 19:41:19 +02:00
committed by GitHub
parent e4911cf0b1
commit 5529c2a3af
1546 changed files with 10467 additions and 3650 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ appVersion: "3.2.0"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 9.3.24
version: 10.0.8
deprecated: false
description: OpenHab is a home-automation application
home: https://github.com/truecharts/apps/tree/master/charts/stable/openhab
@@ -19,7 +19,7 @@ name: openhab
sources:
- https://hub.docker.com/r/openhab/openhab
type: application
version: 1.0.19
version: 2.0.0
annotations:
truecharts.org/catagories: |
- media
@@ -0,0 +1,21 @@
#!/usr/bin/python3
import json
import os
import sys
def migrate(values):
values.update({
**({'secretEnv': values['secret']} if values.get('secret') else {}),
**({'secret': {}} if values.get('secret'))
})
return values
if __name__ == '__main__':
if len(sys.argv) != 2:
exit(1)
if os.path.exists(sys.argv[1]):
with open(sys.argv[1], 'r') as f:
print(json.dumps(migrate(json.loads(f.read()))))
@@ -1,14 +0,0 @@
{{/* Append the hardcoded volumes */}}
{{- define "openhab.configmap" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-init
labels:
{{- include "common.labels" . | nindent 4 }}
data:
enable-console-logging.sh: |
echo 'Enabling console logging.'
sed -i -E 's|(<AppenderRef ref="OSGI"/>).*|\1<AppenderRef ref="STDOUT"/>|' /openhab/userdata/etc/log4j2.xml
{{- end -}}
+2 -19
View File
@@ -1,22 +1,5 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.setup" . }}
{{/* Render configmap for openhab */}}
{{- include "openhab.configmap" . }}
{{/* Append the hardcoded volumes */}}
{{- define "openhab.hardcodedValues" -}}
persistence:
init:
enabled: true
mountPath: /etc/cont-init.d/enable-console-logging.sh
subPath: enable-console-logging.sh
type: custom
volumeSpec:
configMap:
name: {{ printf "%v-init" (include "common.names.fullname" .) }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "openhab.hardcodedValues" . | fromYaml) -}}
{{- include "tc.common.loader.init" . }}
{{/* Render the templates */}}
{{ include "common.postSetup" . }}
{{ include "tc.common.loader.apply" . }}
+16
View File
@@ -17,6 +17,14 @@ service:
enabled: true
port: 10170
configmap:
init:
enabled: true
data:
enable-console-logging.sh: |
echo 'Enabling console logging.'
sed -i -E 's|(<AppenderRef ref="OSGI"/>).*|\1<AppenderRef ref="STDOUT"/>|' /openhab/userdata/etc/log4j2.xml
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
@@ -40,3 +48,11 @@ persistence:
userdata:
enabled: true
mountPath: "/openhab/userdata"
init:
enabled: true
mountPath: /etc/cont-init.d/enable-console-logging.sh
subPath: enable-console-logging.sh
type: custom
volumeSpec:
configMap:
name: '{{ printf "%v-init" (include "tc.common.names.fullname" .) }}'