-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Skip BPFFS installation when LSB is not available CentOS does not come with LSB by default. This skips installation of BPFFS when the `ansible_lsb` fact is not available. This might not be 100% correct, but it's better than having support only for Ubuntu. * Install Cilium repository when rendering the template When attempting to render the helm chart template in a clean helm installation, the playbook fails because the repository has not yet been installed. This makes sure the repository exists before attempting to render the template. Additionally, when there are no repositories installed in helm, the `helm repo list` command exists with an error. In such cases, the playbook would also fail. Now, errors are ignored when listing the available repositories and the install command is ran wether the repo command failed or the repository is not yet available. When the `helm repo list` command throws an error not related to the absence of repositories, the install command will most likely throw it too, so the play will fail in such cases. * Apply suggestions from code review Co-authored-by: Robert Wimmer <[email protected]> Co-authored-by: Robert Wimmer <[email protected]>
- Loading branch information
1 parent
f25ccca
commit 253a5af
Showing
4 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
- name: Register if Cilium Helm repository is installed | ||
command: helm search repo {{ cilium_repo_name }} -n {{ cilium_namespace }} --version ^{{ cilium_chart_version }} 2>/dev/null | ||
register: cilium_repo_installed | ||
changed_when: false | ||
delegate_to: 127.0.0.1 | ||
run_once: true | ||
ignore_errors: true | ||
|
||
- name: Add cilium helm repository | ||
command: helm repo add {{ cilium_repo_name }} {{ cilium_chart_url }} | ||
changed_when: false | ||
delegate_to: 127.0.0.1 | ||
run_once: true | ||
when: | | ||
cilium_repo_installed.failed or | ||
cilium_repo_installed.stdout.find(cilium_repo_name) == -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
- include_tasks: repo.yml | ||
|
||
- name: Render values | ||
block: | ||
- name: Create temporary file for Helm values | ||
|