-
Notifications
You must be signed in to change notification settings - Fork 247
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
[Proposal] - introduction of Deployment #342
Comments
Thanks, Haishi. We (Alibaba) already used OAM to describe upgrade/rollback. In our practice, we apply a trait to a component in a declarative way similar to what you described here. Here are my main observations.
|
My problem with leaving it all to traits is that the trait system is a very generic system. Yes it's capable of describing any intention but none of those is on OAM model. Hence, the semantic meanings of these traits subject to specific implementation/interpretation. To me, for OAM to have value that is broadly applicable to everyone, we have to provide common abstractions and concepts as the OAM model itself. Otherwise, we have an model that can be powerful when backed by a specific implementation but powerless otherwise. And there are no guaranteed consistent behavior across implementations because too much is relying on implementations. |
Agree. However, isn't standard traits/scope/workload the OAM way to provide that common abstraction and portability? |
Rolling updates or canary deployments involve multiple versions of an app/component. How do you apply a trait to multiple version of the same component? |
That's the reason we are proposing #336. I will update that issue with more detailed examples |
Hey @ryanzhang-oss, can you please provide an example of a trait describing rolling update or canary deployment? It will help me to understand how you envision to express such scenarios. Thanks. |
Naming nitpick: When there are two kinds of the same name in different API groups (e.g. |
We should coin a new name, like AppDeployment. |
I like this proposal. I think the Deployment described above is very close to the ComponentRevision in #336. Let me put some examples to describe ComponentRevision: kind: ComponentRevision
metadata:
name: web-service
spec:
versions:
- name: v1
component: web-v1
- name: v2
component: web-v2 In this way, we can keep a history of all revisions of components that's been rollout. Therefore we can describe traffic shifting and canary rollout traits like: kind: ApplicationConfiguration
spec:
components:
- revisionName: web-service
traits:
- trait:
traffic:
- revision: v1
weight: "70%"
- revision: v2
weight: "30%"
- trait:
canary:
source: v1
target: v2
analysis:
interval: 1m
# upper threshold of failure rate to trigger rollback
errorThreshold: "10%"
metrics:
- name: request-success-rate
thresholdRange:
min: "99%"
interval: 1m |
The idea of |
In that case, should we consider renaming ApplicationConfiguration to AppDeployment? |
Not necessary I think. Both of them can be understood as a deployment thing |
Well, if it's an deployment why don't just call it deployment. I recommend to use straightforward terms that don't need implied knowledge or understanding. "Configuration" at surface has no connection to a "Deployment", though under OAM it's implied that when you deploy you deploy an ApplicationConfiguration. I think we should try to reduce such subtle indirection. |
Thanks @Haishi2016 , it seems interesting! Note with ##336 addressed, we should be able to use
It seems standard workloads + standard traits could achieve this goal? For the naming, I tend to agree with @negz. |
I'm okay if we use #336 in conjunction with ApplicationConfiguraiton to model such deployment, as long as we can rename ApplicationConfiguration to ApplicationDeployment or AppDeployment. |
@Haishi2016 yeah that's the current idea in my mind. Would you like to work on #336 to design how we can model revision in detail? We can work together to make it a concrete proposal. |
Sure. |
Hi, please take a look at #336 , I have added a detailed design proposal. |
+1 on renaming to |
@draveness ApplicationConfiguration is indeed the configuration for the app. Essentially:
|
Add this in milestone which is closely related to application level rollout and revisioning. |
So the workflow is:
apiVersion: core.oam.dev/v1alpha3
kind: Deployment
metadata:
name: canary
spec:
versions:
- name: v1
applicationRef:
- name: my-app
version: v1
components:
- website # indicates which component will receive traffic (i.e. thru its ingress trait)
traffic:
- version: v1
weight: 100%
|
how do we ensure ordering of changes vi pipeline from one environment to another, is there something in the plans to model that ? |
(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
The text was updated successfully, but these errors were encountered: