software-infrastructure/discourse_deploy.yaml
2025-12-24 13:20:58 -05:00

342 lines
11 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
meta.helm.sh/release-name: discourse
meta.helm.sh/release-namespace: discourse
creationTimestamp: "2025-11-11T21:42:30Z"
generation: 1
labels:
app.kubernetes.io/instance: discourse
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: discourse
app.kubernetes.io/version: 3.5.0
helm.sh/chart: discourse-17.0.1
name: discourse
namespace: discourse
resourceVersion: "126024847"
uid: 3ab876dd-fba3-4b05-b5b7-4d98e455fc77
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: discourse
app.kubernetes.io/name: discourse
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: e5461cf0a1e43f8902c5301b3406945d6a42bf2817fd69f91864bd1690a64b6b
checksum/secrets-database: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
checksum/secrets-discourse: 400095440da345a753f05bd9af8e09a98b4aba5b2c80294e9d2b4956a080ef86
checksum/secrets-redis: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
creationTimestamp: null
labels:
app.kubernetes.io/instance: discourse
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: discourse
app.kubernetes.io/version: 3.5.0
helm.sh/chart: discourse-17.0.1
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/instance: discourse
app.kubernetes.io/name: discourse
topologyKey: kubernetes.io/hostname
weight: 1
automountServiceAccountToken: false
containers:
- args:
- -c
- |
rm -r /opt/bitnami/discourse/plugins/chat
chown -R discourse:root /opt/bitnami/discourse/plugins
/opt/bitnami/scripts/discourse/entrypoint.sh /opt/bitnami/scripts/discourse/run.sh
command:
- /bin/bash
env:
- name: BITNAMI_DEBUG
value: "false"
- name: DISCOURSE_PASSWORD
valueFrom:
secretKeyRef:
key: discourse-password
name: discourse-discourse
- name: DISCOURSE_PORT_NUMBER
value: "8080"
- name: DISCOURSE_EXTERNAL_HTTP_PORT_NUMBER
value: "80"
- name: DISCOURSE_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: discourse-postgresql
- name: POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: discourse-postgresql
- name: POSTGRESQL_CLIENT_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
name: discourse-postgresql
- name: DISCOURSE_REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: discourse-redis
- name: DISCOURSE_SMTP_PASSWORD
valueFrom:
secretKeyRef:
key: smtp-password
name: discourse-discourse
- name: DISCOURSE_DATA_TO_PERSIST
value: public/backups public/uploads
envFrom:
- configMapRef:
name: discourse
image: docker.io/bitnamilegacy/discourse:3.4.7-debian-12-r0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
initialDelaySeconds: 500
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: http
timeoutSeconds: 5
name: discourse
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
failureThreshold: 6
httpGet:
path: /srv/status
port: http
scheme: HTTP
initialDelaySeconds: 180
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- CHOWN
- SYS_CHROOT
- FOWNER
- SETGID
- SETUID
- DAC_OVERRIDE
drop:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
seLinuxOptions: {}
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /bitnami/discourse
name: discourse-data
subPath: discourse
- mountPath: /opt/bitnami/discourse/plugins
name: empty-dir
subPath: app-plugins-dir
- args:
- /opt/bitnami/scripts/discourse-sidekiq/run.sh
command:
- /opt/bitnami/scripts/discourse/entrypoint.sh
env:
- name: BITNAMI_DEBUG
value: "false"
- name: DISCOURSE_PASSWORD
valueFrom:
secretKeyRef:
key: discourse-password
name: discourse-discourse
- name: DISCOURSE_POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: discourse-postgresql
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: discourse-redis
- name: DISCOURSE_SMTP_PASSWORD
valueFrom:
secretKeyRef:
key: smtp-password
name: discourse-discourse
- name: DISCOURSE_DATA_TO_PERSIST
value: public/backups public/uploads
envFrom:
- configMapRef:
name: discourse
image: docker.io/bitnamilegacy/discourse:3.4.7-debian-12-r0
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- /bin/sh
- -c
- pgrep -f ^sidekiq
failureThreshold: 6
initialDelaySeconds: 500
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: sidekiq
readinessProbe:
exec:
command:
- /bin/sh
- -c
- pgrep -f ^sidekiq
failureThreshold: 6
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: 750m
ephemeral-storage: 2Gi
memory: 768Mi
requests:
cpu: 500m
ephemeral-storage: 50Mi
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- CHOWN
- SYS_CHROOT
- FOWNER
- SETGID
- SETUID
- DAC_OVERRIDE
drop:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
seLinuxOptions: {}
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /bitnami/discourse
name: discourse-data
subPath: discourse
- mountPath: /opt/bitnami/discourse/plugins
name: empty-dir
subPath: app-plugins-dir
dnsPolicy: ClusterFirst
initContainers:
- args:
- -c
- |
pushd "/opt/bitnami/discourse" >/dev/null || exit 1
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-adplugin
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-subscriptions
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-activity-pub
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-openid-connect
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/jonmbake/discourse-ldap-auth
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-math
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-post-voting
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-prometheus
RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-reactions
RAILS_ENV=production LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all
popd >/dev/null || exit 1
cp -nr --preserve=mode /opt/bitnami/discourse/plugins/* /plugins
command:
- /bin/bash
image: docker.io/bitnamilegacy/discourse:3.4.7-debian-12-r0
imagePullPolicy: IfNotPresent
name: install-plugins
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- CHOWN
- SYS_CHROOT
- FOWNER
- SETGID
- SETUID
- DAC_OVERRIDE
drop:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
seLinuxOptions: {}
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /plugins
name: empty-dir
subPath: app-plugins-dir
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 0
fsGroupChangePolicy: Always
serviceAccount: discourse
serviceAccountName: discourse
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: empty-dir
- name: discourse-data
persistentVolumeClaim:
claimName: discourse
status:
conditions:
- lastTransitionTime: "2025-11-11T21:42:30Z"
lastUpdateTime: "2025-11-11T21:42:30Z"
message: Deployment does not have minimum availability.
reason: MinimumReplicasUnavailable
status: "False"
type: Available
- lastTransitionTime: "2025-11-11T21:42:30Z"
lastUpdateTime: "2025-11-11T21:42:30Z"
message: ReplicaSet "discourse-75db4ff77d" is progressing.
reason: ReplicaSetUpdated
status: "True"
type: Progressing
observedGeneration: 1
replicas: 1
unavailableReplicas: 1
updatedReplicas: 1