(It's been mentioned during other discussions but I want to put up a separate proposal for it)
Overview
Conceptually, ApplicationConfiguration serves for several purposes - it describes application topology, it describes configurations, and it represents a deployed unit. With the new application concept, which is being tracked in another proposal, we are separating the first two responsibilities. This proposal proposes we separate representation of a deployed unit out of ApplicationConfiguration and formally introduce a Deployment (or Application Instance) object.
A Deployment object represent a specific instantiation of an application. It captures information that is relevant to a particular deployment. This will be a natural place to describe rolling updates, canary deployments, blue/green deployments etc.
Spec
The simplest Deployment could be as simple as referencing to an application version:
apiVersion: core.oam.dev/v1alpha3
kind: Deployment
metadata:
name: production
spec:
versions:
- name: v1
applicationRef:
- name: my-app
version: v1
And the following sample shows how to describe a canary deployment:
apiVersion: core.oam.dev/v1alpha3
kind: Deployment
metadata:
name: canary
spec:
versions:
- name: v1
applicationRef:
- name: my-app
version: v1
- name: v2
applicationRef:
- name: my-app
version: v2
components:
- website
traffic:
- version: v1
weight: 70%
- version: v2
weight: 30%
policy:
primary: v1
secondary: v2
rollback:
errors: 10%
interval: 1m
promotion:
step: 40%
success: 80%
interval: 1m
Note that the above sample assumes ingress/load-balancer being a built-in concept of the new Application object hence is not explicitly specified here. If this is not the case, we'll need to add a reference to an ingress trait.
Value
- Formally separates abstract description of an application and an instance of an application
- Rich language for describing complex deployment scenarios on one or multiple versions
Implications for a control plane implementation
- The deployed unit of an application is a Deployment instead of an ApplicationConfiguration
(It's been mentioned during other discussions but I want to put up a separate proposal for it)
Overview
Conceptually, ApplicationConfiguration serves for several purposes - it describes application topology, it describes configurations, and it represents a deployed unit. With the new application concept, which is being tracked in another proposal, we are separating the first two responsibilities. This proposal proposes we separate representation of a deployed unit out of ApplicationConfiguration and formally introduce a Deployment (or Application Instance) object.
A Deployment object represent a specific instantiation of an application. It captures information that is relevant to a particular deployment. This will be a natural place to describe rolling updates, canary deployments, blue/green deployments etc.
Spec
The simplest Deployment could be as simple as referencing to an application version:
And the following sample shows how to describe a canary deployment:
Note that the above sample assumes ingress/load-balancer being a built-in concept of the new Application object hence is not explicitly specified here. If this is not the case, we'll need to add a reference to an ingress trait.
Value
Implications for a control plane implementation