deployment.yaml (5373B)
1 apiVersion: v1 2 kind: PersistentVolumeClaim 3 metadata: 4 name: d4all-persistent-storage 5 namespace: matrix 6 spec: 7 accessModes: 8 - ReadWriteMany 9 resources: 10 requests: 11 storage: 2Gi 12 --- 13 apiVersion: apps/v1 14 kind: Deployment 15 metadata: 16 name: draupnir4all 17 namespace: matrix 18 labels: 19 app.kubernetes.io/component: appservice 20 app.kubernetes.io/instance: main-process 21 app.kubernetes.io/name: draupnir4all 22 spec: 23 replicas: 0 24 strategy: 25 rollingUpdate: 26 maxSurge: 25% 27 maxUnavailable: 25% 28 type: RollingUpdate 29 selector: 30 matchLabels: 31 app: draupnir4all 32 template: 33 metadata: 34 labels: 35 app: draupnir4all 36 app.kubernetes.io/component: appservice 37 app.kubernetes.io/instance: main-process 38 app.kubernetes.io/name: draupnir4all 39 spec: 40 automountServiceAccountToken: false 41 affinity: 42 podAntiAffinity: 43 requiredDuringSchedulingIgnoredDuringExecution: 44 - labelSelector: 45 matchExpressions: 46 - key: app 47 operator: In 48 values: 49 - draupnir4all 50 topologyKey: "kubernetes.io/hostname" 51 containers: 52 - name: draupnir4all 53 #image: gnuxie/draupnir:develop 54 #imagePullPolicy: Always 55 #image: ghcr.io/mtrnord/draupnir:latest 56 image: gnuxie/draupnir:v2.7.1 57 imagePullPolicy: IfNotPresent 58 # env: 59 # - name: TRACING_ENABLED 60 # value: "true" 61 # - name: TRACING_DIAG_ENABLED 62 # value: "false" 63 # - name: TRACING_DIAG_VERBOSE 64 # value: "true" 65 # - name: TRACING_TRACE_URL 66 # value: http://tempo.monitoring.svc.cluster.local:4318/v1/traces 67 # - name: TRACING_METRIC_URL 68 # value: http://tempo.monitoring.svc.cluster.local:4318/v1/metrics 69 env: 70 - name: NODE_OPTIONS 71 value: "--trace-warnings" 72 command: ["./draupnir-entrypoint.sh"] 73 args: ["appservice", "-c", "/data/config/config.appservice.yaml", "-f", "/data/config/draupnir-registration.yaml", "--draupnir-config", "/data/config/draupnir-config.yaml", "-p", "9000"] 74 securityContext: 75 allowPrivilegeEscalation: false 76 readOnlyRootFilesystem: true 77 runAsNonRoot: true 78 runAsUser: 1000 79 runAsGroup: 1000 80 capabilities: 81 drop: 82 - ALL 83 seccompProfile: 84 type: RuntimeDefault 85 resources: 86 limits: 87 cpu: "1000m" 88 memory: "1024Mi" 89 requests: 90 memory: "344Mi" 91 cpu: "512m" 92 ports: 93 - containerPort: 9001 94 name: api 95 protocol: TCP 96 - containerPort: 9000 97 name: appservice 98 protocol: TCP 99 volumeMounts: 100 - name: configs 101 mountPath: "/data/config" 102 readOnly: true 103 - mountPath: /data/storage 104 name: storage 105 - mountPath: /tmp 106 name: tmp 107 livenessProbe: 108 httpGet: 109 path: /healthz 110 port: appservice 111 scheme: HTTP 112 initialDelaySeconds: 120 113 periodSeconds: 10 114 startupProbe: 115 httpGet: 116 path: /healthz 117 port: appservice 118 initialDelaySeconds: 120 119 failureThreshold: 30 120 periodSeconds: 10 121 # - name: draupnir4all-web 122 # image: ghcr.io/mtrnord/draupnir4all-web:latest 123 # imagePullPolicy: Always 124 # env: 125 # - name: SESSION_SECRET 126 # valueFrom: 127 # secretKeyRef: 128 # name: draupnir4all-web 129 # key: session-secret 130 # - name: D4ALL_INSTANCE_ADDRESS 131 # value: "http://localhost:9001" 132 # resources: 133 # limits: {} 134 # requests: 135 # memory: "344Mi" 136 # cpu: "252m" 137 # securityContext: 138 # runAsUser: 1000 139 # runAsGroup: 1000 140 # readOnlyRootFilesystem: true 141 # ports: 142 # - containerPort: 3000 143 # name: web 144 # protocol: TCP 145 # volumeMounts: 146 # - mountPath: /tmp 147 # name: tmp 148 # livenessProbe: 149 # httpGet: 150 # path: / 151 # port: web 152 # scheme: HTTP 153 # initialDelaySeconds: 15 154 # periodSeconds: 10 155 # startupProbe: 156 # httpGet: 157 # path: / 158 # port: web 159 # initialDelaySeconds: 15 160 # failureThreshold: 30 161 # periodSeconds: 10 162 volumes: 163 - name: configs 164 secret: 165 secretName: draupnir-appservice 166 - name: storage 167 persistentVolumeClaim: 168 claimName: d4all-persistent-storage 169 - name: tmp 170 emptyDir: 171 sizeLimit: 2048Mi