add demo for app doc (#1349)

* add demo for app doc

* Update docs/en/application.md

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
This commit is contained in:
wyike
2021-03-29 23:25:43 +08:00
committed by GitHub
co-authored by Jianbo Sun
parent 2d95800618
commit eb4efc960f
2 changed files with 89 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: "add sidecar to the app"
name: sidecar
spec:
appliesToWorkloads:
- webservice
- worker
schematic:
cue:
template: |-
patch: {
// +patchKey=name
spec: template: spec: containers: [parameter]
}
parameter: {
name: string
image: string
command?: [...string]
}