deployment.yaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. {{ include "common.resources.limitation" . | nindent 10 }}
  32. env:
  33. {{ $envList := (default list .Values.environmentVariables) }}
  34. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  35. ports:
  36. - name: http
  37. containerPort: 19999
  38. protocol: TCP
  39. livenessProbe:
  40. httpGet:
  41. path: /api/v1/info
  42. port: http
  43. failureThreshold: 3
  44. periodSeconds: 30
  45. successThreshold: 1
  46. timeoutSeconds: 1
  47. readinessProbe:
  48. httpGet:
  49. path: /api/v1/info
  50. port: http
  51. failureThreshold: 3
  52. periodSeconds: 30
  53. successThreshold: 1
  54. timeoutSeconds: 1
  55. volumeMounts:{{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  56. - name: os-release
  57. mountPath: /host/etc/os-release
  58. readOnly: true
  59. - name: sys
  60. mountPath: /host/sys
  61. readOnly: true
  62. - name: proc
  63. mountPath: /host/proc
  64. readOnly: true
  65. - name: user
  66. mountPath: /host/etc/passwd
  67. readOnly: true
  68. - name: group
  69. mountPath: /host/etc/group
  70. readOnly: true
  71. securityContext:
  72. capabilities:
  73. add:
  74. - SYS_PTRACE
  75. terminationGracePeriodSeconds: 60
  76. {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
  77. volumes:{{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  78. - name: os-release
  79. hostPath:
  80. path: /etc/os-release
  81. - name: proc
  82. hostPath:
  83. path: /proc
  84. - name: sys
  85. hostPath:
  86. path: /sys
  87. - name: user
  88. hostPath:
  89. path: /etc/passwd
  90. - name: group
  91. hostPath:
  92. path: /etc/group