From d9d3dd0a8dce7089f72805314caaa7af357dba70 Mon Sep 17 00:00:00 2001 From: oleksii Date: Mon, 3 Jun 2024 19:00:50 +0300 Subject: [PATCH] init commit --- discourse/deployment.yaml | 100 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 discourse/deployment.yaml diff --git a/discourse/deployment.yaml b/discourse/deployment.yaml new file mode 100644 index 0000000..ceb5f52 --- /dev/null +++ b/discourse/deployment.yaml @@ -0,0 +1,100 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: discourse + labels: + app: discourse +spec: + replicas: 1 + selector: + matchLabels: + app: discourse + template: + metadata: + labels: + app: discourse + spec: + + securityContext: + fsGroup: 0 + fsGroupChangePolicy: Always + supplementalGroups: [] + sysctls: [] + initContainers: + containers: + - name: discourse + image: docker.io/bitnami/discourse:3.2.2-debian-12-r0 + imagePullPolicy: "IfNotPresent" + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: false + runAsGroup: 0 + runAsNonRoot: false + runAsUser: 0 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + command: + - /bin/bash + args: + - -c + - | + /opt/bitnami/scripts/discourse/entrypoint.sh /opt/bitnami/scripts/discourse/run.sh + env: + - name: BITNAMI_DEBUG + value: "true" + - name: DISCOURSE_PORT_NUMBER + value: "8080" + - name: DISCOURSE_EXTERNAL_HTTP_PORT_NUMBER + value: "80" + - name: DISCOURSE_DATABASE_PASSWORD + valueFrom: + secretKeyRef: + name: postgresdatabase-discourse-owner-secrets + key: PGPASSWORD + - name: DISCOURSE_DATABASE_HOST + valueFrom: + secretKeyRef: + name: postgresdatabase-discourse-owner-secrets + key: PGHOST + - name: DISCOURSE_DATABASE_USER + valueFrom: + secretKeyRef: + name: postgresdatabase-discourse-owner-secrets + key: PGUSER + - name: DISCOURSE_DATABASE_NAME + valueFrom: + secretKeyRef: + name: postgresdatabase-discourse-owner-secrets + key: PGDATABASE + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + initialDelaySeconds: 500 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 6 + readinessProbe: + httpGet: + path: /srv/status + port: http + initialDelaySeconds: 180 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 6 + resources: + limits: + cpu: "3.0" + ephemeral-storage: 1024Mi + memory: 6144Mi + requests: + cpu: "1.5" + ephemeral-storage: 50Mi + memory: 4096Mi