Files
kubevela/pkg/appfile/testdata/workloadDef.yaml
Zheng Xi Zhou 2a943c9429 Using Terraform as IaC module in KubeVela (#863)
* Integrate Terraform into KubeVela

Integrated Terrafrom into KubeVela to enable it to deploy
infrastruce resouces by `vela up`

* extend Terraform modules/files as WorkloadDefinition

stop printing terraform log to console

Support one workload consumes two cloud services

Refactor Terraform plugin based on Application Object

add testcase

* refactor code per reviewer's comments

fix rebase issue

* find lost code back

* refactor code to make the modification as little as to that of branch master

* remove blank lines from imports
2021-01-28 18:36:52 +08:00

40 lines
936 B
YAML

apiVersion: core.oam.dev/v1alpha2
kind: WorkloadDefinition
metadata:
name: deployments.testapps
labels:
usecase: forplugintest
spec:
definitionRef:
name: deployments.apps
extension:
template: |
output: {
apiVersion: "apps/v1"
kind: "Deployment"
metadata: name: context.name
spec: {
containers: [{
image: parameter.image
name: context.name
env: parameter.env
ports: [{
containerPort: parameter.port
protocol: "TCP"
name: "default"
}]
}]
}
}
parameter: {
// +usage=Which image would you like to use for your service
// +short=i
image: string
// +usage=Which port do you want customer traffic sent to
// +short=p
port: *8080 | int
env: [...{
name: string
value: string
}]
}