File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,14 @@ spec:
132132 key : password
133133 {{- range .Values.clickhouse.users }}
134134 {{ required "A user must have a name" .name }}/access_management: {{ .accessManagement | default 0}}
135+ {{- if kindIs "slice" .hostIP }}
136+ {{ .name }}/networks/ip:
137+ {{- range .hostIP }}
138+ - {{ . | quote }}
139+ {{- end }}
140+ {{- else }}
135141 {{ .name }}/networks/ip: {{ .hostIP | default "0.0.0.0/0" | quote }}
142+ {{- end }}
136143 {{- if .grants }}
137144 {{ .name }}/grants/query:
138145 {{- range .grants }}
Original file line number Diff line number Diff line change 4747 "pattern" : " ^[a-zA-Z0-9]+$"
4848 },
4949 "hostIP" : {
50- "type" : " string" ,
51- "description" : " Mask for IPs allowed for this user." ,
50+ "oneOf" : [
51+ {
52+ "type" : " string" ,
53+ "description" : " Single IP mask allowed for this user."
54+ },
55+ {
56+ "type" : " array" ,
57+ "description" : " Multiple IP masks allowed for this user." ,
58+ "items" : {
59+ "type" : " string"
60+ }
61+ }
62+ ],
63+ "description" : " Mask for IPs allowed for this user. Can be a string or array of strings." ,
5264 "default" : " 0.0.0.0/0"
5365 },
5466 "password_secret_name" : {
Original file line number Diff line number Diff line change @@ -26,8 +26,15 @@ clickhouse:
2626 # @default -- 127.0.0.1/32
2727 hostIP : 127.0.0.1/32
2828
29- # Configure additional users
29+ # -- Configure additional ClickHouse users.
3030 users : []
31+ # users:
32+ # - name: app_user
33+ # hostIP: ["10.0.0.0/8"] # default: "0.0.0.0/0"
34+ # accessManagement: 1 # default: 0
35+ # password_secret_name: "app-user-secret" # secret must contain 'password' key
36+ # grants:
37+ # - "GRANT SELECT ON database.*"
3138
3239 # -- number of replicas. If greater than 1, keeper must be enabled
3340 # or a keeper host should be provided under clickhouse.keeper.host.
You can’t perform that action at this time.
0 commit comments