2022-09-09 09:17:57 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2022-11-01 14:05:59 +00:00
|
|
|
name: NAME-deployment
|
2024-02-26 12:55:33 +00:00
|
|
|
namespace: webserver
|
2022-11-01 14:05:59 +00:00
|
|
|
labels:
|
|
|
|
app.kubernetes.part-of: NAME-website
|
2022-09-09 09:17:57 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
2022-09-09 14:53:51 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2022-09-27 11:53:04 +00:00
|
|
|
app: NAME-nginx
|
2022-09-09 09:17:57 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
2024-02-26 12:55:33 +00:00
|
|
|
namespace: webserver
|
2022-09-09 09:17:57 +00:00
|
|
|
labels:
|
2022-09-27 11:53:04 +00:00
|
|
|
app: NAME-nginx
|
2022-09-09 09:17:57 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
2022-09-27 11:53:04 +00:00
|
|
|
- name: NAME-nginx
|
2022-09-09 14:53:51 +00:00
|
|
|
image: nginx:latest
|
2022-09-30 15:54:26 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2022-09-09 09:17:57 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
2022-09-22 10:48:11 +00:00
|
|
|
- mountPath: /etc/nginx
|
2022-09-09 09:17:57 +00:00
|
|
|
readOnly: true
|
2024-02-26 12:55:33 +00:00
|
|
|
name: etc-ngingx
|
2022-09-09 09:17:57 +00:00
|
|
|
- mountPath: /var/log/nginx
|
|
|
|
name: log
|
2022-09-21 12:40:34 +00:00
|
|
|
- mountPath: /var/www/html/website
|
2022-11-23 10:14:46 +00:00
|
|
|
name: content-volume
|
2022-09-29 11:59:19 +00:00
|
|
|
readOnly: true
|
2022-11-23 10:14:46 +00:00
|
|
|
initContainers:
|
|
|
|
- image: domaindrivenarchitecture/c4k-website-build
|
|
|
|
name: NAME-init-build-container
|
|
|
|
imagePullPolicy: IfNotPresent
|
2022-11-29 13:05:36 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: BUILD_CPU_REQUEST
|
|
|
|
memory: BUILD_MEMORY_REQUEST
|
|
|
|
limits:
|
|
|
|
cpu: BUILD_CPU_LIMIT
|
|
|
|
memory: BUILD_MEMORY_LIMIT
|
2022-11-23 10:14:46 +00:00
|
|
|
command: ["/entrypoint.sh"]
|
|
|
|
envFrom:
|
|
|
|
- secretRef:
|
|
|
|
name: NAME-secret
|
|
|
|
volumeMounts:
|
|
|
|
- name: content-volume
|
|
|
|
mountPath: /var/www/html/website
|
2022-12-02 10:56:21 +00:00
|
|
|
- name: hashfile-volume
|
|
|
|
mountPath: /var/hashfile.d
|
2022-09-09 09:17:57 +00:00
|
|
|
volumes:
|
2024-02-26 12:55:33 +00:00
|
|
|
- name: etc-ngingx
|
2022-09-09 09:17:57 +00:00
|
|
|
configMap:
|
2024-02-26 12:55:33 +00:00
|
|
|
name: etc-ngingx
|
2022-09-09 09:17:57 +00:00
|
|
|
items:
|
|
|
|
- key: nginx.conf
|
2022-09-09 15:32:28 +00:00
|
|
|
path: nginx.conf
|
2022-09-21 12:40:34 +00:00
|
|
|
- key: website.conf
|
|
|
|
path: conf.d/website.conf
|
2022-09-09 11:03:11 +00:00
|
|
|
- key: mime.types
|
2022-09-21 12:40:34 +00:00
|
|
|
path: mime.types
|
2022-09-09 09:17:57 +00:00
|
|
|
- name: log
|
|
|
|
emptyDir: {}
|
2022-11-23 10:14:46 +00:00
|
|
|
- name: content-volume
|
2022-09-09 09:17:57 +00:00
|
|
|
persistentVolumeClaim:
|
2022-09-28 12:32:41 +00:00
|
|
|
claimName: NAME-content-volume
|
2022-12-02 10:56:21 +00:00
|
|
|
- name: hashfile-volume
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: NAME-hashfile-volume
|
2022-09-29 11:59:19 +00:00
|
|
|
|