deployment.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {{ include "common.storage.hostPathValidate" .Values }}
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: {{ template "netdata.name" . }}
  6. labels:
  7. app: {{ template "netdata.name" . }}
  8. chart: {{ template "netdata.chart" . }}
  9. release: {{ .Release.Name }}
  10. heritage: {{ .Release.Service }}
  11. role: parent
  12. spec:
  13. replicas: 1
  14. strategy:
  15. type: Recreate
  16. selector:
  17. matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
  18. template:
  19. metadata:
  20. labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
  21. annotations:
  22. rollme: {{ randAlphaNum 5 | quote }}
  23. spec:
  24. securityContext:
  25. fsGroup: 201
  26. serviceAccountName: {{ .Release.Name }}
  27. containers:
  28. - name: {{ .Chart.Name }}
  29. image: "{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}"
  30. imagePullPolicy: {{ .Values.image.pullPolicy }}
  31. env:
  32. {{ $envList := (default list .Values.environmentVariables) }}
  33. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  34. ports:
  35. - name: http
  36. containerPort: 19999
  37. protocol: TCP
  38. livenessProbe:
  39. httpGet:
  40. path: /api/v1/info
  41. port: http
  42. failureThreshold: 3
  43. periodSeconds: 30
  44. successThreshold: 1
  45. timeoutSeconds: 1
  46. readinessProbe:
  47. httpGet:
  48. path: /api/v1/info
  49. port: http
  50. failureThreshold: 3
  51. periodSeconds: 30
  52. successThreshold: 1
  53. timeoutSeconds: 1
  54. volumeMounts:{{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  55. - name: os-release
  56. mountPath: /host/etc/os-release
  57. readOnly: true
  58. - name: sys
  59. mountPath: /host/sys
  60. readOnly: true
  61. - name: proc
  62. mountPath: /host/proc
  63. readOnly: true
  64. - name: user
  65. mountPath: /host/etc/passwd
  66. readOnly: true
  67. - name: group
  68. mountPath: /host/etc/group
  69. readOnly: true
  70. securityContext:
  71. capabilities:
  72. add:
  73. - SYS_PTRACE
  74. terminationGracePeriodSeconds: 60
  75. {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
  76. volumes:{{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  77. - name: os-release
  78. hostPath:
  79. path: /etc/os-release
  80. - name: proc
  81. hostPath:
  82. path: /proc
  83. - name: sys
  84. hostPath:
  85. path: /sys
  86. - name: user
  87. hostPath:
  88. path: /etc/passwd
  89. - name: group
  90. hostPath:
  91. path: /etc/group