Files
medicalalert-web-reloaded/build/dev/deployment.tpl
Jay Sharma 4e06f267ec Merged in feature/helm-anno-label (pull request #17)
Feature/helm anno label

* Add annotations and lables for helm

* Modify meta.helm.sh/release-name:

* Modify meta.helm.sh/release-namespace

* Revert "Modify meta.helm.sh/release-namespace"

This reverts commit 9538eaf72b6b4f1d8ea99199887bc8c124c88e32.

* Revert "Modify meta.helm.sh/release-name:"

This reverts commit 3b02b8f73e219469c9d18755ce78657e4bb20d7b.
2024-08-16 22:49:06 +00:00

169 lines
5.8 KiB
Smarty
Executable File

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "11"
meta.helm.sh/release-name: weareconnectamerica-web
meta.helm.sh/release-namespace: weareconnectamerica-web
labels:
app.kubernetes.io/managed-by: Helm
app: weareconnectamerica-web
name: weareconnectamerica-web
namespace: weareconnectamerica-web
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: weareconnectamerica-web
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/restartedAt: "2023-06-08T17:04:19-04:00"
creationTimestamp: null
labels:
app: weareconnectamerica-web
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
containers:
- env:
- name: ENVIRONMENT
value: "$ENV"
image: 716593996126.dkr.ecr.us-east-1.amazonaws.com/$BITBUCKET_REPO_SLUG:$VERSION
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- 'for j in dev02 dev03 dev04 dev05; do cd /usr/share/nginx/subdomain && rsync -r --exclude wp-content/uploads ${${j}j}/ /usr/share/nginx/subdomain/${${j}j}-web --inplace -azh -q --partial && echo ---sync-done from efs to local for ${${j}j}-web --- && cd ${${j}j}-web/wp-content && [ -d ./uploads ] && echo ----symlink-exist--- || ln -s /usr/share/nginx/subdomain/${${j}j}/wp-content/uploads/ uploads && chown -R nginx:nginx /usr/share/nginx/subdomain/${${j}j}-web;done'
preStop:
exec:
command:
- /bin/sh
- -c
- 'for j in dev02 dev03 dev04 dev05; do rm -rf /usr/share/nginx/subdomain/${${j}j}-web;done'
envFrom:
- secretRef:
name: weareconnectamerica-web-secrets
- configMapRef:
name: weareconnectamerica-web-cm
imagePullPolicy: Always
name: weareconnectamerica-web
ports:
- containerPort: 80
name: http
protocol: TCP
startupProbe:
exec:
command:
- /root/redinessprobe-wp.sh
initialDelaySeconds: 90
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 5
successThreshold: 1
readinessProbe:
exec:
command:
- /bin/sh
- -c
- "wget -qO- 127.0.0.1/status |grep start && echo redinessprobe-success || exit 9"
initialDelaySeconds: 30
periodSeconds: 5
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 10
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
resources:
limits:
cpu: 2000m
memory: 4096Mi
requests:
cpu: 500m
memory: 1024Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /usr/share/nginx/subdomain/www/wp-content/uploads
name: persistent-storage
- mountPath: /usr/share/nginx/subdomain/dev01
name: persistent-storage-dev01
- mountPath: /usr/share/nginx/subdomain/dev02
name: persistent-storage-dev02
- mountPath: /usr/share/nginx/subdomain/dev03
name: persistent-storage-dev03
- mountPath: /usr/share/nginx/subdomain/dev04
name: persistent-storage-dev04
- mountPath: /usr/share/nginx/subdomain/dev05
name: persistent-storage-dev05
- mountPath: /etc/nginx/conf.d/
name: default-conf
- mountPath: /usr/share/nginx/subdomain/www/wp-content/wflogs
name: empty-dir
- mountPath: /usr/share/nginx/subdomain/dev01/wp-content/wflogs
name: empty-dir
- mountPath: /usr/share/nginx/subdomain/dev02/wp-content/wflogs
name: empty-dir
- mountPath: /usr/share/nginx/subdomain/dev03/wp-content/wflogs
name: empty-dir
- mountPath: /usr/share/nginx/subdomain/dev04/wp-content/wflogs
name: empty-dir
- mountPath: /usr/share/nginx/subdomain/dev05/wp-content/wflogs
name: empty-dir
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: regcred
nodeSelector:
kubernetes.io/os: linux
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica
- name: persistent-storage-dev01
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica-dev01
- name: persistent-storage-dev02
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica-dev02
- name: persistent-storage-dev03
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica-dev03
- name: persistent-storage-dev04
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica-dev04
- name: persistent-storage-dev05
persistentVolumeClaim:
claimName: efs-claim-weareconnectamerica-dev05
- name: default-conf
configMap:
defaultMode: 420
name: weareconnectamerica-web-default-conf-cm
- emptyDir: {}
name: empty-dir