|
48 | 48 | metadata: |
49 | 49 | annotations: |
50 | 50 | checksum/config: {{ printf "%s\n%s" (include "trigger-v4.clickhouse.dataPathsConfig" .) (.Values.clickhouse.configdFiles | toYaml) | sha256sum }} |
| 51 | + {{- /* Restart on pinned-password changes; when the password is |
| 52 | + auto-generated it lives in the retained datastore secret and |
| 53 | + never rotates on upgrade, so there is nothing to hash. */}} |
| 54 | + {{- if .Values.clickhouse.auth.password }} |
51 | 55 | checksum/secret: {{ .Values.clickhouse.auth.password | sha256sum }} |
| 56 | + {{- end }} |
52 | 57 | {{- with .Values.clickhouse.podAnnotations }} |
53 | 58 | {{- toYaml . | nindent 8 }} |
54 | 59 | {{- end }} |
|
63 | 68 | securityContext: |
64 | 69 | {{- toYaml . | nindent 8 }} |
65 | 70 | {{- end }} |
| 71 | + {{- if .Values.clickhouse.volumePermissions.enabled }} |
| 72 | + initContainers: |
| 73 | + - name: volume-permissions |
| 74 | + image: "{{ .Values.global.imageRegistry | default .Values.clickhouse.volumePermissions.image.registry }}/{{ .Values.clickhouse.volumePermissions.image.repository }}:{{ .Values.clickhouse.volumePermissions.image.tag }}" |
| 75 | + imagePullPolicy: {{ .Values.clickhouse.volumePermissions.image.pullPolicy }} |
| 76 | + command: ["sh", "-c", "chown -R 101:101 /var/lib/clickhouse"] |
| 77 | + securityContext: |
| 78 | + runAsUser: 0 |
| 79 | + runAsNonRoot: false |
| 80 | + volumeMounts: |
| 81 | + - name: data |
| 82 | + mountPath: /var/lib/clickhouse |
| 83 | + {{- end }} |
66 | 84 | containers: |
67 | 85 | - name: clickhouse |
68 | 86 | {{- with .Values.clickhouse.securityContext }} |
@@ -134,6 +152,18 @@ spec: |
134 | 152 | mountPath: /etc/clickhouse-server/config.d/{{ $filename }} |
135 | 153 | subPath: {{ $filename }} |
136 | 154 | {{- end }} |
| 155 | + {{- with .Values.clickhouse.nodeSelector }} |
| 156 | + nodeSelector: |
| 157 | + {{- toYaml . | nindent 8 }} |
| 158 | + {{- end }} |
| 159 | + {{- with .Values.clickhouse.affinity }} |
| 160 | + affinity: |
| 161 | + {{- toYaml . | nindent 8 }} |
| 162 | + {{- end }} |
| 163 | + {{- with .Values.clickhouse.tolerations }} |
| 164 | + tolerations: |
| 165 | + {{- toYaml . | nindent 8 }} |
| 166 | + {{- end }} |
137 | 167 | volumes: |
138 | 168 | - name: config |
139 | 169 | configMap: |
|
0 commit comments