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

Add support for ingressClassName in flyte-core #4551

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/flyte-binary/eks-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ configuration:
database:
password: <DB_PASSWORD>
host: <RDS_HOST_DNS>
dbname: app
username: <DB_USERNAME>
dbname: flyteadmin
storage:
metadataContainer: <BUCKET_NAME>
userDataContainer: <USER_DATA_BUCKET_NAME>
Expand Down Expand Up @@ -126,8 +127,7 @@ clusterResourceTemplates:
namespace: '{{ namespace }}'
ingress:
create: true
commonAnnotations:
kubernetes.io/ingress.class: nginx
ingressClassName: nginx
httpAnnotations:
nginx.ingress.kubernetes.io/app-root: /console
grpcAnnotations:
Expand Down
3 changes: 2 additions & 1 deletion charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ helm install gateway bitnami/contour -n flyte
| cluster_resource_manager.service_account_name | string | `"flyteadmin"` | Service account name to run with |
| cluster_resource_manager.templates | list | `[{"key":"aa_namespace","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\nspec:\n finalizers:\n - kubernetes\n"},{"key":"ab_project_resource_quota","value":"apiVersion: v1\nkind: ResourceQuota\nmetadata:\n name: project-quota\n namespace: {{ namespace }}\nspec:\n hard:\n limits.cpu: {{ projectQuotaCpu }}\n limits.memory: {{ projectQuotaMemory }}\n"}]` | Resource templates that should be applied |
| cluster_resource_manager.templates[0] | object | `{"key":"aa_namespace","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\nspec:\n finalizers:\n - kubernetes\n"}` | Template for namespaces resources |
| common | object | `{"databaseSecret":{"name":"","secretManifest":{}},"flyteNamespaceTemplate":{"enabled":false},"ingress":{"albSSLRedirect":false,"annotations":{"nginx.ingress.kubernetes.io/app-root":"/console"},"enabled":true,"separateGrpcIngress":false,"separateGrpcIngressAnnotations":{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"},"tls":{"enabled":false},"webpackHMR":false}}` | ---------------------------------------------- COMMON SETTINGS |
| common | object | `{"databaseSecret":{"name":"","secretManifest":{}},"flyteNamespaceTemplate":{"enabled":false},"ingress":{"albSSLRedirect":false,"annotations":{"nginx.ingress.kubernetes.io/app-root":"/console"},"enabled":true,"ingressClassName":"","separateGrpcIngress":false,"separateGrpcIngressAnnotations":{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"},"tls":{"enabled":false},"webpackHMR":false}}` | ---------------------------------------------- COMMON SETTINGS |
| common.databaseSecret.name | string | `""` | Specify name of K8s Secret which contains Database password. Leave it empty if you don't need this Secret |
| common.databaseSecret.secretManifest | object | `{}` | Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). See https://github.com/godaddy/kubernetes-external-secrets |
| common.flyteNamespaceTemplate.enabled | bool | `false` | - Enable or disable creating Flyte namespace in template. Enable when using helm as template-engine only. Disable when using `helm install ...`. |
| common.ingress.albSSLRedirect | bool | `false` | - albSSLRedirect adds a special route for ssl redirect. Only useful in combination with the AWS LoadBalancer Controller. |
| common.ingress.annotations | object | `{"nginx.ingress.kubernetes.io/app-root":"/console"}` | - Ingress annotations applied to both HTTP and GRPC ingresses. |
| common.ingress.enabled | bool | `true` | - Enable or disable creating Ingress for Flyte. Relevant to disable when using e.g. Istio as ingress controller. |
| common.ingress.ingressClassName | string | `""` | - https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/#using-multiple-ingress-controllers |
| common.ingress.separateGrpcIngress | bool | `false` | - separateGrpcIngress puts GRPC routes into a separate ingress if true. Required for certain ingress controllers like nginx. |
| common.ingress.separateGrpcIngressAnnotations | object | `{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"}` | - Extra Ingress annotations applied only to the GRPC ingress. Only makes sense if `separateGrpcIngress` is enabled. |
| common.ingress.tls | object | `{"enabled":false}` | - Ingress hostname host: |
Expand Down
4 changes: 3 additions & 1 deletion charts/flyte-core/templates/common/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ spec:
- {{ tpl (toYaml .Values.common.ingress.host) $ }}
{{ end }}


