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

Update configmap-coordinator.yaml remove indentation #89

Closed
wants to merge 2 commits into from

Conversation

nabaruns
Copy link

@nabaruns nabaruns commented Jul 5, 2023

With current chart, if we add

server:
    coordinatorExtraConfig: "query.client.timeout=5m"

then
config.properties in coordinator configMap turns out with config extra indented:

coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8080
query.max-memory=2GB
query.max-memory-per-node=1GB
memory.heap-headroom-per-node=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8080
  query.client.timeout=5m

@cla-bot
Copy link

cla-bot bot commented Jul 5, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@nineinchnick
Copy link
Member

Can you update the PR description to explain why this change is necessary, instead of describing the change itself?

@nabaruns
Copy link
Author

nabaruns commented Jul 5, 2023

Can you update the PR description to explain why this change is necessary, instead of describing the change itself?

Please check now.

@nineinchnick
Copy link
Member

Is the correct indentation level 0 or 2? In the example you have, it looks like there are 2 extra spaces now. Can you test this with two additional properties, like:

server:
    coordinatorExtraConfig: |
      query.client.timeout=5m
      query.execution-policy=phased

@nabaruns
Copy link
Author

nabaruns commented Jul 5, 2023

server:
coordinatorExtraConfig: |
query.client.timeout=5m
query.execution-policy=phased

Ok. I am using subchart with dependency. So when I have values.yaml as

trino:
  server:
    coordinatorExtraConfig: |
      query.client.timeout=5m
      query.execution-policy=phased

Then config.properties in coordinator configMap becomes:

  query.client.timeout=5m
query.execution-policy=phased

@nineinchnick
Copy link
Member

And with your change that removes the indentation?

@cla-bot
Copy link

cla-bot bot commented Jul 7, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@nabaruns
Copy link
Author

nabaruns commented Jul 7, 2023

And with your change that removes the indentation?

It works fine now. Refactored changes in both files for coordinator and worker. Kindly check.

@@ -63,7 +63,7 @@ data:
http-server.https.port={{ .Values.server.config.https.port }}
http-server.https.keystore.path={{ .Values.server.config.https.keystore.path }}
{{- end }}
{{ .Values.server.coordinatorExtraConfig | indent 4 }}
{{ .Values.server.coordinatorExtraConfig | indent 4 }}
Copy link
Member

Choose a reason for hiding this comment

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

You could try this to preserve alignment and still have correct indentation.

Suggested change
{{ .Values.server.coordinatorExtraConfig | indent 4 }}
{{- .Values.server.coordinatorExtraConfig | indent 4 }}

Copy link
Author

@nabaruns nabaruns Jul 7, 2023

Choose a reason for hiding this comment

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

This results in

  config.properties: |
    coordinator=true
    node-scheduler.include-coordinator=false
    http-server.http.port=8080
    query.max-memory=4GB
    query.max-memory-per-node=1GB
    discovery.uri=http://localhost:8080    query.max-run-time=3m
    - query.max-scan-physical-bytes=1GB

With values as

  coordinatorExtraConfig: |
    query.max-run-time=3m
    query.max-scan-physical-bytes=1GB

@luismacosta
Copy link

luismacosta commented Dec 5, 2023

Hello @nabaruns

I was also facing this issue
My solution was:

  {{- range $configValue := .Values.coordinator.additionalConfigProperties }}
    {{ $configValue }}
  {{- end }}

worker

  {{- range $configValue := .Values.coordinator.additionalConfigProperties }}
    {{ $configValue }}
  {{- end }}

values.yaml

coordinator:
  additionalConfigProperties:
    - internal-communication.shared-secret=
    - password-authenticator.config-files=
    - http-server.authentication.allow-insecure-over-http=true
    - http-server.process-forwarded=true

@nineinchnick
Copy link
Member

Fixed in 10e2060

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

3 participants