diff --git a/build-scripts/hack/update-component-versions.py b/build-scripts/hack/update-component-versions.py index f9be084908..3f62ce5cf5 100755 --- a/build-scripts/hack/update-component-versions.py +++ b/build-scripts/hack/update-component-versions.py @@ -13,7 +13,6 @@ import argparse import logging import sys -import yaml from pathlib import Path import util @@ -45,6 +44,7 @@ METALLB_REPO = "https://metallb.github.io/metallb" METALLB_CHART_VERSION = "0.14.5" + def get_kubernetes_version() -> str: """Update Kubernetes version based on the specified marker file""" LOG.info("Checking latest Kubernetes version from %s", KUBERNETES_VERSION_MARKER) @@ -67,10 +67,12 @@ def get_cni_version() -> str: raise Exception(f"Failed to find cni dependency in {deps_file}") + def pull_contour_chart() -> None: LOG.info("Pulling Contour Helm chart from %s with version %s", CONTOUR_HELM_REPO, CONTOUR_CHART_VERSION) util.helm_pull("contour", CONTOUR_HELM_REPO, CONTOUR_CHART_VERSION, CHARTS) + def get_containerd_version() -> str: """Update containerd version using latest tag of specified branch""" containerd_repo = util.read_file(COMPONENTS / "containerd/repository") @@ -104,11 +106,6 @@ def pull_metallb_chart() -> None: util.helm_pull("metallb", METALLB_REPO, METALLB_CHART_VERSION, CHARTS) -def pull_metrics_server_chart() -> None: - LOG.info("Pulling Metrics Server chart @ %s", METRICS_CHART_VERSION) - util.helm_pull("metrics-server", METRICS_REPO, METRICS_CHART_VERSION, CHARTS) - - def update_component_versions(dry_run: bool): for component, get_version in [ ("kubernetes", get_kubernetes_version), diff --git a/build-scripts/hack/util.py b/build-scripts/hack/util.py index 0f8e3c57f9..05bc961eb6 100644 --- a/build-scripts/hack/util.py +++ b/build-scripts/hack/util.py @@ -3,7 +3,6 @@ import tempfile import subprocess import logging -import yaml from urllib.request import urlopen from pathlib import Path @@ -50,6 +49,7 @@ def read_file(path: Path) -> str: def read_url(url: str) -> str: return urlopen(url).read().decode().strip() + def helm_pull(chart, repo_url: str, version: str, destination: Path) -> None: parse_output( [ @@ -66,4 +66,3 @@ def helm_pull(chart, repo_url: str, version: str, destination: Path) -> None: ) LOG.info("Pulled helm chart %s @ %s as %s to %s", chart, version, repo_url, destination) -