mirror of
https://ghproxy.com/https://github.com/truecharts/charts.git
synced 2026-07-26 18:20:27 +08:00
fix(kimai): add secrets (#2286)
This commit is contained in:
@@ -82,13 +82,13 @@ questions:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: ADMINMAIL
|
||||
label: "Admin Mail"
|
||||
label: "Admin E-mail"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
required: true
|
||||
- variable: ADMINPASS
|
||||
label: "Admin Pass"
|
||||
label: "Admin Password"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
@@ -101,12 +101,12 @@ questions:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: TRUSTED_HOSTS
|
||||
- variable: trust_hosts
|
||||
label: "TRUSTED_HOSTS"
|
||||
description: "Comma separated list of trusted hosts."
|
||||
schema:
|
||||
type: string
|
||||
default: "localhost"
|
||||
default: "YOUR.FQDN or YOUR.NAS.IP"
|
||||
|
||||
# Include{containerConfig}
|
||||
|
||||
@@ -243,6 +243,49 @@ questions:
|
||||
- value: "Memory"
|
||||
description: "Memory"
|
||||
# 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}
|
||||
|
||||
|
||||
20
charts/incubator/kimai/templates/_secrets.tpl
Normal file
20
charts/incubator/kimai/templates/_secrets.tpl
Normal file
@@ -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_USER: "{{ .Values.mariadb.mariadbDatabase }}"
|
||||
DB_BASE: "{{ .Values.mariadb.mariadbUsername }}"
|
||||
APP_ENV: "prod"
|
||||
TRUSTED_HOSTS: "{{ .Values.env.trust_hosts }},localhost"
|
||||
# User Defined
|
||||
TRUSTED_HOSTS: "localhost"
|
||||
trust_hosts: "127.0.0.1"
|
||||
|
||||
envValueFrom:
|
||||
DB_PASS:
|
||||
@@ -31,6 +33,10 @@ envValueFrom:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: plainhost
|
||||
APP_SECRET:
|
||||
secretKeyRef:
|
||||
name: kimai-secrets
|
||||
key: APP_SECRET
|
||||
|
||||
service:
|
||||
main:
|
||||
@@ -50,7 +56,10 @@ probes:
|
||||
persistence:
|
||||
data:
|
||||
enabled: true
|
||||
mountPath: "/opt/kimai/var"
|
||||
mountPath: "/opt/kimai/var/data"
|
||||
plugins:
|
||||
enabled: true
|
||||
mountPath: "/opt/kimai/var/plugins"
|
||||
|
||||
mariadb:
|
||||
enabled: true
|
||||
|
||||
@@ -17,7 +17,7 @@ maintainers:
|
||||
name: doplarr
|
||||
sources:
|
||||
- https://github.com/kiranshila/Doplarr
|
||||
version: 0.0.4
|
||||
version: 1.0.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
@@ -79,16 +79,17 @@ questions:
|
||||
private: true
|
||||
default: ""
|
||||
- variable: RADARR__API
|
||||
label: "RADARR__API "
|
||||
label: "RADARR__API"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
default: ""
|
||||
- variable: DISCORD__TOKEN
|
||||
label: "DISCORD__TOKEN "
|
||||
label: "DISCORD__TOKEN"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
default: ""
|
||||
- variable: DISCORD__ROLE_ID
|
||||
label: "DISCORD__ROLE_ID"
|
||||
Reference in New Issue
Block a user