mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-11 11:57:04 +00:00
* add podDisruptive to traitdefinition * fix docs & example * fix diff and add docs * use bool type for podDisruptive Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
30 lines
714 B
YAML
30 lines
714 B
YAML
apiVersion: core.oam.dev/v1beta1
|
|
kind: TraitDefinition
|
|
metadata:
|
|
name: expose
|
|
namespace: vela-system
|
|
spec:
|
|
podDisruptive: false
|
|
schematic:
|
|
cue:
|
|
template: |-
|
|
parameter: {
|
|
domain: string
|
|
http: [string]: int
|
|
}
|
|
outputs: {
|
|
for k, v in parameter.http {
|
|
"\(k)": {
|
|
apiVersion: "v1"
|
|
kind: "Service"
|
|
spec: {
|
|
selector:
|
|
app: context.name
|
|
ports: [{
|
|
port: v
|
|
targetPort: v
|
|
}]
|
|
}
|
|
}
|
|
}
|
|
} |