Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3039,6 +3039,7 @@ null
},
"provisioner": {
"additionalTenants": [],
"affinity": {},
"annotations": {},
"enabled": true,
"env": [],
Expand All @@ -3051,16 +3052,19 @@ null
"tag": null
},
"labels": {},
"nodeSelector": {},
"priorityClassName": null,
"provisionedSecretPrefix": null,
"securityContext": {
"fsGroup": 10001,
"runAsGroup": 10001,
"runAsNonRoot": true,
"runAsUser": 10001
}
},
"tolerations": []
},
"tokengen": {
"affinity": {},
"annotations": {},
"enabled": true,
"env": [],
Expand All @@ -3069,6 +3073,7 @@ null
"extraVolumeMounts": [],
"extraVolumes": [],
"labels": {},
"nodeSelector": {},
"priorityClassName": "",
"securityContext": {
"fsGroup": 10001,
Expand Down Expand Up @@ -3222,6 +3227,7 @@ null
<td><pre lang="json">
{
"additionalTenants": [],
"affinity": {},
"annotations": {},
"enabled": true,
"env": [],
Expand All @@ -3234,14 +3240,16 @@ null
"tag": null
},
"labels": {},
"nodeSelector": {},
"priorityClassName": null,
"provisionedSecretPrefix": null,
"securityContext": {
"fsGroup": 10001,
"runAsGroup": 10001,
"runAsNonRoot": true,
"runAsUser": 10001
}
},
"tolerations": []
}
</pre>
</td>
Expand All @@ -3253,6 +3261,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.affinity</td>
<td>object</td>
<td>Affinity for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3358,6 +3375,15 @@ null
<td><pre lang="json">
{}
</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>
</tr>
<tr>
Expand Down Expand Up @@ -3390,6 +3416,15 @@ null
"runAsUser": 10001
}
</pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.tolerations</td>
<td>list</td>
<td>Tolerations for tokengen Pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand All @@ -3398,6 +3433,7 @@ null
<td>Configuration for `tokengen` target</td>
<td><pre lang="json">
{
"affinity": {},
"annotations": {},
"enabled": true,
"env": [],
Expand All @@ -3406,6 +3442,7 @@ null
"extraVolumeMounts": [],
"extraVolumes": [],
"labels": {},
"nodeSelector": {},
"priorityClassName": "",
"securityContext": {
"fsGroup": 10001,
Expand All @@ -3417,6 +3454,15 @@ null
"tolerations": []
}
</pre>
</td>
</tr>
<tr>
<td>enterprise.tokengen.affinity</td>
<td>object</td>
<td>Affinity for tokengen Pods</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3489,6 +3535,15 @@ true
<td><pre lang="json">
{}
</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>
</tr>
<tr>
Expand Down
5 changes: 5 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

## 6.16.0

- [ENHANCEMENT] Allow setting nodeSelector, tolerations and affinity to enterprise components (tokengen and provisioner).

## 6.15.0

- [ENHANCEMENT] Allow setting annotations for memberlist and query-scheduler-discovery services

## 6.14.1

- [BUGFIX] Fixed Memcached persistence options.
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
type: application
appVersion: 3.1.1
version: 6.15.0
version: 6.16.0
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.

Expand Down
12 changes: 12 additions & 0 deletions production/helm/loki/templates/provisioner/job-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ spec:
{{- end }}
- name: 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
serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }}
serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }}
Expand Down
8 changes: 8 additions & 0 deletions production/helm/loki/templates/tokengen/job-tokengen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ spec:
restartPolicy: OnFailure
serviceAccount: {{ 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 }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ enterprise:
labels: {}
# -- Additional annotations for the `tokengen` Job
annotations: {}
# -- Affinity for tokengen Pods
affinity: {}
# -- Node selector for tokengen Pods
nodeSelector: {}
# -- Tolerations for tokengen Job
tolerations: []
# -- Additional volumes for Pods
Expand Down Expand Up @@ -575,6 +579,12 @@ enterprise:
labels: {}
# -- Additional annotations for the `provisioner` Job
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
priorityClassName: null
# -- Run containers as user `enterprise-logs(uid=10001)`
Expand Down
Loading