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:
@@ -3,7 +3,7 @@ appVersion: "3.7.0"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.truecharts.org
|
||||
version: 9.3.24
|
||||
version: 10.0.8
|
||||
- condition: mariadb.enabled
|
||||
name: mariadb
|
||||
repository: https://charts.truecharts.org/
|
||||
@@ -22,7 +22,7 @@ name: monica
|
||||
sources:
|
||||
- https://github.com/monicahq/monica
|
||||
- https://hub.docker.com/_/monica
|
||||
version: 1.0.34
|
||||
version: 2.0.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- crm
|
||||
|
||||
@@ -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()))))
|
||||
@@ -9,7 +9,7 @@ type: Opaque
|
||||
metadata:
|
||||
name: appkey
|
||||
labels:
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
{{- $keyprevious := lookup "v1" "Secret" .Release.Namespace "appkey" }}
|
||||
{{- $appkey := "" }}
|
||||
data:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "common.setup" . }}
|
||||
{{- include "tc.common.loader.init" . }}
|
||||
|
||||
{{/* Render appkey for monica */}}
|
||||
{{- include "monica.appkey" . }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.postSetup" . }}
|
||||
{{ include "tc.common.loader.apply" . }}
|
||||
|
||||
@@ -20,6 +20,18 @@ env:
|
||||
APP_URL: https://crm.k8s-at-home.com
|
||||
DB_DATABASE: monica
|
||||
DB_USERNAME: monica
|
||||
DB_HOST:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: plainhost
|
||||
DB_PASSWORD:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: mariadb-password
|
||||
APP_KEY:
|
||||
secretKeyRef:
|
||||
name: appkey
|
||||
key: appkey
|
||||
|
||||
# -- Configures service settings for the chart.
|
||||
# @default -- See values.yaml
|
||||
@@ -37,20 +49,6 @@ persistence:
|
||||
enabled: true
|
||||
mountPath: "/var/www/html/storage"
|
||||
|
||||
envValueFrom:
|
||||
DB_HOST:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: plainhost
|
||||
DB_PASSWORD:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: mariadb-password
|
||||
APP_KEY:
|
||||
secretKeyRef:
|
||||
name: appkey
|
||||
key: appkey
|
||||
|
||||
mariadb:
|
||||
enabled: true
|
||||
mariadbUsername: monica
|
||||
|
||||
Reference in New Issue
Block a user