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 #24 #25

Closed
wants to merge 1 commit into from
Closed

Fix #24 #25

wants to merge 1 commit into from

Conversation

twavv
Copy link

@twavv twavv commented Sep 21, 2020

The use of {{- with ... }} seems useless here, and it breaks everything else. I think(?) it doesn't cause an issue in the default configuration because .Values.networkPolicy.ingress.grpc is an empty array (and I guess that means it doesn't actually switch into that scope?).

Would be nice™ to add a test too (I made this PR from the GitHub web app).

The use of `{{- with ... }}` seems useless here, and it breaks everything else. I think(?) it doesn't cause an issue in the default configuration because `.Values.networkPolicy.ingress.grpc` is an empty array (and I guess that means it doesn't actually switch into that scope?).

Would be nice™ to add a test too (I made this PR from the GitHub web app).
@EladDolev
Copy link
Contributor

doesn't seem useless at all...
think the right fix here would be placing a $ sign before .Release in places they are inside a {{- with...}} scope
.Release.Name -> $.Release.Name

@twavv
Copy link
Author

twavv commented Sep 21, 2020

Maybe I'm missing something, but it looks to me like the with is only being used to make toYaml . work - everything else in the block doesn't seem to depend on accessing anything inside .Values.networkPolicy.ingress.grpc.

But yeah, just using $ to access the root object would also work here (it would just require changing more lines of code).

@DuskEagle
Copy link
Member

Good catch @travigd. I agree that the {{- with ... }} doesn't seem necessary, and that this is an easier change than replacing every templated call within the with scope to start with$.

If you increment the version field of chart.yaml as described in CONTRIBUTING.md, I can merge this change.

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

Successfully merging this pull request may close these issues.

3 participants