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

When using cilium CNI, install Cilium CLI #9436

Conversation

biqiangwu
Copy link
Contributor

@biqiangwu biqiangwu commented Oct 26, 2022

Signed-off-by: dcwbq biqiang.wu@daocloud.io

What type of PR is this?
/kind feature

What this PR does / why we need it:
ciliumcli provides rich functions. You must use this tool when you start clustermesh. When using cilium CNI, it is necessary to install it by default

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Just like calicoctl, it is installed by default

Does this PR introduce a user-facing change?:
None

When using cilium CNI, install Cilium CLI

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 26, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @dcwbq. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 26, 2022
Copy link
Member

@olivierlemasle olivierlemasle left a comment

Choose a reason for hiding this comment

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

CI is failing with 'cilium_cli_version' is undefined.

@@ -117,6 +117,7 @@ weave_version: 2.8.1
pod_infra_version: "3.7"

cilium_version: "v1.12.1"
calico_cli_version: "v0.12.4"
Copy link
Member

Choose a reason for hiding this comment

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

I guess it should be cilium_cli_version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

THX

@olivierlemasle
Copy link
Member

Just like calicoctl, it is installed by default

calicoctl is effectively used by Kubespray when calico is the network plugin:

shell: "{{ bin_dir }}/calicoctl.sh label node {{ inventory_hostname }} calico-group-id={{ calico_group_id }} --overwrite"

As cilium CLI is not, perhaps it should be made optional.

@biqiangwu
Copy link
Contributor Author

you can also do some status checks and connectivity tests via the cilium-cli (connectivity option is useful). For the original purpose, I wanted to try to enable clustermesh in kubesprayt, so I had to use ciliumcli

you can also do some status checks and connectivity tests via the cilium-cli (connectivity option is useful). For the original purpose, I wanted to try to enable clustermesh in kubesprayt, so I had to use ciliumcli

dest: "{{ local_release_dir }}/cilium"
sha256: "{{ ciliumcli_binary_checksum }}"
url: "{{ ciliumcli_download_url }}"
mirrors:
Copy link
Member

Choose a reason for hiding this comment

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

The cilium cli may not needs mirror.
Only one mirror URL is not reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cilium cli may not needs mirror. Only one mirror URL is not reasonable.

THX

url: "{{ ciliumcli_download_url }}"
mirrors:
- "{{ ciliumcli_download_url }}"
unarchive: false
Copy link
Member

Choose a reason for hiding this comment

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

The unarchive may be true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The unarchive may be true

THX

src: "{{ local_release_dir }}/cilium"
dest: "{{ bin_dir }}/cilium"
mode: 0755
remote_src: yes
Copy link
Member

Choose a reason for hiding this comment

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

there needs a new line

@@ -117,6 +117,7 @@ weave_version: 2.8.1
pod_infra_version: "3.7"

cilium_version: "v1.12.1"
cilium_cli_version: "v0.12.4"
Copy link
Member

Choose a reason for hiding this comment

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

Please update to latest cilium-cli version (v0.12.5).

Copy link
Member

@olivierlemasle olivierlemasle left a comment

Choose a reason for hiding this comment

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

Download fails with:

TASK [download : download_file | Validate mirrors] *******************************************************************************************************************************************
failed: [node1] (item=”https://github.com/cilium/cilium-cli/releases/download/v0.12.5/cilium-linux-amd64.tar.gz“) => {"ansible_loop_var": "mirror", "attempts": 4, "changed": false,
"elapsed": 0, "mirror": "”https://github.com/cilium/cilium-cli/releases/download/v0.12.5/cilium-linux-amd64.tar.gz“", "msg": "Status code was -1 and not [200]: Request failed: <urlopen error
unknown url type: ”https>", "redirected": false, "status": -1, "url": "”https://github.com/cilium/cilium-cli/releases/download/v0.12.5/cilium-linux-amd64.tar.gz“"}

Quotes are invalid, which cause Ansible to think that the URL is "”https://github.com/cilium/cilium-cli/releases/download/v0.12.5/cilium-linux-amd64.tar.gz“".

@@ -158,6 +159,7 @@ cni_download_url: "https://github.com/containernetworking/plugins/releases/downl
calicoctl_download_url: "https://github.com/projectcalico/calico/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
calicoctl_alternate_download_url: "https://github.com/projectcalico/calicoctl/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
calico_crds_download_url: "https://github.com/projectcalico/calico/archive/{{ calico_version }}.tar.gz"
ciliumcli_download_url: ”https://github.com/cilium/cilium-cli/releases/download/{{ cilium_cli_version }}/cilium-linux-{{ image_arch }}.tar.gz“
Copy link
Member

Choose a reason for hiding this comment

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

The quotes are wrong: you use ” “ where YAML quotes should be " ".

Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
@yankay
Copy link
Member

yankay commented Oct 27, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 27, 2022
@olivierlemasle
Copy link
Member

Thanks @dcwbq!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 27, 2022
@yankay
Copy link
Member

yankay commented Oct 28, 2022

Thanks @dcwbq!
/lgtm

@oomichi
Copy link
Contributor

oomichi commented Oct 30, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dcwbq, oomichi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2022
@k8s-ci-robot k8s-ci-robot merged commit 78624c5 into kubernetes-sigs:master Oct 31, 2022
@biqiangwu
Copy link
Contributor Author

/approve

THX

salifou pushed a commit to salifou/kubespray that referenced this pull request Nov 13, 2022
Signed-off-by: dcwbq <biqiang.wu@daocloud.io>

Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
@floryut floryut mentioned this pull request Jan 4, 2023
enneitex pushed a commit to enneitex/kubespray that referenced this pull request Jan 25, 2023
Signed-off-by: dcwbq <biqiang.wu@daocloud.io>

Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
HoKim98 pushed a commit to ulagbulag/kubespray that referenced this pull request Mar 8, 2023
Signed-off-by: dcwbq <biqiang.wu@daocloud.io>

Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
nolimitkun pushed a commit to nolimitkun/kubespray that referenced this pull request Mar 19, 2023
Signed-off-by: dcwbq <biqiang.wu@daocloud.io>

Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants