Wordpress operator for Kubernetes
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
Vladimir Smagin 06e9370411 helm 1 mese fa
build bootstrap 10 mesi fa
cmd/manager bootstrap 10 mesi fa
deploy helm 1 mese fa
pkg strategy can be changed now, default recreate 1 mese fa
vendor use vendoring, add jenkins pipeline 6 mesi fa
version add pvc access mode 1 mese fa
.gitignore bootstrap 10 mesi fa
Dockerfile add helm chart 1 mese fa
Jenkinsfile Изменить 'Jenkinsfile' 1 mese fa
README.md Изменить 'README.md' 1 mese fa
VERSION add pvc access mode 1 mese fa
go.mod add helm chart 1 mese fa
go.sum add helm chart 1 mese fa
logo.png add logo 10 mesi fa
tools.go bootstrap 10 mesi fa

README.md

Wordpress operator for Kubernetes

Run multiple Wordpress instances in your Kubernetes cluster.

Build sources

Prebuilt images

You can find images here https://hub.docker.com/r/iam21h/wordpress-operator

Deploy operator

Edit files and run:

kubectl -f deploy/raw_resources/clusterrole.yaml
kubectl -f deploy/raw_resources/clusterrole_binding.yaml
kubectl -n operators -f deploy/raw_resources/service_account.yaml
kubectl -n operators -f deploy/raw_resources/operator.yaml

or use Helm:

helm repo add 21h https://charts.blindage.org
helm repo update
helm install wordpress-operator 21h/wordpress-operator -n operators

Your first Wordpress deployment

Use internal or external database. Internal database means a single pod with MariaDB without any replication or clusterization, my Wordpress operator is NOT MySQL operator. If you need database high availability use specific MySQL operator to create cluster.

Think scalability before first start, because you can’t mount ReadWriteOnce persistent volume to multiple pods (replicas > 1), so you need storage class with ReadWriteMany feature.

Changed: now PVCs not purging after custom resource deletion. To delete PVCs use special flags.

This sample resource can help you run your first instance with many pods:

apiVersion: blindage.org/v1alpha1
kind: Wordpress
metadata:
  name: my-test-wordpress
spec:
  replicas: 3
  databaseVolumeSize: 1Gi
  wordpressVolumeSize: 2Gi
  # set storage class with ReadWriteMany feature
  wordpressStorageClass: nfs
  # purge PVCs after use
  databaseVolumeCleanup: true
  wordpressVolumeCleanup: true
  podDisruptionBudget:
    maxUnavailable: 1

podDisruptionBudget supports maxUnavailable and minAvailable, rules only Wordpress pods.

Or if you want to use external database. For example, TiDB as database used:

apiVersion: blindage.org/v1alpha1
kind: Wordpress
metadata:
  name: another
spec:
  database:
    database: wordpress
    hostname: tidb-wordpress-database:4000
    password: wordpress
    username: wordpress
  replicas: 1
  wordpressVolumeSize: 1Gi

Look to pkg/apis/blindage/v1alpha1/wordpress_types.go to find more parameters like affinity or annotations.


Copyright by Vladimir Smagin (21h) 2019
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/wordpress-operator