Skip to content

Commit

Permalink
Add support for ingressClassName in ingress
Browse files Browse the repository at this point in the history
 - ingressClassName field was added in k8s 1.18, and effectively
   replaces the unofficially supported annotation `ingress.class`

   https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation

Signed-off-by: ddl-ebrown <[email protected]>
  • Loading branch information
ddl-ebrown committed Jan 31, 2024
1 parent 2794894 commit 3008f0e
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ 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"},"class":null,"enabled":true,"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.class | string | `nil` | - Sets the ingressClassName |
| 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.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. |
Expand Down
2 changes: 2 additions & 0 deletions charts/flyte-core/templates/common/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ metadata:
annotations: {{ tpl (toYaml .) $ | nindent 4}}
{{- end }}
spec:
ingressClassName: {{ .Values.common.ingress.class | quote }}
rules:
- http:
paths:
Expand Down Expand Up @@ -485,6 +486,7 @@ metadata:
{{- toYaml . | nindent 4}}
{{- end }}
spec:
ingressClassName: {{ .Values.common.ingress.class | quote }}
rules:
- host: {{ tpl (toYaml .Values.common.ingress.host) $ }}
http:
Expand Down
2 changes: 2 additions & 0 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ common:
# -- Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). See https://github.com/godaddy/kubernetes-external-secrets
secretManifest: {}
ingress:
# --- Sets the ingressClassName
class:
# --- Enable or disable creating Ingress for Flyte. Relevant to disable when using e.g. Istio as ingress controller.
enabled: true
# --- Enable or disable HMR route to flyteconsole. This is useful only for frontend development.
Expand Down
2 changes: 2 additions & 0 deletions deployment/eks/flyte_aws_scheduler_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,7 @@ metadata:
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -1562,6 +1563,7 @@ metadata:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: null
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/eks/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ metadata:
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -1190,6 +1191,7 @@ metadata:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: null
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/eks/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ metadata:
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -760,6 +761,7 @@ metadata:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: null
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,7 @@ metadata:
kubernetes.io/ingress.class: alb
nginx.ingress.kubernetes.io/app-root: /console
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -1681,6 +1682,7 @@ metadata:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: null
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/gcp/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ metadata:
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -1190,6 +1191,7 @@ metadata:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: '<HOSTNAME>'
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/gcp/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ metadata:
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -752,6 +753,7 @@ metadata:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: '<HOSTNAME>'
http:
Expand Down
2 changes: 2 additions & 0 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,7 @@ metadata:
nginx.ingress.kubernetes.io/app-root: /console
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down Expand Up @@ -1688,6 +1689,7 @@ metadata:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: GRPC
spec:
ingressClassName:
rules:
- host: '<HOSTNAME>'
http:
Expand Down
1 change: 1 addition & 0 deletions deployment/sandbox/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7542,6 +7542,7 @@ metadata:
annotations:
nginx.ingress.kubernetes.io/app-root: /console
spec:
ingressClassName:
rules:
- http:
paths:
Expand Down

0 comments on commit 3008f0e

Please sign in to comment.