Adds is attribute to manifests.
This commit is contained in:
@@ -19,11 +19,11 @@ spec:
|
||||
automountServiceAccountToken: false
|
||||
serviceAccountName: discourse
|
||||
securityContext:
|
||||
fsGroup: 0
|
||||
fsGroup: 1000
|
||||
fsGroupChangePolicy: Always
|
||||
containers:
|
||||
- name: discourse
|
||||
image: tiredofit/discourse:latest
|
||||
image: discourse/discourse:3.5.3
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -32,10 +32,10 @@ spec:
|
||||
- ALL
|
||||
add:
|
||||
- CHOWN
|
||||
- DAC_OVERRIDE
|
||||
- FOWNER
|
||||
- SETGID
|
||||
- SETUID
|
||||
- DAC_OVERRIDE
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
@@ -43,78 +43,68 @@ spec:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
env:
|
||||
# Admin configuration
|
||||
- name: ADMIN_USER
|
||||
value: {{ .adminUsername }}
|
||||
- name: ADMIN_EMAIL
|
||||
value: {{ .adminEmail }}
|
||||
- name: ADMIN_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: adminPassword
|
||||
# Site configuration
|
||||
- name: SITE_TITLE
|
||||
value: {{ .siteName }}
|
||||
- name: HOSTNAME
|
||||
value: {{ .domain }}
|
||||
# Database configuration
|
||||
- name: DB_HOST
|
||||
# Discourse database configuration
|
||||
- name: DISCOURSE_DB_HOST
|
||||
value: {{ .dbHostname }}
|
||||
- name: DB_PORT
|
||||
- name: DISCOURSE_DB_PORT
|
||||
value: "{{ .dbPort }}"
|
||||
- name: DB_NAME
|
||||
- name: DISCOURSE_DB_NAME
|
||||
value: {{ .dbName }}
|
||||
- name: DB_USER
|
||||
- name: DISCOURSE_DB_USERNAME
|
||||
value: {{ .dbUsername }}
|
||||
- name: DB_PASS
|
||||
- name: DISCOURSE_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: dbPassword
|
||||
# Redis configuration
|
||||
- name: REDIS_HOST
|
||||
- name: DISCOURSE_REDIS_HOST
|
||||
value: {{ .redisHostname }}
|
||||
- name: REDIS_PASS
|
||||
- name: DISCOURSE_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: redis.password
|
||||
# Site configuration
|
||||
- name: DISCOURSE_HOSTNAME
|
||||
value: {{ .domain }}
|
||||
- name: DISCOURSE_DEVELOPER_EMAILS
|
||||
value: {{ .adminEmail }}
|
||||
- name: DISCOURSE_SECRET_KEY_BASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: secretKeyBase
|
||||
# SMTP configuration
|
||||
- name: SMTP_ENABLED
|
||||
value: "{{ .smtp.enabled }}"
|
||||
- name: SMTP_HOST
|
||||
- name: DISCOURSE_SMTP_ADDRESS
|
||||
value: {{ .smtp.host }}
|
||||
- name: SMTP_PORT
|
||||
- name: DISCOURSE_SMTP_PORT
|
||||
value: "{{ .smtp.port }}"
|
||||
- name: SMTP_USER
|
||||
- name: DISCOURSE_SMTP_USER_NAME
|
||||
value: {{ .smtp.user }}
|
||||
- name: SMTP_PASS
|
||||
- name: DISCOURSE_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: smtpPassword
|
||||
- name: SMTP_TLS
|
||||
value: "{{ .smtp.tls }}"
|
||||
# Container timezone
|
||||
- name: TZ
|
||||
value: {{ .timezone }}
|
||||
- name: DISCOURSE_SMTP_ENABLE_START_TLS
|
||||
value: "{{ .smtp.startTls }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /srv/status
|
||||
port: http
|
||||
initialDelaySeconds: 420
|
||||
initialDelaySeconds: 500
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /srv/status
|
||||
port: http
|
||||
initialDelaySeconds: 360
|
||||
periodSeconds: 30
|
||||
@@ -125,25 +115,120 @@ spec:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
ephemeral-storage: 10Gi
|
||||
memory: 4Gi
|
||||
memory: 8Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
cpu: 750m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: discourse-logs
|
||||
mountPath: /data/logs
|
||||
- name: discourse-uploads
|
||||
mountPath: /data/uploads
|
||||
- name: discourse-backups
|
||||
mountPath: /data/backups
|
||||
- name: discourse-data
|
||||
mountPath: /shared
|
||||
- name: sidekiq
|
||||
image: discourse/discourse:3.5.3
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- CHOWN
|
||||
- FOWNER
|
||||
- SETGID
|
||||
- SETUID
|
||||
- DAC_OVERRIDE
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
runAsUser: 0
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "cd /var/www/discourse && exec bundle exec sidekiq"
|
||||
env:
|
||||
# Discourse database configuration
|
||||
- name: DISCOURSE_DB_HOST
|
||||
value: {{ .dbHostname }}
|
||||
- name: DISCOURSE_DB_PORT
|
||||
value: "{{ .dbPort }}"
|
||||
- name: DISCOURSE_DB_NAME
|
||||
value: {{ .dbName }}
|
||||
- name: DISCOURSE_DB_USERNAME
|
||||
value: {{ .dbUsername }}
|
||||
- name: DISCOURSE_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: dbPassword
|
||||
# Redis configuration
|
||||
- name: DISCOURSE_REDIS_HOST
|
||||
value: {{ .redisHostname }}
|
||||
- name: DISCOURSE_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: redis.password
|
||||
# Site configuration
|
||||
- name: DISCOURSE_HOSTNAME
|
||||
value: {{ .domain }}
|
||||
- name: DISCOURSE_DEVELOPER_EMAILS
|
||||
value: {{ .adminEmail }}
|
||||
- name: DISCOURSE_SECRET_KEY_BASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: secretKeyBase
|
||||
# SMTP configuration
|
||||
- name: DISCOURSE_SMTP_ADDRESS
|
||||
value: {{ .smtp.host }}
|
||||
- name: DISCOURSE_SMTP_PORT
|
||||
value: "{{ .smtp.port }}"
|
||||
- name: DISCOURSE_SMTP_USER_NAME
|
||||
value: {{ .smtp.user }}
|
||||
- name: DISCOURSE_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: discourse-secrets
|
||||
key: smtpPassword
|
||||
- name: DISCOURSE_SMTP_ENABLE_START_TLS
|
||||
value: "{{ .smtp.startTls }}"
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "pgrep -f sidekiq"
|
||||
initialDelaySeconds: 500
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "pgrep -f sidekiq"
|
||||
initialDelaySeconds: 180
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
ephemeral-storage: 2Gi
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 375m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: discourse-data
|
||||
mountPath: /shared
|
||||
volumes:
|
||||
- name: discourse-logs
|
||||
- name: discourse-data
|
||||
persistentVolumeClaim:
|
||||
claimName: discourse-logs
|
||||
- name: discourse-uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: discourse-uploads
|
||||
- name: discourse-backups
|
||||
persistentVolumeClaim:
|
||||
claimName: discourse-backups
|
||||
claimName: discourse-data
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
name: discourse
|
||||
is: discourse
|
||||
description: Discourse is a modern, open-source discussion platform designed for online communities and forums.
|
||||
version: 3.5.3
|
||||
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/discourse.svg
|
||||
|
||||
@@ -2,20 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: discourse-logs
|
||||
namespace: discourse
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storageClassName: longhorn
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: discourse-uploads
|
||||
name: discourse-data
|
||||
namespace: discourse
|
||||
spec:
|
||||
accessModes:
|
||||
@@ -24,16 +11,3 @@ spec:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
storageClassName: longhorn
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: discourse-backups
|
||||
namespace: discourse
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
storageClassName: longhorn
|
||||
|
||||
Reference in New Issue
Block a user