Skip to content

Commit

Permalink
Update apis to allow for compatibility with k8s 1.22
Browse files Browse the repository at this point in the history
The CRD for the flyteworkflows is incomplete, atm. A schema should be
added in the near future.

See #1273
  • Loading branch information
f.szekeresch committed Dec 21, 2021
1 parent aa68d5c commit 6f48396
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 68 deletions.
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
12 changes: 10 additions & 2 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 @@ -12,5 +12,13 @@ spec:
- fly
singular: flyteworkflow
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
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

0 comments on commit 6f48396

Please sign in to comment.