Knative Pluggability
The Goal.
Knative aims to be “loosely coupled at the top, and pluggable at the bottom”[1].
… but we are not today.
Loosely coupled at the top
Eventing
n
Serving
n
Build
n
???
???
Use Knative components with non-Knative components that satisfy some contract/interface.
Pluggable at the bottom
Eventing
n
Serving
n
The focus of this presentation.
KPA
n
Background
Kubernetes Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
1 resource definition,
N controller implementations.
Kubernetes Ingress (cont’d)
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
impl.io/foo: bar
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
Pass implementation-specific configuration through annotations.
High-level Idea
Broad Strokes
Pluggable at the bottom (revisited)
Eventing
n
Serving
n
kIngress
n
Autoscaling
n
Choose your own adventure...
ImageCache
n
Build
n
CRDs
Implementations
Example: Autoscaler
Pluggable at the bottom (Autoscaler)
Serving
n
KPA
n
Autoscaling
n
HPA
Implementations
CRD (autoscaling.knative.dev/v1alpha1/Bikeshed)
Goal: Pluggable Autoscalers
A rough version of this as “KPA” was pitched in #1655, before seeing the pattern or alignment with the Kubernetes Ingress pattern.
Example: Ingress 2.0
… or is it Ingress++?
Pluggable at the bottom (Ingress)
Eventing
n
Ingress
2.0
Implementations
CRD (networking.knative.dev/v1alpha1/Bikeshed)
Serving
n
Goal: Pluggable Ingress
Kubernetes Ingress is close, but lacking:
… we likely want the evolution of Kubernetes Ingress, but its coupling with K8s is unfortunate. Maybe it needs to evolve into a CRD outside K8s?
See also: Network routing requirements for Knative
Goal: Pluggable Ingress (cont’d)
… and provide a base implementation around Istio (to match what we use today).
Example: Image Cache
Pluggable at the bottom (Image Caching)
Eventing
n
Serving
n
ImageCache
n
Nothing
Build
n
Implementations
CRD (something.knative.dev/v1alpha1/Bikeshed)
Goal: Improve Pod Start Latency
Variety of possible strategies, with a variety of operational costs
… get abstraction in place, and measure.
But why?
So why is this interesting? Win / Win.
How do we qualify plugins?
How do we qualify plugins?
Conformance!
The elephant in the room
Google drawing doesn’t have a nonagon.
Serving
n
10 sides!
I’m sorry...
Questions?