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 401 additions and 59 deletions
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
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
image:
# https://hub.docker.com/r/invoiceninja/invoiceninja/tags
tag: 5.6
pullPolicy: Always
ingress:
enabled: true
hostname: "${invoiceninja_domain}"
tls: true
certManager: true
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: frame-ancestors 'self' ${nextcloud_domain}";
commonLabels:
stackspin.net/backupSet: "invoiceninja"
podLabels:
stackspin.net/backupSet: "invoiceninja"
backup.velero.io/backup-volumes: "invoiceninja-data"
persistence:
public:
existingClaim: "invoiceninja-data"
mariadb:
# https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml
commonLabels:
stackspin.net/backupSet: "invoiceninja"
auth:
password: "${mariadb_password}"
rootPassword: "${mariadb_root_password}"
primary:
persistence:
existingClaim: invoiceninja-mariadb
redis:
commonLabels:
stackspin.net/backupSet: "invoiceninja"
# Redis is only cache, so no pvc needed: https://invoiceninja.github.io/docs/env-variables/
auth:
password: "${redis_password}"
appKey: "${app_key}"
appURL: "https://${invoiceninja_domain}"
userEmail: "${admin_email}"
userPassword: "${password}"
mailer: "smtp" # FIXME use "${outgoing_mail_enabled}"
# https://github.com/invoiceninja/invoiceninja/blob/v5-stable/config/mail.php#L36
extraEnvVars:
- name: APP_CIPHER
value: AES-256-CBC
- name: MAIL_MAILER
value: smtp
- name: MAIL_HOST
value: "${outgoing_mail_smtp_host}"
- name: MAIL_PORT
value: "${outgoing_mail_smtp_port}"
- name: MAIL_USERNAME
value: "${outgoing_mail_smtp_user}"
- name: MAIL_PASSWORD
value: "${outgoing_mail_smtp_password}"
- name: MAIL_EHLO_DOMAIN
value: "${outgoing_mail_domain}"
- name: MAIL_FROM_ADDRESS
value: "${outgoing_mail_from_address}"
- name: MAIL_FROM_NAME
value: "${business_name}"
# Missing: invoiceninja OpenID Connect Single Sign-On Configuration
# - name: Stackspin
# key: "${client_id}"
# secret: "${client_secret}"
# autoDiscoverUrl: 'https://sso.${domain}/.well-known/openid-configuration'
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-suitecrm-variables
namespace: flux-system
data:
password: "{{ 32 | generate_password | b64encode }}"
mariadb_password: "{{ 32 | generate_password | b64encode }}"
mariadb_root_password: "{{ 32 | generate_password | b64encode }}"
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: suitecrm
namespace: stackspout
spec:
releaseName: suitecrm
chart:
spec:
chart: suitecrm
version: 11.1.12
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
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-suitecrm-values
namespace: stackspout
data:
values.yaml: |
ingress:
enabled: true
primary: false
hostname: "people.${domain}"
tls: true
certManager: true
suitecrmUsername: "admin"
suitecrmEmail: "${admin_email}"
suitecrmPassword: "${password}"
mariadb:
auth:
password: "${mariadb_password}"
rootPassword: "${mariadb_root_password}"
# TODO Adjust OIDC SSO to service
# - name: Stackspin
# key: "${client_id}"
# secret: "${client_secret}"
# customAuthUrl: "https://people.${domain}/login/login"
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: zammad
namespace: flux-system
spec:
interval: 10m
retryInterval: 2m
wait: true
timeout: 3m
dependsOn:
- name: single-sign-on
sourceRef:
kind: GitRepository
name: stackspout
path: ./basic/apps/name
prune: true
postBuild:
substituteFrom:
#- kind: Secret
# name: stackspin-zammad-variables
- kind: Secret
name: stackspin-zammad-oauth-variables
- kind: Secret
name: stackspin-cluster-variables
apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: zammad-oauth-client
# Has to live in the same namespace as the stackspin-zammad-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-zammad-oauth-variables
#redirectUris:
# - https://support.${domain}/oauth/openid/
#tokenEndpointAuthMethod: client_secret_post
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zammad-data
namespace: stackspout
labels:
stackspin.net/backupSet: "zammad"
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: local-path
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: zammad
namespace: stackspout
spec:
releaseName: zammad
chart:
spec:
chart: zammad
version: # TODO
sourceRef:
kind: HelmRepository
name: zammad
namespace: flux-system
interval: 5m
valuesFrom:
- kind: ConfigMap
name: stackspin-zammad-values
optional: false
# Allow overriding values by ConfigMap or Secret
- kind: ConfigMap
name: stackspin-zammad-override
optional: true
- kind: Secret
name: stackspin-zammad-override
optional: true
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-zammad-values
namespace: stackspout
data:
values.yaml: |
# TODO verify structure matches chart
ingress:
enabled: true
# Elaborate style
annotations:
kubernetes.io/tls-acme: "true"
hosts:
- host: "support.${domain}"
paths:
- path: /
pathType: Prefix
tls:
- secretName: zammad-tls
hosts:
- "support.${domain}"
# Bitnami style
hostname: "support.${domain}"
tls: true
certManager: true
# TODO Configure PVC for data & database
# TODO Adjust zammad 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 zammad OpenID Connect Single Sign-On Configuration
# - name: Stackspin
# key: "${client_id}"
# secret: "${client_secret}"
# autoDiscoverUrl: 'https://sso.${domain}/.well-known/openid-configuration'
apiVersion: secretgenerator.mittwald.de/v1alpha1
kind: StringSecret
metadata:
name: stackspin-kimai-variables
namespace: flux-system
data:
password: "{{ 32 | generate_password | b64encode }}"
secret: "{{ 32 | generate_password | b64encode }}"
mariadb_password: "{{ 32 | generate_password | b64encode }}"
mariadb_root_password: "{{ 32 | generate_password | b64encode }}"
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
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: kimai
namespace: stackspout
spec:
releaseName: kimai
chart:
spec:
chart: kimai2
version: 1.3.0
sourceRef:
kind: HelmRepository
name: robjuz
namespace: flux-system
interval: 5m
valuesFrom:
- kind: ConfigMap
name: stackspin-kimai-values
optional: false
# Allow overriding values by ConfigMap or Secret
- kind: ConfigMap
name: stackspin-kimai-override
optional: true
- kind: Secret
name: stackspin-kimai-override
optional: true
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-kimai-values
namespace: stackspout
data:
values.yaml: |
# https://github.com/robjuz/helm-charts/tree/master/charts/kimai2#parameters
image:
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}"
# autoDiscoverUrl: 'https://sso.${domain}/.well-known/openid-configuration'
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: podinfo
namespace: example-basic
spec:
releaseName: podinfo
chart:
spec:
# https://artifacthub.io/packages/helm/podinfo/podinfo
chart: podinfo
version: 6.1.1
sourceRef:
kind: HelmRepository
name: podinfo
namespace: example-basic
interval: 60m
# Default values
# https://github.com/stefanprodan/podinfo/blob/master/charts/podinfo/values.yaml
values:
ingress:
enabled: true
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: example-infrastructure
namespace: example-basic
spec:
interval: 24h
sourceRef:
kind: GitRepository
name: stackspin-flux-example
path: ./basic/infrastructure
prune: true
validation: client
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: podinfo
namespace: example-basic
spec:
interval: 1h
url: https://stefanprodan.github.io/podinfo
#!/usr/bin/env bash
echo "Creating / updating gitRepository stackspin-flux-example-basic in namespace example-basic"
flux create source git stackspin-flux-example \
--namespace=example-basic \
--url=https://open.greenhost.net/stackspin/stackspin-flux-example.git \
--branch=main \
--interval=1h
echo "Creating / updating kustomization stackspin-flux-example in namespace example-basic"
flux create kustomization stackspin-flux-example \
--namespace=example-basic \
--source=GitRepository/stackspin-flux-example \
--path="./basic/clusters/production/" \
--prune=true \
--interval=1h
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: examle-apps
namespace: example-basic
name: stackspout-apps
namespace: flux-system
spec:
interval: 24h
interval: 10m
retryInterval: 1m
sourceRef:
kind: GitRepository
name: stackspin-flux-example
path: ./basic/apps
name: stackspout
path: ./apps
prune: true
validation: client
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: stackspout-namespace
namespace: flux-system
spec:
interval: 10m
retryInterval: 1m
sourceRef:
kind: GitRepository
name: stackspout
path: ./infrastructure/namespaces
prune: true