-
Notifications
You must be signed in to change notification settings - Fork 115
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
HelmRelease causes a line break on long values #3062
Comments
Hi @ChristianRaoulis it appears that this is related to an upstream bug regarding line splitting. Please see helm/helm#7704 for additional information. Note that I am also able to reproduce this issue using Helm CLI (v3.15.2 - latest) and the following values.yaml file: # helm install bitnami/rabbitmq --values ./values.yml --generate-name
metrics:
enabled: true
prometheusRule:
enabled: true
rules:
- alert: RabbitmqInstancesDifferentVersions
expr: count(count(rabbitmq_build_info) by (rabbitmq_version)) > 1
for: 60m
labels:
severity: warning
annotations:
summary: RabbitMQ instances running different versions (instance {{ "{{ $labels.instance }}" }})
description: |-
Running different version of RabbitMQ in the same cluster, can lead to failure.
VALUE = {{ "{{ $value }}" }}
LABELS = {{ "{{ $labels }}" }} As a workaround for now, you could employ the suggestion in helm/helm#7704 (comment) by declaring your custom values in a yaml file and referencing it using the Example:# index.ts
const chart = new k8s.helm.v3.Release(
"rabbitmq",
{
chart: "rabbitmq",
version: "14.1.2",
repositoryOpts: {
repo: "https://charts.bitnami.com/bitnami",
},
valueYamlFiles: [new pulumi.asset.FileAsset("./values.yml")],
},
{ provider }
); #values.yml
metrics:
enabled: true
prometheusRule:
enabled: true
rules:
- alert: RabbitmqInstancesDifferentVersions
expr: |
count(count(rabbitmq_build_info) by (rabbitmq_version)) > 1
for: 60m
labels:
severity: warning
annotations:
summary: |
RabbitMQ instances running different versions (instance {{ "{{ $labels.instance }}" }})
description: |
Running different version of RabbitMQ in the same cluster, can lead to failure.
VALUE = {{ "{{ $value }}" }}
LABELS = {{ "{{ $labels }}" }} Alternatively, you could force a string literal by adding a const rabbitMQ = new HelmRelease("rabbitmq", {
chart: "rabbitmq",
version: "14.1.2",
repositoryOpts: {
repo: "https://charts.bitnami.com/bitnami",
},
values: {
metrics: {
enabled: true,
prometheusRule: {
enabled: true,
rules: [
{
alert: "RabbitmqInstancesDifferentVersions",
expr: 'count(count(rabbitmq_build_info) by (rabbitmq_version)) > 1',
for: '60m',
labels: {
severity: "warning",
},
annotations: {
summary: 'RabbitMQ instances running different versions (instance {{ "{{ $labels.instance }}" }})\n',
description: 'Running different version of RabbitMQ in the same cluster, can lead to failure.\n VALUE = {{ "{{ $value }}" }}\n LABELS = {{ "{{ $labels }}" }}',
},
},
],
},
},
},
}); In the meantime, I'll see what strategies we could implement within our provider to avoid this issue. |
What happened?
I'm trying to add some prometheus rules to my rabbitmq bitnami helm chart and pulumi seems to add a
\n
on a point where it causes anunterminated quoted string
error onpulumi up
Example
Output of
pulumi about
Additional context
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: