k3s/namespaces/monitoring/ntfy/kustomization.yaml

108 lines
2.7 KiB
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: notImportantHere
namespace: monitoring
unsetOnly: true
namePrefix: ntfy-
resources:
- ../../../kustomize/bases/public-oidc/
replacements:
- source:
kind: Service
name: svc
targets:
- select:
kind: HTTPRoute
options:
create: true
fieldPaths:
- spec.rules.0.backendRefs.0.name
- source:
kind: Deployment
name: app
fieldPath: metadata.labels.[app.kubernetes.io/appName]
targets:
- select:
kind: HTTPRoute
options:
create: true
delimiter: "."
index: 0
fieldPaths:
- spec.hostnames.0
- select:
kind: InfisicalSecret
options:
delimiter: "-"
index: 0
fieldPaths:
- spec.managedSecretReference.secretName
- select:
kind: InfisicalSecret
options:
delimiter: "/"
index: 2
fieldPaths:
- spec.authentication.universalAuth.secretsScope.secretsPath
- select:
kind: Service
fieldPaths:
- spec.ports.0.name
- spec.ports.0.targetPort
- source:
kind: Deployment
name: app
fieldPath: metadata.labels.[app.kubernetes.io/appNamespace]
targets:
- select:
kind: InfisicalSecret
fieldPaths:
- spec.managedSecretReference.secretNamespace
- select:
kind: InfisicalSecret
options:
delimiter: "/"
index: 1
fieldPaths:
- spec.authentication.universalAuth.secretsScope.secretsPath
patches:
- path: patches/deployment.yaml
target:
kind: Deployment
name: app
- path: patches/pvc.yaml
target:
kind: PersistentVolumeClaim
name: pvc
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/appName: ntfy
- pairs:
app.kubernetes.io/appNamespace: monitoring
configMapGenerator:
- name: config
literals:
- TZ=America/New_York
- NTFY_BASE_URL=https://ntfy.leechpepin.com
- NTFY_CACHE_FILE=/var/cache/ntfy/cache.db
- NTFY_ATTACHMENT_CACHE_DIR=/var/cache/ntfy/attachments
- NTFY_AUTH_FILE=/var/cache/ntfy/auth.db
- NTFY_AUTH_DEFAULT_ACCESS=deny-all
- NTFY_BEHIND_PROXY=true
- NTFY_ENABLE_LOGIN=true
- NTFY_WEB_PUSH_FILE=/var/cache/ntfy/webpush.db
- NTFY_WEB_PUSH_PUBLIC_KEY=BMsh_qTqBI5D9BNPgXBLUsKd5O9PBycfkEyk5ikLx2KAgIxxXfPe8r_cjDPkaU-eMF2sptm6p__bvht70qcuu3
- NTFY_WEB_PUSH_EMAIL_ADDRESS=homelab@leechpepin.com
# - NTFY_WEB_ROOT=disable