Add analytics
This commit is contained in:
parent
46e64631c6
commit
f6a4beb263
3 changed files with 144 additions and 0 deletions
97
namespaces/monitoring/umami/kustomization.yaml
Normal file
97
namespaces/monitoring/umami/kustomization.yaml
Normal file
|
@ -0,0 +1,97 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: NamespaceTransformer
|
||||
metadata:
|
||||
name: notImportantHere
|
||||
namespace: monitoring
|
||||
unsetOnly: true
|
||||
|
||||
namePrefix: umami-
|
||||
resources:
|
||||
- ../../../kustomize/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/delete-pvc.yaml
|
||||
target:
|
||||
kind: PersistentVolumeClaim
|
||||
name: pvc
|
||||
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/appName: umami
|
||||
- pairs:
|
||||
app.kubernetes.io/appNamespace: monitoring
|
||||
|
||||
configMapGenerator:
|
||||
- name: config
|
||||
literals:
|
||||
- DATABASE_TYPE=postgresql
|
5
namespaces/monitoring/umami/patches/delete-pvc.yaml
Normal file
5
namespaces/monitoring/umami/patches/delete-pvc.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
$patch: delete
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pvc
|
42
namespaces/monitoring/umami/patches/deployment.yaml
Normal file
42
namespaces/monitoring/umami/patches/deployment.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
tolerations:
|
||||
- key: "public"
|
||||
operator: "Equal"
|
||||
value: "true"
|
||||
effect: "NoSchedule"
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: public
|
||||
operator: In
|
||||
values:
|
||||
- "true"
|
||||
containers:
|
||||
- name: umami
|
||||
image: ghcr.io/umami-software/umami:postgresql-latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: umami-config
|
||||
env:
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: umami-secrets
|
||||
key: UMAMI_APP_SECRET
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: umami-secrets
|
||||
key: UMAMI_POSTGRESQL_CONNECTION
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: umami
|
Loading…
Add table
Reference in a new issue