Skip to content

Commit

Permalink
fix storage if using zfs (or other non-default value)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghormoon committed Mar 21, 2024
1 parent 58e784c commit 8e5734a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ group_vars/all/temp.yaml
containerd:
## if FS used by containerd is zfs (e.g. Ubuntu 20.04+)
snapshotter: zfs
## if using the playbook to also install docker/containerd, storage driver needs to be overriden too. It still assumes /var/lib/docker and /var/lib/containerd/io.containerd.snapshotter.v1.zfs are on ZFS.
storage_driver: zfs

## Override version
KUBERNETES_VERSION_CUSTOM: "1.26.0"
Expand Down
8 changes: 4 additions & 4 deletions roles/common/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@
notify:
- Restart docker

- name: set docker storage to overlay2 (Debian / RH new) - overlay2 works only with ubuntu's official docker distribution (docker.io)
- name: set docker storage to {{ containerd.storage_driver|default('overlay2') }} (Debian / RH new) - overlay2 works only with ubuntu's official docker distribution (docker.io)
copy:
content: |
{
"storage-driver": "overlay2",
"storage-driver": "{{ containerd.storage_driver|default('overlay2') }}",
"exec-opts": ["native.cgroupdriver=systemd"],
"log-opts": {
"max-size": "1000m",
Expand Down Expand Up @@ -250,8 +250,8 @@
- name: Make sure containerd sandbox_image does not pull img from outside to avoid proxy issues
lineinfile:
dest: /etc/containerd/config.toml
regexp: '^(.*)sandbox_image = "registry.k8s.io/pause(.*)$'
line: '\1sandbox_image = "{{ images_repo | default ("registry.k8s.io") }}/pause\2'
regexp: '^(.*)sandbox_image = "registry.k8s.io/pause(.*)"$'
line: '\1sandbox_image = "{{ images_repo | default ("registry.k8s.io") }}/pause\2"'
backrefs: yes
notify:
- Restart containerd
Expand Down

0 comments on commit 8e5734a

Please sign in to comment.