{{- if .Values.common.ingress.separateGrpcIngress }}
# Certain ingress controllers like nginx cannot serve HTTP 1 and GRPC with a single ingress because GRPC can only
# enabled on the ingress object, not on backend services (GRPC annotation is set on the ingress, not on the services).
Expand All @@ -485,6 +484,9 @@ metadata:
{{- toYaml . | nindent 4}}
{{- end }}
spec:
{{- if .Values.common.ingress.ingressClassName }}
ingressClassName: {{ .Values.common.ingress.ingressClassName | quote }}
{{- end }}
rules:
- host: {{ tpl (toYaml .Values.common.ingress.host) $ }}
http:
Expand Down
2 changes: 1 addition & 1 deletion charts/flyte-core/values-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ flyteconsole:

common:
ingress:
ingressClassName: alb
albSSLRedirect: true
separateGrpcIngress: true
annotations:
# -- aws-load-balancer-controller v2.1 or higher is required - https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/
# For EKS if using [ALB](https://kubernetes-sigs.github.io/aws-load-balancer-controller/guide/ingress/annotations/), these annotations are set
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
Expand Down
2 changes: 1 addition & 1 deletion charts/flyte-core/values-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ workflow_notifications:

common:
ingress:
ingressClassName: nginx
host: "{{ .Values.userSettings.hostName }}"
tls:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/issuer: "letsencrypt-production"
# --- separateGrpcIngress puts GRPC routes into a separate ingress if true. Required for certain ingress controllers like nginx.
Expand Down
3 changes: 3 additions & 0 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ common:
ingress:
# --- Enable or disable creating Ingress for Flyte. Relevant to disable when using e.g. Istio as ingress controller.
enabled: true
# --- Specify the IngressClass corresponding to your Ingress controller. This is useful for automated certificate generation, among other use cases.
# --- https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/#using-multiple-ingress-controllers
ingressClassName: ""
# --- Enable or disable HMR route to flyteconsole. This is useful only for frontend development.
webpackHMR: false
# --- separateGrpcIngress puts GRPC routes into a separate ingress if true. Required for certain ingress controllers like nginx.
Expand Down
3 changes: 1 addition & 2 deletions deployment/eks/flyte_aws_scheduler_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,6 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
rules:
Expand Down Expand Up @@ -1554,11 +1553,11 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "alb"
rules:
- host: null
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/eks/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
rules:
Expand Down Expand Up @@ -1182,11 +1181,11 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "alb"
rules:
- host: null
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/eks/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
rules:
Expand Down Expand Up @@ -755,11 +754,11 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "alb"
rules:
- host: null
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,6 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
rules:
Expand Down Expand Up @@ -1673,11 +1672,11 @@ metadata:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: service_instance=production
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "alb"
rules:
- host: null
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/gcp/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,6 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
Expand Down Expand Up @@ -1182,11 +1181,11 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "nginx"
rules:
- host: '<HOSTNAME>'
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/gcp/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
Expand Down Expand Up @@ -747,11 +746,11 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "nginx"
rules:
- host: '<HOSTNAME>'
http:
Expand Down
3 changes: 1 addition & 2 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,6 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
Expand Down Expand Up @@ -1680,11 +1679,11 @@ metadata:
namespace: flyte
annotations:
cert-manager.io/issuer: letsencrypt-production
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName: "nginx"
rules:
- host: '<HOSTNAME>'
http:
Expand Down
Loading