Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect ciliumcli binary #10575

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/kubespray-defaults/defaults/main/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ downloads:
enabled: "{{ kube_network_plugin == 'cilium' or cilium_deploy_additionally | default(false) | bool }}"
file: true
version: "{{ cilium_cli_version }}"
dest: "{{ local_release_dir }}/cilium-{{ cilium_cli_version }}-{{ image_arch }}"
dest: "{{ local_release_dir }}/cilium-{{ cilium_cli_version }}-{{ image_arch }}.tar.gz"
sha256: "{{ ciliumcli_binary_checksum }}"
url: "{{ ciliumcli_download_url }}"
unarchive: true
Expand Down
2 changes: 1 addition & 1 deletion roles/network_plugin/cilium/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

- name: Cilium | Copy Ciliumcli binary from download dir
copy:
src: "{{ downloads.ciliumcli.dest }}"
src: "{{ local_release_dir }}/cilium"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you prefer to replace the variable vanriant by the more hardcoded way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @tu1h

Does the downloads.ciliumcli.dest not work correctly ?

Other binary usually use the {{ downloads.XX.dest }} like : https://github.com/kubernetes-sigs/kubespray/blob/master/roles/container-engine/skopeo/tasks/main.yml#L30

Copy link
Member Author

@0ekk 0ekk Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ciliumcli_download_url: "https://github.com/cilium/cilium-cli/releases/download/{{ cilium_cli_version }}/cilium-linux-{{ image_arch }}.tar.gz"

skopeo_download_url: "https://github.com/lework/skopeo-binary/releases/download/{{ skopeo_version }}/skopeo-linux-{{ image_arch }}"

The downloading for cilium cli is the .tar.gz which is different from skopeo as a static executable ELF.

the downloads.ciliumcli.dest is still a .tar.gz file, that's describe at the beginning of the PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ciliumcli_download_url: "https://github.com/cilium/cilium-cli/releases/download/{{ cilium_cli_version }}/cilium-linux-{{ image_arch }}.tar.gz"

skopeo_download_url: "https://github.com/lework/skopeo-binary/releases/download/{{ skopeo_version }}/skopeo-linux-{{ image_arch }}"

The downloading for cilium cli is the .tar.gz which is different from skopeo as a static executable ELF.

the downloads.ciliumcli.dest is still a .tar.gz file, that's describe at the beginning of the PR.

I understand, the extraction of the tar-ball isn't referenced by downloads.ciliumcli.dest. So, it is necessary to point to the cilium cli binary directly.

dest: "{{ bin_dir }}/cilium"
mode: 0755
remote_src: yes