Skip to content

Commit

Permalink
fix: rework of #1119 to preserve backwards compatability/features
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Horvath <[email protected]>
  • Loading branch information
ts-mini committed Apr 14, 2022
1 parent b09897d commit 96d70b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
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: 2.5.0
version: 4.2.0
version: 4.3.0
home: https://grafana.com/loki
sources:
- https://github.com/grafana/loki
Expand Down
5 changes: 3 additions & 2 deletions charts/promtail/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# promtail

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

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

Expand Down Expand Up @@ -72,7 +72,8 @@ The new release which will pick up again from the existing `positions.yaml`.
| config.lokiAddress | string | `"http://loki-gateway/loki/api/v1/push"` | The Loki address to post logs to. Must be reference in `config.file` to configure `client.url`. See default config in `values.yaml` |
| config.serverPort | int | `3101` | The port of the Promtail server Must be reference in `config.file` to configure `server.http_listen_port` See default config in `values.yaml` |
| config.snippets | object | See `values.yaml` | A section of reusable snippets that can be reference in `config.file`. Custom snippets may be added in order to reduce redundancy. This is especially helpful when multiple `kubernetes_sd_configs` are use which usually have large parts in common. |
| config.snippets.extraClientConfigs | list | empty | You can put here any keys that will be directly added to the config file's 'client' block. |
| config.snippets.extraClientConfigs | string | empty | You can put here any keys that will be directly added to the config file's main 'client' block. This is helpful to add custom configuration for the promtail for things like tenant |
| config.snippets.extraClients | list | empty | You can put any client configs here that will be added in addition to the main client block. |
| config.snippets.extraRelabelConfigs | list | `[]` | You can put here any additional relabel_configs to "kubernetes-pods" job |
| config.snippets.extraScrapeConfigs | string | empty | You can put here any additional scrape configs you want to add to the config file. |
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}` | The security context for containers |
Expand Down
12 changes: 9 additions & 3 deletions charts/promtail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,14 @@ config:
# This helps debug the Promtail config.
addScrapeJobLabel: false

# -- You can put here any keys that will be directly added to the config file's 'client' block.
# -- You can put here any keys that will be directly added to the config file's main 'client' block.
# This is helpful to add custom configuration for the promtail for things like tenant
# @default -- empty
extraClientConfigs: []
extraClientConfigs: ""

# -- You can put any client configs here that will be added in addition to the main client block.
# @default -- empty
extraClients: []

# -- You can put here any additional scrape configs you want to add to the config file.
# @default -- empty
Expand Down Expand Up @@ -346,7 +351,8 @@ config:
clients:
- url: {{ tpl .Values.config.lokiAddress . }}
{{- with .Values.config.snippets.extraClientConfigs }}
{{- tpl .Values.config.snippets.extraClientConfigs . | nindent 2 }}
{{- with .Values.config.snippets.extraClients }}
{{- toYaml . | nindent 2 }}
{{- end }}
Expand Down

0 comments on commit 96d70b7

Please sign in to comment.