deployment.yaml 2.8 KB

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