Wordpress operator for Kubernetes
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
Vladimir Smagin 06e9370411 helm pirms 1 mēnesi
build bootstrap pirms 11 mēnešiem
cmd/manager bootstrap pirms 11 mēnešiem
deploy helm pirms 1 mēnesi
pkg strategy can be changed now, default recreate pirms 1 mēnesi
vendor use vendoring, add jenkins pipeline pirms 6 mēnešiem
version add pvc access mode pirms 1 mēnesi
.gitignore bootstrap pirms 11 mēnešiem
Dockerfile add helm chart pirms 1 mēnesi
Jenkinsfile Изменить 'Jenkinsfile' pirms 1 mēnesi
README.md Изменить 'README.md' pirms 1 mēnesi
VERSION add pvc access mode pirms 1 mēnesi
go.mod add helm chart pirms 1 mēnesi
go.sum add helm chart pirms 1 mēnesi
logo.png add logo pirms 11 mēnešiem
tools.go bootstrap pirms 11 mēnešiem

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