github.com/oam-dev/kubevela@v1.9.11/vela-templates/registry/auto-gen/expose.yaml (about) 1 # Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. 2 # Definition source cue file: vela-templates/definitions/registry/expose.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: TraitDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/description: Expose a service. 8 name: expose 9 namespace: vela-system 10 spec: 11 podDisruptive: false 12 schematic: 13 cue: 14 template: | 15 parameter: { 16 domain: string 17 http: [string]: int 18 } 19 outputs: { 20 for k, v in parameter.http { 21 (k): { 22 apiVersion: "v1" 23 kind: "Service" 24 spec: { 25 selector: app: context.name 26 ports: [{ 27 port: v 28 targetPort: v 29 }] 30 } 31 } 32 } 33 } 34