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): Add commonly used configurations to global scope #14406

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

RotemCDos
Copy link

@RotemCDos RotemCDos commented Oct 7, 2024

What this PR does / why we need it:

This PR introduces three new configurations: extraArgs, extraEnv, and extraEnvFrom to Loki's global scope within the Helm chart. These configurations are essential for reducing code duplication and improving the maintainability of values.yml files by allowing to specify additional arguments and environment variables in a centralized, reusable manner.

Special notes for your reviewer:

The changes were implemented in the following way:

  • Two new functions were added to the general _helpers.tpl
  • extraArgs, extraEnv and extraEnvFrom added to values.yml under the loki stanza
  • Replaced all loki loops over extraArgs, extraEnv and extraEnvFrom to function calls

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@RotemCDos RotemCDos requested a review from a team as a code owner October 7, 2024 13:45
@CLAassistant
Copy link

CLAassistant commented Oct 7, 2024

CLA assistant check
All committers have signed the CLA.

This comment has been minimized.

@RotemCDos RotemCDos changed the title feat: Add commonly used configurations to global scope feat(helm): Add commonly used configurations to global scope Oct 20, 2024
Copy link
Contributor

Kubernetes Manifest Diff Summary

Scenario: default-single-binary-values (Added: 0, Modified: 11, Removed: 0)

Summary:

  • Added: 0

  • Modified: 11

  • Removed: 0

Added Files

No added files

Modified Files

loki/templates/querier/deployment-querier.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/querier/deployment-querier.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/querier/deployment-querier.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 58,63 ****
--- 58,65 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=querier
 - -distributor.zone-awareness-enabled=true
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 68,73 ****
--- 70,81 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/query-frontend/deployment-query-frontend.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/query-frontend/deployment-query-frontend.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/query-frontend/deployment-query-frontend.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 49,54 ****
--- 49,56 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=query-frontend
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 59,64 ****
--- 61,72 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/compactor/statefulset-compactor.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/compactor/statefulset-compactor.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/compactor/statefulset-compactor.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 51,56 ****
--- 51,58 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=compactor
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 61,66 ****
--- 63,74 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/gateway/deployment-gateway-nginx.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 48,53 ****
--- 48,57 ----
 - name: http-metrics
 containerPort: 8080
 protocol: TCP
+ env:
+ 
+ envFrom:
+ 
 readinessProbe:
 httpGet:
 path: /
loki/templates/query-scheduler/deployment-query-scheduler.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/query-scheduler/deployment-query-scheduler.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/query-scheduler/deployment-query-scheduler.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 49,54 ****
--- 49,56 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=query-scheduler
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 59,64 ****
--- 61,72 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/ruler/statefulset-ruler.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ruler/statefulset-ruler.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ruler/statefulset-ruler.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 46,51 ****
--- 46,53 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=ruler
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 56,61 ****
--- 58,69 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/index-gateway/statefulset-index-gateway.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/index-gateway/statefulset-index-gateway.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/index-gateway/statefulset-index-gateway.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 47,52 ****
--- 47,54 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=index-gateway
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 57,62 ****
--- 59,70 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/ingester/statefulset-ingester-zone-c.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-c.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-c.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 68,73 ****
--- 68,75 ----
 - -ingester.unregister-on-shutdown=false
 - -ingester.tokens-file-path=/var/loki/ring-tokens
 - -target=ingester
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 78,83 ****
--- 80,91 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/ingester/statefulset-ingester-zone-b.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-b.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-b.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 68,73 ****
--- 68,75 ----
 - -ingester.unregister-on-shutdown=false
 - -ingester.tokens-file-path=/var/loki/ring-tokens
 - -target=ingester
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 78,83 ****
--- 80,91 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/ingester/statefulset-ingester-zone-a.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-a.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-a.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 68,73 ****
--- 68,75 ----
 - -ingester.unregister-on-shutdown=false
 - -ingester.tokens-file-path=/var/loki/ring-tokens
 - -target=ingester
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 78,83 ****
--- 80,91 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/distributor/deployment-distributor.yaml
*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/distributor/deployment-distributor.yaml	2024-11-11 09:26:01.065613994 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/distributor/deployment-distributor.yaml	2024-11-11 09:26:03.429641436 +0000
***************
*** 51,56 ****
--- 51,58 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=distributor
 - -distributor.zone-awareness-enabled=true
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 61,66 ****
--- 63,74 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:

