apiVersion: apps/v1 kind: Deployment metadata: name: nginx namespace: NAME labels: app.kubernetes.part-of: NAME-website spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: namespace: NAME labels: app: nginx app.kubernetes.part-of: NAME-website spec: containers: - name: nginx image: nginx:latest 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 name: content-volume readOnly: true initContainers: - image: domaindrivenarchitecture/c4k-website-build name: init-build-container imagePullPolicy: IfNotPresent resources: requests: cpu: BUILD_CPU_REQUEST memory: BUILD_MEMORY_REQUEST limits: cpu: BUILD_CPU_LIMIT memory: BUILD_MEMORY_LIMIT command: ["/entrypoint.sh"] envFrom: - secretRef: name: build-secret volumeMounts: - name: content-volume mountPath: /var/www/html/website - name: hash-state-volume mountPath: /var/hashfile.d volumes: - name: etc-nginx configMap: name: etc-nginx items: - key: nginx.conf path: nginx.conf - key: website.conf path: conf.d/website.conf - key: mime.types path: mime.types - name: log emptyDir: {} - name: content-volume persistentVolumeClaim: claimName: content-volume - name: hash-state-volume persistentVolumeClaim: claimName: hash-state-volume