mirror of
https://github.com/kubevela/kubevela.git
synced 2026-03-05 11:11:28 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
apiVersion: core.oam.dev/v1alpha2
|
|
kind: WorkloadDefinition
|
|
metadata:
|
|
name: webservice.testapps
|
|
labels:
|
|
usecase: forplugintest
|
|
spec:
|
|
definitionRef:
|
|
name: deployments.apps
|
|
extension:
|
|
template: |
|
|
output: {
|
|
apiVersion: "apps/v1"
|
|
kind: "Deployment"
|
|
metadata: name: context.name
|
|
spec: {
|
|
replicas: 1
|
|
podSpec: {
|
|
containers: [{
|
|
name: context.name
|
|
image: parameter.image
|
|
env: parameter.env
|
|
ports: [{
|
|
containerPort: parameter.port
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
}
|
|
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: *6379 | int
|
|
|
|
env: [...{
|
|
name: string
|
|
value?: string
|
|
valueFrom?: {
|
|
secretKeyRef: {
|
|
name: string
|
|
key: string
|
|
}
|
|
}
|
|
}]
|
|
} |