commit f115e7e4764fd0fed5f8cd4cbac41dba93cdcbdd
parent 25fb117f5048740598fec9252aff5c15ed965a32
Author: MTRNord <mtrnord1@gmail.com>
Date: Mon, 19 Feb 2024 10:55:01 +0100
Deploy xandikos
Diffstat:
7 files changed, 195 insertions(+), 0 deletions(-)
diff --git a/apps/base/xandikos/kustomization.yaml b/apps/base/xandikos/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: xandikos
+resources:
+ - release.yaml
diff --git a/apps/base/xandikos/release.yaml b/apps/base/xandikos/release.yaml
@@ -0,0 +1,154 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: xandikos
+ namespace: xandikos
+spec:
+ strategy:
+ rollingUpdate:
+ maxSurge: 1
+ maxUnavailable: 1
+ type: RollingUpdate
+ replicas: 1
+ selector:
+ matchLabels:
+ app: xandikos
+ template:
+ metadata:
+ labels:
+ app: xandikos
+ spec:
+ containers:
+ - name: xandikos
+ image: ghcr.io/jelmer/xandikos
+ imagePullPolicy: Always
+ command:
+ - "python3"
+ - "-m"
+ - "xandikos.web"
+ - "--port=8081"
+ - "-d/data"
+ - "--defaults"
+ - "--listen-address=0.0.0.0"
+ - "--current-user-principal=/jelmer"
+ - "--route-prefix=/dav"
+ resources:
+ limits:
+ cpu: "2"
+ memory: "2Gi"
+ requests:
+ cpu: "0.1"
+ memory: "10M"
+ livenessProbe:
+ httpGet:
+ path: /health
+ port: 8081
+ initialDelaySeconds: 30
+ periodSeconds: 3
+ timeoutSeconds: 90
+ ports:
+ - containerPort: 8081
+ volumeMounts:
+ - name: xandikos-volume
+ mountPath: /data
+ volumes:
+ - name: xandikos-volume
+ persistentVolumeClaim:
+ claimName: xandikos
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: xandikos
+ labels:
+ app: xandikos
+ namespace: xandikos
+spec:
+ ports:
+ - port: 8081
+ name: web
+ selector:
+ app: xandikos
+ type: ClusterIP
+---
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: xandikos
+ namespace: xandikos
+ labels:
+ app: xandikos
+spec:
+ selector:
+ matchLabels:
+ app: xandikos
+ endpoints:
+ - port: web
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: xandikos
+ namespace: xandikos
+ annotations:
+ nginx.ingress.kubernetes.io/auth-type: basic
+ nginx.ingress.kubernetes.io/auth-secret: my-htpasswd
+ nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - mysite'
+ cert-manager.io/cluster-issuer: letsencrypt-http
+spec:
+ rules:
+ - host: midnightthoughts.space
+ http:
+ paths:
+ - backend:
+ service:
+ name: xandikos
+ port:
+ name: web
+ path: /dav(/|$)(.*)
+ pathType: Prefix
+ tls:
+ - hosts:
+ - midnightthoughts.space
+ secretName: midnightthoughts.space-tls
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: xandikos-wellknown
+ namespace: xandikos
+ annotations:
+ cert-manager.io/cluster-issuer: letsencrypt-http
+spec:
+ rules:
+ - host: midnightthoughts.space
+ http:
+ paths:
+ - backend:
+ service:
+ name: xandikos
+ port:
+ name: web
+ path: /.well-known/carddav
+ pathType: Exact
+ - backend:
+ service:
+ name: xandikos
+ port:
+ name: web
+ path: /.well-known/caldav
+ pathType: Exact
+ tls:
+ - hosts:
+ - midnightthoughts.space
+ secretName: midnightthoughts.space-tls
+---
+apiVersion: traefik.io/v1alpha1
+kind: Middleware
+metadata:
+ name: xandikos-auth
+ namespace: xandikos
+spec:
+ basicAuth:
+ secret: authsecret-xandikos
diff --git a/apps/namespaces/kustomization.yaml b/apps/namespaces/kustomization.yaml
@@ -24,3 +24,4 @@ resources:
- keycloak.yaml
- authentik.yaml
- chaosmesh.yaml
+ - xandikos.yaml
diff --git a/apps/namespaces/xandikos.yaml b/apps/namespaces/xandikos.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: xandikos
diff --git a/apps/production/kustomization.yaml b/apps/production/kustomization.yaml
@@ -29,6 +29,7 @@ resources:
- ../base/keycloak
- ../base/authentik
- ../base/chaosmesh
+ - ../base/xandikos
patchesStrategicMerge:
- cosign-values.yaml
- vaultwarden-values.yaml
diff --git a/apps/production/secrets/kustomization.yaml b/apps/production/secrets/kustomization.yaml
@@ -18,3 +18,4 @@ resources:
- zuul-secrets.yaml
- draupnir-fluffy-config.yaml
- umami.yaml
+ - xandikos.yaml
diff --git a/apps/production/secrets/xandikos.yaml b/apps/production/secrets/xandikos.yaml
@@ -0,0 +1,29 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: authsecret-xandikos
+ namespace: xandikos
+type: kubernetes.io/basic-auth
+data:
+ username: ENC[AES256_GCM,data:0WAevtRE1CgUZI/J,iv:bnmykVHEE4PKOt2DSMdC6FFHNTmZAmlBkN8IelyDd+w=,tag:aNpxiWRVMfwXXOSr6uakYg==,type:str]
+ password: ENC[AES256_GCM,data:Hrgmor/dsxFKpLi5MUto8w==,iv:9opkPzMenfhdpAHSZPOZuTmR1wfa14091M7q6sq/jJw=,tag:sXz7boYNEaXrigTbXWbiJQ==,type:str]
+sops:
+ kms: []
+ gcp_kms: []
+ azure_kv: []
+ hc_vault: []
+ age:
+ - recipient: age1esjyg2qfy49awv0ptkzvpk425adczjr38m37w2mmcahzc4p8n54sll2nzh
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvZHVTd3kwSXBjL2Q4c1Fj
+ Y2lnK1Rxb3NDYW9QY253OTdIRGJ2a1N4bUNnCnlnYzRtV29CdE9rclM2WkdGK2Fa
+ clFvU1VBeVhJNTVBRDRucWdkY1lIL2sKLS0tIHpveVlBcUZRSE51eEo2ZEN5WEU1
+ ZHVYQ1dtS0pVQ2s3dDFPK3dwNzAxTEEK68xvbqLhxDQ+uMoNxrs5LwXY00IWV8vL
+ 8jPBrk4Q+sk+tdPMuQxJIw3uO4r85gWnji7xYv606Tw+xaMsVI0nMA==
+ -----END AGE ENCRYPTED FILE-----
+ lastmodified: "2024-02-19T09:54:36Z"
+ mac: ENC[AES256_GCM,data:BHTLryniCKg7kHMoO3BJ9FnHceJoZjK+tt8TUICSsexBPez5Mbp+A47rKL8peBiMGRRP3u0G6tSA/23nqKkMF5SYRnp+CvJ6JJJTW+Zrnb0TCAB1Xe83d8K86KdOxmAlJ5D7GrngY1DC+NgEEab1w+j1y4J9MAh5lkndc62vNLs=,iv:wXM+/WdepYtlpX7VC0Dd303TRZ06QBiKE4U6AkN3Apo=,tag:v1Y3owrRTzVMkRB38KHYEA==,type:str]
+ pgp: []
+ encrypted_regex: ^(secret_key|adminPassword|admin_pass|admin_email|mariadbPassword|mariadbRootPassword|privateKey|data|stringData|PASSWD|password|pass|postgresPassword|postgresqlPassword|redminePassword|smtpPassword|registration_shared_secret|shared_secret|secret)$
+ version: 3.8.1