Skip to content

Commit

Permalink
Add settable cilium status wait duration (#17)
Browse files Browse the repository at this point in the history
# Pull Request Description
Added variable to set wait duration for the cilium status command to
report success, previously was hardcoded to 10m, so i added the default
of 10m, to keep the default behaviour consistent.

## Change type
- [ ] Bug fix (non-breaking change which fixes a specific issue)
- [x] New feature (non-breaking change adding new functionality)
- [ ] Breaking change (fix or feature that potentially causes existing
functionality to fail)
- [ ] Change that does not affect Ansible Role code (Github Actions
Workflow, Documentation, or similair)
  • Loading branch information
lukapetrovic-git authored Dec 25, 2024
1 parent 4fc8648 commit a164f9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ cilium_kubeconfig_path: ~/.kube/config
# Restart cilium operator and agents on config change
cilium_restart_on_config_change: false

# Duration to wait for cilium status to report success
cilium_status_wait_duration: 10m

# Cilium specific config

# Configure the kube-proxy replacement in Cilium BPF datapath
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
- cilium_restart_on_config_change | bool

- name: Wait for Cilium to be running and ready
ansible.builtin.command: "{{ cilium_cli_bin_path }} status --wait --wait-duration 10m"
ansible.builtin.command: "{{ cilium_cli_bin_path }} status --wait --wait-duration {{ cilium_status_wait_duration }}"
environment:
KUBECONFIG: "{{ cilium_kubeconfig_path }}"
changed_when: true
Expand Down

0 comments on commit a164f9d

Please sign in to comment.