From 9f8abda4522cbcb3174e79f96b42ee407b4e7141 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 20 Jul 2022 09:23:08 +0100 Subject: [PATCH] Configure kimai and some more --- basic/apps/do-test/kustomization.yaml | 7 +++++++ basic/apps/do-test/vikunja-values-configmap.yaml | 4 ++-- basic/apps/people/suitecrm-values-configmap.yaml | 2 +- basic/apps/time/kimai-values-configmap.yaml | 14 ++++++++++++-- basic/apps/time/kustomization.yaml | 1 + basic/apps/time/pvc.yaml | 15 +++++++++++++++ basic/install.sh | 1 + templates/stackspin-kimai-variables.yaml.jinja | 9 +++++++++ templates/stackspin-suitecrm-variables.yaml.jinja | 2 +- 9 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 basic/apps/do-test/kustomization.yaml create mode 100644 basic/apps/time/pvc.yaml create mode 100644 templates/stackspin-kimai-variables.yaml.jinja diff --git a/basic/apps/do-test/kustomization.yaml b/basic/apps/do-test/kustomization.yaml new file mode 100644 index 0000000..4aa48ff --- /dev/null +++ b/basic/apps/do-test/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - vikunja-oauth-client.yaml + - vikunja-release.yaml + - vikunja-values-configmap.yaml + - vikunja-postgres-pvc.yaml diff --git a/basic/apps/do-test/vikunja-values-configmap.yaml b/basic/apps/do-test/vikunja-values-configmap.yaml index a55565a..422c86b 100644 --- a/basic/apps/do-test/vikunja-values-configmap.yaml +++ b/basic/apps/do-test/vikunja-values-configmap.yaml @@ -9,10 +9,10 @@ data: values.yaml: | additionalContainers: api: - image: vikunja/api:0.18.1 + image: vikunja/api:unstable imagePullPolicy: Always frontend: - image: vikunja/frontend:0.18.2 + image: vikunja/frontend:unstable imagePullPolicy: Always vikunja: config: |- diff --git a/basic/apps/people/suitecrm-values-configmap.yaml b/basic/apps/people/suitecrm-values-configmap.yaml index c8a7a9f..b48b0d8 100644 --- a/basic/apps/people/suitecrm-values-configmap.yaml +++ b/basic/apps/people/suitecrm-values-configmap.yaml @@ -13,7 +13,7 @@ data: certManager: true suitecrmUsername: "admin" suitecrmEmail: "${admin_email}" - suitecrmPassword: "${suitecrm_password}" + suitecrmPassword: "${password}" mariadb: auth: password: "${mariadb_password}" diff --git a/basic/apps/time/kimai-values-configmap.yaml b/basic/apps/time/kimai-values-configmap.yaml index 875c97b..9a271c0 100644 --- a/basic/apps/time/kimai-values-configmap.yaml +++ b/basic/apps/time/kimai-values-configmap.yaml @@ -7,13 +7,23 @@ data: values.yaml: | # https://github.com/robjuz/helm-charts/tree/master/charts/kimai2#parameters image: - # Maybe apache-latest? - tag: apache-1.20.4-prod + tag: apache-1.21.0-prod + kimaiAppSecret: "${secret}" + kimaiAdminEmail: "${admin_email}" + kimaiAdminPassword: "${password}" + kimaiMailerUrl: "smtp://${outgoing_mail_smtp_user}:${outgoing_mail_smtp_password}@${outgoing_mail_smtp_host}?encryption=tls&auth_mode=plain" + kimaiMailerFrom: "${outgoing_mail_from_address}" ingress: enabled: true certManager: true tls: true hostname: "time.${domain}" + persistence: + existingClaim: kimai-data + mariadb: + auth: + password: "${mariadb_password}" + rootPassword: "${mariadb_root_password}" # - name: Stackspin # key: "${client_id}" # secret: "${client_secret}" diff --git a/basic/apps/time/kustomization.yaml b/basic/apps/time/kustomization.yaml index ba38c45..c799291 100644 --- a/basic/apps/time/kustomization.yaml +++ b/basic/apps/time/kustomization.yaml @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - kimai-release.yaml + - pvc.yaml - kimai-values-configmap.yaml diff --git a/basic/apps/time/pvc.yaml b/basic/apps/time/pvc.yaml new file mode 100644 index 0000000..efc0ded --- /dev/null +++ b/basic/apps/time/pvc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kimai-data + namespace: stackspout + labels: + stackspin.net/backupSet: "kimai" +spec: + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 2Gi + storageClassName: local-path diff --git a/basic/install.sh b/basic/install.sh index 09e35b8..1e8eed0 100755 --- a/basic/install.sh +++ b/basic/install.sh @@ -19,3 +19,4 @@ python $(dirname "$0")/../generate_secrets.py vikunja python $(dirname "$0")/../generate_secrets.py vikunja-test python $(dirname "$0")/../generate_secrets.py gitea python $(dirname "$0")/../generate_secrets.py suitecrm +python $(dirname "$0")/../generate_secrets.py kimai diff --git a/templates/stackspin-kimai-variables.yaml.jinja b/templates/stackspin-kimai-variables.yaml.jinja new file mode 100644 index 0000000..86fd0fd --- /dev/null +++ b/templates/stackspin-kimai-variables.yaml.jinja @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: stackspin-suitecrm-variables +data: + password: "{{ 32 | generate_password | b64encode }}" + secret: "{{ 32 | generate_password | b64encode }}" + mariadb_password: "{{ 32 | generate_password | b64encode }}" + mariadb_root_password: "{{ 32 | generate_password | b64encode }}" diff --git a/templates/stackspin-suitecrm-variables.yaml.jinja b/templates/stackspin-suitecrm-variables.yaml.jinja index eb1a66e..06651dd 100644 --- a/templates/stackspin-suitecrm-variables.yaml.jinja +++ b/templates/stackspin-suitecrm-variables.yaml.jinja @@ -3,6 +3,6 @@ kind: Secret metadata: name: stackspin-suitecrm-variables data: - suitecrm_password: "{{ 32 | generate_password | b64encode }}" + password: "{{ 32 | generate_password | b64encode }}" mariadb_password: "{{ 32 | generate_password | b64encode }}" mariadb_root_password: "{{ 32 | generate_password | b64encode }}"