Skip to content

Commit c708ae6

Browse files
authored
feat(helm): Allow setting node attributes to tokengen and provisioner (#14311)
1 parent f52f8ad commit c708ae6

File tree

7 files changed

+94
-4
lines changed

7 files changed

+94
-4
lines changed

docs/sources/setup/install/helm/reference.md

+57-2
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,7 @@ null
30393039
},
30403040
"provisioner": {
30413041
"additionalTenants": [],
3042+
"affinity": {},
30423043
"annotations": {},
30433044
"enabled": true,
30443045
"env": [],
@@ -3051,16 +3052,19 @@ null
30513052
"tag": null
30523053
},
30533054
"labels": {},
3055+
"nodeSelector": {},
30543056
"priorityClassName": null,
30553057
"provisionedSecretPrefix": null,
30563058
"securityContext": {
30573059
"fsGroup": 10001,
30583060
"runAsGroup": 10001,
30593061
"runAsNonRoot": true,
30603062
"runAsUser": 10001
3061-
}
3063+
},
3064+
"tolerations": []
30623065
},
30633066
"tokengen": {
3067+
"affinity": {},
30643068
"annotations": {},
30653069
"enabled": true,
30663070
"env": [],
@@ -3069,6 +3073,7 @@ null
30693073
"extraVolumeMounts": [],
30703074
"extraVolumes": [],
30713075
"labels": {},
3076+
"nodeSelector": {},
30723077
"priorityClassName": "",
30733078
"securityContext": {
30743079
"fsGroup": 10001,
@@ -3222,6 +3227,7 @@ null
32223227
<td><pre lang="json">
32233228
{
32243229
"additionalTenants": [],
3230+
"affinity": {},
32253231
"annotations": {},
32263232
"enabled": true,
32273233
"env": [],
@@ -3234,14 +3240,16 @@ null
32343240
"tag": null
32353241
},
32363242
"labels": {},
3243+
"nodeSelector": {},
32373244
"priorityClassName": null,
32383245
"provisionedSecretPrefix": null,
32393246
"securityContext": {
32403247
"fsGroup": 10001,
32413248
"runAsGroup": 10001,
32423249
"runAsNonRoot": true,
32433250
"runAsUser": 10001
3244-
}
3251+
},
3252+
"tolerations": []
32453253
}
32463254
</pre>
32473255
</td>
@@ -3253,6 +3261,15 @@ null
32533261
<td><pre lang="json">
32543262
[]
32553263
</pre>
3264+
</td>
3265+
</tr>
3266+
<tr>
3267+
<td>enterprise.provisioner.affinity</td>
3268+
<td>object</td>
3269+
<td>Affinity for tokengen Pods</td>
3270+
<td><pre lang="json">
3271+
{}
3272+
</pre>
32563273
</td>
32573274
</tr>
32583275
<tr>
@@ -3358,6 +3375,15 @@ null
33583375
<td><pre lang="json">
33593376
{}
33603377
</pre>
3378+
</td>
3379+
</tr>
3380+
<tr>
3381+
<td>enterprise.provisioner.nodeSelector</td>
3382+
<td>object</td>
3383+
<td>Node selector for tokengen Pods</td>
3384+
<td><pre lang="json">
3385+
{}
3386+
</pre>
33613387
</td>
33623388
</tr>
33633389
<tr>
@@ -3390,6 +3416,15 @@ null
33903416
"runAsUser": 10001
33913417
}
33923418
</pre>
3419+
</td>
3420+
</tr>
3421+
<tr>
3422+
<td>enterprise.provisioner.tolerations</td>
3423+
<td>list</td>
3424+
<td>Tolerations for tokengen Pods</td>
3425+
<td><pre lang="json">
3426+
[]
3427+
</pre>
33933428
</td>
33943429
</tr>
33953430
<tr>
@@ -3398,6 +3433,7 @@ null
33983433
<td>Configuration for `tokengen` target</td>
33993434
<td><pre lang="json">
34003435
{
3436+
"affinity": {},
34013437
"annotations": {},
34023438
"enabled": true,
34033439
"env": [],
@@ -3406,6 +3442,7 @@ null
34063442
"extraVolumeMounts": [],
34073443
"extraVolumes": [],
34083444
"labels": {},
3445+
"nodeSelector": {},
34093446
"priorityClassName": "",
34103447
"securityContext": {
34113448
"fsGroup": 10001,
@@ -3417,6 +3454,15 @@ null
34173454
"tolerations": []
34183455
}
34193456
</pre>
3457+
</td>
3458+
</tr>
3459+
<tr>
3460+
<td>enterprise.tokengen.affinity</td>
3461+
<td>object</td>
3462+
<td>Affinity for tokengen Pods</td>
3463+
<td><pre lang="json">
3464+
{}
3465+
</pre>
34203466
</td>
34213467
</tr>
34223468
<tr>
@@ -3489,6 +3535,15 @@ true
34893535
<td><pre lang="json">
34903536
{}
34913537
</pre>
3538+
</td>
3539+
</tr>
3540+
<tr>
3541+
<td>enterprise.tokengen.nodeSelector</td>
3542+
<td>object</td>
3543+
<td>Node selector for tokengen Pods</td>
3544+
<td><pre lang="json">
3545+
{}
3546+
</pre>
34923547
</td>
34933548
</tr>
34943549
<tr>

production/helm/loki/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ Entries should include a reference to the pull request that introduced the chang
1313

1414
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
1515

16+
## 6.16.0
17+
18+
- [ENHANCEMENT] Allow setting nodeSelector, tolerations and affinity to enterprise components (tokengen and provisioner).
19+
1620
## 6.15.0
1721

1822
- [ENHANCEMENT] Allow setting annotations for memberlist and query-scheduler-discovery services
23+
1924
## 6.14.1
2025

2126
- [BUGFIX] Fixed Memcached persistence options.

production/helm/loki/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: loki
33
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
44
type: application
55
appVersion: 3.1.1
6-
version: 6.15.0
6+
version: 6.16.0
77
home: https://grafana.github.io/helm-charts
88
sources:
99
- https://github.com/grafana/loki

production/helm/loki/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# loki
22

3-
![Version: 6.15.0](https://img.shields.io/badge/Version-6.15.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square)
3+
![Version: 6.16.0](https://img.shields.io/badge/Version-6.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square)
44

55
Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
66

production/helm/loki/templates/provisioner/job-provisioner.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ spec:
123123
{{- end }}
124124
- name: bootstrap
125125
mountPath: /bootstrap
126+
{{- with .Values.enterprise.provisioner.affinity }}
127+
affinity:
128+
{{- toYaml . | nindent 8 }}
129+
{{- end }}
130+
{{- with .Values.enterprise.provisioner.nodeSelector }}
131+
nodeSelector:
132+
{{- toYaml . | nindent 8 }}
133+
{{- end }}
134+
{{- with .Values.enterprise.provisioner.tolerations }}
135+
tolerations:
136+
{{- toYaml . | nindent 8 }}
137+
{{- end }}
126138
restartPolicy: OnFailure
127139
serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }}
128140
serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }}

