Skip to content

Commit

Permalink
review feedback - remove bazel code and references
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle committed Feb 10, 2025
1 parent 00dbf13 commit 636c64d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,4 @@ main() {
exit $res
}

main
main
30 changes: 7 additions & 23 deletions experiment/compatibility-versions/kind-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# script adapted from - https://gist.github.com/aojea/2c94034f8e86d08842e5916231eb3fe1

set -e
set -o pipefail

Expand All @@ -21,10 +23,6 @@ build_docker(){
make quick-release-images 1> /dev/null
}

build_bazel(){
bazel build //cmd/kubectl:kubectl //cmd/kubelet:kubelet //build:docker-artifacts
}

update_kubelet() {
for n in $NODES; do
# Backup previous kubelet
Expand Down Expand Up @@ -70,7 +68,7 @@ update_control_plane(){

usage()
{
echo "usage: kind_upgrade.sh [-n|--name <cluster_name>] [--cni <cni_image>] [-b|--build-mode docker|bazel]"
echo "usage: kind_upgrade.sh [-n|--name <cluster_name>] [--cni <cni_image>]"
echo " [--no-kproxy] [--no-control-plane] [--no-kubelet]"
echo ""
}
Expand All @@ -85,14 +83,6 @@ parse_args()
--cni-image ) shift
CNI_IMAGE=$1
;;
-b | --build-mode ) shift
if [ "$1" != "docker" ] && [ "$1" != "bazel" ]; then
echo "Invalid build mode: $1"
usage
exit 1
fi
BUILD_MODE=$1
;;
--no-kproxy ) UPDATE_KUBE_PROXY=false
;;
--no-kubelet ) UPDATE_KUBELET=false
Expand Down Expand Up @@ -137,15 +127,9 @@ CONTROL_PLANE_NODES=$(kind get nodes --name ${CLUSTER_NAME} | grep control)
WORKER_NODES=$(kind get nodes --name ${CLUSTER_NAME} | grep worker)

# Main
if [[ "$BUILD_MODE" == "docker" ]]; then
build_docker
IMAGES_PATH="${KUBE_ROOT}/_output/release-images/amd64"
KUBELET_BINARY=$(find ${KUBE_ROOT}/_output/ -type f -name kubelet)
else
build_bazel
IMAGES_PATH="${KUBE_ROOT}/bazel-kubernetes/bazel-out/k8-fastbuild/bin/build"
KUBELET_BINARY=$(find ${KUBE_ROOT}/bazel-kubernetes/ -type f -name kubelet)
fi
build_docker
IMAGES_PATH="${KUBE_ROOT}/_output/release-images/amd64"
KUBELET_BINARY=$(find ${KUBE_ROOT}/_output/ -type f -name kubelet)

if [[ "$UPDATE_CONTROL_PLANE" == "true" ]]; then
update_control_plane
Expand All @@ -170,4 +154,4 @@ if kubectl get nodes | grep NoReady; then
else
echo "KIND cluster $CLUSTER_NAME updated successfully with version $KUBE_GIT_VERSION"
exit 0
fi
fi

0 comments on commit 636c64d

Please sign in to comment.