Skip to content

Commit

Permalink
Merge pull request #8364 from projectcalico/calicoctl-path
Browse files Browse the repository at this point in the history
Move calicoctl binary to standard executable search path
  • Loading branch information
hjiawei authored Dec 21, 2023
2 parents 89e2691 + e42b962 commit 2bf0d93
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions calicoctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FROM scratch as source
ARG TARGETARCH

COPY LICENSE /licenses/LICENSE
COPY bin/calicoctl-linux-${TARGETARCH} /calicoctl
COPY bin/calicoctl-linux-${TARGETARCH} /usr/bin/calicoctl

FROM calico/base

Expand All @@ -35,4 +35,4 @@ ENV CALICO_CTL_CONTAINER=TRUE

COPY --from=source / /

ENTRYPOINT ["/calicoctl"]
ENTRYPOINT ["/usr/bin/calicoctl"]
2 changes: 1 addition & 1 deletion manifests/calicoctl-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: calicoctl
image: calico/ctl:master
command:
- /calicoctl
- calicoctl
args:
- version
- --poll=1m
Expand Down
2 changes: 1 addition & 1 deletion manifests/calicoctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
- name: calicoctl
image: calico/ctl:master
command:
- /calicoctl
- calicoctl
args:
- version
- --poll=1m
Expand Down
4 changes: 2 additions & 2 deletions node/tests/k8st/infra/calicoctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ spec:
serviceAccountName: calicoctl
containers:
- name: calicoctl
image: docker.io/calico/ctl:latest-amd64
image: calico/ctl:master
command:
- /calicoctl
- calicoctl
args:
- version
- --poll=1m
Expand Down
2 changes: 1 addition & 1 deletion node/tests/k8st/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def kubectl(args, logerr=True, allow_fail=False, allow_codes=[], timeout=0, retu
returnerr=returnerr)

def calicoctl(args, allow_fail=False):
return kubectl("exec -i -n kube-system calicoctl -- /calicoctl --allow-version-mismatch " + args,
return kubectl("exec -i -n kube-system calicoctl -- calicoctl --allow-version-mismatch " + args,
allow_fail=allow_fail)


Expand Down
6 changes: 3 additions & 3 deletions process/testing/winfv/create_kubeadm_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ echo "Calico is running."
kubectl taint nodes --all node-role.kubernetes.io/master-

# strict affinity
curl -O -L https://github.com/projectcalico/calicoctl/releases/download/v3.17.1/calicoctl
curl -sSf -L --retry 5 https://github.com/projectcalico/calico/releases/download/v3.27.0/calicoctl-linux-amd64 -o calicoctl
chmod +x calicoctl
export CALICO_DATASTORE_TYPE=kubernetes
export CALICO_KUBECONFIG=~/.kube/config
./calicoctl get node
./calicoctl ipam configure --strictaffinity=true
./calicoctl --allow-version-mismatch get node
./calicoctl --allow-version-mismatch ipam configure --strictaffinity=true
echo "ipam configured"

pushd $ROOT/infra
Expand Down

0 comments on commit 2bf0d93

Please sign in to comment.