mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-23 22:46:53 +00:00
use settings from App to override Values add discovery util to get workload created by helm module add helm typed structs into workloadDef and traitDef update doc & refine code add e2e test for helm module application use oam.dev/catalog as helm repo Signed-off-by: roywang <seiwy2010@gmail.com>
30 lines
772 B
YAML
30 lines
772 B
YAML
apiVersion: core.oam.dev/v1alpha2
|
|
kind: TraitDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: "Add virtual group labels"
|
|
name: virtualgroup
|
|
spec:
|
|
appliesToWorkloads:
|
|
- webservice
|
|
- worker
|
|
- deployments.apps
|
|
extension:
|
|
template: |-
|
|
patch: {
|
|
spec: template: {
|
|
metadata: labels: {
|
|
if parameter.type == "namespace" {
|
|
"app.namespace.virtual.group": parameter.group
|
|
}
|
|
if parameter.type == "cluster" {
|
|
"app.cluster.virtual.group": parameter.group
|
|
}
|
|
}
|
|
}
|
|
}
|
|
parameter: {
|
|
group: *"default" | string
|
|
type: *"namespace" | string
|
|
}
|