From 8868a66812e55e7228dbe951a0e8d7a34ccd4f08 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 29 Jun 2022 23:59:48 +0100 Subject: [PATCH] suitecrm: add people app --- basic/apps/people/suitecrm-release.yaml | 27 ++++++++++++++ .../people/suitecrm-values-configmap.yaml | 22 ++++++++++++ .../production/suitecrm-kustomization.yaml | 35 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 basic/apps/people/suitecrm-release.yaml create mode 100644 basic/apps/people/suitecrm-values-configmap.yaml create mode 100644 basic/clusters/production/suitecrm-kustomization.yaml diff --git a/basic/apps/people/suitecrm-release.yaml b/basic/apps/people/suitecrm-release.yaml new file mode 100644 index 0000000..01ef513 --- /dev/null +++ b/basic/apps/people/suitecrm-release.yaml @@ -0,0 +1,27 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: suitecrm + namespace: stackspout +spec: + releaseName: suitecrm + chart: + spec: + chart: suitecrm + version: 8.1.2 + sourceRef: + kind: HelmRepository + name: bitnami + namespace: flux-system + interval: 5m + valuesFrom: + - kind: ConfigMap + name: stackspin-suitecrm-values + optional: false + # Allow overriding values by ConfigMap or Secret + - kind: ConfigMap + name: stackspin-suitecrm-override + optional: true + - kind: Secret + name: stackspin-suitecrm-override + optional: true diff --git a/basic/apps/people/suitecrm-values-configmap.yaml b/basic/apps/people/suitecrm-values-configmap.yaml new file mode 100644 index 0000000..d949095 --- /dev/null +++ b/basic/apps/people/suitecrm-values-configmap.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: stackspin-suitecrm-values + namespace: stackspout +data: + values.yaml: | + ingress: + enabled: true + annotations: + kubernetes.io/tls-acme: true + hostname: "people.${domain}" + tls: true + # - secretName: suitecrm-tls + # hosts: + # - "people.${domain}" + # TODO Adjust OIDC SSO to service + # - name: Stackspin + # key: "${client_id}" + # secret: "${client_secret}" + # customAuthUrl: "https://people.${domain}/login/login" diff --git a/basic/clusters/production/suitecrm-kustomization.yaml b/basic/clusters/production/suitecrm-kustomization.yaml new file mode 100644 index 0000000..cfb7891 --- /dev/null +++ b/basic/clusters/production/suitecrm-kustomization.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: suitecrm + namespace: flux-system +spec: + interval: 5m + timeout: 30m + dependsOn: + - name: single-sign-on + sourceRef: + kind: GitRepository + name: stackspout + path: ./basic/apps/people + prune: true + # TODO what does this mean? + #validation: client + healthChecks: + - apiVersion: helm.toolkit.fluxcd.io/v2beta1 + kind: HelmRelease + name: suitecrm + namespace: stackspout + - apiVersion: apps/v1 + kind: Deployment + name: suitecrm + namespace: stackspout + postBuild: + substituteFrom: + #- kind: Secret + # name: stackspin-suitecrm-variables + - kind: Secret + name: stackspin-suitecrm-oauth-variables + - kind: Secret + name: stackspin-cluster-variables