deployment.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ template "openshift-console-plugin.name" . }}
  5. namespace: {{ .Release.Namespace }}
  6. labels:
  7. {{- include "openshift-console-plugin.labels" . | nindent 4 }}
  8. app.openshift.io/runtime-namespace: {{ .Release.Namespace }}
  9. spec:
  10. replicas: {{ .Values.plugin.replicas }}
  11. selector:
  12. matchLabels:
  13. {{- include "openshift-console-plugin.selectorLabels" . | nindent 6 }}
  14. template:
  15. metadata:
  16. labels:
  17. {{- include "openshift-console-plugin.labels" . | nindent 8 }}
  18. spec:
  19. containers:
  20. - name: {{ template "openshift-console-plugin.name" . }}
  21. image: {{ required "Plugin image must be specified!" .Values.plugin.image }}
  22. ports:
  23. - containerPort: {{ .Values.plugin.port }}
  24. protocol: TCP
  25. imagePullPolicy: {{ .Values.plugin.imagePullPolicy }}
  26. {{- if .Values.plugin.containerSecurityContext }}
  27. securityContext:
  28. {{ tpl (toYaml .Values.plugin.containerSecurityContext | indent 12) . }}
  29. {{- end }}
  30. resources:
  31. {{- toYaml .Values.plugin.resources | nindent 12 }}
  32. volumeMounts:
  33. - name: {{ template "openshift-console-plugin.certificateSecret" . }}
  34. readOnly: true
  35. mountPath: /var/cert
  36. - name: nginx-conf
  37. readOnly: true
  38. mountPath: /etc/nginx/nginx.conf
  39. subPath: nginx.conf
  40. volumes:
  41. - name: {{ template "openshift-console-plugin.certificateSecret" . }}
  42. secret:
  43. secretName: {{ template "openshift-console-plugin.certificateSecret" . }}
  44. defaultMode: 420
  45. - name: nginx-conf
  46. configMap:
  47. name: {{ template "openshift-console-plugin.name" . }}
  48. defaultMode: 420
  49. restartPolicy: Always
  50. dnsPolicy: ClusterFirst
  51. {{- if .Values.plugin.podSecurityContext }}
  52. securityContext:
  53. {{ tpl (toYaml .Values.plugin.podSecurityContext | indent 8) . }}
  54. {{- end }}
  55. strategy:
  56. type: RollingUpdate
  57. rollingUpdate:
  58. maxUnavailable: 25%
  59. maxSurge: 25%