Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .github/workflows/_helm-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Helm CI Shared

on:
workflow_call:
inputs:
run_release:
required: false
type: boolean
default: false
database:
required: false
type: string
default: mysql

env:
K3D_VERSION: 5.7.4
HELM_VERSION: 3.14.4
KUBECTL_VERSION: 1.29.2
KUSTOMIZE_VERSION: 5.3.0

jobs:
helm-ci:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Helm linting
run: ./test/lint.sh

- name: Install toolchain
run: |
mkdir -p ${GITHUB_WORKSPACE}/bin/

# kubectl
curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
-o ${GITHUB_WORKSPACE}/bin/kubectl
chmod +x ${GITHUB_WORKSPACE}/bin/kubectl

# helm
curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -o helm.tar.gz
tar -xzf helm.tar.gz
mv linux-amd64/helm ${GITHUB_WORKSPACE}/bin/helm
chmod +x ${GITHUB_WORKSPACE}/bin/helm

# kustomize
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz -o kustomize.tar.gz
tar -xzf kustomize.tar.gz
mv kustomize ${GITHUB_WORKSPACE}/bin/kustomize
chmod +x ${GITHUB_WORKSPACE}/bin/kustomize

# k3d
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v${K3D_VERSION} bash

# taskfile
curl -sL https://taskfile.dev/install.sh | sh

# yq
curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
-o ${GITHUB_WORKSPACE}/bin/yq
chmod +x ${GITHUB_WORKSPACE}/bin/yq

- name: Add bin to PATH
run: echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH

- name: Create Kubernetes Cluster
run: k3d cluster create --config=cluster/config.yaml

- name: Install Drupal Helm Chart
run: |
cd charts/drupal

if [ "${{ inputs.database }}" = "postgresql" ]; then
echo "Testing PostgreSQL install"
helm install drupal \
-f values.yaml \
--set mysql.enabled=false \
--set postgresql.enabled=true \
. --timeout=600s
else
echo "Testing MySQL install"
helm install drupal \
-f values.yaml \
--set mysql.enabled=true \
--set postgresql.enabled=false \
. --timeout=600s
fi

- name: Configure Git
if: inputs.run_release == true
run: |
git config user.name "chart-releaser"
git config user.email "chart-releaser@users.noreply.github.com"

- name: Add Helm repositories
if: inputs.run_release == true
run: |
for repo in $(yq '.chart-repos[]' test/config.yaml); do
helm repo add $(echo $repo | cut -d'=' -f1) $(echo $repo | cut -d'=' -f2) --force-update
done
helm repo update

- name: Run chart-releaser
if: inputs.run_release == true
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: ./charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"
89 changes: 9 additions & 80 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,15 @@ name: Release Charts

on:
push:
branches:
- main

# Environment variables available to all jobs and steps in this workflow
env:
K3D_VERSION: 5.4.4
HELM_VERSION: 3.11.3
KUBECTL_VERSION: 1.23.4
KUSTOMIZE_VERSION: 4.5.7
branches: [ main ]

jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Helm linting
run: |
./test/lint.sh

- name: Dependencies
run: |
mkdir -p ${GITHUB_WORKSPACE}/bin/

# install kubectl
curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o ${GITHUB_WORKSPACE}/bin/kubectl && chmod +x ${GITHUB_WORKSPACE}/bin/kubectl

# install helm
curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -o helm-v${HELM_VERSION}-linux-amd64.tar.gz && tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz && chmod +x linux-amd64/helm && mv linux-amd64/helm ${GITHUB_WORKSPACE}/bin/helm

# install kustomize
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz -o kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && tar -zxvf kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && chmod +x kustomize && mv kustomize ${GITHUB_WORKSPACE}/bin/kustomize

# install k3d
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v${K3D_VERSION} bash

# install taskfile
curl -sL https://taskfile.dev/install.sh | sh

# install yq
sudo snap install yq

- name: GitHub Path
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH

- name: Create Kubernetes Cluster
run: |
k3d cluster create --config=cluster/config.yaml

# - name: Test Drupal Helm Chart
# run: |
# cd charts/drupal
# helm install drupal -f values.yaml . --timeout=600s

- name: Configure Git
run: |
git config user.name "chart-releaser"
git config user.email "chart-releaser@users.noreply.github.com"

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1

- name: Add repositories
run: |
for repo in $(yq '.chart-repos[]' test/config.yaml); do helm repo add $(echo $repo | cut -d'=' -f1) $(echo $repo | cut -d'=' -f2) --force-update; done

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
with:
charts_dir: ./charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: 'true'
strategy:
matrix:
database: [ mysql, postgresql ]

uses: ./.github/workflows/_helm-ci.yml
with:
database: ${{ matrix.database }}
run_release: true
61 changes: 8 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@
name: Test Helm Charts

on:
pull_request:
branches:
- main

# Environment variables available to all jobs and steps in this workflow
env:
K3D_VERSION: 5.4.4
HELM_VERSION: 3.11.3
KUBECTL_VERSION: 1.23.4
KUSTOMIZE_VERSION: 4.5.7
branches: [ main ]