production/helm/loki/templates/tokengen/job-tokengen.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ spec:
110110
restartPolicy: OnFailure
111111
serviceAccount: {{ template "enterprise-logs.tokengenFullname" . }}
112112
serviceAccountName: {{ template "enterprise-logs.tokengenFullname" . }}
113+
{{- with .Values.enterprise.tokengen.affinity }}
114+
affinity:
115+
{{- toYaml . | nindent 8 }}
116+
{{- end }}
117+
{{- with .Values.enterprise.tokengen.nodeSelector }}
118+
nodeSelector:
119+
{{- toYaml . | nindent 8 }}
120+
{{- end }}
113121
{{- with .Values.enterprise.tokengen.tolerations }}
114122
tolerations:
115123
{{- toYaml . | nindent 8 }}

production/helm/loki/values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,10 @@ enterprise:
540540
labels: {}
541541
# -- Additional annotations for the `tokengen` Job
542542
annotations: {}
543+
# -- Affinity for tokengen Pods
544+
affinity: {}
545+
# -- Node selector for tokengen Pods
546+
nodeSelector: {}
543547
# -- Tolerations for tokengen Job
544548
tolerations: []
545549
# -- Additional volumes for Pods
@@ -575,6 +579,12 @@ enterprise:
575579
labels: {}
576580
# -- Additional annotations for the `provisioner` Job
577581
annotations: {}
582+
# -- Affinity for tokengen Pods
583+
affinity: {}
584+
# -- Node selector for tokengen Pods
585+
nodeSelector: {}
586+
# -- Tolerations for tokengen Pods
587+
tolerations: []
578588
# -- The name of the PriorityClass for provisioner Job
579589
priorityClassName: null
580590
# -- Run containers as user `enterprise-logs(uid=10001)`

0 commit comments

Comments
 (0)