Files
kubevela/references/plugins/testdata/svcTraitDef.yaml
wangyuan249 0753734372 vela show support show the parameters of KUBE model ComponentDefinition (#1693)
* vela show support show the paramters of KUBE model ComponentDefinition

* fix

* fix

fix

* enchance test case and add function in show -web

fmt and vet

fix

fix522

* add resolve for kubedef type trait in  reconcil process

* fix StoreOpenAPISchema args para and ret para

* fix GetCapabilityObject uncover
2021-05-26 21:16:40 +08:00

31 lines
676 B
YAML

apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
name: service-kube
namespace: default
spec:
appliesToWorkloads:
- webservice
- worker
- backend
podDisruptive: true
schematic:
kube:
template:
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
ports:
- protocol: TCP
port: 80
targetPort: 9376
parameters:
- name: targetPort
required: true
type: number
fieldPaths:
- "spec.template.spec.ports[0].targetPort"
description: "target port num for service provider."