Skip to content

Commit 005ebd6

Browse files
committed
cartridge helm chart: pass rolesToAssign via annotation
1 parent 156121e commit 005ebd6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

examples/kv/helm-chart/templates/deployment.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ spec:
99
tarantool.io/cluster-id: {{ .Values.ClusterName }}
1010
---
1111
{{- range .Values.RoleConfig }}
12+
{{- $r := .RolesToAssign | toJson | quote }}
1213
apiVersion: tarantool.io/v1alpha1
1314
kind: Role
1415
metadata:
@@ -17,7 +18,8 @@ metadata:
1718
labels:
1819
tarantool.io/cluster-id: {{ $.Values.ClusterName }}
1920
tarantool.io/role: {{ .RoleName }}
20-
tarantool.io/rolesToAssign: "{{ .RolesToAssign }}"
21+
annotations:
22+
tarantool.io/rolesToAssign: {{ $r }}
2123
spec:
2224
selector:
2325
matchLabels:
@@ -33,8 +35,9 @@ metadata:
3335
tarantool.io/cluster-id: {{ $.Values.ClusterName }}
3436
tarantool.io/replicaset-template: "{{ .RoleName }}-template"
3537
tarantool.io/role: {{ .RoleName }}
36-
tarantool.io/rolesToAssign: "{{ .RolesToAssign }}"
3738
tarantool.io/useVshardGroups: "0"
39+
annotations:
40+
tarantool.io/rolesToAssign: {{ $r }}
3841
spec:
3942
replicas: {{ .ReplicaCount }}
4043
serviceName: {{ .RoleName }}
@@ -54,10 +57,10 @@ spec:
5457
labels:
5558
tarantool.io/cluster-id: {{ $.Values.ClusterName }}
5659
tarantool.io/pod-template: "{{ .RoleName }}-pod-template"
57-
tarantool.io/rolesToAssign: "{{ .RolesToAssign }}"
5860
tarantool.io/useVshardGroups: "0"
5961
environment: "{{ $.Values.ClusterEnv }}"
6062
annotations:
63+
tarantool.io/rolesToAssign: {{ $r }}
6164
prometheus.io/path: "{{ $.Values.Prometheus.path }}"
6265
prometheus.io/port: "{{ $.Values.Prometheus.port}}"
6366
prometheus.io/scrape: "true"

examples/kv/helm-chart/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ RoleConfig:
3333
DiskSize: 1Gi
3434
CPUallocation: 0.25
3535
MemtxMemoryMB: 256
36-
RolesToAssign: storage
36+
RolesToAssign:
37+
- storage
38+
- vshard.storage

0 commit comments

Comments
 (0)