fix(humhub): split containers and fix bug (#16858)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes #16563

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2024-01-04 00:55:09 +02:00
committed by GitHub
parent 074ef6eee0
commit f1151d2c72
3 changed files with 136 additions and 43 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
kubeVersion: ">=1.24.0-0" kubeVersion: ">=1.24.0-0"
apiVersion: v2 apiVersion: v2
name: humhub name: humhub
version: 6.1.8 version: 6.2.0
appVersion: 1.15.0 appVersion: 1.15.0
description: A feature rich and highly flexible OpenSource Social Network Kit written in PHP. description: A feature rich and highly flexible OpenSource Social Network Kit written in PHP.
home: https://truecharts.org/charts/stable/humhub home: https://truecharts.org/charts/stable/humhub
+26 -18
View File
@@ -18,50 +18,58 @@ questions:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: debug - variable: host
label: Debug label: Host (Initial Install Only
description: Enable/Disable Debug description: |
schema: The host that this app will available </br>
type: boolean eg, hum.example.com
default: true
- variable: proto
label: Protocol
schema: schema:
type: string type: string
required: true required: true
immutable: true
default: ""
- variable: proto
label: Protocol (Initial Install Only)
description: |
The protocol this app will be available </br>
eg, HTTPS
schema:
type: string
default: http default: http
required: true
immutable: true
enum: enum:
- value: http - value: http
description: HTTP description: HTTP
- value: https - value: https
description: HTTPS description: HTTPS
- variable: host
label: Host
description: Enable/Disable Debug
schema:
type: string
default: "localhost:8080"
- variable: admin - variable: admin
label: Admin Credentials label: Admin Credentials (Initial Install Only)
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: login - variable: login
label: Login UserName label: Username (Initial Install Only)
schema: schema:
type: string type: string
required: true
immutable: true
default: "" default: ""
- variable: password - variable: password
label: Login Password label: Password (Initial Install Only)
schema: schema:
type: string type: string
private: true private: true
required: true
immutable: true
default: "" default: ""
- variable: email - variable: email
label: Login Email label: Email (Initial Install Only)
schema: schema:
type: string type: string
required: true
immutable: true
default: "" default: ""
- variable: mailer - variable: mailer
label: Mailer Credentials label: Mailer Credentials
+109 -24
View File
@@ -1,7 +1,11 @@
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: ghcr.io/mriedmann/humhub-allinone repository: ghcr.io/mriedmann/humhub-phponly
tag: 1.15.0@sha256:a2a5719d55fcc6970b3c8310450d2ad0ef3476f9e06e71e2f4081a2505c91b86 tag: 1.15.0@sha256:8cbc2f44a64f4e615b425968aea116944a367947e07d092c19e57c6753ff2f9f
nginxImage:
pullPolicy: IfNotPresent
repository: ghcr.io/mriedmann/humhub-nginx
tag: 1.15.0@sha256:3973892d38021d00cf5b2d31eb8e4a962778195d6fb1a737a464bd1126b4f6c2
securityContext: securityContext:
container: container:
@@ -17,21 +21,30 @@ service:
protocol: http protocol: http
targetPort: 80 targetPort: 80
port: 8080 port: 8080
backend:
enabled: true
type: ClusterIP
ports:
backend:
enabled: true
targetPort: 9000
port: 9000
humhub: humhub:
debug: true nginx:
max_client_body_size: 10m
keep_alive_timeout: 65
proto: http proto: http
host: localhost:8080 host: localhost:8080
admin: admin:
login: admin login: admin
password: test password: test
email: humhub@example.com email: humhub@example.com
mailer: mailer:
sys_address: noreply@example.com sys_address: noreply@example.com
sys_name: HumHub sys_name: HumHub
type: smtp type: smtp
hostname: mailer hostname: ""
port: 1025 port: 1025
user: "" user: ""
password: "" password: ""
@@ -43,8 +56,26 @@ workload:
podSpec: podSpec:
containers: containers:
main: main:
probes:
liveness:
enabled: true
type: exec
command: /usr/local/bin/php-fpm-healthcheck
readiness:
enabled: true
type: exec
command: /usr/local/bin/php-fpm-healthcheck
startup:
enabled: true
type: exec
command: /usr/local/bin/php-fpm-healthcheck
env: env:
HUMHUB_AUTO_INSTALL: true
HUMHUB_INTEGRITY_CHECK: true
WAIT_FOR_DB: true
# Database
HUMHUB_DB_USER: "{{ .Values.mariadb.mariadbUsername }}" HUMHUB_DB_USER: "{{ .Values.mariadb.mariadbUsername }}"
HUMHUB_DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}"
HUMHUB_DB_PASSWORD: HUMHUB_DB_PASSWORD:
secretKeyRef: secretKeyRef:
expandObjectName: false expandObjectName: false
@@ -55,36 +86,24 @@ workload:
expandObjectName: false expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}' name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
key: plainhost key: plainhost
HUMHUB_DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}" # Redis
# Cache Config
HUMHUB_CACHE_EXPIRE_TIME: 3600
# do not expose
HUMHUB_CACHE_CLASS: yii\redis\Cache
HUMHUB_QUEUE_CLASS: humhub\modules\queue\driver\Redis HUMHUB_QUEUE_CLASS: humhub\modules\queue\driver\Redis
HUMHUB_CACHE_CLASS: yii\redis\Cache
HUMHUB_CACHE_EXPIRE_TIME: 3600
HUMHUB_REDIS_PORT: 6379
HUMHUB_REDIS_HOSTNAME: HUMHUB_REDIS_HOSTNAME:
secretKeyRef: secretKeyRef:
expandObjectName: false expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}' name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}'
key: plainhost key: plainhost
HUMHUB_REDIS_PORT: 6379
HUMHUB_REDIS_PASSWORD: HUMHUB_REDIS_PASSWORD:
secretKeyRef: secretKeyRef:
expandObjectName: false expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}' name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}'
key: redis-password key: redis-password
HUMHUB_AUTO_INSTALL: 1 # Mailer
# 0 | 1
HUMHUB_DEBUG: "{{ .Values.humhub.debug }}"
# http | https
HUMHUB_PROTO: "{{ .Values.humhub.proto }}"
HUMHUB_HOST: "{{ .Values.humhub.host }}"
HUMHUB_ADMIN_LOGIN: "{{ .Values.humhub.admin.login }}"
HUMHUB_ADMIN_EMAIL: "{{ .Values.humhub.admin.email }}"
HUMHUB_ADMIN_PASSWORD: "{{ .Values.humhub.admin.password }}"
# Mailer install setup
HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS: "{{ .Values.humhub.mailer.sys_address }}" HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS: "{{ .Values.humhub.mailer.sys_address }}"
HUMHUB_MAILER_SYSTEM_EMAIL_NAME: "{{ .Values.humhub.mailer.sys_name }}" HUMHUB_MAILER_SYSTEM_EMAIL_NAME: "{{ .Values.humhub.mailer.sys_name }}"
# php | smtp
HUMHUB_MAILER_TRANSPORT_TYPE: "{{ .Values.humhub.mailer.type }}" HUMHUB_MAILER_TRANSPORT_TYPE: "{{ .Values.humhub.mailer.type }}"
HUMHUB_MAILER_HOSTNAME: "{{ .Values.humhub.mailer.hostname }}" HUMHUB_MAILER_HOSTNAME: "{{ .Values.humhub.mailer.hostname }}"
HUMHUB_MAILER_PORT: "{{ .Values.humhub.mailer.port }}" HUMHUB_MAILER_PORT: "{{ .Values.humhub.mailer.port }}"
@@ -92,6 +111,46 @@ workload:
HUMHUB_MAILER_PASSWORD: "{{ .Values.humhub.mailer.password }}" HUMHUB_MAILER_PASSWORD: "{{ .Values.humhub.mailer.password }}"
HUMHUB_MAILER_ENCRYPTION: "{{ .Values.humhub.mailer.encrypt }}" HUMHUB_MAILER_ENCRYPTION: "{{ .Values.humhub.mailer.encrypt }}"
HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS: "{{ .Values.humhub.mailer.allow_self_sign_certs }}" HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS: "{{ .Values.humhub.mailer.allow_self_sign_certs }}"
# -- Initial install only
# HTTP/HTTPS configuration
HUMHUB_PROTO: "{{ .Values.humhub.proto }}"
HUMHUB_HOST: "{{ .Values.humhub.host }}"
# -- Initial install only
# Admin creattion
HUMHUB_ADMIN_LOGIN: "{{ .Values.humhub.admin.login }}"
HUMHUB_ADMIN_EMAIL: "{{ .Values.humhub.admin.email }}"
HUMHUB_ADMIN_PASSWORD: "{{ .Values.humhub.admin.password }}"
nginx:
enabled: true
type: Deployment
podSpec:
containers:
nginx:
enabled: true
primary: true
imageSelector: nginxImage
env:
NGINX_CLIENT_MAX_BODY_SIZE: "{{ .Values.humhub.nginx.max_client_body_size }}"
NGINX_KEEPALIVE_TIMEOUT: "{{ .Values.humhub.nginx.keep_alive_timeout }}"
NGINX_UPSTREAM: '{{ printf "%s-backend:9000" (include "tc.v1.common.lib.chart.names.fullname" $) }}'
# Allow IPs for `/ping` ONLY
HUMHUB_REVERSEPROXY_WHITELIST: "10.0.0.0/8;172.16.0.0/16;192.168.0.0/24"
probes:
liveness:
enabled: true
type: http
path: /ping
port: 80
readiness:
enabled: true
type: http
path: /ping
port: 80
startup:
enabled: true
type: tcp
port: 80
persistence: persistence:
config: config:
@@ -100,15 +159,41 @@ persistence:
assets: assets:
enabled: true enabled: true
mountPath: /var/www/localhost/htdocs/assets mountPath: /var/www/localhost/htdocs/assets
targetSelector:
main:
main:
mountPath: /var/www/localhost/htdocs/assets
nginx:
nginx:
mountPath: /var/www/localhost/htdocs/assets
themes: themes:
enabled: true enabled: true
mountPath: /var/www/localhost/htdocs/themes mountPath: /var/www/localhost/htdocs/themes
targetSelector:
main:
main:
mountPath: /var/www/localhost/htdocs/themes
nginx:
nginx:
mountPath: /var/www/localhost/htdocs/themes
modules: modules:
enabled: true enabled: true
mountPath: /var/www/localhost/htdocs/protected/modules targetSelector:
main:
main:
mountPath: /var/www/localhost/htdocs/protected/modules
nginx:
nginx:
mountPath: /var/www/localhost/htdocs/protected/modules
uploads: uploads:
enabled: true enabled: true
mountPath: /var/www/localhost/htdocs/uploads targetSelector:
main:
main:
mountPath: /var/www/localhost/htdocs/uploads
nginx:
nginx:
mountPath: /var/www/localhost/htdocs/uploads
mariadb: mariadb:
enabled: true enabled: true