Files
kubevela/docs/examples/registry/for-loop.yaml
yangsoon 1261e2678f add podDisruptive to traitdefinition (#1192)
* 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>
2021-04-08 13:39:03 +08:00

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
}]
}
}
}
}