-
Notifications
You must be signed in to change notification settings - Fork 69
/
componentdefinition-knative-serving.yaml
45 lines (45 loc) · 1.23 KB
/
componentdefinition-knative-serving.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
name: knative-serving
annotations:
definition.oam.dev/description: "Knative serving."
spec:
workload:
definition:
apiVersion: serving.knative.dev/v1
kind: Service
schematic:
cue:
template: |
output: {
apiVersion: "serving.knative.dev/v1"
kind: "Service"
spec: {
template:
spec:
containers: [{
image: parameter.image
env: parameter.env
}]
}
}
parameter: {
image: string
env?: [...{
// +usage=Environment variable name
name: string
// +usage=The value of the environment variable
value?: string
// +usage=Specifies a source the value of this var should come from
valueFrom?: {
// +usage=Selects a key of a secret in the pod's namespace
secretKeyRef: {
// +usage=The name of the secret in the pod's namespace to select from
name: string
// +usage=The key of the secret to select from. Must be a valid secret key
key: string
}
}
}]
}