Removed Files

No removed files

Scenario: default-values (Added: 0, Modified: 4, Removed: 0)

Summary:

  • Added: 0

  • Modified: 4

  • Removed: 0

Added Files

No added files

Modified Files

loki/templates/read/deployment-read.yaml
*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:01.165615155 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:03.525642549 +0000
***************
*** 53,58 ****
--- 53,60 ----
 - -target=read
 - -legacy-read-mode=false
 - -common.compactor-grpc-address=loki-backend.default.svc.cluster.local:9095
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/write/statefulset-write.yaml
*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:01.165615155 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:03.525642549 +0000
***************
*** 53,58 ****
--- 53,60 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=write
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/gateway/deployment-gateway-nginx.yaml
*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:01.165615155 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:03.525642549 +0000
***************
*** 48,53 ****
--- 48,57 ----
 - name: http-metrics
 containerPort: 8080
 protocol: TCP
+ env:
+ 
+ envFrom:
+ 
 readinessProbe:
 httpGet:
 path: /
loki/templates/backend/statefulset-backend.yaml
*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:01.165615155 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:03.525642549 +0000
***************
*** 78,83 ****
--- 78,85 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=backend
 - -legacy-read-mode=false
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 88,93 ****
--- 90,101 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:

Removed Files

No removed files

Scenario: ingress-values (Added: 0, Modified: 4, Removed: 0)

Summary:

  • Added: 0

  • Modified: 4

  • Removed: 0

Added Files

No added files

Modified Files

loki/templates/read/deployment-read.yaml
*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:01.261616270 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:03.621643664 +0000
***************
*** 53,58 ****
--- 53,60 ----
 - -target=read
 - -legacy-read-mode=false
 - -common.compactor-grpc-address=loki-backend.default.svc.cluster.local:9095
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/write/statefulset-write.yaml
*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:01.261616270 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:03.621643664 +0000
***************
*** 53,58 ****
--- 53,60 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=write
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/gateway/deployment-gateway-nginx.yaml
*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:01.261616270 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:03.621643664 +0000
***************
*** 48,53 ****
--- 48,57 ----
 - name: http-metrics
 containerPort: 8080
 protocol: TCP
+ env:
+ 
+ envFrom:
+ 
 readinessProbe:
 httpGet:
 path: /
loki/templates/backend/statefulset-backend.yaml
*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:01.261616270 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:03.621643664 +0000
***************
*** 78,83 ****
--- 78,85 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=backend
 - -legacy-read-mode=false
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 88,93 ****
--- 90,101 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:

Removed Files

No removed files

Scenario: legacy-monitoring-values (Added: 0, Modified: 4, Removed: 0)

Summary:

  • Added: 0

  • Modified: 4

  • Removed: 0

Added Files

No added files

Modified Files

loki/templates/read/deployment-read.yaml
*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:01.377617616 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:03.721644825 +0000
***************
*** 53,58 ****
--- 53,60 ----
 - -target=read
 - -legacy-read-mode=false
 - -common.compactor-grpc-address=loki-backend.default.svc.cluster.local:9095
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/write/statefulset-write.yaml
*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:01.377617616 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:03.721644825 +0000
***************
*** 53,58 ****
--- 53,60 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=write
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/gateway/deployment-gateway-nginx.yaml
*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:01.377617616 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/gateway/deployment-gateway-nginx.yaml	2024-11-11 09:26:03.721644825 +0000
***************
*** 48,53 ****
--- 48,57 ----
 - name: http-metrics
 containerPort: 8080
 protocol: TCP
+ env:
+ 
+ envFrom:
+ 
 readinessProbe:
 httpGet:
 path: /
loki/templates/backend/statefulset-backend.yaml
*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:01.377617616 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:03.721644825 +0000
***************
*** 78,83 ****
--- 78,85 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=backend
 - -legacy-read-mode=false
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 88,93 ****
--- 90,101 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:

