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

Refactor key/value parsing #6203

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Refactor key/value parsing #6203

merged 1 commit into from
Sep 21, 2020

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Sep 21, 2020

What this PR does / why we need it:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

fixes #6202

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 21, 2020
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 21, 2020
@aledbf aledbf changed the title Refactor parsing of key values Refactor key/value parsing Sep 21, 2020
Copy link
Contributor

@ChiefAlexander ChiefAlexander left a comment

Choose a reason for hiding this comment

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

Have flags without values been removed? I am wondering how this will handle flags that don't have values?

@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

Have flags without values been removed? I am wondering how this will handle flags that don't have values?

What do you mean? All flags have values

@ChiefAlexander
Copy link
Contributor

Have flags without values been removed? I am wondering how this will handle flags that don't have values?

What do you mean? All flags have values

I wonder if something like --alsologtostderr from the docs is the reason this was made the way it was. I assume under the covers it is a true/false flag.

@ChiefAlexander
Copy link
Contributor

Also if it is supported to just pass the flag without any value behind it wouldn't this be a breaking change as we might have people using that functionality?

@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

Have flags without values been removed? I am wondering how this will handle flags that don't have values?

What do you mean? All flags have values

I wonder if something like --alsologtostderr from the docs is the reason this was made the way it was. I assume under the covers it is a true/false flag.

Right, now if I define

extraArgs:
  alsologtostderr:

is valid?

@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2020
@ChiefAlexander
Copy link
Contributor

extraArgs:
alsologtostderr

controller:
  extraArgs:
    alsologtostderr: ""

Generates today:

          args:
            - /nginx-ingress-controller
            - --publish-service=$(POD_NAMESPACE)/RELEASE-NAME-ingress-nginx-controller
            - --election-id=ingress-controller-leader
            - --ingress-class=nginx
            - --configmap=$(POD_NAMESPACE)/RELEASE-NAME-ingress-nginx-controller
            - --validating-webhook=:8443
            - --validating-webhook-certificate=/usr/local/certificates/cert
            - --validating-webhook-key=/usr/local/certificates/key
            - --alsologtostderr

@ChiefAlexander
Copy link
Contributor

Definitely not perfect...

@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

Definitely not perfect...

ok, maybe check for empty value instead of a boolean check? (to not break what exists now)

@ChiefAlexander
Copy link
Contributor

I was thinking we should probably just have the value be stringified via the quote method

charts/ingress-nginx/Chart.yaml Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 21, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 21, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 21, 2020
@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2020
@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2020

@ChiefAlexander ok, this works now without breaking existing definitions.

@ChiefAlexander
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, ChiefAlexander

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 merged commit 701ad4e into kubernetes:master Sep 21, 2020
@mKaloer
Copy link

mKaloer commented Sep 21, 2020

Thanks guys

@aledbf aledbf deleted the false branch September 21, 2020 23:33
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm: Impossible to pass extraArg argument with 'false' value
4 participants