From 1d594df7304186c5128c2020104616228a555dec Mon Sep 17 00:00:00 2001 From: Felipe Martin Date: Sun, 25 Dec 2022 13:10:57 +0100 Subject: [PATCH 1/3] select version using sha256 instead of tag --- scripts/kind-config.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/kind-config.yaml b/scripts/kind-config.yaml index 199ed4982..e7551727c 100644 --- a/scripts/kind-config.yaml +++ b/scripts/kind-config.yaml @@ -1,11 +1,12 @@ +# v1.22.9 kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - - role: control-plane - image: kindest/node:v1.22.9 - - role: worker - image: kindest/node:v1.22.9 - - role: worker - image: kindest/node:v1.22.9 - - role: worker - image: kindest/node:v1.22.9 + - role: control-plane + image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c + - role: worker + image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c + - role: worker + image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c + - role: worker + image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c From 630a4668bddb4931e7259b207edbc2ca621be2af Mon Sep 17 00:00:00 2001 From: Felipe Martin Date: Mon, 26 Dec 2022 07:41:12 +0100 Subject: [PATCH 2/3] using different kind configuration per arch --- Makefile | 2 +- scripts/kind-config-amd64.yaml | 11 +++++++++++ scripts/kind-config-arm64.yaml | 11 +++++++++++ scripts/kind-config.yaml | 12 ------------ scripts/setup_kind.sh | 6 ++++++ 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 scripts/kind-config-amd64.yaml create mode 100644 scripts/kind-config-arm64.yaml delete mode 100644 scripts/kind-config.yaml diff --git a/Makefile b/Makefile index 4c831a031..83c7ed653 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ INSTALL_YAML=docs/mattermost-operator/mattermost-operator.yaml GO_INSTALL = ./scripts/go_install.sh KIND_CLUSTER ?= kind -KIND_CONFIG_FILE ?= kind-config.yaml +KIND_CONFIG_FILE ?= kind-config-amd64.yaml # Binaries. TOOLS_BIN_DIR := $(abspath bin) diff --git a/scripts/kind-config-amd64.yaml b/scripts/kind-config-amd64.yaml new file mode 100644 index 000000000..095e7391a --- /dev/null +++ b/scripts/kind-config-amd64.yaml @@ -0,0 +1,11 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + - role: worker + image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + - role: worker + image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + - role: worker + image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 diff --git a/scripts/kind-config-arm64.yaml b/scripts/kind-config-arm64.yaml new file mode 100644 index 000000000..7e16dfc87 --- /dev/null +++ b/scripts/kind-config-arm64.yaml @@ -0,0 +1,11 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + - role: worker + image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + - role: worker + image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + - role: worker + image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e diff --git a/scripts/kind-config.yaml b/scripts/kind-config.yaml deleted file mode 100644 index e7551727c..000000000 --- a/scripts/kind-config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# v1.22.9 -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - - role: worker - image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - - role: worker - image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - - role: worker - image: kindest/node@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c diff --git a/scripts/setup_kind.sh b/scripts/setup_kind.sh index 69ce34704..11d509518 100755 --- a/scripts/setup_kind.sh +++ b/scripts/setup_kind.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +# Ensure we use the proper kind configuration for arm64 (M1 Macs) +if [[ "$(uname -m)" == "arm64" ]]; then + echo "arm64 detected: using kind arm64 configuration" + KIND_CONFIG_FILE=kind-config-arm64.yaml +fi + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" if kind export kubeconfig --name "$KIND_CLUSTER" ; then From 936832db90bb32ed3976f3b8d509ad58628b65b9 Mon Sep 17 00:00:00 2001 From: Felipe Martin Date: Mon, 26 Dec 2022 09:08:36 +0100 Subject: [PATCH 3/3] Trying 1.22.9 --- scripts/kind-config-amd64.yaml | 8 ++++---- scripts/kind-config-arm64.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/kind-config-amd64.yaml b/scripts/kind-config-amd64.yaml index 095e7391a..41ba039bc 100644 --- a/scripts/kind-config-amd64.yaml +++ b/scripts/kind-config-amd64.yaml @@ -2,10 +2,10 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + image: kindest/node:v1.22.9@sha256:ad5b8404c4052781365a4e70bb7d17c5331e4177bd4a7cd214339316cd6193b6 - role: worker - image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + image: kindest/node:v1.22.9@sha256:ad5b8404c4052781365a4e70bb7d17c5331e4177bd4a7cd214339316cd6193b6 - role: worker - image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + image: kindest/node:v1.22.9@sha256:ad5b8404c4052781365a4e70bb7d17c5331e4177bd4a7cd214339316cd6193b6 - role: worker - image: kindest/node:v1.23.13@sha256:e7968cda1b4ff790d5b0b5b0c29bda0404cdb825fd939fe50fd5accc43e3a730 + image: kindest/node:v1.22.9@sha256:ad5b8404c4052781365a4e70bb7d17c5331e4177bd4a7cd214339316cd6193b6 diff --git a/scripts/kind-config-arm64.yaml b/scripts/kind-config-arm64.yaml index 7e16dfc87..91f5219ce 100644 --- a/scripts/kind-config-arm64.yaml +++ b/scripts/kind-config-arm64.yaml @@ -2,10 +2,10 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + image: kindest/node:v1.22.9@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - role: worker - image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + image: kindest/node:v1.22.9@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - role: worker - image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + image: kindest/node:v1.22.9@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c - role: worker - image: kindest/node:v1.23.13@sha256:b096a7d969f0751ac47afebb7eca52e397b464a76ab1a72d678b4f41d9392a0e + image: kindest/node:v1.22.9@sha256:302f7c1e5b7c7179146ee732be15b8b896cd602daa8e81a323910b8ab4ca790c