Feat: sync application from CR to data store (#3428)

* Feat: sync application from CR to data store

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feature: address comments

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add migrate database feature to avoid max 63 charactor in kubeapi storage

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* update the sync data

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
This commit is contained in:
Jianbo Sun
2022-03-18 09:55:15 +08:00
committed by GitHub
parent 5209be6da9
commit 6354912bba
37 changed files with 1637 additions and 147 deletions

View File

@@ -0,0 +1,37 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: example
spec:
components:
- name: nginx
type: webservice
properties:
image: nginx
traits:
- type: gateway
properties:
domain: testsvc.example.com
http:
"/": 8000
- name: nginx2
type: webservice
properties:
image: nginx2
policies:
- name: topology-beijing-demo
type: topology
properties:
clusterLabelSelector:
region: beijing
namespace: demo
- name: topology-local
type: topology
properties:
targets: ["local/demo", "local/ackone-demo"]
workflow:
steps:
- type: deploy
name: deploy-local
properties:
policies: ["topology-local", "topology-beijing-demo"]

View File

@@ -0,0 +1,10 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: example
spec:
components:
- name: blog
type: webservice
properties:
image: wordpress

View File

@@ -0,0 +1,33 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: example
spec:
components:
- name: blog
type: webservice
properties:
image: wordpress
traits:
- type: gateway
properties:
domain: testsvc.example.com
http:
"/": 8000
- name: nginx2
type: webservice
properties:
image: nginx
policies:
- name: topology-beijing-demo
type: topology
properties:
clusterLabelSelector:
region: beijing
namespace: demo
workflow:
steps:
- type: deploy
name: deploy-local
properties:
policies: ["topology-beijing-demo"]