Begin adding chart for wordpress.
This commit is contained in:
23
wordpress/.helmignore
Normal file
23
wordpress/.helmignore
Normal file
@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
6
wordpress/Chart.yaml
Normal file
6
wordpress/Chart.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: wordpress
|
||||
description: A helm chart for deploying the wordpress cms on kubernetes.
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "6.1"
|
||||
3
wordpress/templates/NOTES.txt
Normal file
3
wordpress/templates/NOTES.txt
Normal file
@ -0,0 +1,3 @@
|
||||
See:
|
||||
- https://{{ .Values.host }}
|
||||
- https://{{ .Values.host }}/wp-admin
|
||||
13
wordpress/templates/cm.yaml
Normal file
13
wordpress/templates/cm.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
uploads.ini: |
|
||||
file_uploads = On
|
||||
memory_limit = 64M
|
||||
upload_max_filesize = 64M
|
||||
post_max_size = 64M
|
||||
max_execution_time = 600
|
||||
23
wordpress/templates/ingress.yaml
Normal file
23
wordpress/templates/ingress.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.proxyBodySize }}
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.host }}
|
||||
secretName: {{ .Release.Name }}-tls
|
||||
rules:
|
||||
- host: {{ required ".Values.host is required" .Values.host }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ .Release.Name }}
|
||||
port:
|
||||
name: http
|
||||
15
wordpress/templates/service.yaml
Normal file
15
wordpress/templates/service.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
release: {{ .Release.Name }}
|
||||
63
wordpress/templates/sts.yaml
Normal file
63
wordpress/templates/sts.yaml
Normal file
@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
serviceName: {{ .Release.Name }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.storage }}
|
||||
replicas: {{ .Values.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/cm.yml") . | sha256sum }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ .Release.Name }}
|
||||
containers:
|
||||
- name: main
|
||||
image: {{ .Values.image }}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/www/html
|
||||
- name: config
|
||||
mountPath: /usr/local/etc/php/conf.d/uploads.ini
|
||||
subPath: uploads.ini
|
||||
env:
|
||||
- name: WORDPRESS_DB_HOST
|
||||
value: {{ required ".Values.WORDPRESS_DB_HOST is required" .Values.WORDPRESS_DB_HOST }}
|
||||
- name: WORDPRESS_DB_USER
|
||||
value: {{ required ".Values.WORDPRESS_DB_USER is required" .Values.WORDPRESS_DB_USER }}
|
||||
- name: WORDPRESS_DB_PASSWORD
|
||||
value: {{ required ".Values.WORDPRESS_DB_PASSWORD is required" .Values.WORDPRESS_DB_PASSWORD }}
|
||||
- name: WORDPRESS_DB_NAME
|
||||
value: {{ required ".Values.WORDPRESS_DB_NAME is required" .Values.WORDPRESS_DB_NAME }}
|
||||
12
wordpress/values.yaml
Normal file
12
wordpress/values.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
# Required
|
||||
host:
|
||||
WORDPRESS_DB_HOST:
|
||||
WORDPRESS_DB_USER:
|
||||
WORDPRESS_DB_PASSWORD:
|
||||
WORDPRESS_DB_NAME:
|
||||
|
||||
# Optional
|
||||
image: wordpress:6.1
|
||||
storage: 10Gi
|
||||
proxyBodySize: 100m
|
||||
clusterIssuer: letsencrypt
|
||||
Reference in New Issue
Block a user