Skip to content

Commit

Permalink
[kind] Set containers limit for podman
Browse files Browse the repository at this point in the history
The sf-operator can not be deployed when there is already deployed
operator by somone. The new pods got an error that some limits are
reached.
This commit is setting the podman pids_limit to unlimited [1].

[1] kubernetes-sigs/kind#2896 (comment)

Change-Id: Ie314ed4e60ea127bca1af7e9d60548a5346fa203
  • Loading branch information
danpawlik committed Nov 18, 2022
1 parent d02813f commit e4b2593
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions roles/extra/kind/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,25 @@
shell: |
sysctl -w fs.inotify.max_user_watches=5242880
sysctl -w fs.inotify.max_user_instances=1280
# NOTE: taking advice from https://github.com/kubernetes-sigs/kind/issues/2896#issuecomment-1226184890
- name: Create containers configuration file if not exists
become: true
file:
path: /etc/containers/containers.conf
state: touched

- name: Set the containers section
become: true
lineinfile:
path: /etc/containers/containers.conf
regexp: "^[containers]"
line: "[containers]"

- name: Set the podman limit
become: true
lineinfile:
path: /etc/containers/containers.conf
regexp: "^pids_limit"
line: "pids_limit=0"
insertafter: "[containers]"

0 comments on commit e4b2593

Please sign in to comment.