Skip to content

Commit

Permalink
Merge pull request #2030 from zehenrique/main
Browse files Browse the repository at this point in the history
[promtail] Allow setting labels and annotations in secret
  • Loading branch information
zanhsieh committed Dec 1, 2022
2 parents ae614c2 + 0956131 commit 433b7f9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/promtail/Chart.yaml
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: 2.6.1
version: 6.6.2
version: 6.6.3
home: https://grafana.com/loki
sources:
- https://github.com/grafana/loki
Expand Down
4 changes: 3 additions & 1 deletion charts/promtail/README.md
@@ -1,6 +1,6 @@
# promtail

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

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

Expand Down Expand Up @@ -127,6 +127,8 @@ The new release which will pick up again from the existing `positions.yaml`.
| rbac.pspEnabled | bool | `false` | Specifies whether a PodSecurityPolicy is to be created |
| readinessProbe | object | See `values.yaml` | Readiness probe |
| resources | object | `{}` | Resource requests and limits |
| secret.annotations | object | `{}` | Annotations for the Secret |
| secret.labels | object | `{}` | Labels for the Secret |
| serviceAccount.annotations | object | `{}` | Annotations for the service account |
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created |
| serviceAccount.imagePullSecrets | list | `[]` | Image pull secrets for the service account |
Expand Down
7 changes: 7 additions & 0 deletions charts/promtail/templates/secret.yaml
Expand Up @@ -6,6 +6,13 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "promtail.labels" . | nindent 4 }}
{{- with .Values.secret.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.secret.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
stringData:
promtail.yaml: |
{{- tpl .Values.config.file . | nindent 4 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/promtail/values.yaml
Expand Up @@ -20,6 +20,12 @@ deployment:
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage:

secret:
# -- Labels for the Secret
labels: {}
# -- Annotations for the Secret
annotations: {}

configmap:
# -- If enabled, promtail config will be created as a ConfigMap instead of a secret
enabled: false
Expand Down

0 comments on commit 433b7f9

Please sign in to comment.