From 03dbaad254f970619f0d2fd8baf7956ddf506d1a Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 6 Feb 2024 19:08:49 +0100 Subject: [PATCH] apps/ninja: adjust fully to new template --- apps/ninja-kustomization.yaml | 3 +- apps/ninja/invoiceninja-customization.yaml | 28 --------------- apps/ninja/invoiceninja-kustomization.yaml | 35 +++++++++++++++++++ .../invoiceninja-secrets-kustomization.yaml | 18 ++++++++++ .../invoiceninja-oauth-secret.yaml | 12 +++++++ .../invoiceninja-variables.yaml} | 2 +- .../invoiceninja-secrets/kustomization.yaml | 4 +++ apps/ninja/invoiceninja/kustomization.yaml | 7 ++++ apps/ninja/ninja-kustomization.yaml | 13 +++++++ .../sources/invoiceninja-helmrepository.yaml | 1 - 10 files changed, 91 insertions(+), 32 deletions(-) delete mode 100644 apps/ninja/invoiceninja-customization.yaml create mode 100644 apps/ninja/invoiceninja-kustomization.yaml create mode 100644 apps/ninja/invoiceninja-secrets-kustomization.yaml create mode 100644 apps/ninja/invoiceninja-secrets/invoiceninja-oauth-secret.yaml rename apps/ninja/{invoiceninja/stackspout-invoiceninja-variables.yaml => invoiceninja-secrets/invoiceninja-variables.yaml} (86%) create mode 100644 apps/ninja/invoiceninja-secrets/kustomization.yaml create mode 100644 apps/ninja/invoiceninja/kustomization.yaml create mode 100644 apps/ninja/ninja-kustomization.yaml diff --git a/apps/ninja-kustomization.yaml b/apps/ninja-kustomization.yaml index 71a100c..cbbfb79 100644 --- a/apps/ninja-kustomization.yaml +++ b/apps/ninja-kustomization.yaml @@ -1,11 +1,10 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 kind: Kustomization metadata: - name: stackspout-apps + name: add-ninja namespace: flux-system spec: interval: 10m - retryInterval: 2m prune: true path: ./apps/ninja sourceRef: diff --git a/apps/ninja/invoiceninja-customization.yaml b/apps/ninja/invoiceninja-customization.yaml deleted file mode 100644 index efcb7a0..0000000 --- a/apps/ninja/invoiceninja-customization.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 -kind: Kustomization -metadata: - name: invoiceninja - namespace: flux-system -spec: - interval: 10m - retryInterval: 2m - wait: true - timeout: 3m - #dependsOn: - # - name: single-sign-on - sourceRef: - kind: GitRepository - name: stackspout - path: ./apps/ninja - prune: true - postBuild: - substituteFrom: - - kind: Secret - name: stackspin-invoiceninja-variables - - kind: Secret - name: stackspin-invoiceninja-oauth-variables - optional: true - - kind: Secret - name: stackspin-cluster-variables - - kind: ConfigMap - name: stackspin-nextcloud-kustomization-variables diff --git a/apps/ninja/invoiceninja-kustomization.yaml b/apps/ninja/invoiceninja-kustomization.yaml new file mode 100644 index 0000000..9e5d9e1 --- /dev/null +++ b/apps/ninja/invoiceninja-kustomization.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 +kind: Kustomization +metadata: + name: invoiceninja + namespace: flux-system +spec: + interval: 5m + retryInterval: 2m + timeout: 10m + wait: true + prune: true + path: ./apps/ninja/invoiceninja + sourceRef: + kind: GitRepository + name: stackspout + dependsOn: + - name: flux + - name: local-path-provisioner + - name: invoiceninja-secrets + - name: nginx + #- name: single-sign-on + postBuild: + substituteFrom: + - kind: Secret + name: stackspout-invoiceninja-variables + - kind: Secret + name: stackspout-invoiceninja-oauth-variables + optional: true + - kind: ConfigMap + name: stackspout-invoiceninja-kustomization-variables + - kind: Secret + name: stackspin-cluster-variables + - kind: ConfigMap + name: stackspin-single-sign-on-kustomization-variables diff --git a/apps/ninja/invoiceninja-secrets-kustomization.yaml b/apps/ninja/invoiceninja-secrets-kustomization.yaml new file mode 100644 index 0000000..992f8d7 --- /dev/null +++ b/apps/ninja/invoiceninja-secrets-kustomization.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 +kind: Kustomization +metadata: + name: invoiceninja-secrets + namespace: flux-system +spec: + interval: 5m + timeout: 4m + wait: true + prune: true + path: ./apps/ninja/invoiceninja-secrets + sourceRef: + kind: GitRepository + name: stackspout + dependsOn: + - name: flux + - name: secrets-controller diff --git a/apps/ninja/invoiceninja-secrets/invoiceninja-oauth-secret.yaml b/apps/ninja/invoiceninja-secrets/invoiceninja-oauth-secret.yaml new file mode 100644 index 0000000..354622a --- /dev/null +++ b/apps/ninja/invoiceninja-secrets/invoiceninja-oauth-secret.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: secretgenerator.mittwald.de/v1alpha1 +kind: StringSecret +metadata: + name: stackspout-invoiceninja-oauth-variables + namespace: flux-system +spec: + data: + client_id: invoiceninja + fields: + - fieldName: client_secret + length: "32" diff --git a/apps/ninja/invoiceninja/stackspout-invoiceninja-variables.yaml b/apps/ninja/invoiceninja-secrets/invoiceninja-variables.yaml similarity index 86% rename from apps/ninja/invoiceninja/stackspout-invoiceninja-variables.yaml rename to apps/ninja/invoiceninja-secrets/invoiceninja-variables.yaml index f6ba2d0..bf5a6e1 100644 --- a/apps/ninja/invoiceninja/stackspout-invoiceninja-variables.yaml +++ b/apps/ninja/invoiceninja-secrets/invoiceninja-variables.yaml @@ -1,7 +1,7 @@ apiVersion: secretgenerator.mittwald.de/v1alpha1 kind: StringSecret metadata: - name: stackspin-invoiceninja-variables + name: stackspout-invoiceninja-variables namespace: flux-system spec: fields: diff --git a/apps/ninja/invoiceninja-secrets/kustomization.yaml b/apps/ninja/invoiceninja-secrets/kustomization.yaml new file mode 100644 index 0000000..01e50f0 --- /dev/null +++ b/apps/ninja/invoiceninja-secrets/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - invoiceninja-variables.yaml diff --git a/apps/ninja/invoiceninja/kustomization.yaml b/apps/ninja/invoiceninja/kustomization.yaml new file mode 100644 index 0000000..bed32ae --- /dev/null +++ b/apps/ninja/invoiceninja/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - invoiceninja-mariadb-pvc.yaml + - invoiceninja-pvc.yaml + - invoiceninja-release.yaml + - invoiceninja-values-configmap.yaml diff --git a/apps/ninja/ninja-kustomization.yaml b/apps/ninja/ninja-kustomization.yaml new file mode 100644 index 0000000..693fcdd --- /dev/null +++ b/apps/ninja/ninja-kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 +kind: Kustomization +metadata: + name: add-ninja + namespace: flux-system +spec: + interval: 10m + prune: true + path: ./apps/ninja + sourceRef: + kind: GitRepository + name: stackspout diff --git a/infrastructure/sources/invoiceninja-helmrepository.yaml b/infrastructure/sources/invoiceninja-helmrepository.yaml index 71f7ec9..2abfbdf 100644 --- a/infrastructure/sources/invoiceninja-helmrepository.yaml +++ b/infrastructure/sources/invoiceninja-helmrepository.yaml @@ -1,4 +1,3 @@ -# For kimai2 apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: HelmRepository metadata: