From 28655a3614fa9386f966e7bc6bd2945adfde9e96 Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Wed, 9 Sep 2020 19:55:05 -0700 Subject: [PATCH 1/2] update kubernetes from 1.18.4 to 1.18.8 Signed-off-by: Brian Downs --- Dockerfile | 4 ++-- pkg/images/images.go | 2 +- scripts/version.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 991f1b396f..0873af24e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,7 +69,7 @@ RUN echo ${CACHEBUST}>/dev/null RUN CHART_VERSION="v3.13.3" CHART_FILE=/charts/rke2-canal-chart.yml CHART_BOOTSTRAP=true /charts/build-chart.sh RUN CHART_VERSION="1.10.101" CHART_FILE=/charts/rke2-coredns-chart.yml CHART_BOOTSTRAP=true /charts/build-chart.sh RUN CHART_VERSION="1.36.300" CHART_FILE=/charts/rke2-ingress-nginx-chart.yml CHART_BOOTSTRAP=false /charts/build-chart.sh -RUN CHART_VERSION="v1.18.4" CHART_FILE=/charts/rke2-kube-proxy-chart.yml CHART_BOOTSTRAP=true /charts/build-chart.sh +RUN CHART_VERSION="v1.18.8" CHART_FILE=/charts/rke2-kube-proxy-chart.yml CHART_BOOTSTRAP=true /charts/build-chart.sh RUN CHART_VERSION="2.11.100" CHART_FILE=/charts/rke2-metrics-server-chart.yml CHART_BOOTSTRAP=false /charts/build-chart.sh RUN rm -vf /charts/*.sh /charts/*.md @@ -77,7 +77,7 @@ RUN rm -vf /charts/*.sh /charts/*.md # This image includes any host level programs that we might need. All binaries # must be placed in bin/ of the file image and subdirectories of bin/ will be flattened during installation. # This means bin/foo/bar will become bin/bar when rke2 installs this to the host -FROM rancher/k3s:v1.18.4-k3s1 AS k3s +FROM rancher/k3s:v1.18.8-k3s1 AS k3s FROM rancher/containerd:v1.3.6-k3s2 AS containerd FROM rancher/crictl:v1.18.0 AS crictl diff --git a/pkg/images/images.go b/pkg/images/images.go index aa382f94fa..54b09df6de 100644 --- a/pkg/images/images.go +++ b/pkg/images/images.go @@ -19,7 +19,7 @@ var ( runtime = os.Getenv("RKE2_RUNTIME_IMAGE") etcd = os.Getenv("RKE2_ETCD_IMAGE") - KubernetesVersion = "v1.18.4" // make sure this matches what is in the scripts/version.sh script + KubernetesVersion = "v1.18.8" // make sure this matches what is in the scripts/version.sh script PauseVersion = "3.2" // make sure this matches what is in the scripts/build-images script EtcdVersion = "v3.4.13" // make sure this matches what is in the scripts/build-images script RuntimeImageName = "rke2-runtime" diff --git a/scripts/version.sh b/scripts/version.sh index a1e4331bdc..f6a8527d2b 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -30,7 +30,7 @@ REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; PLATFORM=${GOOS}-${GOARCH} RELEASE=${PROG}.${PLATFORM} # hardcode k8s version unless its set specifically -KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.18.4} +KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.18.8} if [ -d .git ]; then if [ -z "$GIT_TAG" ]; then From 1361a32cf94bb973ca1315eadccbe84420ca00b2 Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Thu, 10 Sep 2020 11:04:20 -0700 Subject: [PATCH 2/2] per @dweomer, update build-chart script to fail correctly if specified version does not exist Signed-off-by: Brian Downs --- charts/build-chart.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/build-chart.sh b/charts/build-chart.sh index ebde514e5f..ee9392a0cf 100755 --- a/charts/build-chart.sh +++ b/charts/build-chart.sh @@ -1,15 +1,20 @@ #!/usr/bin/env bash + set -eux -o pipefail + : "${CHART_FILE?required}" +: "${CHART_NAME:="$(basename "${CHART_FILE%%-chart.yml}")"}" +: "${CHART_URL:="${CHART_REPO:="https://rke2-charts.rancher.io"}/assets/${CHART_NAME}/${CHART_NAME}-${CHART_VERSION:="v0.0.0"}.tgz"}" +curl -fsSL "${CHART_URL}" -o "${CHART_TMP:=$(mktemp)}" cat <<-EOF > "${CHART_FILE}" apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: - name: "${CHART_NAME:="$(basename "${CHART_FILE%%-chart.yml}")"}" + name: "${CHART_NAME}" namespace: "${CHART_NAMESPACE:="kube-system"}" annotations: - helm.cattle.io/chart-url: "${CHART_URL:="${CHART_REPO:="https://rke2-charts.rancher.io"}/assets/${CHART_NAME}/${CHART_NAME}-${CHART_VERSION:="v0.0.0"}.tgz"}" + helm.cattle.io/chart-url: "${CHART_URL}" spec: bootstrap: ${CHART_BOOTSTRAP:=false} - chartContent: $(curl -fsSL "${CHART_URL}" | base64 -w0) + chartContent: $(base64 -w0 < "${CHART_TMP}") EOF