fix(kimai): add secrets (#2286)
This commit is contained in:
@@ -82,13 +82,13 @@ questions:
|
|||||||
type: dict
|
type: dict
|
||||||
attrs:
|
attrs:
|
||||||
- variable: ADMINMAIL
|
- variable: ADMINMAIL
|
||||||
label: "Admin Mail"
|
label: "Admin E-mail"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
required: true
|
required: true
|
||||||
- variable: ADMINPASS
|
- variable: ADMINPASS
|
||||||
label: "Admin Pass"
|
label: "Admin Password"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
@@ -101,12 +101,12 @@ questions:
|
|||||||
additional_attrs: true
|
additional_attrs: true
|
||||||
type: dict
|
type: dict
|
||||||
attrs:
|
attrs:
|
||||||
- variable: TRUSTED_HOSTS
|
- variable: trust_hosts
|
||||||
label: "TRUSTED_HOSTS"
|
label: "TRUSTED_HOSTS"
|
||||||
description: "Comma separated list of trusted hosts."
|
description: "Comma separated list of trusted hosts."
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: "localhost"
|
default: "YOUR.FQDN or YOUR.NAS.IP"
|
||||||
|
|
||||||
# Include{containerConfig}
|
# Include{containerConfig}
|
||||||
|
|
||||||
@@ -243,6 +243,49 @@ questions:
|
|||||||
- value: "Memory"
|
- value: "Memory"
|
||||||
description: "Memory"
|
description: "Memory"
|
||||||
# Include{persistenceAdvanced}
|
# Include{persistenceAdvanced}
|
||||||
|
- variable: plugins
|
||||||
|
label: "App Plugins Storage"
|
||||||
|
description: "Stores the Application Plugins"
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: type
|
||||||
|
label: "Type of Storage"
|
||||||
|
description: "Sets the persistence type, Anything other than PVC could break rollback!"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "simplePVC"
|
||||||
|
enum:
|
||||||
|
- value: "simplePVC"
|
||||||
|
description: "PVC (simple)"
|
||||||
|
- value: "simpleHP"
|
||||||
|
description: "HostPath (simple)"
|
||||||
|
- value: "emptyDir"
|
||||||
|
description: "emptyDir"
|
||||||
|
- value: "pvc"
|
||||||
|
description: "pvc"
|
||||||
|
- value: "hostPath"
|
||||||
|
description: "hostPath"
|
||||||
|
# Include{persistenceBasic}
|
||||||
|
- variable: hostPath
|
||||||
|
label: "hostPath"
|
||||||
|
description: "Path inside the container the storage is mounted"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "hostPath"]]
|
||||||
|
type: hostpath
|
||||||
|
- variable: medium
|
||||||
|
label: "EmptyDir Medium"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "emptyDir"]]
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
enum:
|
||||||
|
- value: ""
|
||||||
|
description: "Default"
|
||||||
|
- value: "Memory"
|
||||||
|
description: "Memory"
|
||||||
|
# Include{persistenceAdvanced}
|
||||||
|
|
||||||
# Include{persistenceList}
|
# Include{persistenceList}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{{/* Define the secrets */}}
|
||||||
|
{{- define "kimai.secrets" -}}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
type: Opaque
|
||||||
|
metadata:
|
||||||
|
name: kimai-secrets
|
||||||
|
{{- $kimaiprevious := lookup "v1" "Secret" .Release.Namespace "kimai-secrets" }}
|
||||||
|
{{- $app_secret := "" }}
|
||||||
|
data:
|
||||||
|
{{- if $kimaiprevious}}
|
||||||
|
APP_SECRET: {{ index $kimaiprevious.data "APP_SECRET" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $app_secret := randAlphaNum 32 }}
|
||||||
|
APP_SECRET: {{ $app_secret | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end -}}
|
||||||
@@ -1 +1,8 @@
|
|||||||
{{- include "common.all" . }}
|
{{/* Make sure all variables are set properly */}}
|
||||||
|
{{- include "common.setup" . }}
|
||||||
|
|
||||||
|
{{/* Render secrets for kimai */}}
|
||||||
|
{{- include "kimai.secrets" . }}
|
||||||
|
|
||||||
|
{{/* Render the templates */}}
|
||||||
|
{{ include "common.postSetup" . }}
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ env:
|
|||||||
DB_PORT: "3306"
|
DB_PORT: "3306"
|
||||||
DB_USER: "{{ .Values.mariadb.mariadbDatabase }}"
|
DB_USER: "{{ .Values.mariadb.mariadbDatabase }}"
|
||||||
DB_BASE: "{{ .Values.mariadb.mariadbUsername }}"
|
DB_BASE: "{{ .Values.mariadb.mariadbUsername }}"
|
||||||
|
APP_ENV: "prod"
|
||||||
|
TRUSTED_HOSTS: "{{ .Values.env.trust_hosts }},localhost"
|
||||||
# User Defined
|
# User Defined
|
||||||
TRUSTED_HOSTS: "localhost"
|
trust_hosts: "127.0.0.1"
|
||||||
|
|
||||||
envValueFrom:
|
envValueFrom:
|
||||||
DB_PASS:
|
DB_PASS:
|
||||||
@@ -31,6 +33,10 @@ envValueFrom:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: mariadbcreds
|
name: mariadbcreds
|
||||||
key: plainhost
|
key: plainhost
|
||||||
|
APP_SECRET:
|
||||||
|
secretKeyRef:
|
||||||
|
name: kimai-secrets
|
||||||
|
key: APP_SECRET
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
@@ -50,7 +56,10 @@ probes:
|
|||||||
persistence:
|
persistence:
|
||||||
data:
|
data:
|
||||||
enabled: true
|
enabled: true
|
||||||
mountPath: "/opt/kimai/var"
|
mountPath: "/opt/kimai/var/data"
|
||||||
|
plugins:
|
||||||
|
enabled: true
|
||||||
|
mountPath: "/opt/kimai/var/plugins"
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ maintainers:
|
|||||||
name: doplarr
|
name: doplarr
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/kiranshila/Doplarr
|
- https://github.com/kiranshila/Doplarr
|
||||||
version: 0.0.4
|
version: 1.0.0
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- media
|
- media
|
||||||
@@ -79,16 +79,17 @@ questions:
|
|||||||
private: true
|
private: true
|
||||||
default: ""
|
default: ""
|
||||||
- variable: RADARR__API
|
- variable: RADARR__API
|
||||||
label: "RADARR__API "
|
label: "RADARR__API"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
private: true
|
private: true
|
||||||
default: ""
|
default: ""
|
||||||
- variable: DISCORD__TOKEN
|
- variable: DISCORD__TOKEN
|
||||||
label: "DISCORD__TOKEN "
|
label: "DISCORD__TOKEN"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
private: true
|
private: true
|
||||||
|
required: true
|
||||||
default: ""
|
default: ""
|
||||||
- variable: DISCORD__ROLE_ID
|
- variable: DISCORD__ROLE_ID
|
||||||
label: "DISCORD__ROLE_ID"
|
label: "DISCORD__ROLE_ID"
|
||||||
Reference in New Issue
Block a user