From 8a7693a443a4a821f1ae5a50bbb4e3f29b5ea9fc Mon Sep 17 00:00:00 2001 From: timflannagan Date: Thu, 19 Mar 2026 16:04:55 -0400 Subject: [PATCH] Makefile: Move Go tools into tools module We moved executable Go tooling into a dedicated tools module and wired make targets and scripts to run tools through go tool with a modfile override. The lint workflow now runs our make targets directly and no longer depends on the third-party golangci action. This also committed formatter changes from golangci-lint --fix so the tree matches the new lint behavior. --- .github/workflows/lint.yml | 5 +- Makefile | 43 +- go.mod | 14 +- go.sum | 16 - internal/cli/agent/tui/mcp_wizard.go | 4 +- .../cli/mcp/frameworks/python/generator.go | 4 +- scripts/kind/setup-kind.sh | 12 +- tools/go.mod | 229 ++++ tools/go.sum | 1016 +++++++++++++++++ 9 files changed, 1292 insertions(+), 51 deletions(-) create mode 100644 tools/go.mod create mode 100644 tools/go.sum diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 24106b1b..c0ead921 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,9 +19,8 @@ jobs: with: go-version-file: "go.mod" - - uses: golangci/golangci-lint-action@v7 - with: - version: v2.8.0 + - name: Lint Go + run: make lint lint-ui: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 56d64666..12f71e43 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,16 @@ HELM_PLUGIN_UNITTEST_VERSION ?= v1.0.3 # It is not entirely clear as to what is causing the issue exactly because the error message # is not completely clear is it the plugin that does not support the flag or is it helm or both? HELM_PLUGIN_INSTALL_FLAGS ?= --verify=false + +# Go/tooling settings +GO ?= go +TOOLS_DIR ?= tools +TOOLS_MODFILE ?= $(TOOLS_DIR)/go.mod +GO_TOOL ?= $(GO) tool -modfile=$(TOOLS_MODFILE) +KIND ?= $(GO_TOOL) kind +GOTESTSUM ?= $(GO_TOOL) gotestsum +GOLANGCI_LINT ?= $(GO_TOOL) golangci-lint +GOLANGCI_LINT_ARGS ?= --fix # Help # `make help` self-documents targets annotated with `##`. .PHONY: help @@ -159,7 +169,6 @@ run: run-k8s # Start local development environment (default: k8s) down: daemon-stop delete-kind-cluster ## Stop the local development environment @echo "agentregistry stopped" -GOTESTSUM ?= go tool gotestsum ARCTL ?= ./bin/arctl # Manage local daemon lifecycle via CLI helpers. @@ -311,20 +320,21 @@ endif .PHONY: create-kind-cluster create-kind-cluster: local-registry ## Create a local Kind cluster with MetalLB (skips cluster creation if already exists, always runs post-create steps) - @if go tool kind get clusters 2>/dev/null | grep -qx "$(KIND_CLUSTER_NAME)"; then \ + @if $(KIND) get clusters 2>/dev/null | grep -qx "$(KIND_CLUSTER_NAME)"; then \ echo "Kind cluster '$(KIND_CLUSTER_NAME)' already exists, skipping cluster creation"; \ else \ KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) \ KIND_IMAGE_VERSION=$(KIND_IMAGE_VERSION) \ REG_NAME=kind-registry \ REG_PORT=5001 \ + KIND='$(KIND)' \ bash ./scripts/kind/setup-kind.sh; \ fi KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) bash ./scripts/kind/setup-metallb.sh .PHONY: delete-kind-cluster delete-kind-cluster: ## Delete the local Kind cluster (no-op if it does not exist) - @go tool kind delete cluster --name $(KIND_CLUSTER_NAME) 2>/dev/null || true + @$(KIND) delete cluster --name $(KIND_CLUSTER_NAME) 2>/dev/null || true .PHONY: prune-kind-cluster prune-kind-cluster: ## Prune dangling container images from the Kind control-plane node @@ -419,7 +429,7 @@ setup-kind-cluster: create-kind-cluster install-postgresql install-kagent instal .PHONY: dump-kind-state dump-kind-state: ## Dump Kind cluster state for debugging (pods, events, kagent logs) @echo "=== Kind clusters ===" - @go tool kind get clusters 2>/dev/null || true + @$(KIND) get clusters 2>/dev/null || true @echo "" @echo "=== Pods ===" @kubectl get pods -A --context $(KIND_CLUSTER_CONTEXT) 2>/dev/null || true @@ -473,9 +483,6 @@ release-cli: bin/arctl-darwin-amd64.sha256 release-cli: bin/arctl-darwin-arm64.sha256 release-cli: bin/arctl-windows-amd64.exe.sha256 -GOLANGCI_LINT ?= go tool golangci-lint -GOLANGCI_LINT_ARGS ?= --fix - .PHONY: lint lint: ## Run golangci-lint linter $(GOLANGCI_LINT) run $(GOLANGCI_LINT_ARGS) @@ -489,12 +496,26 @@ verify: mod-tidy gen-client ## Run all verification checks git diff --exit-code .PHONY: mod-tidy -mod-tidy: ## Run go mod tidy - go mod tidy +mod-tidy: mod-tidy-root mod-tidy-tools ## Run go mod tidy for root and tools modules + +.PHONY: mod-tidy-root +mod-tidy-root: + $(GO) mod tidy + +.PHONY: mod-tidy-tools +mod-tidy-tools: + $(GO) -C $(TOOLS_DIR) mod tidy .PHONY: mod-download -mod-download: ## Run go mod download - go mod download +mod-download: mod-download-root mod-download-tools ## Run go mod download for root and tools modules + +.PHONY: mod-download-root +mod-download-root: + $(GO) mod download + +.PHONY: mod-download-tools +mod-download-tools: + $(GO) -C $(TOOLS_DIR) mod download all # ────────────────────────────────────────────────────────────────────────────── # Helm / Chart targets diff --git a/go.mod b/go.mod index 8df8c666..2d4e597e 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,6 @@ require ( ) require ( - al.essio.dev/pkg/shellescape v1.5.1 // indirect cel.dev/expr v0.24.0 // indirect cloud.google.com/go v0.121.2 // indirect cloud.google.com/go/auth v0.16.5 // indirect @@ -68,7 +67,6 @@ require ( github.com/atotto/clipboard v0.1.4 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bitfield/gotestdox v0.2.2 // indirect github.com/bombsimon/logrusr/v2 v2.0.1 // indirect github.com/bradleyfalzon/ghinstallation/v2 v2.8.0 // indirect github.com/caarlos0/env/v6 v6.10.0 // indirect @@ -89,7 +87,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/dnephin/pflag v1.0.7 // indirect github.com/docker/cli v28.2.2+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.3 // indirect @@ -105,7 +102,6 @@ require ( github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/frankban/quicktest v1.14.6 // indirect - github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect @@ -130,7 +126,6 @@ require ( github.com/google/jsonschema-go v0.4.2 // indirect github.com/google/osv-scanner v1.4.1 // indirect github.com/google/s2a-go v0.1.9 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/google/wire v0.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect @@ -178,7 +173,6 @@ require ( github.com/opencontainers/image-spec v1.1.1 // indirect github.com/owenrumney/go-sarif/v2 v2.2.2 // indirect github.com/package-url/packageurl-go v0.1.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect @@ -241,19 +235,13 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gotest.tools/gotestsum v1.13.0 // indirect + gotest.tools/v3 v3.5.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect mvdan.cc/sh/v3 v3.7.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect - sigs.k8s.io/kind v0.31.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/release-utils v0.6.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) - -tool ( - gotest.tools/gotestsum - sigs.k8s.io/kind -) diff --git a/go.sum b/go.sum index 79dcbaa7..002db411 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= -al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -105,8 +103,6 @@ github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3v github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE= -github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY= github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4mvaOAM= github.com/bombsimon/logrusr/v2 v2.0.1/go.mod h1:ByVAX+vHdLGAfdroiMg6q0zgq2FODY2lc5YJvzmOJio= github.com/bradleyfalzon/ghinstallation/v2 v2.8.0 h1:yUmoVv70H3J4UOqxqsee39+KlXxNEDfTbAp8c/qULKk= @@ -175,8 +171,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvw github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= -github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A= github.com/docker/cli v28.2.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= @@ -217,8 +211,6 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= -github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= @@ -321,8 +313,6 @@ github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21 github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -464,8 +454,6 @@ github.com/owenrumney/go-sarif/v2 v2.2.2 h1:x2acaiiAW9hu+78wbEYBRGLk5nRtHmkv7HeU github.com/owenrumney/go-sarif/v2 v2.2.2/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w= github.com/package-url/packageurl-go v0.1.1 h1:KTRE0bK3sKbFKAk3yy63DpeskU7Cvs/x/Da5l+RtzyU= github.com/package-url/packageurl-go v0.1.1/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -791,8 +779,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/gotestsum v1.13.0 h1:+Lh454O9mu9AMG1APV4o0y7oDYKyik/3kBOiCqiEpRo= -gotest.tools/gotestsum v1.13.0/go.mod h1:7f0NS5hFb0dWr4NtcsAsF0y1kzjEFfAil0HiBQJE03Q= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -817,8 +803,6 @@ sigs.k8s.io/controller-runtime v0.23.0 h1:Ubi7klJWiwEWqDY+odSVZiFA0aDSevOCXpa38y sigs.k8s.io/controller-runtime v0.23.0/go.mod h1:DBOIr9NsprUqCZ1ZhsuJ0wAnQSIxY/C6VjZbmLgw0j0= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kind v0.31.0 h1:UcT4nzm+YM7YEbqiAKECk+b6dsvc/HRZZu9U0FolL1g= -sigs.k8s.io/kind v0.31.0/go.mod h1:FSqriGaoTPruiXWfRnUXNykF8r2t+fHtK0P0m1AbGF8= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/release-utils v0.6.0 h1:wJDuzWJqPH4a5FAxAXE2aBvbB6UMIW7iYMhsKnIMQkA= diff --git a/internal/cli/agent/tui/mcp_wizard.go b/internal/cli/agent/tui/mcp_wizard.go index 590950f2..4303e9dc 100644 --- a/internal/cli/agent/tui/mcp_wizard.go +++ b/internal/cli/agent/tui/mcp_wizard.go @@ -1353,7 +1353,7 @@ func (w *McpServerWizard) renderRegistryEnvStep() string { displayValue = v[:7] + "***" } } - sb.WriteString(fmt.Sprintf(" • %s=%s\n", k, displayValue)) + fmt.Fprintf(&sb, " • %s=%s\n", k, displayValue) } sb.WriteString("\n") } @@ -1391,7 +1391,7 @@ func (w *McpServerWizard) renderHeadersStep() string { displayValue = v[:7] + "***" } } - sb.WriteString(fmt.Sprintf(" • %s: %s\n", k, displayValue)) + fmt.Fprintf(&sb, " • %s: %s\n", k, displayValue) } sb.WriteString("\n") } diff --git a/internal/cli/mcp/frameworks/python/generator.go b/internal/cli/mcp/frameworks/python/generator.go index 8a397bce..69dc9f2b 100644 --- a/internal/cli/mcp/frameworks/python/generator.go +++ b/internal/cli/mcp/frameworks/python/generator.go @@ -128,7 +128,7 @@ Do not edit manually - it will be overwritten when tools are loaded. // Add import statements for _, tool := range tools { - content.WriteString(fmt.Sprintf("from .%s import %s\n", tool, tool)) + fmt.Fprintf(&content, "from .%s import %s\n", tool, tool) } // Add empty line @@ -140,7 +140,7 @@ Do not edit manually - it will be overwritten when tools are loaded. if i > 0 { content.WriteString(", ") } - content.WriteString(fmt.Sprintf(`"%s"`, tool)) + fmt.Fprintf(&content, `"%s"`, tool) } content.WriteString("]\n") diff --git a/scripts/kind/setup-kind.sh b/scripts/kind/setup-kind.sh index 7acca701..2f9fdfa5 100755 --- a/scripts/kind/setup-kind.sh +++ b/scripts/kind/setup-kind.sh @@ -4,9 +4,13 @@ set -o errexit set -o pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" -# Use kind via go tool directives (go.mod) so no separate install step is needed. -KIND=(go tool kind) +# Use kind via go tool directives (tools/go.mod) so no separate install step is needed. +# Override KIND to use a different binary or command. +TOOLS_MODFILE="${TOOLS_MODFILE:-${REPO_ROOT}/tools/go.mod}" +KIND="${KIND:-go tool -modfile=${TOOLS_MODFILE} kind}" +read -r -a KIND_TOOL <<<"${KIND}" KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-agentregistry} KIND_IMAGE_VERSION=${KIND_IMAGE_VERSION:-1.34.0} @@ -50,7 +54,7 @@ if [ "$(uname -s)" = "Linux" ]; then "${TMP_CONFIG}" fi -"${KIND[@]}" create cluster --name "${KIND_CLUSTER_NAME}" \ +"${KIND_TOOL[@]}" create cluster --name "${KIND_CLUSTER_NAME}" \ --config "${TMP_CONFIG}" \ --image="kindest/node:v${KIND_IMAGE_VERSION}" @@ -85,7 +89,7 @@ fi # We want a consistent name that works from both ends, so we tell containerd to # alias localhost:${REG_PORT} to the registry container when pulling images REGISTRY_DIR="/etc/containerd/certs.d/localhost:${REG_PORT}" -for node in $("${KIND[@]}" get nodes --name "${KIND_CLUSTER_NAME}"); do +for node in $("${KIND_TOOL[@]}" get nodes --name "${KIND_CLUSTER_NAME}"); do docker exec "${node}" mkdir -p "${REGISTRY_DIR}" cat <