Comments (3)
Here is a scenario case
I described and published an application through oam, as follows
apiVersion: core.oam.dev/v1alpha2
kind: Component
metadata:
name: stateless-example-component
namespace: oam-sample
spec:
workload:
apiVersion: core.matrix.io/v1alpha1
kind: StatelessWorkload
spec:
serviceName: statelessworkload-nginx
template:
spec:
containers:
- name: container-nginx
image: noop
ports:
- name: http
containerPort: 80
protocol: TCP
parameters:
- name: instance-name
required: true
fieldPaths:
- metadata.name
- name: image
fieldPaths:
- spec.template.spec.containers[0].image
----
apiVersion: core.oam.dev/v1alpha2
kind: ApplicationConfiguration
metadata:
name: stateless-example-appconfig
namespace: oam-sample
spec:
components:
- componentName: stateless-example-component
parameterValues:
- name: instance-name
value: statelessworkload-nginx
- name: image
value: nginx
traits:
- trait:
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: statelessworkload-nginx
namespace: oam-sample
spec:
gateways:
- istio-system/common-gateway
hosts:
- statelessworkload-nginx.sk8s.cn
http:
- route:
- destination:
host: statelessworkload-nginx.oam-sample.svc.cluster.local
weight: 100
- trait:
apiVersion: core.oam.dev/v1alpha2
kind: ManualScalerTrait
metadata:
name: example-stateless-trait
spec:
replicaCount: 2
Then I directly modified some fields of VirtualService resources (fields not touched by OAM) through other channels
For example, add a CORS strategy on a platform that I have not yet migrated to OAM
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
creationTimestamp: '2020-07-04T10:11:09Z'
generation: 9
name: statelessworkload-nginx
namespace: oam-sample
ownerReferences:
- apiVersion: core.oam.dev/v1alpha2
blockOwnerDeletion: true
controller: true
kind: ApplicationConfiguration
name: stateless-example-appconfig
uid: 67c65fc2-f090-4398-9d7b-cf376307d72c
spec:
gateways:
- istio-system/common-gateway
hosts:
- statelessworkload-nginx.sk8s.cn
http:
- corsPolicy:
allowCredentials: true
allowHeaders:
- '*'
allowMethods:
- POST
- PUT
- PATCH
allowOrigin:
- '*'
route:
- destination:
host: statelessworkload-nginx.oam-sample.svc.cluster.local
weight: 100
At this time, oam runtime will ignore my changes and change to the state described in appconfig, mainly because strategy merge patch is not used
from oam-kubernetes-runtime.
This may not be a strong scenario.
from oam-kubernetes-runtime.
Trait/workload are generate by oam server and don't edit by kubectl, so using patch. But updating k8s built-in resource like deployment in containerizedworkload should use strategy merge patch
from oam-kubernetes-runtime.
Related Issues (20)
- [BUG] 【containerized workload】 Updating the trait of application will result in all workload rebuilding HOT 2
- [BUG]Two examples of oam: flight-tracker and dependency do not authorize oam's permissions to crd, so the example will not run. HOT 2
- Trait apply should use update instead of patch HOT 27
- [Feature] Support Namespaced Scope for Defintion
- [Feature] support don't reconcile if AppConfig or Component not updated HOT 1
- observedGeneration in Component and ControllerRevision should be equal [BUG]
- Should not update workload if only revisionEnabled trait was added first time HOT 1
- [Feature] make development log setting as an argument HOT 2
- [Feature] ContainerConfigFile support subPath HOT 4
- [Feature] Add Helm chart for K8s version < 1.16 HOT 1
- [Feature] scope should include all workload instance with versioning mechanism HOT 1
- [BUG] trait CR label will be override when more than two traits exist
- [Feature] using trait type instead of hardcode word 'trait' to create trait CR HOT 2
- [BUG] not convenient to debug e2e-test locally
- [Feature] Make local development more enjoyable HOT 2
- In ScopeRef it seems like Kind and Name cause for too much configuration, name should be replaced with properties HOT 2
- [Feature] Support ALL oam-kubernetes-runtime feature in KubeVela HOT 2
- once component set command, can't remove.
- Support complex/object data type for parameterValues in ApplicationConfiguration HOT 2
- [BUG] delete component and modify appConfig's components to null array lead to panic
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oam-kubernetes-runtime.