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

fix whitespace remove in postgresql configmap helm chart #518

Merged
merged 1 commit into from
Feb 10, 2018

Conversation

anon6789
Copy link
Contributor

@anon6789 anon6789 commented Feb 5, 2018

When setting a dedicated postgresql instance with the config.postgresURI value, there is no entry for clair.database.options.source in the configmap after helm deploy.

The if statement in configmap.yaml has two dashes "-". It turns out that the newline between source and the comment above is removed by the ending "-".

# PostgreSQL Connection string
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
# This should be done using secrets or Vault, but for now this will also work
{{- if .Values.config.postgresURI -}}
source: "{{ .Values.config.postgresURI }}"

Generated yaml:

# PostgreSQL Connection string
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
# This should be done using secrets or Vault, but for now this will also worksource: "postgres://clair:*********@psql.cloudsql.svc.cluster.local:5432/postgres?sslmode=disable"

The helm documentation says:

{{- (with the dash and space added) indicates that whitespace should be chomped left, while -}} means whitespace to the right should be consumed. Be careful! Newlines are whitespace!

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

Successfully merging this pull request may close these issues.

None yet

2 participants