Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • stackspin/stackspin-flux-example
  • xeruf/stackspout
2 results
Show changes
Showing
with 349 additions and 0 deletions
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: calcom-secrets
namespace: flux-system
spec:
interval: 5m
timeout: 4m
wait: true
prune: true
path: ./apps/meet/calcom-secrets
sourceRef:
kind: GitRepository
name: stackspout
dependsOn:
- name: flux
- name: secrets-controller
postBuild:
substituteFrom:
- kind: Secret
name: stackspin-cluster-variables
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-calcom-kustomization-variables
namespace: flux-system
data:
calcom_domain: meet.${domain}
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-calcom-oauth-variables
namespace: flux-system
spec:
data:
client_id: calcom
fields:
- fieldName: client_secret
length: "32"
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-calcom-variables
namespace: flux-system
spec:
fields:
- fieldName: postgresql_password
- fieldName: postgresql_postgres_password
- fieldName: nextauth_secret
- fieldName: calendso_key
apiVersion: v1
kind: Secret
metadata:
name: stackspin-calcom-keys
namespace: stackspout
stringData:
DATABASE_URL: "postgresql://calcom:${postgresql_password}@calcom-postgresql/calcom"
NEXT_PUBLIC_WEBAPP_URL: "https://${calcom_domain}"
NEXTAUTH_SECRET: "${nextauth_secret}"
CALENDSO_ENCRYPTION_KEY: "${calendso_key}"
apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: calcom-oauth-client
# Has to live in the same namespace as the stackspin-calcom-oauth-variables secret
namespace: flux-system
spec:
# TODO copied from wekan: https://github.com/wekan/wekan/wiki/Keycloak
grantTypes:
- authorization_code
- refresh_token
- client_credentials
- implicit
responseTypes:
- id_token
- code
scope: "openid profile email stackspin_roles"
secretName: stackspin-calcom-oauth-variables
#redirectUris:
# - https://${calcom_domain}/oauth/openid/
#tokenEndpointAuthMethod: client_secret_post
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: calcom-postgres
namespace: stackspout
labels:
stackspin.net/backupSet: "calcom"
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: local-path
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: calcom
namespace: stackspout
spec:
releaseName: calcom
chart:
spec:
chart: calcom-stack
version: 0.1.6
sourceRef:
kind: HelmRepository
name: calcom
namespace: flux-system
interval: 5m
valuesFrom:
- kind: ConfigMap
name: stackspin-calcom-values
optional: false
# Allow overriding values by ConfigMap or Secret
- kind: ConfigMap
name: stackspin-calcom-override
optional: true
- kind: Secret
name: stackspin-calcom-override
optional: true
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-calcom-values
namespace: stackspout
data:
values.yaml: |
postgresql:
# https://github.com/Pyrrha/calcom-helm/blob/main/charts/calcom-stack/values.yaml
enabled: true
commonLabels:
stackspin.net/backupSet: "calcom"
# https://github.com/bitnami/charts/tree/main/bitnami/postgresql/#postgresql-common-parameters
auth:
database: calcom
username: calcom
password: "${postgresql_password}"
postgresPassword: "${postgresql_postgres_password}"
primary:
persistence:
existingClaim: calcom-postgres
podAnnotations:
backup.velero.io/backup-volumes: "data"
calcom:
# https://github.com/Pyrrha/calcom-helm/blob/main/charts/calcom/values.yaml
secretRef: "stackspin-calcom-keys"
commonLabels:
stackspin.net/backupSet: "calcom"
podLabels:
stackspin.net/backupSet: "calcom"
ingress:
enabled: true
annotations:
kubernetes.io/tls-acme: "true"
hosts:
- host: "${calcom_domain}"
paths:
- path: /
pathType: Prefix
tls:
- secretName: calcom-tls
hosts:
- "${calcom_domain}"
# TODO Adjust calcom 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 calcom OpenID Connect Single Sign-On Configuration
# - name: Stackspin
# key: "${client_id}"
# secret: "${client_secret}"
# autoDiscoverUrl: 'https://${hydra_domain}/.well-known/openid-configuration'
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- calcom-kustomization.yaml
- calcom-secrets-kustomization.yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: add-ninja
namespace: flux-system
spec:
interval: 10m
prune: true
path: ./apps/ninja
sourceRef:
kind: GitRepository
name: stackspout
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
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: stackspin-cluster-variables
- kind: ConfigMap
name: stackspin-invoiceninja-kustomization-variables
- kind: Secret
name: stackspin-invoiceninja-variables
- kind: Secret
name: stackspin-invoiceninja-oauth-variables
optional: true
- kind: ConfigMap
name: stackspin-single-sign-on-kustomization-variables
optional: true
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
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
postBuild:
substituteFrom:
- kind: Secret
name: stackspin-cluster-variables
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-invoiceninja-kustomization-variables
namespace: flux-system
data:
invoiceninja_domain: ninja.${domain}
---
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-invoiceninja-oauth-variables
namespace: flux-system
spec:
data:
client_id: invoiceninja
fields:
- fieldName: client_secret
length: "32"
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-invoiceninja-variables
namespace: flux-system
spec:
fields:
- fieldName: app_key
- fieldName: password
- fieldName: redis_password
- fieldName: mariadb_password
- fieldName: mariadb_root_password
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- invoiceninja-variables.yaml
- invoiceninja-kustomization-variables.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: invoiceninja-mariadb
namespace: stackspout
labels:
stackspin.net/backupSet: "invoiceninja"
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 8Gi
storageClassName: local-path
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
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: invoiceninja
namespace: stackspout
spec:
releaseName: invoiceninja
chart:
spec:
# https://github.com/invoiceninja/dockerfiles/blob/master/charts/invoiceninja/Chart.yaml
chart: invoiceninja
version: 0.10.1
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