Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Use consistent whitespace in template placeholders #1437

Merged
merged 3 commits into from
Jul 9, 2017
Merged

Use consistent whitespace in template placeholders #1437

merged 3 commits into from
Jul 9, 2017

Conversation

fhemberger
Copy link
Contributor

@fhemberger fhemberger commented Jul 5, 2017

Sorry, I know this a trivial PR, but it would be nice to have consistent use of whitespace inside all charts. 😉

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 5, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @fhemberger. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 5, 2017
@unguiculus
Copy link
Member

Thanks a lot. This is very much appreciated. But I'm afraid most of this, if not all, has already been done in #1062 which has just been merged today.

@unguiculus unguiculus self-assigned this Jul 5, 2017
@fhemberger
Copy link
Contributor Author

fhemberger commented Jul 5, 2017

@unguiculus Hmm, the issue you mentioned is about Elasticsearch. 🤔

@unguiculus
Copy link
Member

Ouch, sorry. I guess I got confused by the merge conflicts. Here's an open PR for Artifactory which should get merged soon: #1314.

@fhemberger
Copy link
Contributor Author

@unguiculus I updated the PR to resolve the merge conflicts. My PR doesn't just cover Artifactory, it fixes the template placeholder whitespace in all charts.

@unguiculus
Copy link
Member

Wow, I guess I did not look far enough. Did you use some script for this?

Usually we want separate PRs per chart. Do you think you can split this up?

@kubernetes/charts-maintainers How should we go about this? I think this is great.

@fhemberger
Copy link
Contributor Author

fhemberger commented Jul 5, 2017

Just a simple Regex search & replace in Sublime Text:

{{([^ -]) -> {{ $1
([^ -])}} -> $1 }}
(search for all double curly braces that are not followed by a space or a dash and insert a single space between them and the char found)

Splitting it up would have ended up in 38 separate PRs just adding whitespace, so I left it in one single PR instead. 😉

https://github.com/kubernetes/charts/pull/1437/files?w=1 shows that it's really only whitespace that has changed.

@unguiculus
Copy link
Member

Maybe we can take this as a whole. Discussing it on Slack.

Copy link
Member

@unguiculus unguiculus left a comment

Choose a reason for hiding this comment

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

I just found one place where the replace should not happen.

@@ -129,7 +129,7 @@ spec:
fi

# etcd-SET_ID
SET_ID=${HOSTNAME:5:${#HOSTNAME}}
SET_ID=${HOSTNAME:5:${#HOSTNAME }}
Copy link
Member

Choose a reason for hiding this comment

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

This is shell not Go templating. We probably don't want to change that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@unguiculus unguiculus added code reviewed lgtm Indicates that a PR is ready to be merged. labels Jul 5, 2017
@mgoodness
Copy link
Contributor

/test pull-charts-e2e

@fhemberger
Copy link
Contributor Author

Rebased master, fixed tensorflow helper.

/retest

@k8s-ci-robot
Copy link
Contributor

@fhemberger: you can't request testing unless you are a kubernetes member.

In response to this:

Rebased master, fixed tensorflow helper.

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@unguiculus
Copy link
Member

/retest

@k8s-ci-robot
Copy link
Contributor

@fhemberger: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-charts-e2e 1e8c0b098d4f25c54959b6241894374f0a8d31a5 link /test pull-charts-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@fhemberger
Copy link
Contributor Author

@unguiculus Sorry, not sure what's wrong with the Jenkins built, I don't think it's actually related to my changes.

@unguiculus
Copy link
Member

Yeah, there seems to be some test flakiness. We are going to merge this as a whole. Anything else does not make sense.

@unguiculus
Copy link
Member

Would you mind covering NOTES.txt files as well? I understand that those will not be as easy because they often contain shell magic. But we can just try and get this in soon and follow up with that in a separate PR.

@fhemberger
Copy link
Contributor Author

Sure, I can do that as well, but I'd prefer a separate PR to minimize impact.

Also make sure paramater order is always

`kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "…"`
@fhemberger
Copy link
Contributor Author

@unguiculus Fixing NOTES.txt wasn't so bad, so I added it here. Also fixed parameter order on three occasions, so the command is always identical. Should I also adjust APP_HOST vs. SERVICE_IP? (I'd prefer the latter, it is more precise.)

@unguiculus
Copy link
Member

I'm going to merge this as is. You may create a separate PR as follow-up. I'd prefer SERVICE_IP as well.

@unguiculus unguiculus merged commit 912f50c into helm:master Jul 9, 2017
@fhemberger fhemberger deleted the fix/whitespace branch July 9, 2017 19:34
@fhemberger
Copy link
Contributor Author

Awesome, thanks!

@rk295
Copy link
Collaborator

rk295 commented Jul 10, 2017

Hi, this commit breaks (at least) the grafana chart. It fails a lint with the default values.

[ERROR] templates/: parse error in "grafana/templates/job.yaml": template: grafana/templates/job.yaml:41: unexpected "}" in operand

Error: 1 chart(s) linted, 1 chart(s) failed

@rk295
Copy link
Collaborator

rk295 commented Jul 10, 2017

As a follow up, would it be worth having CI lint each of the charts in branches before merging?

@fhemberger
Copy link
Contributor Author

@rk295 Sorry, didn't notice the change in the Job.
Fixed in #1458.

lachie83 added a commit to lachie83/charts that referenced this pull request Jul 10, 2017
* upstream/master: (67 commits)
  Fix json whitespace (helm#1458)
  Use consistent whitespace in template placeholders (helm#1437)
  [stable/selenium] Make hub readiness probe timeout configurable (helm#1391)
  [stable/kube2iam]: add rbac support (helm#1286)
  [stable/traefik] Allow enabling traefik access logs (helm#1302)
  Add Stash chart (helm#1420)
  Add Gearman G2 chart (helm#1421)
  add option to include tolerations to daemonset (helm#1364)
  Moved Artifactory to stable and updated version to 5.3.2 (helm#1314)
  Concourse postgres conditional dependency (helm#1390)
  Typo in helm install command for dask-distributed (helm#1413)
  [stable/fluent-bit] Fluent Bit v0.11.12 (helm#1417)
  fixed cassandra chart's persistence bug (helm#1245)
  Prometheus: modify config to support k8s 1.6 by default (helm#1080)
  Add rocket.chat (helm#752)
  Fix influxdb deployment (helm#1424)
  feat(stable/etcd-operator): add support for supplying additional command args (helm#1418)
  add configurable service annotations helm#1234 (helm#1244)
  [stable/prometheus] extra environment variable for alert manager (helm#1237)
  [stable/heapster] Default service name to Heapster (helm#1266)
  ...
yanns pushed a commit to yanns/charts that referenced this pull request Jul 28, 2017
Use consistent whitespace in template placeholders
wmcdona89 pushed a commit to wmcdona89/charts that referenced this pull request Aug 30, 2020
Use consistent whitespace in template placeholders
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. code reviewed lgtm Indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants