blob: a8b36e211090f45b9096ae61edcaf5b34d442951 [file] [log] [blame]
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
name: "wordpress-01"
labels:
app.kubernetes.io/name: "wordpress-01"
spec:
type: "wordpress"
selector:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
componentKinds:
- group: core
kind: Service
- group: apps
kind: StatefulSet
version: "4.9.4"
description: "WordPress is open source software you can use to create a beautiful website, blog, or app."
icons:
- src: "https://s.w.org/style/images/about/WordPress-logotype-wmark.png"
type: "image/png"
size: "1000x1000"
- src: "https://s.w.org/style/images/about/WordPress-logotype-standard.png"
type: "image/png"
size: "2000x680"
maintainers:
- name: Kenneth Owens
email: kow3ns@github.com
owners:
- name: Kenneth Owens
email: kow3ns@github.com
keywords:
- "cms"
- "blog"
- "wordpress"
links:
- description: About
url: "https://wordpress.org/"
- description: Web Server Dashboard
url: "https://metrics/internal/wordpress-01/web-app"
- description: Mysql Dashboard
url: "https://metrics/internal/wordpress-01/mysql"
---
apiVersion: v1
kind: Service
metadata:
name: wordpress-mysql-hsvc
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "mysql-hsvc"
app.kubernetes.io/tier: "backend"
spec:
ports:
- port: 3306
selector:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "mysql-rdbms"
clusterIP: None
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wordpress-mysql
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "mysql-rdbms"
app.kubernetes.io/tier: "backend"
spec:
selector:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "mysql-rdbms"
app.kubernetes.io/tier: "backend"
replicas: 1
serviceName: wordpress-mysql-hsvc
template:
metadata:
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "mysql-rdbms"
app.kubernetes.io/tier: "backend"
spec:
containers:
- image: mysql:5.6
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
volumeClaimTemplates:
- metadata:
name: mysql-persistent-storage
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 250Gi
---
apiVersion: v1
kind: Service
metadata:
name: wordpress-webserver-svc
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "wordpress-svc"
app.kubernetes.io/tier: "frontend"
spec:
ports:
- port: 80
selector:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "wordpress-webserver"
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
name: wordpress-webserver-hsvc
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "wordpress-hsvc"
app.kubernetes.io/tier: "frontend"
spec:
ports:
- port: 3306
selector:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "wordpress-webserver"
clusterIP: None
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wordpress-webserver
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "wordpress-webserver"
app.kubernetes.io/tier: "frontend"
annotations:
kubernetes.io/application: wordpress
spec:
replicas: 1
serviceName: wordpress-webserver-hsvc
selector:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/component: "wordpress-webserver"
template:
metadata:
labels:
app.kubernetes.io/name: "wordpress-01"
app.kubernetes.io/version: "3"
app.kubernetes.io/component: "wordpress-webserver"
app.kubernetes.io/tier: "frontend"
spec:
containers:
- image: wordpress:4.8-apache
name: wordpress
env:
- name: WORDPRESS_DB_HOST
value: wordpress-mysql-hsvc
- name: WORDPRESS_DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
ports:
- containerPort: 80
name: wordpress
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html
volumeClaimTemplates:
- metadata:
name: wordpress-persistent-storage
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 250Gi