Skip to content

Commit

Permalink
Move info about image pull policy from example to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellonek committed Jan 16, 2018
1 parent b4146e0 commit d8ec8d7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
12 changes: 11 additions & 1 deletion docs/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Virtlet supports QCOW2 format for VM images.
```yaml
containers:
- name: test-vm
image: download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
image: download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
```
**Note:** You need to specify url without `scheme://`. In case you are using [instructions](../deploy/README.md) in `deploy/` directory to deploy Virtlet, you need to add `virtlet.cloud/` prefix to the url.
Expand All @@ -30,6 +30,16 @@ Clones used as boot images are stored in "**volumes**" libvirt pool under `/var/
during the VM execution time and are automatically garbage collected by Virtlet
after stopping VM pod environment (sandbox).

**Note:**
Virtlet currently ignores image tags, but their meaning may change
in future, so it’s better not to set them for VM pods. If there’s no tag
provided in the image specification kubelet defaults to
`imagePullPolicy: Always`, which means that the image is always
redownloaded when the pod is created. In order to make pod creation
faster and more reliable, we set in examples `imagePullPolicy` to `IfNotPresent`
so a previously downloaded image is reused if there is one in Virtlet’s
image store.

## Restrictions and pitfalls

Image name are a subject to the strict validation rules that normally applied to the docker image names. Thus one cannot
Expand Down
4 changes: 2 additions & 2 deletions docs/volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ spec:
- virtlet
containers:
- name: test-vm
image: download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
image: download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
volumes:
- name: vol1
flexVolume:
Expand Down Expand Up @@ -307,7 +307,7 @@ spec:
- virtlet
containers:
- name: test-vm
image: download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
image: download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
volumes:
- name: raw
flexVolume:
Expand Down
8 changes: 0 additions & 8 deletions examples/cirros-vm-with-additional-annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ spec:
# virtlet.cloud/ prefix is used by CRI proxy, the remaining part
# of the image name is prepended with https:// and used to download the image
image: virtlet.cloud/cirros
# Virtlet currently ignores image tags, but their meaning may change
# in future, so it’s better not to set them for VM pods. If there’s no tag
# provided in the image specification kubelet defaults to
# imagePullPolicy: Always, which means that the image is always
# redownloaded when the pod is created. In order to make pod creation
# faster and more reliable, we set imagePullPolicy to IfNotPresent here
# so a previously downloaded image is reused if there is one
# in Virtlet’s image store
imagePullPolicy: IfNotPresent
# tty and stdin required for `kubectl attach -t` to work
tty: true
Expand Down
8 changes: 0 additions & 8 deletions examples/cirros-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ spec:
# virtlet.cloud/ prefix is used by CRI proxy, the remaining part
# of the image name is prepended with https:// and used to download the image
image: virtlet.cloud/cirros
# Virtlet currently ignores image tags, but their meaning may change
# in future, so it’s better not to set them for VM pods. If there’s no tag
# provided in the image specification kubelet defaults to
# imagePullPolicy: Always, which means that the image is always
# redownloaded when the pod is created. In order to make pod creation
# faster and more reliable, we set imagePullPolicy to IfNotPresent here
# so a previously downloaded image is reused if there is one
# in Virtlet’s image store
imagePullPolicy: IfNotPresent
# tty and stdin required for `kubectl attach -t` to work
tty: true
Expand Down

0 comments on commit d8ec8d7

Please sign in to comment.