jobs:
test:
name: 'Test'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Helm linting
run: |
./test/lint.sh

- name: Dependencies
run: |
mkdir -p ${GITHUB_WORKSPACE}/bin/

# install kubectl
curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o ${GITHUB_WORKSPACE}/bin/kubectl && chmod +x ${GITHUB_WORKSPACE}/bin/kubectl

# install helm
curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -o helm-v${HELM_VERSION}-linux-amd64.tar.gz && tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz && chmod +x linux-amd64/helm && mv linux-amd64/helm ${GITHUB_WORKSPACE}/bin/helm

# install kustomize
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz -o kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && tar -zxvf kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && chmod +x kustomize && mv kustomize ${GITHUB_WORKSPACE}/bin/kustomize

# install k3d
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v${K3D_VERSION} bash

# install taskfile
curl -sL https://taskfile.dev/install.sh | sh

# install yq
sudo snap install yq

- name: GitHub Path
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH

- name: Create Kubernetes Cluster
run: |
k3d cluster create --config=cluster/config.yaml
strategy:
matrix:
database: [ mysql, postgresql ]

- name: Test Drupal Helm Chart
run: |
cd charts/drupal
helm install drupal -f values.yaml . --timeout=600s
uses: ./.github/workflows/_helm-ci.yml
with:
database: ${{ matrix.database }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
packages
index.yaml

tpl/
values-*.yaml
!values-example-*.yaml
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Changelog

## 2.0.0-beta1

### ⚠️ Breaking Changes

**Back up your MySQL/PostgreSQL databases before upgrading and proceed with caution.**

- Replaced Bitnami Redis with **Valkey (official chart)**
- Removed Redis Sentinel support
- Switched Redis authentication from Bitnami password secret → **ACL-based auth**
- Migrated MySQL, PostgreSQL, and Solr images to the **Bitnami Legacy registry**
- Added global workaround to disable SSL requirements for MySQL connections in Drush

### Known Issue

- **Drush + MySQL SSL bug:** Drush attempts to enforce SSL when connecting to MySQL inside Kubernetes.
A global workaround is now applied using `--skip-ssl` to ensure site installation and maintenance commands succeed.

### Changes

- Upgraded MySQL and PostgreSQL chart versions
- Updated Redis readiness and maintenance scripts to use RESP protocol (BusyBox `nc` compatible)
- Added Helm CI matrix to test both MySQL and PostgreSQL installs
- Reduced Bitnami-specific assumptions across templates and scripts

## 1.0.0-beta7

- Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## MIT License

Copyright (c) 2024 William Hearn
Copyright (c) 2026 William Hearn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
# Helm Charts for Drupal

A **[Helm chart][helm]** for **Drupal**.
A **[Helm chart][helm]** for deploying **Drupal** on Kubernetes.

This chart will deploy a highly available and performant enterprise Drupal site with the following integrations:
This chart is designed to support a modern, stateless, enterprise-ready Drupal deployment with optional supporting services that can be enabled for local development, testing, or self-hosted environments.

- File Storage (Azure Files) for Stateless Design
- MySQL (optionally configured with ProxySQL)
- PostgreSQL (optionally configured with PGBouncer)
- Redis
- Solr
- Varnish
## Included optional dependencies

Please consult our **Architectural Diagram** for a recommended setup on Azure:
The chart can deploy the following supporting services when enabled:

- **File Storage** – Azure Files (for stateless Drupal file storage)
- **MariaDB / MySQL-compatible database** (optional)
- **PostgreSQL** (optional)
- **Valkey (Redis-compatible cache & queue)** (optional)
- **Apache Solr** (search)
- **Varnish** (HTTP caching / reverse proxy)

> These services are intended primarily for **development, CI, and self-contained deployments**.
> In production environments, external managed services are typically recommended.

## Architecture

Please consult the **Architectural Diagram** for a recommended deployment pattern on Azure:

- **[Architectural Diagram][diagram]**

## Individual Charts

Further documentation can be found at the individual chart level:

- **[Drupal 9/10][drupal]**
- **[Drupal 10/11][drupal]**

## Versioning & Compatibility

We follow **semantic versioning** for chart releases:

## Development
- **Patch** → bug fixes and non-breaking improvements
- **Minor** → new features and backwards-compatible changes
- **Major** → breaking changes

We strive to ensure for every significant changes made to the Helm Chart we will bump the `Chart.yaml` version so that there are no breaking changes introduced on your current release.
For any significant chart change, the `Chart.yaml` version is bumped accordingly.

You can consult the `values.yaml` file for the full range of options available to you.
You can consult the `values.yaml` file for the full set of configurable options.

> **Note:** We try out best to follow `https://semver.org` so that it's clear patch, minor and major releases for breaking changes.
---

[diagram]: https://github.com/drupalwxt/helm-drupal/blob/main/docs/diagram-drupal.pdf
[drupal]: charts/drupal/
Expand Down
Loading