-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
33 lines (29 loc) · 896 Bytes
/
config.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
kind: ConfigData
localization:
- file: deployment.yaml
mapping:
path: spec.template.spec
transform: |-
package main
import "encoding/json"
spec: initContainers: [ for x in component.resources
if x.type == "ociImage" && x.extraIdentity.init != _|_ {
{
name: x.name
image: x.access.imageReference
args: {for v in x.labels if v.name == "args" {v.value}}
}
},
]
spec: containers: [ for x in component.resources
if x.type == "ociImage" && x.extraIdentity.init == _|_ {
{
name: x.name
image: x.access.imageReference
if x.labels != _|_ {
ports: {for v in x.labels if v.name == "ports" {v.value}}
}
}
},
]
out: json.Marshal(spec)