ghost

by janip81

Helm chartv0.1.3App 6.72.0Verified publisher

Ghost blogging platform with external MySQL/MariaDB

About this chart

ghost

Ghost blogging platform with external MySQL/MariaDB

Homepage: https://github.com/janip81/helm-charts/tree/main/charts/ghost

Maintainers

NameEmailUrl
janip81[email protected]https://github.com/janip81

Source Code

Overview

Helm chart for deploying Ghost — an open-source blogging and publishing platform.

This chart deploys Ghost against an external MySQL/MariaDB database. It does not bundle a database; pair it with a MariaDB deployment (e.g. groundhog2k/mariadb) or any MySQL-compatible instance.

Adding this helm repository

helm repo add janip81 https://janip81.github.io/helm-charts/
helm search repo ghost

Pre-requisites

  • A running MySQL 8.x or MariaDB 10.3+ instance reachable from the cluster
  • A Kubernetes Secret containing the database password, e.g.:
kubectl -n ghost create secret generic ghost-db \
  --from-literal=MARIADB_PASSWORD='<db-password>'

Or via ArgoCD Vault Plugin (AVP):

apiVersion: v1
kind: Secret
metadata:
  name: ghost-db
  namespace: ghost
  annotations:
    avp.kubernetes.io/path: "kubernetes/data/prod-k8s/ghost"
type: Opaque
stringData:
  MARIADB_ROOT_PASSWORD: <path:kubernetes/data/prod-k8s/ghost#mariadb-root-password>
  MARIADB_DATABASE: ghost
  MARIADB_USER: ghost
  MARIADB_PASSWORD: <path:kubernetes/data/prod-k8s/ghost#mariadb-password>

TL;DR

helm repo add janip81 https://janip81.github.io/helm-charts/
helm install ghost janip81/ghost \
  --set settings.url=https://blog.example.com \
  --set database.host=my-mariadb.ghost.svc.cluster.local \
  --set database.passwordSecret.name=ghost-db \
  --set persistence.enabled=true \
  --set persistence.storageClass=my-storage-class

First-run setup

After Ghost starts, visit <settings.url>/ghost to complete the admin account wizard.

Gateway API (HTTPRoute)

Enable the built-in HTTPRoute for Gateway API:

gatewayApi:
  enabled: true
  host: blog.example.com
  parentRefs:
    - name: my-gateway
      namespace: kube-system

Values

KeyTypeDefaultDescription
affinityobject{}
database.clientstring"mysql"
database.hoststring""
database.namestring"ghost"
database.passwordSecret.keystring"MARIADB_PASSWORD"
database.passwordSecret.namestring""
database.portint3306
database.userstring"ghost"
fullnameOverridestring""
gatewayApi.enabledboolfalse
gatewayApi.hoststring""
gatewayApi.parentRefs[0].namestring"internal-shared"
gatewayApi.parentRefs[0].namespacestring"kube-system"
image.pullPolicystring"IfNotPresent"
image.repositorystring"ghost"
image.tagstring""
livenessProbe.failureThresholdint3
livenessProbe.periodSecondsint30
livenessProbe.timeoutSecondsint5
mail.enabledboolfalse
mail.fromstring""
mail.hoststring""
mail.passwordSecret.keystring""
mail.passwordSecret.namestring""
mail.portint587
mail.secureboolfalse
mail.transportstring"SMTP"
mail.userstring""
nameOverridestring""
nodeSelectorobject{}
persistence.accessModes[0]string"ReadWriteOnce"
persistence.enabledboolfalse
persistence.sizestring"5Gi"
persistence.storageClassstring""
podAnnotationsobject{}
podSecurityContext.fsGroupint1000
readinessProbe.failureThresholdint3
readinessProbe.periodSecondsint10
readinessProbe.timeoutSecondsint5
replicaCountint1
resourcesobject{}
securityContext.allowPrivilegeEscalationboolfalse
securityContext.runAsGroupint1000
securityContext.runAsNonRootbooltrue
securityContext.runAsUserint1000
service.portint80
service.typestring"ClusterIP"
settings.urlstring"http://localhost"
startupProbe.failureThresholdint30
startupProbe.initialDelaySecondsint30
startupProbe.periodSecondsint10
startupProbe.timeoutSecondsint5
tolerationslist[]

Autogenerated from chart metadata using helm-docs v1.14.2

Deploy ghost with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ghost on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartghost is pinned at v0.1.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply