diff --git a/basic/apps/ninja/invoiceninja-pvc.yaml b/basic/apps/ninja/invoiceninja-pvc.yaml new file mode 100644 index 0000000..e9b7020 --- /dev/null +++ b/basic/apps/ninja/invoiceninja-pvc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: invoiceninja-data + namespace: stackspout + labels: + stackspin.net/backupSet: "invoiceninja" +spec: + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 2Gi + storageClassName: local-path diff --git a/basic/apps/ninja/invoiceninja-release.yaml b/basic/apps/ninja/invoiceninja-release.yaml new file mode 100644 index 0000000..e2e911d --- /dev/null +++ b/basic/apps/ninja/invoiceninja-release.yaml @@ -0,0 +1,27 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: invoiceninja + namespace: stackspout +spec: + releaseName: invoiceninja + chart: + spec: + chart: invoiceninja + version: 0.9.2 + sourceRef: + kind: HelmRepository + name: invoiceninja + namespace: flux-system + interval: 5m + valuesFrom: + - kind: ConfigMap + name: stackspin-invoiceninja-values + optional: false + # Allow overriding values by ConfigMap or Secret + - kind: ConfigMap + name: stackspin-invoiceninja-override + optional: true + - kind: Secret + name: stackspin-invoiceninja-override + optional: true diff --git a/basic/apps/ninja/invoiceninja-values-configmap.yaml b/basic/apps/ninja/invoiceninja-values-configmap.yaml new file mode 100644 index 0000000..4d61995 --- /dev/null +++ b/basic/apps/ninja/invoiceninja-values-configmap.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: stackspin-invoiceninja-values + namespace: stackspout +data: + values.yaml: | + # https://github.com/invoiceninja/dockerfiles/blob/master/charts/invoiceninja/values.yaml + ingress: + enabled: true + # Elaborate style + #annotations: + # kubernetes.io/tls-acme: "true" + #hosts: + # - host: "ninja.${domain}" + # paths: + # - path: / + # pathType: Prefix + #tls: + # - secretName: invoiceninja-tls + # hosts: + # - "ninja.${domain}" + # Bitnami style + hostname: "ninja.${domain}" + tls: true + certManager: true + persistence: + public: + existingClaim: invoiceninja-data + appKey: "ksickejksickejksickejdddksickejd" + mariadb: + # https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml + auth: + rootPassword: "testilein" + password: "bratwurst" + # TODO Adjust invoiceninja Mailing config + # mailer: + # enabled: "${outgoing_mail_enabled}" + # host: "${outgoing_mail_smtp_host}" + # port: "${outgoing_mail_smtp_port}" + # username: "${outgoing_mail_smtp_user}" + # password: "${outgoing_mail_smtp_password}" + # fromemail: "${outgoing_mail_from_address}" + # TODO Adjust invoiceninja OpenID Connect Single Sign-On Configuration + # - name: Stackspin + # key: "${client_id}" + # secret: "${client_secret}" + # autoDiscoverUrl: 'https://sso.${domain}/.well-known/openid-configuration' diff --git a/basic/infrastructure/kustomizations/invoiceninja-customization.yaml b/basic/infrastructure/kustomizations/invoiceninja-customization.yaml new file mode 100644 index 0000000..1ef3e9f --- /dev/null +++ b/basic/infrastructure/kustomizations/invoiceninja-customization.yaml @@ -0,0 +1,26 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: invoiceninja + namespace: flux-system +spec: + interval: 10m + retryInterval: 1m + wait: true + timeout: 3m + #dependsOn: + # - name: single-sign-on + sourceRef: + kind: GitRepository + name: stackspout + path: ./basic/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 diff --git a/basic/infrastructure/sources/invoiceninja.yaml b/basic/infrastructure/sources/invoiceninja.yaml new file mode 100644 index 0000000..71f7ec9 --- /dev/null +++ b/basic/infrastructure/sources/invoiceninja.yaml @@ -0,0 +1,9 @@ +# For kimai2 +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: invoiceninja + namespace: flux-system +spec: + interval: 60m + url: https://invoiceninja.github.io/dockerfiles/