Wordpress operator for Kubernetes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Vladimir Smagin 1108107876 fix readme typo il y a 1 semaine
build bootstrap il y a 6 mois
cmd/manager bootstrap il y a 6 mois
deploy readme il y a 1 semaine
pkg add logging to deletion il y a 1 semaine
vendor use vendoring, add jenkins pipeline il y a 2 mois
version add pdb resource il y a 1 semaine
.gitignore bootstrap il y a 6 mois
Dockerfile add pdb resource il y a 1 semaine
Jenkinsfile use vendoring, add jenkins pipeline il y a 2 mois
README.md fix readme typo il y a 1 semaine
VERSION add pdb resource il y a 1 semaine
go.mod use vendoring, add jenkins pipeline il y a 2 mois
go.sum use vendoring, add jenkins pipeline il y a 2 mois
logo.png add logo il y a 6 mois
tools.go bootstrap il y a 6 mois

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

kubectl -f deploy/service_account.yaml
kubectl -f deploy/role.yaml
kubectl -f deploy/role_binding.yaml
kubectl -f deploy/operator.yaml

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 and restore from backup:

apiVersion: blindage.org/v1alpha1
kind: Wordpress
metadata:
  name: another
spec:
  importBackup:
    databaseBackupFile: s3://mywpbackup/backup.sql.gz
    wordpressBackupFile:
    bucketRegion:
    bucketAccessKeyID:
    bucketSecretKey:
  database:
    database: wordpress
    hostname: my-test-wordpress-database
    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