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

Loki chart fails to render proper YAML when add more than one extra manifest #12910

Open
ngclinflows opened this issue May 8, 2024 · 0 comments · May be fixed by #12911
Open

Loki chart fails to render proper YAML when add more than one extra manifest #12910

ngclinflows opened this issue May 8, 2024 · 0 comments · May be fixed by #12911
Labels
area/helm type/bug Somehing is not working as expected

Comments

@ngclinflows
Copy link

Describe the bug
Loki chart fails to render proper YAML when add more than one extra manifest, since --- YAML files separator is stuck to last character of preceding YAML files due to template whitespace chomping.

To Reproduce
Add at least 2 extra objects in values:

extraObjects:
  # Grafana datasource provisioning
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: loki-datasource
      labels:
        grafana_datasource: "1"
    data:
      loki-datasource.yaml: "..."
  # Custom Alerting Rules
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: loki-alerting-rules
    data:
      loki-alerting-rules.yaml: "..."

Leads to render something like:

apiVersion: v1
kind: ConfigMap
metadata:
  name: loki-datasource
  labels:
    grafana_datasource: "1"
data:
  loki-datasource.yaml: "..."---      # <--- missing new line before `---` separator
apiVersion: v1
kind: ConfigMap
metadata:
  name: loki-alerting-rules
data:
  loki-alerting-rules.yaml: "..."

Expected behavior
Renders valid YAML

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output
N/A

ngclinflows added a commit to ngclinflows/loki that referenced this issue May 8, 2024
@JStickler JStickler added area/helm type/bug Somehing is not working as expected labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm type/bug Somehing is not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants