mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-06 09:27:16 +00:00
* change podspec workload to deployment in built-in templates * fix Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
apiVersion: core.oam.dev/v1alpha2
|
|
kind: WorkloadDefinition
|
|
metadata:
|
|
name: webservice.testapps
|
|
labels:
|
|
usecase: forplugintest
|
|
spec:
|
|
definitionRef:
|
|
name: webservice.testapps
|
|
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=specify app image
|
|
// +short=i
|
|
image: string
|
|
|
|
// +usage=specify port for container
|
|
// +short=p
|
|
port: *6379 | int
|
|
|
|
env: [...{
|
|
name: string
|
|
value?: string
|
|
valueFrom?: {
|
|
secretKeyRef: {
|
|
name: string
|
|
key: string
|
|
}
|
|
}
|
|
}]
|
|
} |