This documentation is for not yet released version of kbld. For the documentation of the latest release version, see the latest version.
CNAB Image Maps
CNAB spec mentions Image Relocation as part of bundle runtime.
kbld supports applying relocation-mapping.json
on top of YAML configuration via kbld --image-map-file /cnab/app/relocation-mapping.json ...
. For example:
/cnab/app/relocation-mapping.json:
{
"gabrtv/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687": "my.registry/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687",
"technosophos/helloworld:0.1.0": "my.registry/helloworld:0.1.0"
}
and kbld input:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kbld-test1
spec:
selector:
matchLabels:
app: kbld-test1
template:
metadata:
labels:
app: kbld-test1
spec:
containers:
- name: my-app
image: gabrtv/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687
- name: my-app2
image: technosophos/helloworld:0.1.0
would result in:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kbld-test1
spec:
selector:
matchLabels:
app: kbld-test1
template:
metadata:
labels:
app: kbld-test1
spec:
containers:
- name: my-app
image: my.registry/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687
- name: my-app2
image: my.registry/helloworld:0.1.0
(Help improve our docs: edit this page on GitHub)