The Bitnami chart and images stop at 3.5.0. Run Discourse 2026.10.0 from an image built with the official launcher, on PostgreSQL 18, reusing the existing uploads volume, Redis and secrets. Update the Dex sign-in step for the new image paths, drop the removed LDAP setting, and keep chat off now that it is bundled in core. The image adds a real-IP rule so visitors are not all rate limited as the ingress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
77 lines
2.7 KiB
YAML
77 lines
2.7 KiB
YAML
---
|
|
# tasks file for discourse
|
|
#
|
|
# Discourse runs from an image built with the official launcher; the Bitnami
|
|
# chart stops at 3.5.0. To upgrade, change params.version in
|
|
# files/discourse/web_only.yml, then from a discourse_docker checkout:
|
|
# cp <role>/files/discourse/web_only.yml containers/web_only.yml
|
|
# launcher build --set base_image=<base_image from templates/web.template.yml>-web-only \
|
|
# --tag gitea.eom.dev/devops/discourse-web:<version> web_only --output=type=docker
|
|
# Push it, update the image tag in files/discourse/discourse-web.yaml, and re-run.
|
|
#
|
|
# Pushing through the gitea ingress needs proxy-body-size raised and
|
|
# proxy-request-buffering "off" for the push, then restored. With buffering on,
|
|
# ingress-nginx writes layers to its node's small disk; on 2026-11-08 that caused
|
|
# DiskPressure, evicted the MetalLB speaker, and took the public sites down.
|
|
#
|
|
# Redis, the secrets, the uploads PVC, the Service and the Ingress still come from
|
|
# the original Helm release, which must stay installed but is no longer upgraded.
|
|
- name: Deploy PostgreSQL 18 for Discourse
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
src: "{{ role_path }}/files/discourse/postgres18.yaml"
|
|
|
|
- name: Deploy Discourse
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
src: "{{ role_path }}/files/discourse/discourse-web.yaml"
|
|
wait: true
|
|
wait_condition:
|
|
type: Available
|
|
status: "True"
|
|
wait_timeout: 1800
|
|
|
|
- name: Point the Discourse Service at the launcher-built pods
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
merge_type: merge
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: discourse
|
|
namespace: discourse
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: discourse-web
|
|
app.kubernetes.io/instance: null
|
|
|
|
- name: Find the Discourse pod
|
|
kubernetes.core.k8s_info:
|
|
kind: Pod
|
|
namespace: discourse
|
|
label_selectors:
|
|
- app.kubernetes.io/name=discourse-web
|
|
field_selectors:
|
|
- status.phase=Running
|
|
register: discourse_pods
|
|
|
|
- name: Copy the Dex sign-in / membership sign-up settings script
|
|
kubernetes.core.k8s_cp:
|
|
namespace: discourse
|
|
pod: "{{ discourse_pods.resources[0].metadata.name }}"
|
|
container: discourse
|
|
local_path: "{{ role_path }}/files/discourse-sso.rb"
|
|
remote_path: /tmp/discourse-sso.rb
|
|
|
|
- name: Apply Dex sign-in / membership sign-up settings
|
|
kubernetes.core.k8s_exec:
|
|
namespace: discourse
|
|
pod: "{{ discourse_pods.resources[0].metadata.name }}"
|
|
container: discourse
|
|
command: >-
|
|
bash -c 'cd /var/www/discourse && su discourse -c
|
|
"RAILS_ENV=production bundle exec rails runner /tmp/discourse-sso.rb"'
|
|
register: discourse_sso
|
|
changed_when: false
|