-
Notifications
You must be signed in to change notification settings - Fork 881
CRI: Add '--name', '--annotation', '--label', '--environment' for 'rkt app add'. #3205
Conversation
|
I would prefer if the flags for The new flags here /cc @krnowak |
|
Blocked by #3209 |
|
@s-urbaniak That would finally fix #1204. Really waiting for that. Or its better to create a separate PR just for the app name, that won't add new functionality so we can merge it sooner. I'm not sure what |
|
@yifan-gu #3209 just landed :) @monder vCRI is a working branch/milestone to support the new Kubernetes runtime interface in rkt. That branch is quite experimental so it is not meant to be used by final users, but fixes there will definitely land in master soon. |
|
Updating. |
|
Actually blocking on #3207 But I will make updates based on that. |
ef8492a to
91f015c
Compare
|
Now after rebase, I can patch environment, annotation, label, name for the app: $ sudo rkt app add 65bb11a9 sha512-f94f7a2d3f28 --annotation=foo=bar --annotation=hello=world --label=bar=foo --label=world=hello --environment=foo=bar --exec="/bin/sleep 1000" --name=test
...
$ sudo rkt app status 65bb11a9 --app=test --format=json-pretty
{
"name": "test",
"state": "created",
"created_at": 1474502683,
"image_id": "sha512-f94f7a2d3f289edaf18fe125ab8850e1f0bf703148b0cf2d3bb3c3f78efea6dd",
"cri_annotations": {
"foo": "bar",
"hello": "world"
},
"cri_labels": {
"bar": "foo",
"world": "hello"
}
}
$ sudo rkt cat-manifest --pretty-print 65bb11a9
{
"acVersion": "1.15.0+git117aaa9-dirty",
"acKind": "PodManifest",
"apps": [
{
"name": "test",
"image": {
"name": "registry-1.docker.io/library/busybox",
"id": "sha512-f94f7a2d3f289edaf18fe125ab8850e1f0bf703148b0cf2d3bb3c3f78efea6dd",
"labels": [
{
"name": "version",
"value": "latest"
},
{
"name": "arch",
"value": "amd64"
},
{
"name": "os",
"value": "linux"
}
]
},
"app": {
"exec": [
"/bin/sleep 1000"
],
"user": "0",
"group": "0",
"environment": [
{
"name": "PATH",
"value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
},
{
"name": "foo",
"value": "bar"
}
],
"criAnnotations": {
"foo": "bar",
"hello": "world"
},
"criLabels": {
"bar": "foo",
"world": "hello"
}
}
}
],
"volumes": null,
"isolators": null,
"annotations": [
{
"name": "coreos.com/rkt/stage1/mutable",
"value": "true"
}
],
"ports": []
}Also environment is set correctly: $ sudo rkt enter 65bb11a9 env
HOME=/root
SHELL=/bin/sh
USER=root
LOGNAME=root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
foo=bar
AC_APP_NAME=test
TERM=xterm |
|
Same failure again Ref #2943 |
Add ability to patch the app during
rkt app add.Ref #3136
#3010