+ ADD kubernetes deployment
All checks were successful
/ build-and-deploy (push) Successful in 1m26s
All checks were successful
/ build-and-deploy (push) Successful in 1m26s
This commit is contained in:
83
k8s/manifests/app/templates/7-wp-deployment.yaml
Normal file
83
k8s/manifests/app/templates/7-wp-deployment.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: 1
|
||||
# revisionHistoryLimit: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: github-container-registry
|
||||
containers:
|
||||
- name: {{ .Release.Name }}
|
||||
image: {{ .Values.image }}
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- {{ .Values.command | default "web" | quote }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 128M
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 512M
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}
|
||||
- secretRef:
|
||||
name: {{ .Release.Name }}
|
||||
- secretRef:
|
||||
name: "{{ .Release.Name }}-db-connection"
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: {{ .Values.host }}
|
||||
- name: X-Forwarded-Proto
|
||||
value: https
|
||||
path: /wp/wp-cron.php?nocache
|
||||
port: 5000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 60
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 30
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: {{ .Values.host }}
|
||||
- name: X-Forwarded-Proto
|
||||
value: https
|
||||
path: /?nocache
|
||||
port: 5000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 30
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: wp
|
||||
protocol: TCP
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
Reference in New Issue
Block a user