Wordpress operator for Kubernetes
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
Vladimir Smagin 06e9370411 helm vor 2 Monaten
build bootstrap vor 11 Monaten
cmd/manager bootstrap vor 11 Monaten
deploy helm vor 2 Monaten
pkg strategy can be changed now, default recreate vor 2 Monaten
vendor use vendoring, add jenkins pipeline vor 7 Monaten
version add pvc access mode vor 2 Monaten
.gitignore bootstrap vor 11 Monaten
Dockerfile add helm chart vor 2 Monaten
Jenkinsfile Изменить 'Jenkinsfile' vor 2 Monaten
README.md Изменить 'README.md' vor 2 Monaten
VERSION add pvc access mode vor 2 Monaten
go.mod add helm chart vor 2 Monaten
go.sum add helm chart vor 2 Monaten
logo.png add logo vor 11 Monaten
tools.go bootstrap vor 11 Monaten

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