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 cluster-autoscaler chart to match with the examples #3725

Merged
merged 3 commits into from
Jan 24, 2021
Merged

Fix cluster-autoscaler chart to match with the examples #3725

merged 3 commits into from
Jan 24, 2021

Conversation

foriequal0
Copy link
Contributor

@foriequal0 foriequal0 commented Nov 26, 2020

Partially resolves: #3724

Following lint error is well known issue:

templates/: template: cluster-autoscaler/templates/role.yaml:15:7: executing "cluster-autoscaler/templates/role.yaml" at <eq (default .Values.extraArgs.expander "") "priority">: error calling eq: invalid type for comparison

helm/helm#6376
The workaround doesn't seem to work.

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

Welcome @foriequal0!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 26, 2020
@foriequal0 foriequal0 changed the title Fix cluster-autoscaler charts to match with the examples Fix cluster-autoscaler chart to match with the examples Nov 26, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 3, 2020
@foriequal0
Copy link
Contributor Author

I've overlooked #3692 that it would solve the issue, but it wasn't enough. I should've read the code carefully and commented to it.

@gjtempleton
Copy link
Member

I've had a play around with the code, and I think the issue you're seeing boils down to this: helm/helm#7091

The current default is an empty string, which YAML is then viewing as an unquoted nil.

I think there's a couple of options here:

  1. We pipe the default to quote, i.e. {{- if eq (default .Values.extraArgs.expander "" | quote ) "priority" }}
  2. We set the default to a dummy string/other expander, but don't set a default for the values in the values file.
  3. We set a default value of expander: in the top level values

@gjtempleton
Copy link
Member

/assign

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 28, 2020
@foriequal0
Copy link
Contributor Author

Oh. I've mistakenly swapped default's argument. default takes a default value as a first argument. Swapping two arguments fixes that. I'll rebase and fix that.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 30, 2020
@foriequal0
Copy link
Contributor Author

@gjtempleton Can you review the fix?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2021
@gjtempleton
Copy link
Member

Sorry for the delay, thanks for fixing that!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: foriequal0, gjtempleton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit ccef700 into kubernetes:master Jan 24, 2021
@foriequal0 foriequal0 deleted the feature/chart-match-examples branch January 25, 2021 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster Autoscaler examples and helm chart is different
3 participants