k8s-pages/helm-chart/templates/deployment.yaml
2025-02-19 10:01:33 -06:00

31 lines
859 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-reverse-proxy
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: nginx-reverse-proxy
template:
metadata:
labels:
app: nginx-reverse-proxy
annotations:
# Compute a checksum of the rendered ConfigMap template.
# This forces a pod restart when the config changes.
checksum/nginx-config: {{ include "nginx.configmap.content" . | sha256sum }}
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d
volumes:
- name: nginx-config
configMap:
name: nginx-reverse-proxy-config