[Backport release-1.5] Fix: address failure when rendering addon API schemas (#4445)

* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit de7a64346c)

* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 284e673bad)

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 1c0653e449)

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 78104068b1)

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0442f823c8)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
This commit is contained in:
github-actions[bot]
2022-07-25 17:02:32 +08:00
committed by GitHub
parent 853f44cf61
commit 35ae4e5ef5
16 changed files with 215 additions and 11 deletions

27
pkg/addon/testdata/example/template.cue vendored Normal file
View File

@@ -0,0 +1,27 @@
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: "example"
namespace: "vela-system"
}
spec: {
workflow: steps: [{
name: "apply-ns"
type: "apply-component"
properties: component: "ns-example-system"
}, {
name: "apply-resources"
type: "apply-remaining"
}]
components: [{
name: "ns-example-system"
type: "raw"
properties: {
apiVersion: "v1"
kind: "Namespace"
metadata: name: "example-system"
}
}]
}
}

View File

@@ -1,22 +0,0 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: example
namespace: vela-system
spec:
workflow:
steps:
- name: apply-ns
type: apply-component
properties:
component: ns-example-system
- name: apply-resources
type: apply-remaining
components:
- name: ns-example-system
type: raw
properties:
apiVersion: v1
kind: Namespace
metadata:
name: example-system