Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/nginx-ingress] If clusterIPs are set, they will automatically be quoted #19765

Merged
merged 5 commits into from
Jan 8, 2020
Merged

[stable/nginx-ingress] If clusterIPs are set, they will automatically be quoted #19765

merged 5 commits into from
Jan 8, 2020

Conversation

naseemkullah
Copy link
Collaborator

What this PR does / why we need it:

So that if by chance clusterIP values are actually provided (this PR aside, these are values that should not even exist imho), they are automatically quoted.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer:

Along the path to the current fix for the infamous clusterIP conflicts of having them commented out in the default values file, I proposed a fix that included removing the | quote in the templates. This proved to be useless, so I am adding that back for those (if anyone) that set their clusterIPs.

Checklist

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

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

cc @ChiefAlexander @taharah

Signed-off-by: Naseem <naseemkullah@gmail.com>
Signed-off-by: Naseem <naseemkullah@gmail.com>
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 24, 2019
@ChiefAlexander
Copy link
Collaborator

/lgtm
Thanks!

@k8s-ci-robot k8s-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 6, 2020
@naseemkullah
Copy link
Collaborator Author

/retest

@ChiefAlexander
Copy link
Collaborator

Other changes have been merged in before yours. You will have to fix the conflicts and then bump the version of the chart.

@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2020
@naseemkullah
Copy link
Collaborator Author

np @ChiefAlexander, done.

@ChiefAlexander
Copy link
Collaborator

Sorry about this, but yet another change went in before yours. You will have to update your pr again.

Signed-off-by: Naseem <naseemkullah@gmail.com>
@ChiefAlexander
Copy link
Collaborator

/lgtm
Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 e176572 into helm:master Jan 8, 2020
dargolith pushed a commit to dargolith/charts that referenced this pull request Jan 10, 2020
… be quoted (helm#19765)

* If clusterIPs are set, they will automatically be quoted

Signed-off-by: Naseem <naseemkullah@gmail.com>

* bump version

Signed-off-by: Naseem <naseemkullah@gmail.com>
arturrez pushed a commit to arturrez/stable-charts that referenced this pull request Jan 28, 2020
… be quoted (helm#19765)

* If clusterIPs are set, they will automatically be quoted

Signed-off-by: Naseem <naseemkullah@gmail.com>

* bump version

Signed-off-by: Naseem <naseemkullah@gmail.com>
Signed-off-by: Artur <artur@upbound.io>
arturrez pushed a commit to arturrez/stable-charts that referenced this pull request Jan 28, 2020
… be quoted (helm#19765)

* If clusterIPs are set, they will automatically be quoted

Signed-off-by: Naseem <naseemkullah@gmail.com>

* bump version

Signed-off-by: Naseem <naseemkullah@gmail.com>
Signed-off-by: Artur <artur@upbound.io>
@cgroschupp
Copy link
Contributor

@naseemkullah How is it possible to set ClusterIP to an empty string after this PR?

values.yaml:

defaultBackend:
  service:
    omitClusterIP: false
    clusterIP: '""'

With chart version 0.28.1, i get this:

clusterIP: ""

With chart version 0.28.2, i get this:

clusterIP: "\"\""

@naseemkullah
Copy link
Collaborator Author

naseemkullah commented Jan 31, 2020

@naseemkullah How is it possible to set ClusterIP to an empty string after this PR?

values.yaml:

defaultBackend:
  service:
    omitClusterIP: false
    clusterIP: '""'

With chart version 0.28.1, i get this:

clusterIP: ""

With chart version 0.28.2, i get this:

clusterIP: "\"\""

Hi @cgroschupp try clusterIP: "" or clusterIP: or clusterIP: null one of those should work.
I'm curious as to why though, is it beneficial to have clusterIP: "" in the resulting template?

@cgroschupp
Copy link
Contributor

Hi @naseemkullah None of the variants produces an empty string. older kubernetes version requires an empty string in ClusterIP. Now is it possible to omit the ClusterIP. But you have to destroy the old service. Therefore the parameter omitClusterIP was introduced.

@naseemkullah
Copy link
Collaborator Author

My mistake @cgroschupp and I did not know older k8s versions required an empty string as ClusterIP.

By default the chart now does not template this, even without the omitClusterIP because in the default values file clusterIP: values are commented out altogether. If this does not play well with older versions of k8s we should maybe update the minimum k8s version required to run this chart as is.

@naseemkullah naseemkullah deleted the clusterip-quotes branch January 31, 2020 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm 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.

5 participants