feat(helm): Allow setting node attributes to `tokengen` and `provisioner` (#14311)

pull/14314/head helm-loki-6.16.0
Dylan Guedes 8 months ago committed by GitHub
parent f52f8ad540
commit c708ae691c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 59
      docs/sources/setup/install/helm/reference.md
  2. 5
      production/helm/loki/CHANGELOG.md
  3. 2
      production/helm/loki/Chart.yaml
  4. 2
      production/helm/loki/README.md
  5. 12
      production/helm/loki/templates/provisioner/job-provisioner.yaml
  6. 8
      production/helm/loki/templates/tokengen/job-tokengen.yaml
  7. 10
      production/helm/loki/values.yaml

@ -3039,6 +3039,7 @@ null
}, },
"provisioner": { "provisioner": {
"additionalTenants": [], "additionalTenants": [],
"affinity": {},
"annotations": {}, "annotations": {},
"enabled": true, "enabled": true,
"env": [], "env": [],
@ -3051,6 +3052,7 @@ null
"tag": null "tag": null
}, },
"labels": {}, "labels": {},
"nodeSelector": {},
"priorityClassName": null, "priorityClassName": null,
"provisionedSecretPrefix": null, "provisionedSecretPrefix": null,
"securityContext": { "securityContext": {
@ -3058,9 +3060,11 @@ null
"runAsGroup": 10001, "runAsGroup": 10001,
"runAsNonRoot": true, "runAsNonRoot": true,
"runAsUser": 10001 "runAsUser": 10001
} },
"tolerations": []
}, },
"tokengen": { "tokengen": {
"affinity": {},
"annotations": {}, "annotations": {},
"enabled": true, "enabled": true,
"env": [], "env": [],
@ -3069,6 +3073,7 @@ null
"extraVolumeMounts": [], "extraVolumeMounts": [],
"extraVolumes": [], "extraVolumes": [],
"labels": {}, "labels": {},
"nodeSelector": {},
"priorityClassName": "", "priorityClassName": "",
"securityContext": { "securityContext": {
"fsGroup": 10001, "fsGroup": 10001,
@ -3222,6 +3227,7 @@ null
<td><pre lang="json"> <td><pre lang="json">
{ {
"additionalTenants": [], "additionalTenants": [],
"affinity": {},
"annotations": {}, "annotations": {},
"enabled": true, "enabled": true,
"env": [], "env": [],
@ -3234,6 +3240,7 @@ null
"tag": null "tag": null
}, },
"labels": {}, "labels": {},
"nodeSelector": {},
"priorityClassName": null, "priorityClassName": null,
"provisionedSecretPrefix": null, "provisionedSecretPrefix": null,
"securityContext": { "securityContext": {
@ -3241,7 +3248,8 @@ null
"runAsGroup": 10001, "runAsGroup": 10001,
"runAsNonRoot": true, "runAsNonRoot": true,
"runAsUser": 10001 "runAsUser": 10001
} },
"tolerations": []
} }
</pre> </pre>
</td> </td>
@ -3253,6 +3261,15 @@ null
<td><pre lang="json"> <td><pre lang="json">
[] []
</pre> </pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.affinity</td>
<td>object</td>
<td>Affinity for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -3358,6 +3375,15 @@ null
<td><pre lang="json"> <td><pre lang="json">
{} {}
</pre> </pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.nodeSelector</td>
<td>object</td>
<td>Node selector for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -3390,6 +3416,15 @@ null
"runAsUser": 10001 "runAsUser": 10001
} }
</pre> </pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.tolerations</td>
<td>list</td>
<td>Tolerations for tokengen Pods</td>
<td><pre lang="json">
[]
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -3398,6 +3433,7 @@ null
<td>Configuration for `tokengen` target</td> <td>Configuration for `tokengen` target</td>
<td><pre lang="json"> <td><pre lang="json">
{ {
"affinity": {},
"annotations": {}, "annotations": {},
"enabled": true, "enabled": true,
"env": [], "env": [],
@ -3406,6 +3442,7 @@ null
"extraVolumeMounts": [], "extraVolumeMounts": [],
"extraVolumes": [], "extraVolumes": [],
"labels": {}, "labels": {},
"nodeSelector": {},
"priorityClassName": "", "priorityClassName": "",
"securityContext": { "securityContext": {
"fsGroup": 10001, "fsGroup": 10001,
@ -3417,6 +3454,15 @@ null
"tolerations": [] "tolerations": []
} }
</pre> </pre>
</td>
</tr>
<tr>
<td>enterprise.tokengen.affinity</td>
<td>object</td>
<td>Affinity for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -3489,6 +3535,15 @@ true
<td><pre lang="json"> <td><pre lang="json">
{} {}
</pre> </pre>
</td>
</tr>
<tr>
<td>enterprise.tokengen.nodeSelector</td>
<td>object</td>
<td>Node selector for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>

@ -13,9 +13,14 @@ Entries should include a reference to the pull request that introduced the chang
[//]: # (<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.) [//]: # (<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.)
## 6.16.0
- [ENHANCEMENT] Allow setting nodeSelector, tolerations and affinity to enterprise components (tokengen and provisioner).
## 6.15.0 ## 6.15.0
- [ENHANCEMENT] Allow setting annotations for memberlist and query-scheduler-discovery services - [ENHANCEMENT] Allow setting annotations for memberlist and query-scheduler-discovery services
## 6.14.1 ## 6.14.1
- [BUGFIX] Fixed Memcached persistence options. - [BUGFIX] Fixed Memcached persistence options.

@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes. description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
type: application type: application
appVersion: 3.1.1 appVersion: 3.1.1
version: 6.15.0 version: 6.16.0
home: https://grafana.github.io/helm-charts home: https://grafana.github.io/helm-charts
sources: sources:
- https://github.com/grafana/loki - https://github.com/grafana/loki

@ -1,6 +1,6 @@
# loki # loki
![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) ![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)
Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes. Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.

@ -123,6 +123,18 @@ spec:
{{- end }} {{- end }}
- name: bootstrap - name: bootstrap
mountPath: /bootstrap mountPath: /bootstrap
{{- with .Values.enterprise.provisioner.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.enterprise.provisioner.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.enterprise.provisioner.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: OnFailure restartPolicy: OnFailure
serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }} serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }}
serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }} serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }}

