From 047fae24d48ef3daacf38088bf9c629a592c1454 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Tue, 2 Apr 2024 10:05:41 +0300 Subject: [PATCH 1/9] Update to Go 1.22 for CI and builds --- .github/workflows/go.yml | 6 +++--- Dockerfile | 2 +- Makefile | 4 ++-- go.mod | 2 +- go.sum | 28 ++++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4065d5d..a05e624 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.19" + go-version: "1.22" - name: go fmt run: make fmt @@ -37,7 +37,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.19" + go-version: "1.22" - name: Run tests run: make test @@ -53,7 +53,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.19" + go-version: "1.22" - name: Try build run: make diff --git a/Dockerfile b/Dockerfile index 6483fc0..2f04135 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.22 as builder ARG arch diff --git a/Makefile b/Makefile index d6dc0ff..59fe44c 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ docker-manifest: docker-push ## Push docker multi-arch manifest. .PHONY: lint lint: golangci-lint ## Lint the codebase - $(GOLANGCI_LINT) run -v --go=1.19 --timeout 3m0s + $(GOLANGCI_LINT) run -v --go=1.22 --timeout 3m0s ##@ Deployment @@ -124,7 +124,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint .PHONY: golangci-lint golangci-lint: ## Download golangci-lint locally if necessary. - $(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1) + $(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2) CONTROLLER_GEN = $(shell pwd)/bin/controller-gen .PHONY: controller-gen diff --git a/go.mod b/go.mod index 1796a2e..02e3ccc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/cluster-api-control-plane-provider-microk8s -go 1.19 +go 1.21 require ( github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1 diff --git a/go.sum b/go.sum index ccbc643..b67a207 100644 --- a/go.sum +++ b/go.sum @@ -52,9 +52,13 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= +github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= +github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -63,7 +67,9 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed h1:ue9pVfIcP+QMEjfgo/Ez4ZjNZfonGgR6NgjMaJMu1Cg= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -73,6 +79,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1 h1:t/qqh9l44Ci+aZsk67k5kCv9xrLCD6Le4GfVr5hze8o= github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1/go.mod h1:tVGQG1UKgtBqnyO1a50LtnzlvWtYqcZbNmJ4SjEEMnI= @@ -89,11 +96,14 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coredns/caddy v1.1.0 h1:ezvsPrT/tA/7pYDBZxu0cT0VmWk75AfIaf6GSYCNMf0= +github.com/coredns/caddy v1.1.0/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= github.com/coredns/corefile-migration v1.0.17 h1:tNwh8+4WOANV6NjSljwgW7qViJfhvPUt1kosj4rR8yg= +github.com/coredns/corefile-migration v1.0.17/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= @@ -105,6 +115,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -182,6 +193,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/cel-go v0.12.5 h1:DmzaiSgoaqGCjtpPQWl26/gND+yRpim56H1jCVev6d8= +github.com/google/cel-go v0.12.5/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -218,6 +230,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= @@ -245,6 +258,7 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -253,8 +267,11 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -274,11 +291,13 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.3.0 h1:kUMoxMoQG3ogk/QWyKh3zibV7BKZ+xBpWil1cTylVqc= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI= github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -314,11 +333,13 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -352,6 +373,7 @@ go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= @@ -360,7 +382,9 @@ go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go4.org v0.0.0-20201209231011-d4a079459e60 h1:iqAGo78tVOJXELHQFRjR6TMwItrvXH4hrGJ32I/NFF8= go4.org/intern v0.0.0-20211027215823-ae77deb06f29 h1:UXLjNohABv4S58tHmeuIZDO6e3mHpW2Dx33gaNt03LE= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 h1:FyBZqvoA/jbNzuAWLQE2kG820zMAkcilx6BMjGbL/E4= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -636,6 +660,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de h1:5ANeKFmGdtiputJJYeUVg8nTGA/1bEirx4CgzcnPSx8= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -671,6 +696,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -700,6 +726,7 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= inet.af/netaddr v0.0.0-20220617031823-097006376321 h1:B4dC8ySKTQXasnjDTMsoCMf1sQG4WsMej0WXaHxunmU= +inet.af/netaddr v0.0.0-20220617031823-097006376321/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= k8s.io/apiextensions-apiserver v0.25.3 h1:bfI4KS31w2f9WM1KLGwnwuVlW3RSRPuIsfNF/3HzR0k= @@ -711,6 +738,7 @@ k8s.io/apiserver v0.25.3/go.mod h1:9bT47iM2fzRuhICJpM/RcQR9sqDDfZ7Yw60h0p3JW08= k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= k8s.io/cluster-bootstrap v0.25.3 h1:Rwi4SLbpsRYa4n+dPlvyl+VpZH6idHzH5izRQrrFW1s= +k8s.io/cluster-bootstrap v0.25.3/go.mod h1:C5NZX+WE7v/hEyUfMj2sjQfKHsOVAYLrSFLtPspVljM= k8s.io/component-base v0.25.3 h1:UrsxciGdrCY03ULT1h/S/gXFCOPnLhUVwSyx+hM/zq4= k8s.io/component-base v0.25.3/go.mod h1:WYoS8L+IlTZgU7rhAl5Ctpw0WdMxDfCC5dkxcEFa/TI= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= From 4dae6013d930a88e71398bde711a6e70a47b0aa6 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Tue, 2 Apr 2024 10:15:13 +0300 Subject: [PATCH 2/9] use go 1.21 --- .github/workflows/go.yml | 6 +++--- Dockerfile | 2 +- Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a05e624..43cc576 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.22" + go-version: "1.21" - name: go fmt run: make fmt @@ -37,7 +37,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.22" + go-version: "1.21" - name: Run tests run: make test @@ -53,7 +53,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: "1.22" + go-version: "1.21" - name: Try build run: make diff --git a/Dockerfile b/Dockerfile index 2f04135..9c1de47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 as builder +FROM golang:1.21 as builder ARG arch diff --git a/Makefile b/Makefile index 59fe44c..540f6d0 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ docker-manifest: docker-push ## Push docker multi-arch manifest. .PHONY: lint lint: golangci-lint ## Lint the codebase - $(GOLANGCI_LINT) run -v --go=1.22 --timeout 3m0s + $(GOLANGCI_LINT) run -v --go=1.21 --timeout 3m0s ##@ Deployment From bc18da81e1d251f09bf5a169001d59626c62b107 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Wed, 10 Apr 2024 14:28:32 +0300 Subject: [PATCH 3/9] do not ignore cluster port when generating kubeconfig --- controllers/configs.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/controllers/configs.go b/controllers/configs.go index 855ae49..a02fb6c 100644 --- a/controllers/configs.go +++ b/controllers/configs.go @@ -9,6 +9,7 @@ import ( "crypto/x509/pkix" "encoding/base64" "encoding/pem" + "fmt" "math/big" "net" "strings" @@ -37,7 +38,7 @@ apiVersion: v1 clusters: - cluster: certificate-authority-data: - server: https://:6443 + server: https://: name: microk8s-cluster contexts: - context: @@ -97,7 +98,7 @@ func (r *MicroK8sControlPlaneReconciler) kubeconfigForCluster(ctx context.Contex return nil, err } if !found && c.Spec.ControlPlaneEndpoint.IsValid() { - kubeconfig, err := r.genarateKubeconfig(ctx, cluster, c.Spec.ControlPlaneEndpoint.Host) + kubeconfig, err := r.generateKubeconfig(ctx, cluster, c.Spec.ControlPlaneEndpoint.Host, c.Spec.ControlPlaneEndpoint.Port) if err != nil { return nil, err } @@ -149,7 +150,7 @@ func (r *MicroK8sControlPlaneReconciler) kubeconfigForCluster(ctx context.Contex }, nil } -func (r *MicroK8sControlPlaneReconciler) genarateKubeconfig(ctx context.Context, cluster client.ObjectKey, host string) (kubeconfig *string, err error) { +func (r *MicroK8sControlPlaneReconciler) generateKubeconfig(ctx context.Context, cluster client.ObjectKey, host string, port int32) (kubeconfig *string, err error) { // Get the secret with the CA readCASecret := &corev1.Secret{} err = r.Client.Get(ctx, @@ -228,7 +229,13 @@ func (r *MicroK8sControlPlaneReconciler) genarateKubeconfig(ctx context.Context, return nil, err } + // handle unset port value + if port == 0 { + port = 6443 + } + config := strings.Replace(templateConfig, "", host, -1) + config = strings.Replace(config, "", fmt.Sprintf("%d", port), -1) config = strings.Replace(config, "", base64.StdEncoding.EncodeToString(readCASecret.Data["crt"]), -1) config = strings.Replace(config, "", base64.StdEncoding.EncodeToString(certPEM.Bytes()), -1) config = strings.Replace(config, "", base64.StdEncoding.EncodeToString(keyPEM.Bytes()), -1) From 5f4c15ca799cc5bb4b54550c00d6fbe05fa4d450 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Wed, 10 Apr 2024 19:28:19 +0300 Subject: [PATCH 4/9] use get instead of list to see if kubeconfig exists --- controllers/configs.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/controllers/configs.go b/controllers/configs.go index a02fb6c..84d8186 100644 --- a/controllers/configs.go +++ b/controllers/configs.go @@ -21,6 +21,7 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/storage/names" @@ -79,19 +80,19 @@ func (r *MicroK8sControlPlaneReconciler) kubeconfigForCluster(ctx context.Contex kubeconfigSecret := &corev1.Secret{} // See if the kubeconfig exists. If not create it. - secrets := &corev1.SecretList{} - err := r.Client.List(ctx, secrets) - if err != nil { + var found bool + err := r.Client.Get(ctx, types.NamespacedName{ + Namespace: cluster.Namespace, + Name: fmt.Sprintf("%s-kubeconfig", cluster.Name), + }, kubeconfigSecret) + switch { + case err == nil: + found = true + case apierrors.IsNotFound(err): + default: return nil, err } - found := false - for _, s := range secrets.Items { - if s.Name == cluster.Name+"-kubeconfig" { - found = true - } - } - c := &clusterv1.Cluster{} err = r.Client.Get(ctx, cluster, c) if err != nil { From b37b57618e6c02b02928f2a0c521d55daa042f28 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Thu, 11 Apr 2024 10:47:43 +0300 Subject: [PATCH 5/9] avoid unnecessary apiserver traffic --- controllers/configs.go | 58 +++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/controllers/configs.go b/controllers/configs.go index 84d8186..12e0776 100644 --- a/controllers/configs.go +++ b/controllers/configs.go @@ -77,62 +77,53 @@ func newDialer() *connrotation.Dialer { // kubeconfigForCluster will fetch a kubeconfig secret based on cluster name/namespace, // use it to create a clientset, and return it. func (r *MicroK8sControlPlaneReconciler) kubeconfigForCluster(ctx context.Context, cluster client.ObjectKey) (*kubernetesClient, error) { - kubeconfigSecret := &corev1.Secret{} + secret := &corev1.Secret{} // See if the kubeconfig exists. If not create it. - var found bool err := r.Client.Get(ctx, types.NamespacedName{ Namespace: cluster.Namespace, Name: fmt.Sprintf("%s-kubeconfig", cluster.Name), - }, kubeconfigSecret) + }, secret) switch { case err == nil: - found = true + return clientFromKubeconfig(secret.Data["value"]) case apierrors.IsNotFound(err): default: return nil, err } c := &clusterv1.Cluster{} - err = r.Client.Get(ctx, cluster, c) - if err != nil { + if err := r.Client.Get(ctx, cluster, c); err != nil { return nil, err } - if !found && c.Spec.ControlPlaneEndpoint.IsValid() { - kubeconfig, err := r.generateKubeconfig(ctx, cluster, c.Spec.ControlPlaneEndpoint.Host, c.Spec.ControlPlaneEndpoint.Port) - if err != nil { - return nil, err - } - configsecret := &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: cluster.Namespace, - Name: cluster.Name + "-kubeconfig", - Labels: map[string]string{ - clusterv1.ClusterLabelName: cluster.Name, - }, - }, - Data: map[string][]byte{ - "value": []byte(*kubeconfig), - }, - } - err = r.Client.Create(ctx, configsecret) - if err != nil { - return nil, err - } + if !c.Spec.ControlPlaneEndpoint.IsValid() { + return nil, fmt.Errorf("ControlPlaneEndpoint is not set yet, cannot generate kubeconfig yet") } - err = r.Client.Get(ctx, - types.NamespacedName{ + kubeconfig, err := r.generateKubeconfig(ctx, cluster, c.Spec.ControlPlaneEndpoint.Host, c.Spec.ControlPlaneEndpoint.Port) + if err != nil { + return nil, err + } + secret = &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ Namespace: cluster.Namespace, Name: cluster.Name + "-kubeconfig", + Labels: map[string]string{ + clusterv1.ClusterLabelName: cluster.Name, + }, }, - kubeconfigSecret, - ) - if err != nil { + Data: map[string][]byte{ + "value": []byte(*kubeconfig), + }, + } + if err := r.Client.Create(ctx, secret); err != nil { return nil, err } + return clientFromKubeconfig([]byte(*kubeconfig)) +} - config, err := clientcmd.RESTConfigFromKubeConfig(kubeconfigSecret.Data["value"]) +func clientFromKubeconfig(kubeconfigBytes []byte) (*kubernetesClient, error) { + config, err := clientcmd.RESTConfigFromKubeConfig(kubeconfigBytes) if err != nil { return nil, err } @@ -150,7 +141,6 @@ func (r *MicroK8sControlPlaneReconciler) kubeconfigForCluster(ctx context.Contex dialer: dialer, }, nil } - func (r *MicroK8sControlPlaneReconciler) generateKubeconfig(ctx context.Context, cluster client.ObjectKey, host string, port int32) (kubeconfig *string, err error) { // Get the secret with the CA readCASecret := &corev1.Secret{} From ccca70f73f9a37c0bad99bc049d8cfe9bc792c7a Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Wed, 17 Apr 2024 19:11:57 +0300 Subject: [PATCH 6/9] Update CLA check --- .github/workflows/cla-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml index d6db78e..2caa073 100644 --- a/.github/workflows/cla-check.yml +++ b/.github/workflows/cla-check.yml @@ -9,4 +9,4 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if CLA signed - uses: canonical/has-signed-canonical-cla@1.1.6 + uses: canonical/has-signed-canonical-cla@v1 From bb272e0733ec333663767101b700adb9163c3b34 Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Mon, 29 Jul 2024 14:56:57 -0400 Subject: [PATCH 7/9] add new disableDefaultCNI field this PR adds the field created in the v0.6.9-api tag of cluster-api-boostrap-provider microk8s. --- .../controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml b/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml index da51cfd..d19fd84 100644 --- a/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml +++ b/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml @@ -120,6 +120,9 @@ spec: - classic - strict type: string + disableDefaultCNI: + description: Whether or not to use the default CNI + type: boolean extraKubeletArgs: description: ExtraKubeletArgs is a list of extra arguments to add to the kubelet. From e4260ad66609629ed7e1eb519f7f8750b06703b9 Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Mon, 29 Jul 2024 20:26:00 -0400 Subject: [PATCH 8/9] bump bootstrap-provider version --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 02e3ccc..46e007b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/canonical/cluster-api-control-plane-provider-microk8s go 1.21 require ( - github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1 + github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.22.1 k8s.io/api v0.25.3 diff --git a/go.sum b/go.sum index b67a207..589f57b 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1 h1:t/qqh9l44Ci+aZsk67k5kCv9xrLCD6Le4GfVr5hze8o= -github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.0-api.1/go.mod h1:tVGQG1UKgtBqnyO1a50LtnzlvWtYqcZbNmJ4SjEEMnI= +github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api h1:wlS8dXLofkWI2rHlgr6U/iviwBXWPl93t/0064uV880= +github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api/go.mod h1:U/c+efAG83sqU+L502RgtfS8v7VOYCWEg3LNbJYFQz0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= From 205e66e0106ff4565910d93a8258d65acab16387 Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Wed, 31 Jul 2024 16:49:07 -0400 Subject: [PATCH 9/9] generate manifests follows https://github.com/canonical/cluster-api-bootstrap-provider-microk8s/releases/tag/v0.6.9 --- ...ontrolplane.cluster.x-k8s.io_microk8scontrolplanes.yaml | 4 ++++ control-plane-components.yaml | 7 +++++++ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml b/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml index d19fd84..e3ef83c 100644 --- a/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml +++ b/config/crd/bases/controlplane.cluster.x-k8s.io_microk8scontrolplanes.yaml @@ -216,6 +216,10 @@ spec: snapstoreProxyId: description: The snap store proxy ID type: string + snapstoreProxyScheme: + description: The snap store proxy domain's scheme, e.g. "http" + or "https" without "://" Defaults to "http". + type: string type: object type: object machineTemplate: diff --git a/control-plane-components.yaml b/control-plane-components.yaml index 71e070c..bfca787 100644 --- a/control-plane-components.yaml +++ b/control-plane-components.yaml @@ -130,6 +130,9 @@ spec: - classic - strict type: string + disableDefaultCNI: + description: Whether or not to use the default CNI + type: boolean extraKubeletArgs: description: ExtraKubeletArgs is a list of extra arguments to add to the kubelet. @@ -223,6 +226,10 @@ spec: snapstoreProxyId: description: The snap store proxy ID type: string + snapstoreProxyScheme: + description: The snap store proxy domain's scheme, e.g. "http" + or "https" without "://" Defaults to "http". + type: string type: object type: object machineTemplate: diff --git a/go.mod b/go.mod index 46e007b..ccb6f47 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/canonical/cluster-api-control-plane-provider-microk8s go 1.21 require ( - github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api + github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.22.1 k8s.io/api v0.25.3 diff --git a/go.sum b/go.sum index 589f57b..29e0a04 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api h1:wlS8dXLofkWI2rHlgr6U/iviwBXWPl93t/0064uV880= -github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9-api/go.mod h1:U/c+efAG83sqU+L502RgtfS8v7VOYCWEg3LNbJYFQz0= +github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9 h1:j9r6uqoyIchT9Yz/WEjib8vXY7sS+IRdiC6eYRD5ht4= +github.com/canonical/cluster-api-bootstrap-provider-microk8s v0.6.9/go.mod h1:U/c+efAG83sqU+L502RgtfS8v7VOYCWEg3LNbJYFQz0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=