From a3a9ba9359f628bb27b788c7e0d35e08f3877862 Mon Sep 17 00:00:00 2001 From: Pedro Coutinho Date: Thu, 21 Dec 2023 08:50:35 -0800 Subject: [PATCH] [calico-8364] Update calicoctl binary command Remove the leading '/' from the 'calicoctl' command when running it as a pod, due to the calicoctl container being updated in https://github.com/projectcalico/calico/pull/8364 --- calico-enterprise/operations/clis/calicoctl/install.mdx | 4 ++-- calico/_includes/components/HostEndpointsUpgrade.js | 4 ++-- calico/operations/calicoctl/install.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/calico-enterprise/operations/clis/calicoctl/install.mdx b/calico-enterprise/operations/clis/calicoctl/install.mdx index e28ec5631b..c0a77252eb 100644 --- a/calico-enterprise/operations/clis/calicoctl/install.mdx +++ b/calico-enterprise/operations/clis/calicoctl/install.mdx @@ -302,7 +302,7 @@ You can also [view the YAML in a new tab]({{filesUrl}}/manifests/calicoctl.yaml) You can then run commands using kubectl as shown below. ```bash -kubectl exec -ti -n kube-system calicoctl -- /calicoctl get profiles -o wide +kubectl exec -ti -n kube-system calicoctl -- calicoctl get profiles -o wide ``` An example response follows. @@ -316,7 +316,7 @@ kns.kube-system kns.kube-system We recommend setting an alias as follows. ```bash -alias calicoctl="kubectl exec -i -n kube-system calicoctl -- /calicoctl" +alias calicoctl="kubectl exec -i -n kube-system calicoctl -- calicoctl" ``` :::note diff --git a/calico/_includes/components/HostEndpointsUpgrade.js b/calico/_includes/components/HostEndpointsUpgrade.js index ebacc53bb8..79c5c06c01 100644 --- a/calico/_includes/components/HostEndpointsUpgrade.js +++ b/calico/_includes/components/HostEndpointsUpgrade.js @@ -45,8 +45,8 @@ export default function HostEndpointsUpgrade(props) { calicoctl get hep -owide | grep '*' | awk '"{'print $1'}"' \
{props.orch === 'OpenShift' - ? '| xargs -I {} oc exec -i -n kube-system calicoctl -- /calicoctl label hostendpoint {} host-endpoint-upgrade=' - : '| xargs -I {} kubectl exec -i -n kube-system calicoctl -- /calicoctl label hostendpoint {} host-endpoint-upgrade= '} + ? '| xargs -I {} oc exec -i -n kube-system calicoctl -- calicoctl label hostendpoint {} host-endpoint-upgrade=' + : '| xargs -I {} kubectl exec -i -n kube-system calicoctl -- calicoctl label hostendpoint {} host-endpoint-upgrade= '}

Now that the nodes with an all-interfaces host endpoint are labeled with host-endpoint-upgrade, diff --git a/calico/operations/calicoctl/install.mdx b/calico/operations/calicoctl/install.mdx index da95bebbab..e8582a4d9b 100644 --- a/calico/operations/calicoctl/install.mdx +++ b/calico/operations/calicoctl/install.mdx @@ -439,7 +439,7 @@ Use the YAML that matches your datastore type to deploy the `calicoctl` containe You can then run commands using kubectl as shown below. ```bash -kubectl exec -ti -n kube-system calicoctl -- /calicoctl get profiles -o wide +kubectl exec -ti -n kube-system calicoctl -- calicoctl get profiles -o wide ``` An example response follows. @@ -453,7 +453,7 @@ kns.kube-system kns.kube-system We recommend setting an alias as follows. ```bash -alias calicoctl="kubectl exec -i -n kube-system calicoctl -- /calicoctl" +alias calicoctl="kubectl exec -i -n kube-system calicoctl -- calicoctl" ``` :::note