@ -110,6 +110,14 @@ spec:
restartPolicy: OnFailure restartPolicy: OnFailure
serviceAccount: {{ template "enterprise-logs.tokengenFullname" . }} serviceAccount: {{ template "enterprise-logs.tokengenFullname" . }}
serviceAccountName: {{ template "enterprise-logs.tokengenFullname" . }} serviceAccountName: {{ template "enterprise-logs.tokengenFullname" . }}
{{- with .Values.enterprise.tokengen.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.enterprise.tokengen.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.enterprise.tokengen.tolerations }} {{- with .Values.enterprise.tokengen.tolerations }}
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

@ -540,6 +540,10 @@ enterprise:
labels: {} labels: {}
# -- Additional annotations for the `tokengen` Job # -- Additional annotations for the `tokengen` Job
annotations: {} annotations: {}
# -- Affinity for tokengen Pods
affinity: {}
# -- Node selector for tokengen Pods
nodeSelector: {}
# -- Tolerations for tokengen Job # -- Tolerations for tokengen Job
tolerations: [] tolerations: []
# -- Additional volumes for Pods # -- Additional volumes for Pods
@ -575,6 +579,12 @@ enterprise:
labels: {} labels: {}
# -- Additional annotations for the `provisioner` Job # -- Additional annotations for the `provisioner` Job
annotations: {} annotations: {}
# -- Affinity for tokengen Pods
affinity: {}
# -- Node selector for tokengen Pods
nodeSelector: {}
# -- Tolerations for tokengen Pods
tolerations: []
# -- The name of the PriorityClass for provisioner Job # -- The name of the PriorityClass for provisioner Job
priorityClassName: null priorityClassName: null
# -- Run containers as user `enterprise-logs(uid=10001)` # -- Run containers as user `enterprise-logs(uid=10001)`

Loading…
Cancel
Save