mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Merge branch 'apiserver' into merge
This commit is contained in:
+7
-1
@@ -23,7 +23,7 @@ import (
|
||||
#Delete: kube.#Delete
|
||||
|
||||
#ApplyApplication: #Steps & {
|
||||
load: oam.#LoadComponets @step(1)
|
||||
load: oam.#LoadComponetsInOrder @step(1)
|
||||
components: #Steps & {
|
||||
for name, c in load.value {
|
||||
"\(name)": oam.#ApplyComponent & {
|
||||
@@ -129,10 +129,16 @@ import (
|
||||
|
||||
#ConvertString: convert.#String
|
||||
|
||||
#DateToTimestamp: time.#DateToTimestamp
|
||||
|
||||
#TimestampToDate: time.#TimestampToDate
|
||||
|
||||
#SendEmail: email.#Send
|
||||
|
||||
#Load: oam.#LoadComponets
|
||||
|
||||
#LoadInOrder: oam.#LoadComponetsInOrder
|
||||
|
||||
#Steps: {
|
||||
#do: "steps"
|
||||
...
|
||||
|
||||
+13
-4
@@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed pkgs op.cue
|
||||
//go:embed pkgs op.cue ql.cue
|
||||
fs embed.FS
|
||||
)
|
||||
|
||||
@@ -43,17 +43,26 @@ func GetPackages(tagTempl string) (map[string]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pkgContent := string(opBytes) + "\n"
|
||||
qlBytes, err := fs.ReadFile("ql.cue")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
opContent := string(opBytes) + "\n"
|
||||
qlContent := string(qlBytes) + "\n"
|
||||
for _, file := range files {
|
||||
body, err := fs.ReadFile("pkgs/" + file.Name())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pkgContent += fmt.Sprintf("%s: {\n%s\n}\n", strings.TrimSuffix(file.Name(), ".cue"), string(body))
|
||||
pkgContent := fmt.Sprintf("%s: {\n%s\n}\n", strings.TrimSuffix(file.Name(), ".cue"), string(body))
|
||||
opContent += pkgContent
|
||||
qlContent += pkgContent
|
||||
}
|
||||
|
||||
return map[string]string{
|
||||
"vela/op": pkgContent + "\n" + tagTempl,
|
||||
"vela/op": opContent + "\n" + tagTempl,
|
||||
"vela/ql": qlContent + "\n" + tagTempl,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
matchingLabels?: {...}
|
||||
}
|
||||
list?: {...}
|
||||
...
|
||||
}
|
||||
|
||||
#Delete: {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ListResourcesInApp: {
|
||||
#do: "listResourcesInApp"
|
||||
#provider: "query"
|
||||
app: {
|
||||
name: string
|
||||
namespace: string
|
||||
components?: [...string]
|
||||
filter?: {
|
||||
cluster?: string
|
||||
clusterNamespace?: string
|
||||
}
|
||||
clusterNamespace?: string
|
||||
enableHistoryQuery?: bool
|
||||
}
|
||||
...
|
||||
}
|
||||
|
||||
#CollectPods: {
|
||||
#do: "collectPods"
|
||||
#provider: "query"
|
||||
value: {...}
|
||||
cluster: string
|
||||
...
|
||||
}
|
||||
|
||||
#SearchEvents: {
|
||||
#do: "searchEvents"
|
||||
#provider: "query"
|
||||
value: {...}
|
||||
cluster: string
|
||||
...
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#DateToTimestamp: {
|
||||
#do: "timestamp"
|
||||
#provider: "time"
|
||||
|
||||
date: string
|
||||
layout: *"" | string
|
||||
|
||||
timestamp?: int64
|
||||
...
|
||||
}
|
||||
|
||||
#TimestampToDate: {
|
||||
#do: "date"
|
||||
#provider: "time"
|
||||
|
||||
timestamp: int64
|
||||
layout: *"" | string
|
||||
location: *"" | string
|
||||
|
||||
date?: string
|
||||
...
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#Read: kube.#Read
|
||||
|
||||
#List: kube.#List
|
||||
|
||||
#Delete: kube.#Delete
|
||||
|
||||
#ListResourcesInApp: query.#ListResourcesInApp
|
||||
|
||||
#CollectPods: query.#CollectPods
|
||||
|
||||
#SearchEvents: query.#SearchEvents
|
||||
Reference in New Issue
Block a user