deployment.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. apiVersion: apps/v1
  2. kind: StatefulSet
  3. metadata:
  4. name: {{ .Release.Name }}
  5. namespace: {{ include "chart.namespace" . }}
  6. labels:
  7. {{- include "chart.labels" . | nindent 4 }}
  8. spec:
  9. serviceName: {{ .Release.Name }}
  10. replicas: {{ .Values.replicaCount }}
  11. selector:
  12. matchLabels:
  13. {{- include "chart.selector" . | nindent 6 }}
  14. template:
  15. metadata:
  16. labels:
  17. {{- include "chart.selector" . | nindent 8 }}
  18. spec:
  19. nodeSelector:
  20. {{- toYaml .Values.nodeSelector | nindent 8 }}
  21. tolerations:
  22. {{- toYaml .Values.tolerations | nindent 8 }}
  23. affinity:
  24. {{- toYaml .Values.affinity | nindent 8 }}
  25. containers:
  26. - name: php
  27. image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
  28. imagePullPolicy: {{ .Values.image.pullPolicy }}
  29. ports:
  30. - name: http
  31. containerPort: {{ .Values.service.targetPort }}
  32. volumeMounts:
  33. - name: data
  34. mountPath: /var/www/public_html
  35. volumes:
  36. - name: data
  37. persistentVolumeClaim:
  38. claimName: {{ .Release.Name }}-pvc