charts icon indicating copy to clipboard operation
charts copied to clipboard

[artifactory-ha] Fix scope of nodeport variable in artifactory-service.yaml

Open yaron opened this issue 4 years ago • 0 comments

Because of the scope change this variable is not available here, putting a $ in front of the variable makes the root scope available again.

PR Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • [ ] Chart Version bumped
  • [ ] CHANGELOG.md updated
  • [ ] Variables and other changes are documented in the README.md
  • [x] Title of the PR starts with chart name (e.g. [artifactory])

What this PR does / why we need it: Without this fix you can get this error: Error: template: artifactory-ha/templates/artifactory-service.yaml:47:16: executing "templates/artifactory-service.yaml" at <.Values.artifactory.service.nodePort>: nil pointer evaluating interface {}.artifactory If artifactory.node.javaOpts.jmx.enabled is true this part of the helm chart is executed and the scope will be changed because of this statement: {{- with .Values.artifactory.node.javaOpts.jmx }}. After that "." no longer contains ".Values.artifactory" and will throw the above error about .Values.artifactory being nil. The fix adds a $ in front of the variables, thus using the root scope instead of the local scope.

yaron avatar Nov 23 '21 18:11 yaron