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

[promtail] Add automount option for service account and pod #2990

Merged
merged 7 commits into from
Aug 26, 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
2 changes: 1 addition & 1 deletion charts/promtail/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: promtail
description: Promtail is an agent which ships the contents of local logs to a Loki instance
type: application
appVersion: 3.0.0
version: 6.16.4
version: 6.16.5
home: https://grafana.com/loki
sources:
- https://github.com/grafana/loki
Expand Down
4 changes: 3 additions & 1 deletion charts/promtail/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# promtail

![Version: 6.16.4](https://img.shields.io/badge/Version-6.16.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)
![Version: 6.16.5](https://img.shields.io/badge/Version-6.16.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)

Promtail is an agent which ships the contents of local logs to a Loki instance

Expand Down Expand Up @@ -70,6 +70,7 @@ The new release which will pick up again from the existing `positions.yaml`.
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the DaemonSet |
| automountServiceAccountToken | bool | `true` | Automatically mount API credentials for a particular Pod |
| config | object | See `values.yaml` | Section for crafting Promtails config file. The only directly relevant value is `config.file` which is a templated string that references the other values and snippets below this key. |
| config.clients | list | See `values.yaml` | The config of clients of the Promtail server Must be reference in `config.file` to configure `clients` |
| config.enableTracing | bool | `false` | The config to enable tracing |
Expand Down Expand Up @@ -147,6 +148,7 @@ The new release which will pick up again from the existing `positions.yaml`.
| service.enabled | bool | `false` | |
| service.labels | object | `{}` | Labels for the service |
| serviceAccount.annotations | object | `{}` | Annotations for the service account |
| serviceAccount.automountServiceAccountToken | bool | `true` | Automatically mount a ServiceAccount's API credentials |
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created |
| serviceAccount.imagePullSecrets | list | `[]` | Image pull secrets for the service account |
| serviceAccount.name | string | `nil` | The name of the ServiceAccount to use. If not set and `create` is true, a name is generated using the fullname template |
Expand Down
1 change: 1 addition & 0 deletions charts/promtail/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
{{- end }}
spec:
serviceAccountName: {{ include "promtail.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- include "promtail.enableServiceLinks" . | nindent 2 }}
{{- with .Values.hostNetwork }}
hostNetwork: {{ . }}
Expand Down
1 change: 1 addition & 0 deletions charts/promtail/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- with .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/promtail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ serviceAccount:
imagePullSecrets: []
# -- Annotations for the service account
annotations: {}
# -- Automatically mount a ServiceAccount's API credentials
automountServiceAccountToken: true

# -- Automatically mount API credentials for a particular Pod
automountServiceAccountToken: true

# -- Node selector for pods
nodeSelector: {}
Expand Down
Loading