Removed Files

No removed files

Scenario: simple-scalable-aws-kube-irsa-values (Added: 0, Modified: 6, Removed: 0)

Summary:

  • Added: 0

  • Modified: 6

  • Removed: 0

Added Files

No added files

Modified Files

loki/templates/read/deployment-read.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/read/deployment-read.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 53,58 ****
--- 53,60 ----
 - -target=read
 - -legacy-read-mode=false
 - -common.compactor-grpc-address=enterprise-logs-backend.default.svc.cluster.local:9095
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/tokengen/job-tokengen.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/tokengen/job-tokengen.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/tokengen/job-tokengen.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 46,51 ****
--- 46,53 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=tokengen
 - -tokengen.token-file=/shared/admin-token
+ 
+ 
 volumeMounts:
 - name: shared
 mountPath: /shared
***************
*** 56,61 ****
--- 58,68 ----
 - name: license
 mountPath: /etc/loki/license
 env:
+ 
+ 
+ envFrom:
+ 
+ 
 containers:
 - name: create-secret
 image: docker.io/bitnami/kubectl:latest
loki/templates/write/statefulset-write.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/write/statefulset-write.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 53,58 ****
--- 53,60 ----
 args:
 - -config.file=/etc/loki/config/config.yaml
 - -target=write
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 63,68 ****
--- 65,76 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:
loki/templates/gateway/deployment-gateway-enterprise.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/gateway/deployment-gateway-enterprise.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/gateway/deployment-gateway-enterprise.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 53,58 ****
--- 53,60 ----
 - -gateway.proxy.query-frontend.url=http://enterprise-logs-read.default.svc:3100
 - -gateway.proxy.ruler.url=http://enterprise-logs-backend-headless.default.svc:3100
 - -gateway.proxy.query-scheduler.url=http://enterprise-logs-backend-headless.default.svc:3100
+ 
+ 
 volumeMounts:
 - name: config
 mountPath: /etc/loki/config
***************
*** 78,83 ****
--- 80,90 ----
 - ALL
 readOnlyRootFilesystem: true
 env:
+ 
+ 
+ envFrom:
+ 
+ 
 nodeSelector:
 {}
 affinity:
loki/templates/admin-api/deployment-admin-api.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/admin-api/deployment-admin-api.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/admin-api/deployment-admin-api.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 50,55 ****
--- 50,57 ----
 args:
 - -target=admin-api
 - -config.file=/etc/loki/config/config.yaml
+ 
+ 
 volumeMounts:
 - name: config
 mountPath: /etc/loki/config
***************
*** 81,86 ****
--- 83,93 ----
 - ALL
 readOnlyRootFilesystem: true
 env:
+ 
+ 
+ envFrom: 
+ 
+ 
 nodeSelector:
 {}
 affinity:
loki/templates/backend/statefulset-backend.yaml
*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:01.485618870 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/backend/statefulset-backend.yaml	2024-11-11 09:26:03.829646078 +0000
***************
*** 78,83 ****
--- 78,85 ----
 - -config.file=/etc/loki/config/config.yaml
 - -target=backend
 - -legacy-read-mode=false
+ 
+ 
 ports:
 - name: http-metrics
 containerPort: 3100
***************
*** 88,93 ****
--- 90,101 ----
 - name: http-memberlist
 containerPort: 7946
 protocol: TCP
+ env:
+ 
+ 
+ envFrom:
+ 
+ 
 securityContext:
 allowPrivilegeEscalation: false
 capabilities:

Removed Files

No removed files

Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered solving this using yaml anchors instead in your values.yaml? Is there a limitation to that approach, as I would prefer it to keep the added complication out of the helm chart?

@RotemCDos
Copy link
Author

RotemCDos commented Nov 13, 2024

Have you considered solving this using yaml anchors instead in your values.yaml? Is there a limitation to that approach, as I would prefer it to keep the added complication out of the helm chart?

Using yaml anchors in this case is pretty messy, it leaves more room for error imo. I much rather have a global config like many other global configuration options in the chart. Another plus to this approach is to better align the chart with Mimir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants