Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Return ingress.class value for ingress.provider if not set #223

Merged
merged 3 commits into from
Jul 5, 2017

Conversation

munnerz
Copy link
Contributor

@munnerz munnerz commented Jul 5, 2017

This should solve a regression that causes the GCE ingress controller implementation to not work with manifests that don't explicitly set kubernetes.io/ingress.provider: gce. Without this change, these manifests would attempt to use the nginx provider.

This also solves a problem where the default supported ingress classes were not set correctly if not specified.

}

kl.legoSupportedIngressClass = strings.Split(os.Getenv("LEGO_SUPPORTED_INGRESS_CLASS"), ",")
if len(kl.legoSupportedIngressClass) == 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue here is that len(strings.Split("", ",")) == 1, and not 0, meaning the default would never be set.

@munnerz
Copy link
Contributor Author

munnerz commented Jul 5, 2017

This is a follow-up to the recently merged #202 - @simonswine could you take a look over.

/cc @jackhopner

@munnerz munnerz merged commit 6b5cb13 into master Jul 5, 2017
@jackhopner
Copy link
Contributor

Any reason to remove the option to set the default @munnerz ? We could have it check if the default was set otherwise return the ingress class?

@munnerz munnerz deleted the fix-gce-provider branch November 7, 2017 10:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants