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

Update apis to allow for compatibility with k8s 1.22 #1972

Merged
merged 3 commits into from
Jan 26, 2022
Merged
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
2 changes: 1 addition & 1 deletion charts/flyte-core/templates/admin/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rules:
- '*'

---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flyteadmin.name" . }}-binding
Expand Down
190 changes: 126 additions & 64 deletions charts/flyte-core/templates/common/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,62 @@
- path: /flyteidl.service.AdminService
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.AdminService/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.AuthMetadataService
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.AuthMetadataService/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.IdentityService
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.IdentityService/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /grpc.health.v1.Health
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
- path: /grpc.health.v1.Health/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 81
service:
name: flyteadmin
port:
number: 81
{{- end }}
{{- if .Values.common.ingress.enabled }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "flyte.name" . }}
Expand All @@ -58,125 +74,171 @@ spec:
- path: /*
pathType: ImplementationSpecific
backend:
serviceName: ssl-redirect
servicePort: use-annotation
service:
name: ssl-redirect
port:
name: use-annotation
{{- end }}
# This is useful only for frontend development
{{- if .Values.common.ingress.webpackHMR }}
- path: /__webpack_hmr
pathType: ImplementationSpecific
backend:
serviceName: flyteconsole
servicePort: 80
service:
name: flyteconsole
port:
number: 80
{{- end }}
# Port 87 in FlyteAdmin maps to the redoc container.
- path: /openapi
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 87
service:
name: flyteadmin
port:
number: 87
# NOTE: If you change this, you must update the BASE_URL value in flyteconsole.yaml
- path: /console
pathType: ImplementationSpecific
backend:
serviceName: flyteconsole
servicePort: 80
service:
name: flyteconsole
port:
number: 80
- path: /console/*
pathType: ImplementationSpecific
backend:
serviceName: flyteconsole
servicePort: 80
service:
name: flyteconsole
port:
number: 80
- path: /api
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /api/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /healthcheck
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /v1/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
# Port 87 in FlyteAdmin maps to the redoc container.
- path: /openapi/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 87
service:
name: flyteadmin
port:
number: 87
- path: /.well-known
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /.well-known/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /login
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /login/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /logout
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /logout/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /callback
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /callback/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /me
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /config
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /config/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /oauth2
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
- path: /oauth2/*
pathType: ImplementationSpecific
backend:
serviceName: flyteadmin
servicePort: 80
service:
name: flyteadmin
port:
number: 80
{{- if not .Values.common.ingress.separateGrpcIngress }}
{{- include "grpcRoutes" . | nindent 10 -}}
{{- end }}
Expand All @@ -193,7 +255,7 @@ spec:
# 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).
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "flyte.name" . }}-grpc
Expand Down
14 changes: 11 additions & 3 deletions charts/flyte-core/templates/propeller/crds/flyteworkflow.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.flytepropeller.enabled }}
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: flyteworkflows.flyte.lyft.com
Expand All @@ -9,8 +9,16 @@ spec:
kind: FlyteWorkflow
plural: flyteworkflows
shortNames:
- fly
- fly
singular: flyteworkflow
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
{{- end }}
2 changes: 1 addition & 1 deletion charts/flyte-core/templates/propeller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ rules:
- deletecollection

---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flytepropeller.name" . }}
Expand Down
Loading