-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
k8s-infra: routing, TLS (rebased) #9329
Conversation
Signed-off-by: Guy Daich <guy.daich@sap.com> Adapt OS infra to use external server exposer Signed-off-by: Guy Daich <guy.daich@sap.com> reuse k8s ServersConverter in OS infra begin tls for path-based k8s infra Signed-off-by: Guy Daich <guy.daich@sap.com> continue k8s tls support Signed-off-by: Guy Daich <guy.daich@sap.com> Add single-host strategy, cert-manager support Signed-off-by: Guy Daich <guy.daich@sap.com> fix charts, add single-host strategy, add TLS test Signed-off-by: Guy Daich <guy.daich@sap.com> TLS: changed cert-manager certficiate issuer to be ClusterIssuer Signed-off-by: Eyal Barlev <perspectivus@gmail.com> add resolved values.yaml Signed-off-by: Guy Daich <guy.daich@sap.com> Adapt to k8s Multiuser * Add sample values files * Fix merge issues Signed-off-by: Guy Daich <guy.daich@sap.com> Cleanup OpenShift Infra * rename TLS default value in che.env * remove openshift server exposer (consolidated with k8s) Signed-off-by: Guy Daich <guy.daich@sap.com> remove uintended automation changes Signed-off-by: Guy Daich <guy.daich@sap.com> cloud deployment helm changes Signed-off-by: Guy Daich <guy.daich@sap.com>
Signed-off-by: Guy Daich <guy.daich@sap.com>
Signed-off-by: Guy Daich <guy.daich@sap.com>
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
I have tested the PR and can confirm #8694 is fixed. No more wrong redirects. Thanks @guydaichs |
@eivantsov multi-host should work. it's on by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @guydaichs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. Looks GOOD to me 👍
Please take a look my minor comments
CHE_INFRA_KUBERNETES_SERVER__STRATEGY: {{ .Values.global.serverStrategy }} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove extra lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
che.infra.openshift.tls_enabled=false | ||
# Creates Ingresses with Transport Layer Security (TLS) enabled | ||
# In OpenShift infrastructure, Routes will be TLS-enabled | ||
che.infra.kubernetes.tls_enabled=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move new Kubernetes properties above to Kubernetes section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
che.infra.kubernetes.tls_enabled=false | ||
|
||
# Name of a secret that should be used when creating workspace ingresses with TLS | ||
che.infra.kubernetes.tls_secret= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a note that it is ignored by OpenShift infrastructure, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct. done.
dockerfiles/init/manifests/che.env
Outdated
@@ -506,6 +507,10 @@ CHE_SINGLE_PORT=false | |||
# OpenShift infrastructure ignores this property because it uses Routes instead of ingresses. | |||
#CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON=NULL | |||
|
|||
# Creates Ingresses with Transport Layer Security (TLS) enabled | |||
# In OpenShift infrastructure, Routes will be TLS-enabled | |||
CHE_INFRA_KUBERNETES_TLS_ENABLED=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it makes sense to add CHE_INFRA_KUBERNETES_TLS__SECRET
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if (externalServerExposerStrategy != null) { | ||
this.externalServerExposerStrategy = externalServerExposerStrategy; | ||
} else { | ||
throw new IllegalArgumentException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to throw org.eclipse.che.inject.ConfigurationException
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Guy Daich <guy.daich@sap.com>
Signed-off-by: Guy Daich <guy.daich@sap.com>
Signed-off-by: Guy Daich <guy.daich@sap.com>
@guydaichs |
@guydaichs cool contribution to the project! Congrats! |
Introduce an External Server Exposer Strategy, responsible for exposing service ports associated with external servers, making them accessible from outside the cluster. Move server exposure to shared k8s infra level: - multi-host: unique hostname for each component, like Che Openshift infrastructure. - single-host: single hostname for all components. Can be used in conjunction with TLS. - default-host: default ingress hostname. Can be used for local development without dynamic DNS (based on ingress IP). Add basic TLS support. Signed-off-by: Guy Daich <guy.daich@sap.com>
@@ -1,7 +1,9 @@ | |||
{{- define "cheHost" }} | |||
{{- if .Values.global.isHostBased }} | |||
{{- printf "master.%s" .Values.global.cheDomain }} | |||
{{- if eq .Values.global.serverStrategy "default-host" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guydaichs Looks like after your changes readme.md
is outdated. I mean the following line
If you must use an ip address (e.g. your corporate policy prevents you from using nip.io), you would also have to set isHostBased to false.
Could you please review readme.md
and update information about servers strategies there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks
Signed-off-by: Guy Daich guy.daich@sap.com
What does this PR do?
Replaces stale PR: #8822 . All previous commits are squashed.
Introduce an External Server Exposer Strategy, responsible for exposing service ports associated with external servers, making them accessible from outside the cluster.
Move server exposure to shared k8s infra level:
Provide three options for exposing external (and secondary) servers in k8s infra:
Add basic TLS support:
Add Ingress TLS provisioning.
Update Docs:
Multiuser:
Test PR
Follow instructions to set up minikube, helm, tiller, cert-manager.
Follow specific instructions for single/multi-user, default-host installation on minikube.
Routing strategies tested locally on minikube & minishift.
What issues does this PR fix or reference?
This PR fixes #8694.
This PR is part of kubernetes infrastructure epic #5908.
Release Notes
Docs PR
Currently, documented only in the Che Kubernetes Helm deployment instructions.