maidn-e2e-angular/charts/maidn-e2e-angular/templates/deployment.yaml

47 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: maidn-e2e-angular
labels:
app: maidn-e2e-angular
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: maidn-e2e-angular
template:
metadata:
labels:
app: maidn-e2e-angular
spec:
volumes:
- name: static-assets
emptyDir: {}
initContainers:
- name: copy-assets
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /bin/sh
- -c
- cp -a /www/target/. /work/
volumeMounts:
- name: static-assets
mountPath: /work
containers:
- name: nginx
image: nginx:1.27-alpine
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
volumeMounts:
- name: static-assets
mountPath: /usr/share/nginx/html
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ quote . }}
{{- end }}
{{- end }}