c4k-website/src/main/resources/website/nginx-deployment.yaml

74 lines
1.9 KiB
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
2024-02-27 08:27:22 +00:00
name: nginx
namespace: NAME
labels:
app.kubernetes.part-of: NAME-website
spec:
replicas: 1
2022-09-09 14:53:51 +00:00
selector:
matchLabels:
2024-02-27 08:27:22 +00:00
app: nginx
template:
metadata:
2024-02-27 08:27:22 +00:00
namespace: NAME
labels:
2024-02-27 08:27:22 +00:00
app: nginx
app.kubernetes.part-of: NAME-website
spec:
containers:
2024-02-27 08:27:22 +00:00
- name: nginx
2022-09-09 14:53:51 +00:00
image: nginx:latest
2022-09-30 15:54:26 +00:00
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
volumeMounts:
- mountPath: /etc/nginx
readOnly: true
name: etc-ngingx
- mountPath: /var/log/nginx
name: log
- mountPath: /var/www/html/website
2022-11-23 10:14:46 +00:00
name: content-volume
readOnly: true
2022-11-23 10:14:46 +00:00
initContainers:
- image: domaindrivenarchitecture/c4k-website-build
2024-02-27 08:27:22 +00:00
name: init-build-container
2022-11-23 10:14:46 +00:00
imagePullPolicy: IfNotPresent
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:
2024-02-27 08:27:22 +00:00
name: secret
2022-11-23 10:14:46 +00:00
volumeMounts:
- name: content-volume
mountPath: /var/www/html/website
2024-02-27 08:27:22 +00:00
- name: hash-state-volume
2022-12-02 10:56:21 +00:00
mountPath: /var/hashfile.d
volumes:
2024-02-27 08:27:22 +00:00
- name: etc-nginx
configMap:
2024-02-27 08:27:22 +00:00
name: etc-nginx
items:
- key: nginx.conf
path: nginx.conf
- key: website.conf
path: conf.d/website.conf
2022-09-09 11:03:11 +00:00
- key: mime.types
path: mime.types
- name: log
emptyDir: {}
2022-11-23 10:14:46 +00:00
- name: content-volume
persistentVolumeClaim:
2024-02-27 08:27:22 +00:00
claimName: content-volume
- name: hash-state-volume
2022-12-02 10:56:21 +00:00
persistentVolumeClaim:
2024-02-27 08:27:22 +00:00
claimName: hash-state-volume