Wordpress operator for Kubernetes
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
Vladimir Smagin 06e9370411 helm 2ヶ月前
build bootstrap 11ヶ月前
cmd/manager bootstrap 11ヶ月前
deploy helm 2ヶ月前
pkg strategy can be changed now, default recreate 2ヶ月前
vendor use vendoring, add jenkins pipeline 7ヶ月前
version add pvc access mode 2ヶ月前
.gitignore bootstrap 11ヶ月前
Dockerfile add helm chart 2ヶ月前
Jenkinsfile Изменить 'Jenkinsfile' 2ヶ月前
README.md Изменить 'README.md' 2ヶ月前
VERSION add pvc access mode 2ヶ月前
go.mod add helm chart 2ヶ月前
go.sum add helm chart 2ヶ月前
logo.png add logo 11ヶ月前
tools.go bootstrap 11ヶ月前

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