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

helm charts - ingress.class could be extracted to variable (refactoring) #13927

Closed
sparkoo opened this issue Jul 19, 2019 · 6 comments
Closed
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@sparkoo
Copy link
Member

sparkoo commented Jul 19, 2019

Is your task related to a problem? Please describe.

nginx is used repeatedly as a value for ingress.class in helm. This could be extracted to variable.
examples:
https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/custom-charts/che-jaeger/templates/ingress.yaml#L18
https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/custom-charts/che-keycloak/templates/ingress.yaml#L16

Describe the solution you'd like

Find usages of nginx as an ingress.class and extract it to values.yaml https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/values.yaml

Describe alternatives you've considered

It's refactoring and it does not affect functionality. We don't have to do that.

Additional context

with devfile and plugin registry coming to helm charts and following the pattern, it will be at more places #13890

@sparkoo sparkoo added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Jul 19, 2019
@skabashnyuk skabashnyuk added this to the 7.1.0 milestone Jul 19, 2019
@skabashnyuk skabashnyuk added team/platform severity/P1 Has a major impact to usage or development of the system. labels Jul 19, 2019
@slemeur slemeur added kind/enhancement A feature request - must adhere to the feature request template. and removed kind/task Internal things, technical debt, and to-do tasks to be performed. labels Aug 2, 2019
@metlos
Copy link
Contributor

metlos commented Aug 12, 2019

For this to make sense, the helm chart should also offer the possibility to define the other custom annotations on the ingresses that the given ingress controller (chosen by the ingress.class annotation) requires.

@metlos
Copy link
Contributor

metlos commented Aug 13, 2019

To explain my concerns in more detail.

Currently, we hardcode the ingress.class to nginx and we have a variable called global.ingressAnnotationsPrefix that defaults to nginx. which is used when declaring the ingress annotations (both for the "server" ingresses that make Che server (and Keycloak, Jaeger, et al) work - defined at locations like https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/custom-charts/che-jaeger/templates/ingress.yaml#L18
https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/custom-charts/che-keycloak/templates/ingress.yaml#L16 and for workspace ingresses, defined in https://github.com/eclipse/che/blob/master/deploy/kubernetes/helm/che/templates/configmap.yaml#L71).

This is already bad, because it gives the helm chart user a false idea that somehow they can configure the helm chart to use some other ingress controller (through the global.ingressAnnotationsPrefix variable). They can't because other ingress controllers most probably don't support the same annotations as nginx ingress controller even if the annotation prefix is changed to match the name of the needed ingress controller.

So, by adding the option to configure the ingress.class we're only making that false idea stronger. But it would still be false.

IMHO, there are 2 approaches to this problem:

  • keep ingress.class hardcoded (and IMHO actually remove the global.ingressAnnotationsPrefix variable and hardcode it as well) - this would make it clear that the helm chart doesn't support any other ingress controller but nginx
  • come up with a way of defining free-form ingress annotations for both the "server" ingresses and "workspace" ingresses, ideally in some "coordinated" manner, so that they cannot diverge too much (they HAVE to differ, because they have different requirements, but they at least should be consistent).

@l0rd, @skabashnyuk, @sleshchenko wdyt?

@sparkoo
Copy link
Member Author

sparkoo commented Aug 13, 2019

I like the second option. I would investigate option to have multiple ingress configurations prepared and let user choose which one to use. I'm not sure whether it is doable though.

@l0rd
Copy link
Contributor

l0rd commented Aug 14, 2019

@metlos makes sense. But I am not sure that server and workspaces ingresses should always be "coordinated". It makes sense for small clusters but on real world clusters with multiple ingress controllers, server side and workspaces side ingress classes may need to be different. What I mean is that users should able specify ingress class and annotations for both server and workspace ingresses. Making them "coordinated" may be gold plating.

@sparkoo
Copy link
Member Author

sparkoo commented Aug 15, 2019

we've decided to close this one as won't fix and proper solution fixing using various ingress configurations will be investigated in #14230 and fixed in following tasks.

@sparkoo sparkoo closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants