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

Helm: loki-canary test pod gets rendered even when tests are disabled #12765

Closed
elchenberg opened this issue Apr 23, 2024 · 4 comments · Fixed by #15346
Closed

Helm: loki-canary test pod gets rendered even when tests are disabled #12765

elchenberg opened this issue Apr 23, 2024 · 4 comments · Fixed by #15346

Comments

@elchenberg
Copy link

Describe the bug

I could not find out how to not deploy the loki-canary test pod using the Helm chart v6.4.3 when the loki-canary is enabled but the tests are disabled (test.enabled=false).

I think the issue was introduced with this change: 79b876b#diff-4f7364c8431077f51149aa596196fa56a856485769d10f6aa581c5728653015d

{{- with .Values.test }}
-{{- if and .enabled $.Values.monitoring.selfMonitoring.enabled $.Values.monitoring.lokiCanary.enabled }}
+{{- if $.Values.lokiCanary.enabled }}

I guess the change should have looked like this instead:

{{- with .Values.test }}
-{{- if and .enabled $.Values.monitoring.selfMonitoring.enabled $.Values.monitoring.lokiCanary.enabled }}
+{{- if and .enabled $.Values.lokiCanary.enabled }}

To Reproduce

Expected behavior

Test pods should not be created when tests are disabled.

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output

@elchenberg
Copy link
Author

Correction: It is not getting deployed unless I run helm test. But it is getting rendered with helm template which is different to v5.47.2 of the Helm chart.

My values.yaml:

deploymentMode: SingleBinary
loki:
  commonConfig:
    replication_factor: 1
  storage:
    type: filesystem
  useTestSchema: true
singleBinary:
  replicas: 1
read:
  replicas: 0
backend:
  replicas: 0
write:
  replicas: 0
test:
  enabled: false

@elchenberg elchenberg changed the title Helm: loki-canary test pod gets deployed even when tests are disabled Helm: loki-canary test pod gets rendered even when tests are disabled Apr 24, 2024
@ilbarone87
Copy link

I have same issue deploying Loki with ArgoCD

@ilbarone87
Copy link

@elchenberg i just end up setting lokiCanary.enabled: false

@elchenberg
Copy link
Author

@ilbarone87 Unfortunately that does not work for me because I want to have the Loki Canary. 😕

lindhe added a commit to lindhe/loki that referenced this issue Dec 10, 2024
Replaces grafana#13180

Fixes grafana#12765

Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
lindhe added a commit to lindhe/loki that referenced this issue Dec 10, 2024
Replaces grafana#13180

Fixes grafana#12765

Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants