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

package verify ignores the lines inside a range iteration #1432

Closed
zmalik opened this issue Mar 19, 2020 · 1 comment · Fixed by #1455
Closed

package verify ignores the lines inside a range iteration #1432

zmalik opened this issue Mar 19, 2020 · 1 comment · Fixed by #1455
Assignees
Labels
Milestone

Comments

@zmalik
Copy link
Member

zmalik commented Mar 19, 2020

What happened:
package verify doesn't evaluate the code inside the range syntax in templates

having:

{{ range $i, $v := until (int .Params.BROKER_COUNT) }}
- containerPort: {{ add (int $.Params.EXTERNAL_NODE_PORT) $v}}
  name: node-port-{{ $v }}
{{ end }}

will complain on kubectl kudo package verify with warning

Warnings                                            
parameter "EXTERNAL_NODE_PORT" defined but not used.
package is valid

Using $.Params.EXTERNAL_NODE_PORT outside the range fixes the issue.

What you expected to happen:
package verify to also use the parameters used inside the ranges
How to reproduce it (as minimally and precisely as possible):
KUDO Kafka operator package verify
Anything else we need to know?:
#1255 introduced the ability to verify parameters used through $

Environment:

  • Kubernetes version (use kubectl version): 1.17.0
  • Kudo version (use kubectl kudo version): 0.11.0
  • Operator:
  • operatorVersion:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@kensipe kensipe self-assigned this Mar 30, 2020
@kensipe kensipe added this to the 0.12.0 milestone Mar 30, 2020
@kensipe
Copy link
Member

kensipe commented Mar 30, 2020

this is a bug on v0.11.1. lets make the fix on master and back port for a v0.11.2 release if needed

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

Successfully merging a pull request may close this issue.

2 participants