Skip to content

Commit

Permalink
Setup inital Helm chart values
Browse files Browse the repository at this point in the history
  • Loading branch information
brown-a2 committed Nov 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 221b097 commit 28f678b
Showing 2 changed files with 76 additions and 16 deletions.
30 changes: 14 additions & 16 deletions helm_deploy/wordpress/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -36,6 +36,13 @@ spec:
- image: {{ .Values.wp.image.repository }}
imagePullPolicy: {{ .Values.wp.image.imagePullPolicy }}
name: wordpress
resources:
requests:
cpu: {{ .Values.wp.resources.(.Values.configmap.envtype).requests.cpu }}
memory: {{ .Values.wp.resources.(.Values.configmap.envtype).requests.memory }}
limits:
cpu: {{ .Values.wp.resources.(.Values.configmap.envtype).limits.cpu }}
memory: {{ .Values.wp.resources.(.Values.configmap.envtype).limits.memory }}
env:
- name: PHP_INI_SCAN_DIR
value: :/usr/local/etc/php/conf.custom
@@ -52,22 +59,6 @@ spec:
- secretRef:
name: hale-wp-secrets-{{ .Release.Revision }}
{{- if or (eq .Values.configmap.envtype "prod") (eq .Values.configmap.envtype "staging") }}
# livenessProbe:
# exec:
# command:
# - sh
# - -c
# - |
# if [ -f /var/www/html/wp-load.php ]; then
# exit 0
# else
# exit 1
# fi
# initialDelaySeconds: 120
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
readinessProbe:
exec:
command:
@@ -89,6 +80,13 @@ spec:
- name: nginx
image: {{ .Values.nginx.image.repository }}
imagePullPolicy: {{ .Values.nginx.image.imagePullPolicy }}
resources:
requests:
cpu: {{ .Values.nginx.resources.(.Values.configmap.envtype).requests.cpu }}
memory: {{ .Values.nginx.resources.(.Values.configmap.envtype).requests.memory }}
limits:
cpu: {{ .Values.nginx.resources.(.Values.configmap.envtype).limits.cpu }}
memory: {{ .Values.nginx.resources.(.Values.configmap.envtype).limits.memory }}
ports:
- containerPort: 8080
volumeMounts:
62 changes: 62 additions & 0 deletions helm_deploy/wordpress/values.yaml
Original file line number Diff line number Diff line change
@@ -11,6 +11,37 @@ nginx:
image:
repository: ""
imagePullPolicy: Always

# Apply pod level resource allocation
resources:
dev:
requests:
cpu: "100m"
memory: "200Mi"
limits:
cpu: "200m"
memory: "400Mi"
demo:
requests:
cpu: "100m"
memory: "200Mi"
limits:
cpu: "200m"
memory: "400Mi"
staging:
requests:
cpu: "100m"
memory: "200Mi"
limits:
cpu: "200m"
memory: "400Mi"
prod:
requests:
cpu: "100m"
memory: "300Mi"
limits:
cpu: "200m"
memory: "500Mi"

wp:
image:
@@ -23,6 +54,37 @@ wp:
staging: 2
dev: 1
demo: 2

# Apply pod level resource allocation
resources:
dev:
requests:
cpu: "300m"
memory: "1000Mi"
limits:
cpu: "800m"
memory: "1600Mi"
demo:
requests:
cpu: "300m"
memory: "1000Mi"
limits:
cpu: "800m"
memory: "1600Mi"
staging:
requests:
cpu: "300m"
memory: "1000Mi"
limits:
cpu: "800m"
memory: "1600Mi"
prod:
requests:
cpu: "500m"
memory: "1500Mi"
limits:
cpu: "1000m"
memory: "2500Mi"

hpa:
enabled: true

0 comments on commit 28f678b

Please sign in to comment.