diff --git a/UPSTREAM_PROJECTS.yaml b/UPSTREAM_PROJECTS.yaml index b5a5beb6ee..5bad800a3f 100644 --- a/UPSTREAM_PROJECTS.yaml +++ b/UPSTREAM_PROJECTS.yaml @@ -181,7 +181,7 @@ projects: repos: - name: cluster-api versions: - - tag: v1.6.4 + - tag: v1.7.1 go_version: "1.21" - name: cluster-api-provider-cloudstack versions: diff --git a/projects/kubernetes-sigs/cluster-api/ATTRIBUTION.txt b/projects/kubernetes-sigs/cluster-api/ATTRIBUTION.txt index 18c22dcfff..3d58dfb252 100644 --- a/projects/kubernetes-sigs/cluster-api/ATTRIBUTION.txt +++ b/projects/kubernetes-sigs/cluster-api/ATTRIBUTION.txt @@ -11,28 +11,25 @@ https://github.com/coreos/go-semver ** github.com/coreos/go-systemd/unit; version v0.0.0-20191104093116-d3cd4ed1dbcf -- https://github.com/coreos/go-systemd -** github.com/coreos/go-systemd/v22; version v22.5.0 -- +** github.com/coreos/go-systemd/v22/journal; version v22.5.0 -- https://github.com/coreos/go-systemd/v22 ** github.com/distribution/reference; version v0.5.0 -- https://github.com/distribution/reference -** github.com/docker/distribution/reference; version v2.8.3+incompatible -- -https://github.com/distribution/distribution - ** github.com/flatcar/container-linux-config-transpiler; version v0.9.4 -- https://github.com/flatcar/container-linux-config-transpiler ** github.com/flatcar/ignition/config; version v0.36.2 -- https://github.com/flatcar/ignition -** github.com/go-logr/logr; version v1.3.0 -- +** github.com/go-logr/logr; version v1.4.1 -- https://github.com/go-logr/logr ** github.com/go-logr/stdr; version v1.2.2 -- https://github.com/go-logr/stdr -** github.com/go-logr/zapr; version v1.2.4 -- +** github.com/go-logr/zapr; version v1.3.0 -- https://github.com/go-logr/zapr ** github.com/go-openapi/jsonpointer; version v0.19.6 -- @@ -50,7 +47,7 @@ https://github.com/golang/groupcache ** github.com/google/btree; version v1.0.1 -- https://github.com/google/btree -** github.com/google/cel-go; version v0.16.1 -- +** github.com/google/cel-go; version v0.17.7 -- https://github.com/google/cel-go ** github.com/google/gnostic-models; version v0.6.8 -- @@ -62,17 +59,14 @@ https://github.com/google/gofuzz ** github.com/google/shlex; version v0.0.0-20191202100458-e7afc7fbc510 -- https://github.com/google/shlex -** github.com/grpc-ecosystem/go-grpc-prometheus; version v1.2.0 -- -https://github.com/grpc-ecosystem/go-grpc-prometheus - ** github.com/jonboulle/clockwork; version v0.2.2 -- https://github.com/jonboulle/clockwork ** github.com/Masterminds/goutils; version v1.1.1 -- https://github.com/Masterminds/goutils -** github.com/matttproud/golang_protobuf_extensions/pbutil; version v1.0.4 -- -https://github.com/matttproud/golang_protobuf_extensions +** github.com/matttproud/golang_protobuf_extensions/v2/pbutil; version v2.0.0 -- +https://github.com/matttproud/golang_protobuf_extensions/v2 ** github.com/moby/spdystream; version v0.2.0 -- https://github.com/moby/spdystream @@ -92,36 +86,33 @@ https://github.com/nytimes/gziphandler ** github.com/opencontainers/go-digest; version v1.0.0 -- https://github.com/opencontainers/go-digest -** github.com/prometheus/client_golang/prometheus; version v1.17.0 -- +** github.com/prometheus/client_golang/prometheus; version v1.18.0 -- https://github.com/prometheus/client_golang -** github.com/prometheus/client_model/go; version v0.4.1-0.20230718164431-9a2bf3000d16 -- +** github.com/prometheus/client_model/go; version v0.5.0 -- https://github.com/prometheus/client_model -** github.com/prometheus/common; version v0.44.0 -- +** github.com/prometheus/common; version v0.45.0 -- https://github.com/prometheus/common -** github.com/prometheus/procfs; version v0.11.1 -- +** github.com/prometheus/procfs; version v0.12.0 -- https://github.com/prometheus/procfs -** github.com/spf13/afero; version v1.10.0 -- +** github.com/spf13/afero; version v1.11.0 -- https://github.com/spf13/afero ** github.com/spf13/cobra; version v1.8.0 -- https://github.com/spf13/cobra -** go.etcd.io/etcd/api/v3; version v3.5.10 -- +** go.etcd.io/etcd/api/v3; version v3.5.13 -- https://github.com/etcd-io/etcd -** go.etcd.io/etcd/client/pkg/v3; version v3.5.10 -- +** go.etcd.io/etcd/client/pkg/v3; version v3.5.13 -- https://github.com/etcd-io/etcd -** go.etcd.io/etcd/client/v3; version v3.5.10 -- +** go.etcd.io/etcd/client/v3; version v3.5.13 -- https://github.com/etcd-io/etcd -** go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc; version v0.46.0 -- -https://github.com/open-telemetry/opentelemetry-go-contrib - ** go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp; version v0.46.0 -- https://github.com/open-telemetry/opentelemetry-go-contrib @@ -152,10 +143,10 @@ https://github.com/go4org/go4 ** gomodules.xyz/jsonpatch/v2; version v2.4.0 -- https://github.com/gomodules/jsonpatch -** google.golang.org/genproto/googleapis/api; version v0.0.0-20230913181813-007df8e322eb -- +** google.golang.org/genproto/googleapis/api; version v0.0.0-20231106174013-bbf56f31fb17 -- https://github.com/googleapis/go-genproto -** google.golang.org/genproto/googleapis/rpc; version v0.0.0-20230920204549-e6e6cdab5c13 -- +** google.golang.org/genproto/googleapis/rpc; version v0.0.0-20231120223509-83a465c0220f -- https://github.com/googleapis/go-genproto ** google.golang.org/grpc; version v1.59.0 -- @@ -167,70 +158,67 @@ https://gopkg.in/ini.v1 ** gopkg.in/yaml.v2; version v2.4.0 -- https://gopkg.in/yaml.v2 -** k8s.io/api; version v0.28.4 -- +** k8s.io/api; version v0.29.3 -- https://github.com/kubernetes/api -** k8s.io/apiextensions-apiserver/pkg; version v0.28.4 -- +** k8s.io/apiextensions-apiserver/pkg; version v0.29.3 -- https://github.com/kubernetes/apiextensions-apiserver -** k8s.io/apimachinery/pkg; version v0.28.4 -- +** k8s.io/apimachinery/pkg; version v0.29.3 -- https://github.com/kubernetes/apimachinery -** k8s.io/apiserver; version v0.28.4 -- +** k8s.io/apiserver; version v0.29.3 -- https://github.com/kubernetes/apiserver -** k8s.io/cli-runtime/pkg; version v0.28.4 -- +** k8s.io/cli-runtime/pkg; version v0.29.3 -- https://github.com/kubernetes/cli-runtime -** k8s.io/client-go; version v0.28.4 -- +** k8s.io/client-go; version v0.29.3 -- https://github.com/kubernetes/client-go -** k8s.io/cluster-bootstrap/token; version v0.28.4 -- +** k8s.io/cluster-bootstrap; version v0.29.3 -- https://github.com/kubernetes/cluster-bootstrap -** k8s.io/component-base; version v0.28.4 -- +** k8s.io/component-base; version v0.29.3 -- https://github.com/kubernetes/component-base -** k8s.io/component-helpers/auth/rbac; version v0.28.4 -- +** k8s.io/component-helpers/auth/rbac; version v0.29.3 -- https://github.com/kubernetes/component-helpers -** k8s.io/klog/v2; version v2.100.1 -- +** k8s.io/klog/v2; version v2.110.1 -- https://github.com/kubernetes/klog -** k8s.io/kms; version v0.28.4 -- -https://github.com/kubernetes/kms - -** k8s.io/kube-openapi/pkg; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kube-openapi/pkg/validation/errors; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/validation/errors; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kube-openapi/pkg/validation/spec; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/validation/spec; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kube-openapi/pkg/validation/strfmt; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/validation/strfmt; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kube-openapi/pkg/validation/validate; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/validation/validate; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kubectl/pkg; version v0.28.4 -- +** k8s.io/kubectl/pkg; version v0.29.3 -- https://github.com/kubernetes/kubectl -** k8s.io/metrics/pkg; version v0.28.4 -- +** k8s.io/metrics/pkg; version v0.29.3 -- https://github.com/kubernetes/metrics -** k8s.io/utils; version v0.0.0-20230406110748-d93618cff8a2 -- +** k8s.io/utils; version v0.0.0-20231127182322-b307cd553661 -- https://github.com/kubernetes/utils -** sigs.k8s.io/apiserver-network-proxy/konnectivity-client; version v0.1.2 -- +** sigs.k8s.io/apiserver-network-proxy/konnectivity-client; version v0.28.0 -- https://github.com/kubernetes-sigs/apiserver-network-proxy -** sigs.k8s.io/cluster-api; version v1.6.4 -- +** sigs.k8s.io/cluster-api; version v1.7.1 -- https://github.com/kubernetes-sigs/cluster-api -** sigs.k8s.io/controller-runtime; version v0.16.5-0.20240215143111-dca5e8b2b00a -- +** sigs.k8s.io/controller-runtime; version v0.17.3 -- https://github.com/kubernetes-sigs/controller-runtime ** sigs.k8s.io/json; version v0.0.0-20221116044647-bc3834ca7abd -- @@ -245,7 +233,7 @@ https://github.com/kubernetes-sigs/kustomize ** sigs.k8s.io/kustomize/kyaml; version v0.14.3-0.20230601165947-6ce0bf390ce3 -- https://github.com/kubernetes-sigs/kustomize -** sigs.k8s.io/structured-merge-diff/v4; version v4.2.3 -- +** sigs.k8s.io/structured-merge-diff/v4; version v4.4.1 -- https://github.com/kubernetes-sigs/structured-merge-diff ** sigs.k8s.io/yaml; version v1.4.0 -- @@ -474,7 +462,7 @@ This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). -* For github.com/coreos/go-systemd/v22 see also this required NOTICE: +* For github.com/coreos/go-systemd/v22/journal see also this required NOTICE: CoreOS Project Copyright 2018 CoreOS, Inc @@ -498,7 +486,7 @@ This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). -* For github.com/matttproud/golang_protobuf_extensions/pbutil see also this required NOTICE: +* For github.com/matttproud/golang_protobuf_extensions/v2/pbutil see also this required NOTICE: Copyright 2012 Matt T. Proud (matt.proud@gmail.com) @@ -595,6 +583,34 @@ limitations under the License. ------ +** github.com/gorilla/websocket; version v1.5.0 -- +https://github.com/gorilla/websocket + +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------ + ** github.com/magiconair/properties; version v1.8.7 -- https://github.com/magiconair/properties @@ -692,7 +708,7 @@ Blackfriday is distributed under the Simplified BSD License: ** github.com/ajeddeloh/go-json; version v0.0.0-20200220154158-5ae607161559 -- https://github.com/coreos/go-json -** k8s.io/utils/internal/third_party/forked/golang; version v0.0.0-20230406110748-d93618cff8a2 -- +** k8s.io/utils/internal/third_party/forked/golang; version v0.0.0-20231127182322-b307cd553661 -- https://github.com/kubernetes/utils Copyright (c) 2012 The Go Authors. All rights reserved. @@ -853,10 +869,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/evanphx/json-patch; version v5.6.0+incompatible -- +** github.com/evanphx/json-patch; version v5.7.0+incompatible -- https://github.com/evanphx/json-patch -** github.com/evanphx/json-patch/v5; version v5.7.0 -- +** github.com/evanphx/json-patch/v5; version v5.9.0 -- https://github.com/evanphx/json-patch/v5 Copyright (c) 2014, Evan Phoenix @@ -887,7 +903,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/fsnotify/fsnotify; version v1.6.0 -- +** github.com/fsnotify/fsnotify; version v1.7.0 -- https://github.com/fsnotify/fsnotify Copyright © 2012 The Go Authors. All rights reserved. @@ -959,7 +975,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/golang/protobuf; version v1.5.3 -- +** github.com/golang/protobuf; version v1.5.4 -- https://github.com/golang/protobuf Copyright 2010 The Go Authors. All rights reserved. @@ -1092,7 +1108,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/google/uuid; version v1.3.1 -- +** github.com/google/uuid; version v1.4.0 -- https://github.com/google/uuid Copyright (c) 2009,2014 Google Inc. All rights reserved. @@ -1213,10 +1229,10 @@ https://golang.org/x/exp ** golang.org/x/net; version v0.23.0 -- https://golang.org/x/net -** golang.org/x/oauth2; version v0.14.0 -- +** golang.org/x/oauth2; version v0.18.0 -- https://golang.org/x/oauth2 -** golang.org/x/sync; version v0.4.0 -- +** golang.org/x/sync; version v0.6.0 -- https://golang.org/x/sync ** golang.org/x/sys; version v0.18.0 -- @@ -1228,13 +1244,13 @@ https://golang.org/x/term ** golang.org/x/text; version v0.14.0 -- https://golang.org/x/text -** golang.org/x/time/rate; version v0.3.0 -- +** golang.org/x/time/rate; version v0.5.0 -- https://golang.org/x/time -** k8s.io/apimachinery/third_party/forked/golang; version v0.28.4 -- +** k8s.io/apimachinery/third_party/forked/golang; version v0.29.3 -- https://github.com/kubernetes/apimachinery -** k8s.io/client-go/third_party/forked/golang/template; version v0.28.4 -- +** k8s.io/client-go/third_party/forked/golang/template; version v0.29.3 -- https://github.com/kubernetes/client-go Copyright (c) 2009 The Go Authors. All rights reserved. @@ -1339,7 +1355,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.44.0 -- +** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.45.0 -- https://github.com/prometheus/common Copyright (c) 2011, Open Knowledge Foundation Ltd. @@ -1511,7 +1527,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi Copyright (c) 2020 The Go Authors. All rights reserved. @@ -1697,7 +1713,7 @@ Copyright (c) [2015] [go-gitignore] https://github.com/olekukonko/tablewriter Copyright (C) 2014 by Oleku Konko -** github.com/onsi/gomega; version v1.30.0 -- +** github.com/onsi/gomega; version v1.32.0 -- https://github.com/onsi/gomega Copyright (c) 2013-2014 Onsi Fakhouri @@ -1709,11 +1725,11 @@ Copyright (c) 2011-2012 Peter Bourgon https://github.com/rivo/uniseg Copyright (c) 2019 Oliver Kuederle -** github.com/spf13/cast; version v1.5.1 -- +** github.com/spf13/cast; version v1.6.0 -- https://github.com/spf13/cast Copyright (c) 2014 Steve Francia -** github.com/spf13/viper; version v1.17.0 -- +** github.com/spf13/viper; version v1.18.2 -- https://github.com/spf13/viper Copyright (c) 2014 Steve Francia @@ -1737,14 +1753,10 @@ Copyright (c) 2014 Vincent Petithory https://github.com/uber-go/multierr Copyright (c) 2017-2021 Uber Technologies, Inc. -** go.uber.org/zap; version v1.25.0 -- +** go.uber.org/zap; version v1.26.0 -- https://github.com/uber-go/zap Copyright (c) 2016-2017 Uber Technologies, Inc. -** gopkg.in/natefinch/lumberjack.v2; version v2.2.1 -- -https://gopkg.in/natefinch/lumberjack.v2 -Copyright (c) 2014 Nate Finch - ** sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/qri-io/starlib/util; version v0.14.3-0.20230601165947-6ce0bf390ce3 -- https://github.com/kubernetes-sigs/kustomize Copyright (c) 2018 QRI, Inc. diff --git a/projects/kubernetes-sigs/cluster-api/CAPD_ATTRIBUTION.txt b/projects/kubernetes-sigs/cluster-api/CAPD_ATTRIBUTION.txt index 609fab4256..a6877e2b41 100644 --- a/projects/kubernetes-sigs/cluster-api/CAPD_ATTRIBUTION.txt +++ b/projects/kubernetes-sigs/cluster-api/CAPD_ATTRIBUTION.txt @@ -5,19 +5,13 @@ https://github.com/coreos/go-semver ** github.com/coreos/go-systemd/unit; version v0.0.0-20191104093116-d3cd4ed1dbcf -- https://github.com/coreos/go-systemd -** github.com/coreos/go-systemd/v22; version v22.5.0 -- -https://github.com/coreos/go-systemd/v22 - ** github.com/distribution/reference; version v0.5.0 -- https://github.com/distribution/reference -** github.com/docker/distribution/reference; version v2.8.3+incompatible -- -https://github.com/distribution/distribution - -** github.com/docker/docker; version v24.0.9+incompatible -- +** github.com/docker/docker; version v25.0.5+incompatible -- https://github.com/moby/moby -** github.com/docker/go-connections; version v0.4.0 -- +** github.com/docker/go-connections; version v0.5.0 -- https://github.com/docker/go-connections ** github.com/docker/go-units; version v0.4.0 -- @@ -26,13 +20,13 @@ https://github.com/docker/go-units ** github.com/flatcar/ignition/config; version v0.36.2 -- https://github.com/flatcar/ignition -** github.com/go-logr/logr; version v1.3.0 -- +** github.com/go-logr/logr; version v1.4.1 -- https://github.com/go-logr/logr ** github.com/go-logr/stdr; version v1.2.2 -- https://github.com/go-logr/stdr -** github.com/go-logr/zapr; version v1.2.4 -- +** github.com/go-logr/zapr; version v1.3.0 -- https://github.com/go-logr/zapr ** github.com/go-openapi/jsonpointer; version v0.19.6 -- @@ -47,7 +41,7 @@ https://github.com/go-openapi/swag ** github.com/golang/groupcache/lru; version v0.0.0-20210331224755-41bb18bfe9da -- https://github.com/golang/groupcache -** github.com/google/cel-go; version v0.16.1 -- +** github.com/google/cel-go; version v0.17.7 -- https://github.com/google/cel-go ** github.com/google/gnostic-models; version v0.6.8 -- @@ -56,11 +50,8 @@ https://github.com/google/gnostic-models ** github.com/google/gofuzz; version v1.2.0 -- https://github.com/google/gofuzz -** github.com/grpc-ecosystem/go-grpc-prometheus; version v1.2.0 -- -https://github.com/grpc-ecosystem/go-grpc-prometheus - -** github.com/matttproud/golang_protobuf_extensions/pbutil; version v1.0.4 -- -https://github.com/matttproud/golang_protobuf_extensions +** github.com/matttproud/golang_protobuf_extensions/v2/pbutil; version v2.0.0 -- +https://github.com/matttproud/golang_protobuf_extensions/v2 ** github.com/modern-go/concurrent; version v0.0.0-20180306012644-bacd9c7ef1dd -- https://github.com/modern-go/concurrent @@ -77,52 +68,40 @@ https://github.com/opencontainers/go-digest ** github.com/opencontainers/image-spec/specs-go; version v1.0.2 -- https://github.com/opencontainers/image-spec -** github.com/prometheus/client_golang/prometheus; version v1.17.0 -- +** github.com/prometheus/client_golang/prometheus; version v1.18.0 -- https://github.com/prometheus/client_golang -** github.com/prometheus/client_model/go; version v0.4.1-0.20230718164431-9a2bf3000d16 -- +** github.com/prometheus/client_model/go; version v0.5.0 -- https://github.com/prometheus/client_model -** github.com/prometheus/common; version v0.44.0 -- +** github.com/prometheus/common; version v0.45.0 -- https://github.com/prometheus/common -** github.com/prometheus/procfs; version v0.11.1 -- +** github.com/prometheus/procfs; version v0.12.0 -- https://github.com/prometheus/procfs ** github.com/spf13/cobra; version v1.8.0 -- https://github.com/spf13/cobra -** go.etcd.io/etcd/api/v3; version v3.5.10 -- -https://github.com/etcd-io/etcd - -** go.etcd.io/etcd/client/pkg/v3; version v3.5.10 -- -https://github.com/etcd-io/etcd - -** go.etcd.io/etcd/client/v3; version v3.5.10 -- -https://github.com/etcd-io/etcd - -** go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc; version v0.46.0 -- -https://github.com/open-telemetry/opentelemetry-go-contrib - ** go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp; version v0.46.0 -- https://github.com/open-telemetry/opentelemetry-go-contrib -** go.opentelemetry.io/otel; version v1.20.0 -- +** go.opentelemetry.io/otel; version v1.22.0 -- https://github.com/open-telemetry/opentelemetry-go -** go.opentelemetry.io/otel/exporters/otlp/otlptrace; version v1.20.0 -- +** go.opentelemetry.io/otel/exporters/otlp/otlptrace; version v1.22.0 -- https://github.com/open-telemetry/opentelemetry-go ** go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc; version v1.20.0 -- https://github.com/open-telemetry/opentelemetry-go -** go.opentelemetry.io/otel/metric; version v1.20.0 -- +** go.opentelemetry.io/otel/metric; version v1.22.0 -- https://github.com/open-telemetry/opentelemetry-go -** go.opentelemetry.io/otel/sdk; version v1.20.0 -- +** go.opentelemetry.io/otel/sdk; version v1.22.0 -- https://github.com/open-telemetry/opentelemetry-go -** go.opentelemetry.io/otel/trace; version v1.20.0 -- +** go.opentelemetry.io/otel/trace; version v1.22.0 -- https://github.com/open-telemetry/opentelemetry-go ** go.opentelemetry.io/proto/otlp; version v1.0.0 -- @@ -131,85 +110,76 @@ https://github.com/open-telemetry/opentelemetry-proto-go ** gomodules.xyz/jsonpatch/v2; version v2.4.0 -- https://github.com/gomodules/jsonpatch -** google.golang.org/genproto/googleapis/api; version v0.0.0-20230913181813-007df8e322eb -- +** google.golang.org/genproto/googleapis/api; version v0.0.0-20231106174013-bbf56f31fb17 -- https://github.com/googleapis/go-genproto -** google.golang.org/genproto/googleapis/rpc; version v0.0.0-20230920204549-e6e6cdab5c13 -- +** google.golang.org/genproto/googleapis/rpc; version v0.0.0-20231120223509-83a465c0220f -- https://github.com/googleapis/go-genproto -** google.golang.org/grpc; version v1.59.0 -- +** google.golang.org/grpc; version v1.60.1 -- https://github.com/grpc/grpc-go ** gopkg.in/yaml.v2; version v2.4.0 -- https://gopkg.in/yaml.v2 -** k8s.io/api; version v0.28.4 -- +** k8s.io/api; version v0.29.3 -- https://github.com/kubernetes/api -** k8s.io/apiextensions-apiserver/pkg/apis/apiextensions; version v0.28.4 -- +** k8s.io/apiextensions-apiserver/pkg/apis/apiextensions; version v0.29.3 -- https://github.com/kubernetes/apiextensions-apiserver -** k8s.io/apimachinery/pkg; version v0.28.4 -- +** k8s.io/apimachinery/pkg; version v0.29.3 -- https://github.com/kubernetes/apimachinery -** k8s.io/apiserver; version v0.28.4 -- +** k8s.io/apiserver; version v0.29.3 -- https://github.com/kubernetes/apiserver -** k8s.io/client-go; version v0.28.4 -- +** k8s.io/client-go; version v0.29.3 -- https://github.com/kubernetes/client-go -** k8s.io/cluster-bootstrap/token; version v0.28.4 -- +** k8s.io/cluster-bootstrap/token; version v0.29.3 -- https://github.com/kubernetes/cluster-bootstrap -** k8s.io/component-base; version v0.28.4 -- +** k8s.io/component-base; version v0.29.3 -- https://github.com/kubernetes/component-base -** k8s.io/klog/v2; version v2.100.1 -- +** k8s.io/klog/v2; version v2.110.1 -- https://github.com/kubernetes/klog -** k8s.io/kms; version v0.28.4 -- -https://github.com/kubernetes/kms - -** k8s.io/kube-openapi/pkg; version v0.0.0-20230717233707-2695361300d9 -- -https://github.com/kubernetes/kube-openapi - -** k8s.io/kube-openapi/pkg/validation/errors; version v0.0.0-20230717233707-2695361300d9 -- -https://github.com/kubernetes/kube-openapi - -** k8s.io/kube-openapi/pkg/validation/spec; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/kube-openapi/pkg/validation/strfmt; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/validation/spec; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi -** k8s.io/utils; version v0.0.0-20230406110748-d93618cff8a2 -- +** k8s.io/utils; version v0.0.0-20231127182322-b307cd553661 -- https://github.com/kubernetes/utils -** sigs.k8s.io/apiserver-network-proxy/konnectivity-client; version v0.1.2 -- +** sigs.k8s.io/apiserver-network-proxy/konnectivity-client; version v0.28.0 -- https://github.com/kubernetes-sigs/apiserver-network-proxy ** sigs.k8s.io/cluster-api; version v0.0.0-00010101000000-000000000000 -- https://github.com/kubernetes-sigs/cluster-api -** sigs.k8s.io/cluster-api/test/infrastructure/container; version v1.6.4 -- +** sigs.k8s.io/cluster-api/test/infrastructure/container; version v1.7.1 -- https://github.com/kubernetes-sigs/cluster-api -** sigs.k8s.io/cluster-api/test/infrastructure/docker; version v1.6.4 -- +** sigs.k8s.io/cluster-api/test/infrastructure/docker; version v1.7.1 -- https://github.com/kubernetes-sigs/cluster-api -** sigs.k8s.io/cluster-api/test/infrastructure/kind; version v1.6.4 -- +** sigs.k8s.io/cluster-api/test/infrastructure/kind; version v1.7.1 -- https://github.com/kubernetes-sigs/cluster-api -** sigs.k8s.io/controller-runtime; version v0.16.5-0.20240215143111-dca5e8b2b00a -- +** sigs.k8s.io/controller-runtime; version v0.17.3 -- https://github.com/kubernetes-sigs/controller-runtime ** sigs.k8s.io/json; version v0.0.0-20221116044647-bc3834ca7abd -- https://github.com/kubernetes-sigs/json -** sigs.k8s.io/kind/pkg; version v0.20.0 -- +** sigs.k8s.io/kind/pkg; version v0.22.0 -- https://github.com/kubernetes-sigs/kind -** sigs.k8s.io/structured-merge-diff/v4; version v4.2.3 -- +** sigs.k8s.io/structured-merge-diff/v4; version v4.4.1 -- https://github.com/kubernetes-sigs/structured-merge-diff ** sigs.k8s.io/yaml; version v1.4.0 -- @@ -438,14 +408,6 @@ This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). -* For github.com/coreos/go-systemd/v22 see also this required NOTICE: -CoreOS Project -Copyright 2018 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). - - * For github.com/docker/docker see also this required NOTICE: Docker Copyright 2012-2017 Docker, Inc. @@ -476,7 +438,7 @@ This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). -* For github.com/matttproud/golang_protobuf_extensions/pbutil see also this required NOTICE: +* For github.com/matttproud/golang_protobuf_extensions/v2/pbutil see also this required NOTICE: Copyright 2012 Matt T. Proud (matt.proud@gmail.com) @@ -626,10 +588,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/evanphx/json-patch; version v5.6.0+incompatible -- -https://github.com/evanphx/json-patch - -** github.com/evanphx/json-patch/v5; version v5.7.0 -- +** github.com/evanphx/json-patch/v5; version v5.9.0 -- https://github.com/evanphx/json-patch/v5 Copyright (c) 2014, Evan Phoenix @@ -660,7 +619,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/fsnotify/fsnotify; version v1.6.0 -- +** github.com/fsnotify/fsnotify; version v1.7.0 -- https://github.com/fsnotify/fsnotify Copyright © 2012 The Go Authors. All rights reserved. @@ -732,7 +691,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/golang/protobuf; version v1.5.3 -- +** github.com/golang/protobuf; version v1.5.4 -- https://github.com/golang/protobuf Copyright 2010 The Go Authors. All rights reserved. @@ -799,7 +758,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/google/uuid; version v1.3.1 -- +** github.com/google/uuid; version v1.4.0 -- https://github.com/google/uuid Copyright (c) 2009,2014 Google Inc. All rights reserved. @@ -936,7 +895,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.44.0 -- +** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.45.0 -- https://github.com/prometheus/common Copyright (c) 2011, Open Knowledge Foundation Ltd. @@ -1009,19 +968,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** golang.org/go; version go1.21.8 -- https://github.com/golang/go -** golang.org/x/crypto; version v0.21.0 -- -https://golang.org/x/crypto - ** golang.org/x/exp; version v0.0.0-20230905200255-921286631fa9 -- https://golang.org/x/exp ** golang.org/x/net; version v0.23.0 -- https://golang.org/x/net -** golang.org/x/oauth2; version v0.14.0 -- +** golang.org/x/oauth2; version v0.18.0 -- https://golang.org/x/oauth2 -** golang.org/x/sync/singleflight; version v0.4.0 -- +** golang.org/x/sync/singleflight; version v0.6.0 -- https://golang.org/x/sync ** golang.org/x/sys/unix; version v0.18.0 -- @@ -1033,10 +989,10 @@ https://golang.org/x/term ** golang.org/x/text; version v0.14.0 -- https://golang.org/x/text -** golang.org/x/time/rate; version v0.3.0 -- +** golang.org/x/time/rate; version v0.5.0 -- https://golang.org/x/time -** k8s.io/apimachinery/third_party/forked/golang; version v0.28.4 -- +** k8s.io/apimachinery/third_party/forked/golang; version v0.29.3 -- https://github.com/kubernetes/apimachinery Copyright (c) 2009 The Go Authors. All rights reserved. @@ -1136,7 +1092,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json; version v0.0.0-20230717233707-2695361300d9 -- +** k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json; version v0.0.0-20231010175941-2dd684a91f00 -- https://github.com/kubernetes/kube-openapi Copyright (c) 2020 The Go Authors. All rights reserved. @@ -1169,7 +1125,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** k8s.io/utils/internal/third_party/forked/golang; version v0.0.0-20230406110748-d93618cff8a2 -- +** k8s.io/utils/internal/third_party/forked/golang; version v0.0.0-20231127182322-b307cd553661 -- https://github.com/kubernetes/utils Copyright (c) 2012 The Go Authors. All rights reserved. @@ -1223,10 +1179,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------ -** github.com/asaskevich/govalidator; version v0.0.0-20190424111038-f61b66f89f4a -- -https://github.com/asaskevich/govalidator -Copyright (c) 2014 Alex Saskevich - ** github.com/beorn7/perks/quantile; version v1.0.1 -- https://github.com/beorn7/perks Copyright (C) 2013 Blake Mizerany @@ -1243,7 +1195,7 @@ Copyright (c) 2014 Cenk Altı https://github.com/cespare/xxhash/v2 Copyright (c) 2016 Caleb Spare -** github.com/emicklei/go-restful/v3; version v3.11.0 -- +** github.com/emicklei/go-restful/v3; version v3.12.0 -- https://github.com/emicklei/go-restful/v3 Copyright (c) 2012,2013 Ernest Micklei @@ -1267,7 +1219,7 @@ Copyright (c) 2016 json-iterator https://github.com/mailru/easyjson Copyright (c) 2016 Mail.Ru Group -** github.com/onsi/gomega; version v1.30.0 -- +** github.com/onsi/gomega; version v1.32.0 -- https://github.com/onsi/gomega Copyright (c) 2013-2014 Onsi Fakhouri @@ -1283,31 +1235,28 @@ Copyright (c) 2014 Vincent Petithory https://github.com/uber-go/multierr Copyright (c) 2017-2021 Uber Technologies, Inc. -** go.uber.org/zap; version v1.25.0 -- +** go.uber.org/zap; version v1.26.0 -- https://github.com/uber-go/zap Copyright (c) 2016-2017 Uber Technologies, Inc. -** gopkg.in/natefinch/lumberjack.v2; version v2.2.1 -- -https://gopkg.in/natefinch/lumberjack.v2 -Copyright (c) 2014 Nate Finch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------ ** gopkg.in/yaml.v3; version v3.0.1 -- diff --git a/projects/kubernetes-sigs/cluster-api/CHECKSUMS b/projects/kubernetes-sigs/cluster-api/CHECKSUMS index 8e79c6c60d..dc74be74da 100644 --- a/projects/kubernetes-sigs/cluster-api/CHECKSUMS +++ b/projects/kubernetes-sigs/cluster-api/CHECKSUMS @@ -1,10 +1,10 @@ -69efdc01ca2924e01e7e3e7f2beb35f2fb49df6600f43d5a6646845ced1447ca _output/bin/cluster-api/linux-amd64/cluster-api-provider-docker-manager -6943bd91c50e278f870b2acacd3a98815273dfd1778d2b405386e73f65dcad07 _output/bin/cluster-api/linux-amd64/clusterctl -f8b378c01cb0be9ed69174b748ba1cd4da3476ccac8e84792e0180a38baeb5c5 _output/bin/cluster-api/linux-amd64/kubeadm-bootstrap-manager -4764be5a9521c7391e07ef4a81c73d62cc943e34238fb46c6eff96b6fbf38a38 _output/bin/cluster-api/linux-amd64/kubeadm-control-plane-manager -1e31bb359c1ff19cc8f3a9be9673e22aaa1d2ddc6f4be5dd7add80e468a78820 _output/bin/cluster-api/linux-amd64/manager -aee855657bf606404ec64a21cfe8b5e2e619600096b62736586a99858c919694 _output/bin/cluster-api/linux-arm64/cluster-api-provider-docker-manager -5e19226494d586e953735588398122bfc1d818a6bd1295c42b37288ae0a38ba8 _output/bin/cluster-api/linux-arm64/clusterctl -9fd2c63f28b60b8f0c570dfc7d1861a159a601b6b068ee5f1b7e887c23bd9c41 _output/bin/cluster-api/linux-arm64/kubeadm-bootstrap-manager -a98fad48391e6e1f5c2eaaeed5d243d93790de855e036831b96b180cc4140856 _output/bin/cluster-api/linux-arm64/kubeadm-control-plane-manager -72d7011d185dc4dfb7f4ae43403d6887a1e2f7519e5834f2bfedef4f4fd93d0e _output/bin/cluster-api/linux-arm64/manager +6bba78988012aa87cb9183306d10251a1a3d0b60abb745b04d6e59867ad1ceb8 _output/bin/cluster-api/linux-amd64/cluster-api-provider-docker-manager +f45e064aa92a4b2cfa59790dcde0c84aaad11254280fa3945619ca136709279b _output/bin/cluster-api/linux-amd64/clusterctl +08c4257e4a09d5872a572d18d4fffef7949a06536abb73bee41163f7c106c696 _output/bin/cluster-api/linux-amd64/kubeadm-bootstrap-manager +636c057cdf5d9df954e40e9038b1d19910874330aa499254fe1dbbdd527cbab7 _output/bin/cluster-api/linux-amd64/kubeadm-control-plane-manager +be36d90a7072f27b8dccb4b89987b5477f31e63a119b80bac34b88330dbc666a _output/bin/cluster-api/linux-amd64/manager +6353550c01f81fb84508884c4f673ca8223687a574944a14ba7eee0bd8dd5aee _output/bin/cluster-api/linux-arm64/cluster-api-provider-docker-manager +dc65a837b71323d52fd07890f9a2f593ee2e9b457d52544dda366e51eb92ada8 _output/bin/cluster-api/linux-arm64/clusterctl +aa3b0e916d0810db6a202028264bc8a06f022725f640c44a1e4edf7d1c290e82 _output/bin/cluster-api/linux-arm64/kubeadm-bootstrap-manager +d6bf65b48674ad359001607fc3bc3c6bfdac529eef62330118187314aa1ecf82 _output/bin/cluster-api/linux-arm64/kubeadm-control-plane-manager +81ced85cf7ac15084268ea97b340cfb955a2ebe5b375317dc99c0a735d0216a7 _output/bin/cluster-api/linux-arm64/manager diff --git a/projects/kubernetes-sigs/cluster-api/GIT_TAG b/projects/kubernetes-sigs/cluster-api/GIT_TAG index 3717b2a503..a97fc4411a 100644 --- a/projects/kubernetes-sigs/cluster-api/GIT_TAG +++ b/projects/kubernetes-sigs/cluster-api/GIT_TAG @@ -1 +1 @@ -v1.6.4 +v1.7.1 diff --git a/projects/kubernetes-sigs/cluster-api/README.md b/projects/kubernetes-sigs/cluster-api/README.md index a6c8dadaa6..d51ca2d986 100644 --- a/projects/kubernetes-sigs/cluster-api/README.md +++ b/projects/kubernetes-sigs/cluster-api/README.md @@ -1,5 +1,5 @@ ## **Cluster API** -![Version](https://img.shields.io/badge/version-v1.6.4-blue) +![Version](https://img.shields.io/badge/version-v1.7.1-blue) ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiQVZ3TDBZZVVXZUZiVmtqLzVoOVcrV2FaMmxRRzJXRmJCRlZtQkNodXdWZ0FrNm0zQ3l5UzNqTkdsQXgwdzc0bTBZc1RIcjBhMUVFbEhIK3d2VDVPek1rPSIsIml2UGFyYW1ldGVyU3BlYyI6IkVuOGJxNXBPZEtDek81Q3giLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main) [Cluster API](https://github.com/kubernetes-sigs/cluster-api) is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters. It uses Kubernetes-style APIs and patterns to automate cluster lifecycle management for platform operators. The supporting infrastructure, like virtual machines, networks, load balancers, and VPCs, as well as the Kubernetes cluster configuration are all defined in the same way that application developers operate deploying and managing their workloads. This enables consistent and repeatable cluster deployments across a wide variety of infrastructure environments. Cluster API can be extended to support any infrastructure provider (AWS, Azure, vSphere, etc.) or bootstrap provider (kubeadm is default) as required by the customer. diff --git a/projects/kubernetes-sigs/cluster-api/patches/0001-Adding-capi-support-for-Bottlerocket.patch b/projects/kubernetes-sigs/cluster-api/patches/0001-Adding-capi-support-for-Bottlerocket.patch index 6395012b83..884005f09f 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0001-Adding-capi-support-for-Bottlerocket.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0001-Adding-capi-support-for-Bottlerocket.patch @@ -1,7 +1,7 @@ -From 31769793dab5cc07b2fba520e998f15d203854e0 Mon Sep 17 00:00:00 2001 +From 2f7df1f4a09760823557a751829ff8c074b44a96 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Fri, 11 Jun 2021 10:43:09 -0700 -Subject: [PATCH 01/40] Adding capi support for Bottlerocket +Subject: [PATCH 01/37] Adding capi support for Bottlerocket Signed-off-by: Vignesh Goutham Ganesh @@ -29,13 +29,13 @@ Add network settings only when there is a proxy defined Remove userdata logging for bottlerocket --- - Makefile | 3 +- .../kubeadm/api/v1beta1/kubeadm_types.go | 53 +++++ .../api/v1beta1/kubeadmconfig_types.go | 5 +- - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 174 ++++++++++++++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 186 ++++++++++++++++++ + .../api/v1beta1/zz_generated.deepcopy.go | 58 ++++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 185 +++++++++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 189 ++++++++++++++++++ .../internal/bottlerocket/bootstrap.go | 45 +++++ - .../internal/bottlerocket/bottlerocket.go | 176 +++++++++++++++++ + .../internal/bottlerocket/bottlerocket.go | 176 ++++++++++++++++ .../bottlerocket/bottlerocket_test.go | 141 +++++++++++++ .../bottlerocket/controlplane_init.go | 47 +++++ .../bottlerocket/controlplane_join.go | 30 +++ @@ -46,9 +46,13 @@ Remove userdata logging for bottlerocket .../kubeadm/internal/cloudinit/cloudinit.go | 2 +- .../controllers/kubeadmconfig_controller.go | 73 +++++++ .../kubeadm/types/upstreamv1beta1/types.go | 53 +++++ - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 186 ++++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 99 ++++++++++ - 19 files changed, 1350 insertions(+), 3 deletions(-) + .../upstreamv1beta1/zz_generated.deepcopy.go | 58 ++++++ + .../zz_generated.conversion.go | 6 + + .../zz_generated.conversion.go | 6 + + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 189 ++++++++++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 95 +++++++++ + .../v1alpha4/zz_generated.conversion.go | 26 ++- + 23 files changed, 1513 insertions(+), 4 deletions(-) create mode 100644 bootstrap/kubeadm/internal/bottlerocket/bootstrap.go create mode 100644 bootstrap/kubeadm/internal/bottlerocket/bottlerocket.go create mode 100644 bootstrap/kubeadm/internal/bottlerocket/bottlerocket_test.go @@ -59,23 +63,8 @@ Remove userdata logging for bottlerocket create mode 100644 bootstrap/kubeadm/internal/bottlerocket/users.go create mode 100644 bootstrap/kubeadm/internal/bottlerocket/utils.go -diff --git a/Makefile b/Makefile -index b5fb87d77..dc37c436b 100644 ---- a/Makefile -+++ b/Makefile -@@ -493,8 +493,9 @@ generate-go-conversions-kubeadm-bootstrap: $(CONVERSION_GEN) ## Generate convers - --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ - --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt -- $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3" -+ $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta1,./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3" - $(CONVERSION_GEN) \ -+ --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta1 \ - --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta2 \ - --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta3 \ - --build-tag=ignore_autogenerated_kubeadm_types \ diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 653b4da55..11aa737a7 100644 +index 67b4f51cd..f49a64302 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -73,6 +73,21 @@ type InitConfiguration struct { @@ -175,54 +164,144 @@ index 70b9c133b..d68d247c7 100644 ) var ( +diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +index 425b90eda..1c034ec0d 100644 +--- a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +@@ -142,10 +142,29 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrap. ++func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketBootstrap) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta ++ out.Pause = in.Pause ++ out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ in.Proxy.DeepCopyInto(&out.Proxy) + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) +@@ -555,6 +574,9 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { + func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta ++ out.Pause = in.Pause ++ out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ in.Proxy.DeepCopyInto(&out.Proxy) + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { +@@ -1052,6 +1074,42 @@ func (in *Patches) DeepCopy() *Patches { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *Pause) DeepCopyInto(out *Pause) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pause. ++func (in *Pause) DeepCopy() *Pause { ++ if in == nil { ++ return nil ++ } ++ out := new(Pause) ++ in.DeepCopyInto(out) ++ return out ++} ++ ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration) { ++ *out = *in ++ if in.NoProxy != nil { ++ in, out := &in.NoProxy, &out.NoProxy ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. ++func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { ++ if in == nil { ++ return nil ++ } ++ out := new(ProxyConfiguration) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { + *out = *in diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index 8c29323a0..e2ebd6fb6 100644 +index ea2733dc9..ec42c300e 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -103,6 +103,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -114,6 +114,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -306,6 +321,34 @@ spec: - if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -324,6 +340,36 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket + properties: + httpsProxy: + description: HTTPS proxy @@ -236,58 +315,53 @@ index 8c29323a0..e2ebd6fb6 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -495,6 +538,7 @@ spec: - description: Format specifies the output format of the bootstrap data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration are -@@ -661,6 +705,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -677,6 +723,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -831,6 +890,34 @@ spec: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -843,6 +905,36 @@ spec: type: object type: array type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket + properties: + httpsProxy: + description: HTTPS proxy @@ -301,50 +375,53 @@ index 8c29323a0..e2ebd6fb6 100644 type: object mounts: description: Mounts specifies a list of mount points to be setup. -@@ -1098,6 +1185,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -2137,6 +2229,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -1298,6 +1400,34 @@ spec: - if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2351,6 +2459,36 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket + properties: + httpsProxy: + description: HTTPS proxy @@ -358,58 +435,61 @@ index 8c29323a0..e2ebd6fb6 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -1651,6 +1781,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -2541,6 +2679,7 @@ spec: + enum: + - cloud-config + - ignition ++ - bottlerocket + type: string + ignition: + description: Ignition contains Ignition specific configuration. +@@ -2766,6 +2905,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -2481,6 +2626,7 @@ spec: - enum: - - cloud-config - - ignition -+ - bottlerocket - type: string - ignition: - description: Ignition contains Ignition specific configuration. -@@ -2689,6 +2835,34 @@ spec: - content inline or by referencing a secret. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2964,6 +3119,36 @@ spec: + by referencing a secret. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket + properties: + httpsProxy: + description: HTTPS proxy @@ -421,57 +501,58 @@ index 8c29323a0..e2ebd6fb6 100644 + type: array + type: object skipPhases: - description: SkipPhases is a list of phases to skip during command - execution. The list of phases can be obtained with the "kubeadm + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 5b30cf21a..adf6c718e 100644 +index 30baffe56..478c8baf6 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -111,6 +111,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -122,6 +122,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -327,6 +343,36 @@ spec: - or to "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -336,6 +352,37 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -487,59 +568,52 @@ index 5b30cf21a..adf6c718e 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -527,6 +573,7 @@ spec: - data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -703,6 +750,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -697,6 +744,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -884,6 +947,36 @@ spec: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -865,6 +928,37 @@ spec: type: object type: array type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -555,51 +629,52 @@ index 5b30cf21a..adf6c718e 100644 type: object mounts: description: Mounts specifies a list of mount points to be -@@ -1094,6 +1187,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -2085,6 +2179,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -1308,6 +1417,36 @@ spec: - or to "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2303,6 +2413,37 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -615,59 +690,60 @@ index 5b30cf21a..adf6c718e 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -1683,6 +1822,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -2501,6 +2642,7 @@ spec: + enum: + - cloud-config + - ignition ++ - bottlerocket + type: string + ignition: + description: Ignition contains Ignition specific configuration. +@@ -2729,6 +2871,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -2518,6 +2673,7 @@ spec: - enum: - - cloud-config - - ignition -+ - bottlerocket - type: string - ignition: - description: Ignition contains Ignition specific configuration. -@@ -2744,6 +2900,36 @@ spec: - content inline or by referencing a secret. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2930,6 +3088,37 @@ spec: + by referencing a secret. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -681,8 +757,8 @@ index 5b30cf21a..adf6c718e 100644 + type: array + type: object skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go new file mode 100644 index 000000000..e4be8d945 @@ -1271,10 +1347,10 @@ index c2f158f7c..aaf8c5dc0 100644 if input.UseExperimentalRetry { input.KubeadmCommand = retriableJoinScriptName diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 99a9cbaa2..ba57b38a8 100644 +index 183f99c1e..000a4c5bd 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -41,6 +41,7 @@ import ( +@@ -43,6 +43,7 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" @@ -1282,7 +1358,7 @@ index 99a9cbaa2..ba57b38a8 100644 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/ignition" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/locking" -@@ -440,6 +441,46 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -472,6 +473,46 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex // injects into config.ClusterConfiguration values from top level object r.reconcileTopLevelObjectSettings(ctx, scope.Cluster, machine, scope.Config) @@ -1329,7 +1405,7 @@ index 99a9cbaa2..ba57b38a8 100644 clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) if err != nil { scope.Error(err, "Failed to marshal cluster configuration") -@@ -511,6 +552,12 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -543,6 +584,12 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex ControlPlaneInput: controlPlaneInput, Ignition: scope.Config.Spec.Ignition, }) @@ -1342,7 +1418,7 @@ index 99a9cbaa2..ba57b38a8 100644 default: bootstrapInitData, err = cloudinit.NewInitControlPlane(controlPlaneInput) } -@@ -619,6 +666,19 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -651,6 +698,19 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) NodeInput: nodeInput, Ignition: scope.Config.Spec.Ignition, }) @@ -1362,7 +1438,7 @@ index 99a9cbaa2..ba57b38a8 100644 default: bootstrapJoinData, err = cloudinit.NewNode(nodeInput) } -@@ -723,6 +783,19 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -757,6 +817,19 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S ControlPlaneJoinInput: controlPlaneJoinInput, Ignition: scope.Config.Spec.Ignition, }) @@ -1460,55 +1536,188 @@ index 3f90b4611..2570daa4f 100644 // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration +diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go +index aeaaa3aff..17a1e2aec 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go +@@ -141,10 +141,29 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrap. ++func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketBootstrap) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta ++ out.Pause = in.Pause ++ out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ in.Proxy.DeepCopyInto(&out.Proxy) + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) +@@ -409,6 +428,9 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { + func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta ++ out.Pause = in.Pause ++ out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ in.Proxy.DeepCopyInto(&out.Proxy) + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { +@@ -528,3 +550,39 @@ func (in *NodeRegistrationOptions) DeepCopy() *NodeRegistrationOptions { + in.DeepCopyInto(out) + return out + } ++ ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *Pause) DeepCopyInto(out *Pause) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pause. ++func (in *Pause) DeepCopy() *Pause { ++ if in == nil { ++ return nil ++ } ++ out := new(Pause) ++ in.DeepCopyInto(out) ++ return out ++} ++ ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration) { ++ *out = *in ++ if in.NoProxy != nil { ++ in, out := &in.NoProxy, &out.NoProxy ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. ++func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { ++ if in == nil { ++ return nil ++ } ++ out := new(ProxyConfiguration) ++ in.DeepCopyInto(out) ++ return out ++} +diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +index 9a40da3b2..b39352d39 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +@@ -409,6 +409,9 @@ func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfigur + } + + func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -698,6 +701,9 @@ func Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in * + } + + func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } +diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +index d849616cb..b487d3ba8 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +@@ -413,6 +413,9 @@ func Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguratio + } + + func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -690,6 +693,9 @@ func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration( + } + + func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index eb6893bb8..4c5037de1 100644 +index 1e87f3761..2fb57cc98 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -178,6 +178,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -198,6 +198,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -387,6 +403,36 @@ spec: - "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -410,6 +426,37 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1524,59 +1733,52 @@ index eb6893bb8..4c5037de1 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -583,6 +629,7 @@ spec: - data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -755,6 +802,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -768,6 +815,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -931,6 +994,36 @@ spec: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -934,6 +997,37 @@ spec: type: object type: array type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1592,51 +1794,52 @@ index eb6893bb8..4c5037de1 100644 type: object mounts: description: Mounts specifies a list of mount points to be setup. -@@ -1318,6 +1411,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -2604,6 +2698,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -1524,6 +1633,36 @@ spec: - "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2820,6 +2930,37 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1652,59 +1855,60 @@ index eb6893bb8..4c5037de1 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -1891,6 +2030,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -3015,6 +3156,7 @@ spec: + enum: + - cloud-config + - ignition ++ - bottlerocket + type: string + ignition: + description: Ignition contains Ignition specific configuration. +@@ -3241,6 +3383,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -2947,6 +3102,7 @@ spec: - enum: - - cloud-config - - ignition -+ - bottlerocket - type: string - ignition: - description: Ignition contains Ignition specific configuration. -@@ -3165,6 +3321,36 @@ spec: - or by referencing a secret. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -3440,6 +3598,37 @@ spec: + by referencing a secret. type: string type: object + pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ Pause holds the image source for pause container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1718,60 +1922,58 @@ index eb6893bb8..4c5037de1 100644 + type: array + type: object skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained with + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index da5d6a080..dd4f1e72f 100644 +index 082217777..54f1f373d 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -1309,6 +1309,24 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -1287,6 +1287,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image -+ source for kubeadm bootstrap container This is only -+ for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -1538,6 +1556,37 @@ spec: - or to "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1507,6 +1523,37 @@ spec: + to "10.96.0.0/12" if that's unset. type: string type: object + pause: -+ description: Pause holds the image source for pause -+ container This is only for bottlerocket ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1787,7 +1989,7 @@ index da5d6a080..dd4f1e72f 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -1745,6 +1794,7 @@ spec: +@@ -1709,6 +1756,7 @@ spec: enum: - cloud-config - ignition @@ -1795,54 +1997,52 @@ index da5d6a080..dd4f1e72f 100644 type: string ignition: description: Ignition contains Ignition specific configuration. -@@ -2001,6 +2051,24 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -1937,6 +1985,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image -+ source for kubeadm bootstrap container This is only -+ for bottlerocket ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -2230,6 +2298,37 @@ spec: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2138,6 +2202,37 @@ spec: by referencing a secret. type: string type: object + pause: -+ description: Pause holds the image source for pause -+ container This is only for bottlerocket ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ Proxy holds the https and no proxy information + This is only for bottlerocket + properties: + httpsProxy: @@ -1856,8 +2056,66 @@ index da5d6a080..dd4f1e72f 100644 + type: array + type: object skipPhases: - description: SkipPhases is a list of phases to skip - during command execution. The list of phases can + description: |- + SkipPhases is a list of phases to skip during command execution. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 5a9c2f8bf..4d45e86af 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -575,6 +575,9 @@ func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *C + } + + func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -968,6 +971,9 @@ func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinCon + } + + func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { ++ // WARNING: in.Pause requires manual conversion: does not exist in peer-type ++ // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type ++ // WARNING: in.Proxy requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } +@@ -1080,7 +1086,15 @@ func Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1 + } + + func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { +- out.ClusterConfiguration = (*v1beta1.ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) ++ if in.ClusterConfiguration != nil { ++ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration ++ *out = new(v1beta1.ClusterConfiguration) ++ if err := Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { ++ return err ++ } ++ } else { ++ out.ClusterConfiguration = nil ++ } + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(v1beta1.InitConfiguration) +@@ -1138,7 +1152,15 @@ func Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *Kubeadm + } + + func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { +- out.ClusterConfiguration = (*ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) ++ if in.ClusterConfiguration != nil { ++ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration ++ *out = new(ClusterConfiguration) ++ if err := Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(*in, *out, s); err != nil { ++ return err ++ } ++ } else { ++ out.ClusterConfiguration = nil ++ } + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(InitConfiguration) -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0002-Add-unstacked-etcd-support.patch b/projects/kubernetes-sigs/cluster-api/patches/0002-Add-unstacked-etcd-support.patch index 1f92447d10..e00a9b82b5 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0002-Add-unstacked-etcd-support.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0002-Add-unstacked-etcd-support.patch @@ -1,7 +1,7 @@ -From bae12aae7aa733b4fea934cca2d072c084dfcc14 Mon Sep 17 00:00:00 2001 +From 84d971991787d5f4a445432f58704d9216b8983d Mon Sep 17 00:00:00 2001 From: Rajashree Mandaogane Date: Mon, 28 Jun 2021 13:44:50 -0700 -Subject: [PATCH 02/40] Add unstacked etcd support +Subject: [PATCH 02/37] Add unstacked etcd support Unstacked etcd: API and config changes @@ -66,7 +66,6 @@ It needs update permission on etcdadmcluster object for this. We previously had added this permission, it got dropped while rebasing commits on the new 1.0.1 branch. This commit adds back the permission. --- - api/v1alpha4/cluster_types.go | 14 ++ api/v1beta1/cluster_types.go | 14 ++ api/v1beta1/condition_consts.go | 16 ++ api/v1beta1/machine_types.go | 3 + @@ -80,53 +79,22 @@ commits on the new 1.0.1 branch. This commit adds back the permission. .../apis/core/v1alpha3/condition_consts.go | 16 ++ internal/apis/core/v1alpha3/conversion.go | 12 ++ .../core/v1alpha3/zz_generated.conversion.go | 6 + + internal/apis/core/v1alpha4/cluster_types.go | 14 ++ .../controllers/cluster/cluster_controller.go | 90 ++++++++++- .../cluster/cluster_controller_phases.go | 108 +++++++++++++ .../cluster/cluster_controller_test.go | 136 +++++++++++++++++ .../machine/machine_controller_noderef.go | 8 + - .../machine_controller_noderef_test.go | 43 ++++++ + .../machine_controller_noderef_test.go | 48 ++++++ .../machine/machine_controller_phases.go | 115 ++++++++++++++ .../controllers/dockermachine_controller.go | 35 +++-- util/collections/machine_filters.go | 26 ++++ util/secret/certificates.go | 3 + util/secret/consts.go | 2 + util/util.go | 6 + - 25 files changed, 877 insertions(+), 22 deletions(-) + 25 files changed, 882 insertions(+), 22 deletions(-) -diff --git a/api/v1alpha4/cluster_types.go b/api/v1alpha4/cluster_types.go -index d4ee0658e..207cdcf76 100644 ---- a/api/v1alpha4/cluster_types.go -+++ b/api/v1alpha4/cluster_types.go -@@ -56,6 +56,11 @@ type ClusterSpec struct { - // +optional - ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` - -+ // ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details -+ // for provisioning an external etcd cluster -+ // +optional -+ ManagedExternalEtcdRef *corev1.ObjectReference `json:"managedExternalEtcdRef,omitempty"` -+ - // InfrastructureRef is a reference to a provider-specific resource that holds the details - // for provisioning infrastructure for a cluster in said provider. - // +optional -@@ -222,6 +227,15 @@ type ClusterStatus struct { - // ObservedGeneration is the latest generation observed by the controller. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -+ -+ // ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, -+ // so remaining etcd members can lookup the address to join the cluster -+ // +optional -+ ManagedExternalEtcdInitialized bool `json:"managedExternalEtcdInitialized"` -+ -+ // ManagedExternalEtcdReady indicates external etcd cluster is fully provisioned -+ // +optional -+ ManagedExternalEtcdReady bool `json:"managedExternalEtcdReady"` - } - - // ANCHOR_END: ClusterStatus diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go -index 456d83622..dcfa7e198 100644 +index 12c258f22..680e99731 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -60,6 +60,11 @@ type ClusterSpec struct { @@ -158,10 +126,10 @@ index 456d83622..dcfa7e198 100644 // ANCHOR_END: ClusterStatus diff --git a/api/v1beta1/condition_consts.go b/api/v1beta1/condition_consts.go -index 5e2bc212e..960ad2d12 100644 +index 57d8324c1..15d67d77b 100644 --- a/api/v1beta1/condition_consts.go +++ b/api/v1beta1/condition_consts.go -@@ -269,6 +269,22 @@ const ( +@@ -286,6 +286,22 @@ const ( ScalingDownReason = "ScalingDown" ) @@ -199,7 +167,7 @@ index e6e0fa8fe..07395019e 100644 ExcludeNodeDrainingAnnotation = "machine.cluster.x-k8s.io/exclude-node-draining" diff --git a/cmd/clusterctl/client/cluster/mover.go b/cmd/clusterctl/client/cluster/mover.go -index ea9c742ab..61270d3a7 100644 +index 0232aba2b..4910963e6 100644 --- a/cmd/clusterctl/client/cluster/mover.go +++ b/cmd/clusterctl/client/cluster/mover.go @@ -270,7 +270,8 @@ func (o *objectMover) checkProvisioningCompleted(ctx context.Context, graph *obj @@ -213,10 +181,10 @@ index ea9c742ab..61270d3a7 100644 } } diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml -index f052a5b8e..a10bee3ce 100644 +index 1e04b861c..5d9abbe89 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml -@@ -169,6 +169,45 @@ spec: +@@ -189,6 +189,45 @@ spec: type: string type: object x-kubernetes-map-type: atomic @@ -262,7 +230,7 @@ index f052a5b8e..a10bee3ce 100644 paused: description: Paused can be used to prevent controllers from processing the Cluster and all its associated objects. -@@ -261,6 +300,15 @@ spec: +@@ -283,6 +322,15 @@ spec: description: InfrastructureReady is the state of the infrastructure provider. type: boolean @@ -278,7 +246,7 @@ index f052a5b8e..a10bee3ce 100644 observedGeneration: description: ObservedGeneration is the latest generation observed by the controller. -@@ -432,6 +480,45 @@ spec: +@@ -478,6 +526,45 @@ spec: type: string type: object x-kubernetes-map-type: atomic @@ -324,7 +292,7 @@ index f052a5b8e..a10bee3ce 100644 paused: description: Paused can be used to prevent controllers from processing the Cluster and all its associated objects. -@@ -649,6 +736,15 @@ spec: +@@ -696,6 +783,15 @@ spec: description: InfrastructureReady is the state of the infrastructure provider. type: boolean @@ -340,7 +308,7 @@ index f052a5b8e..a10bee3ce 100644 observedGeneration: description: ObservedGeneration is the latest generation observed by the controller. -@@ -827,6 +923,45 @@ spec: +@@ -895,6 +991,45 @@ spec: type: string type: object x-kubernetes-map-type: atomic @@ -386,7 +354,7 @@ index f052a5b8e..a10bee3ce 100644 paused: description: Paused can be used to prevent controllers from processing the Cluster and all its associated objects. -@@ -1627,6 +1762,15 @@ spec: +@@ -1670,6 +1805,15 @@ spec: description: InfrastructureReady is the state of the infrastructure provider. type: boolean @@ -429,10 +397,10 @@ index 55346c81b..b111f3d67 100644 - bootstrap.cluster.x-k8s.io - controlplane.cluster.x-k8s.io diff --git a/controllers/external/util.go b/controllers/external/util.go -index 896474544..7e0fd392a 100644 +index 4efdb9c13..182d680e2 100644 --- a/controllers/external/util.go +++ b/controllers/external/util.go -@@ -244,3 +244,13 @@ func IsInitialized(obj *unstructured.Unstructured) (bool, error) { +@@ -256,3 +256,13 @@ func IsInitialized(obj *unstructured.Unstructured) (bool, error) { } return initialized && found, nil } @@ -447,10 +415,10 @@ index 896474544..7e0fd392a 100644 + return endpoints, found, nil +} diff --git a/controlplane/kubeadm/config/rbac/role.yaml b/controlplane/kubeadm/config/rbac/role.yaml -index 8bae8c0a1..19055ca2a 100644 +index c79787ee7..2f2554b62 100644 --- a/controlplane/kubeadm/config/rbac/role.yaml +++ b/controlplane/kubeadm/config/rbac/role.yaml -@@ -81,3 +81,12 @@ rules: +@@ -87,3 +87,12 @@ rules: - patch - update - watch @@ -464,7 +432,7 @@ index 8bae8c0a1..19055ca2a 100644 + - update + - watch diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go -index f71bdec07..9bdafa7ec 100644 +index 22ba4f0ae..a3a67dadd 100644 --- a/controlplane/kubeadm/internal/controllers/controller.go +++ b/controlplane/kubeadm/internal/controllers/controller.go @@ -19,6 +19,8 @@ package controllers @@ -484,15 +452,15 @@ index f71bdec07..9bdafa7ec 100644 "sigs.k8s.io/cluster-api/controllers/remote" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" -@@ -68,6 +71,7 @@ const ( - // +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch +@@ -69,6 +72,7 @@ const ( // +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch;create;update;patch;delete + // +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machinepools,verbs=list // +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch +// +kubebuilder:rbac:groups=etcdcluster.cluster.x-k8s.io,resources=*,verbs=get;list;watch;update // KubeadmControlPlaneReconciler reconciles a KubeadmControlPlane object. type KubeadmControlPlaneReconciler struct { -@@ -169,6 +173,32 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl. +@@ -170,6 +174,32 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl. return ctrl.Result{Requeue: true}, nil } @@ -549,7 +517,7 @@ index f71bdec07..9bdafa7ec 100644 controllerutil.RemoveFinalizer(controlPlane.KCP, controlplanev1.KubeadmControlPlaneFinalizer) @@ -530,12 +575,6 @@ func (r *KubeadmControlPlaneReconciler) reconcileDelete(ctx context.Context, con // all the machines are deleted in parallel. - conditions.SetAggregate(controlPlane.KCP, controlplanev1.MachinesReadyCondition, controlPlane.Machines.ConditionGetters(), conditions.AddSourceRef(), conditions.WithStepCounterIf(false)) + conditions.SetAggregate(controlPlane.KCP, controlplanev1.MachinesReadyCondition, controlPlane.Machines.ConditionGetters(), conditions.AddSourceRef()) - // Gets all machines, not just control plane machines. - allMachines, err := r.managementCluster.GetMachinesForCluster(ctx, controlPlane.Cluster) @@ -684,6 +652,38 @@ index c7ea14ba3..30a689e8e 100644 return nil } +diff --git a/internal/apis/core/v1alpha4/cluster_types.go b/internal/apis/core/v1alpha4/cluster_types.go +index 019329d7c..6e4069b73 100644 +--- a/internal/apis/core/v1alpha4/cluster_types.go ++++ b/internal/apis/core/v1alpha4/cluster_types.go +@@ -56,6 +56,11 @@ type ClusterSpec struct { + // +optional + ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` + ++ // ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details ++ // for provisioning an external etcd cluster ++ // +optional ++ ManagedExternalEtcdRef *corev1.ObjectReference `json:"managedExternalEtcdRef,omitempty"` ++ + // InfrastructureRef is a reference to a provider-specific resource that holds the details + // for provisioning infrastructure for a cluster in said provider. + // +optional +@@ -222,6 +227,15 @@ type ClusterStatus struct { + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` ++ ++ // ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, ++ // so remaining etcd members can lookup the address to join the cluster ++ // +optional ++ ManagedExternalEtcdInitialized bool `json:"managedExternalEtcdInitialized"` ++ ++ // ManagedExternalEtcdReady indicates external etcd cluster is fully provisioned ++ // +optional ++ ManagedExternalEtcdReady bool `json:"managedExternalEtcdReady"` + } + + // ANCHOR_END: ClusterStatus diff --git a/internal/controllers/cluster/cluster_controller.go b/internal/controllers/cluster/cluster_controller.go index 7654b788a..269007490 100644 --- a/internal/controllers/cluster/cluster_controller.go @@ -860,7 +860,7 @@ index 7654b788a..269007490 100644 + }} +} diff --git a/internal/controllers/cluster/cluster_controller_phases.go b/internal/controllers/cluster/cluster_controller_phases.go -index 4266a212d..590967dd6 100644 +index c70d3389d..73ff4f789 100644 --- a/internal/controllers/cluster/cluster_controller_phases.go +++ b/internal/controllers/cluster/cluster_controller_phases.go @@ -19,6 +19,8 @@ package cluster @@ -993,7 +993,7 @@ index 4266a212d..590967dd6 100644 log := ctrl.LoggerFrom(ctx) diff --git a/internal/controllers/cluster/cluster_controller_test.go b/internal/controllers/cluster/cluster_controller_test.go -index f6a35071c..bce99a762 100644 +index 7e505b7d1..0439ca397 100644 --- a/internal/controllers/cluster/cluster_controller_test.go +++ b/internal/controllers/cluster/cluster_controller_test.go @@ -537,6 +537,124 @@ func TestClusterReconcilerNodeRef(t *testing.T) { @@ -1175,10 +1175,10 @@ index f6a35071c..bce99a762 100644 g.Expect(actual).To(BeComparableTo(expected)) diff --git a/internal/controllers/machine/machine_controller_noderef.go b/internal/controllers/machine/machine_controller_noderef.go -index 7f32c72c4..e6a9374f6 100644 +index 719e7d411..4f3404aa2 100644 --- a/internal/controllers/machine/machine_controller_noderef.go +++ b/internal/controllers/machine/machine_controller_noderef.go -@@ -53,6 +53,14 @@ func (r *Reconciler) reconcileNode(ctx context.Context, s *scope) (ctrl.Result, +@@ -55,6 +55,14 @@ func (r *Reconciler) reconcileNode(ctx context.Context, s *scope) (ctrl.Result, return ctrl.Result{}, err } @@ -1194,10 +1194,18 @@ index 7f32c72c4..e6a9374f6 100644 if machine.Spec.ProviderID == nil || *machine.Spec.ProviderID == "" { log.Info("Waiting for infrastructure provider to report spec.providerID", machine.Spec.InfrastructureRef.Kind, klog.KRef(machine.Spec.InfrastructureRef.Namespace, machine.Spec.InfrastructureRef.Name)) diff --git a/internal/controllers/machine/machine_controller_noderef_test.go b/internal/controllers/machine/machine_controller_noderef_test.go -index 0bcaaa1d0..f3586efa5 100644 +index 48ebcabf3..9a150640d 100644 --- a/internal/controllers/machine/machine_controller_noderef_test.go +++ b/internal/controllers/machine/machine_controller_noderef_test.go -@@ -35,6 +35,7 @@ import ( +@@ -26,6 +26,7 @@ import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ++ "k8s.io/utils/pointer" + "k8s.io/utils/ptr" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +@@ -35,6 +36,7 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util" @@ -1205,8 +1213,8 @@ index 0bcaaa1d0..f3586efa5 100644 "sigs.k8s.io/cluster-api/util/kubeconfig" ) -@@ -770,3 +771,45 @@ func TestPatchNode(t *testing.T) { - }) +@@ -996,3 +998,49 @@ func newFakeMachineDeployment(namespace, clusterName string) *clusterv1.MachineD + }, } } + @@ -1245,14 +1253,18 @@ index 0bcaaa1d0..f3586efa5 100644 + t.Run(tc.name, func(t *testing.T) { + g := NewWithT(t) + r := Reconciler{Client: env} ++ s := &scope{ ++ cluster: &clusterv1.Cluster{}, ++ machine: tc.machine, ++ } + -+ g.Expect(r.reconcileNode(ctx, &clusterv1.Cluster{}, tc.machine)).To(Equal(ctrl.Result{})) ++ g.Expect(r.reconcileNode(ctx, s)).To(Equal(ctrl.Result{})) + g.Expect(conditions.Get(tc.machine, clusterv1.MachineNodeHealthyCondition)).To(BeNil()) + }) + } +} diff --git a/internal/controllers/machine/machine_controller_phases.go b/internal/controllers/machine/machine_controller_phases.go -index 8c197b4c1..e22977cc0 100644 +index 1bd41f4d8..32cddef3d 100644 --- a/internal/controllers/machine/machine_controller_phases.go +++ b/internal/controllers/machine/machine_controller_phases.go @@ -19,6 +19,7 @@ package machine @@ -1392,10 +1404,10 @@ index 8c197b4c1..e22977cc0 100644 var failureDomain string err = util.UnstructuredUnmarshalField(infraConfig, &failureDomain, "spec", "failureDomain") diff --git a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go -index 68b3553ff..30128dcc4 100644 +index 8b517275a..029c5614b 100644 --- a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go +++ b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go -@@ -408,23 +408,27 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * +@@ -415,23 +415,27 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * // set to true after a control plane machine has a node ref. If we would requeue here in this case, the // Machine will never get a node ref as ProviderID is required to set the node ref, so we would get a deadlock. if cluster.Spec.ControlPlaneRef != nil && @@ -1436,7 +1448,7 @@ index 68b3553ff..30128dcc4 100644 } // Set ProviderID so the Cluster API Machine Controller can pull it providerID := externalMachine.ProviderID() -@@ -599,3 +603,8 @@ func setMachineAddress(ctx context.Context, dockerMachine *infrav1.DockerMachine +@@ -606,3 +610,8 @@ func setMachineAddress(ctx context.Context, dockerMachine *infrav1.DockerMachine return nil } @@ -1446,7 +1458,7 @@ index 68b3553ff..30128dcc4 100644 + return ok +} diff --git a/util/collections/machine_filters.go b/util/collections/machine_filters.go -index 12c2e20f8..ec46466ec 100644 +index 775e9a8b8..0e52c4f45 100644 --- a/util/collections/machine_filters.go +++ b/util/collections/machine_filters.go @@ -122,6 +122,18 @@ func ControlPlaneMachines(clusterName string) func(machine *clusterv1.Machine) b @@ -1490,10 +1502,10 @@ index 12c2e20f8..ec46466ec 100644 func MatchesKubernetesVersion(kubernetesVersion string) Func { return func(machine *clusterv1.Machine) bool { diff --git a/util/secret/certificates.go b/util/secret/certificates.go -index 7e9d211dc..60f37ced3 100644 +index b1d553c52..0fc42c3b8 100644 --- a/util/secret/certificates.go +++ b/util/secret/certificates.go -@@ -427,6 +427,9 @@ func (c Certificates) AsFiles() []bootstrapv1.File { +@@ -431,6 +431,9 @@ func (c Certificates) AsFiles() []bootstrapv1.File { if serviceAccountKey := c.GetByPurpose(ServiceAccount); serviceAccountKey != nil { certFiles = append(certFiles, serviceAccountKey.AsFiles()...) } @@ -1517,10 +1529,10 @@ index d50062da3..043764325 100644 var ( diff --git a/util/util.go b/util/util.go -index d72947ecf..e830011d9 100644 +index 1648cb3d1..f967e7b37 100644 --- a/util/util.go +++ b/util/util.go -@@ -146,6 +146,12 @@ func IsNodeReady(node *corev1.Node) bool { +@@ -147,6 +147,12 @@ func IsNodeReady(node *corev1.Node) bool { return false } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0003-Unstacked-etcd-and-controlplane-upgrade.patch b/projects/kubernetes-sigs/cluster-api/patches/0003-Unstacked-etcd-and-controlplane-upgrade.patch index b249cbf5d4..0511e68071 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0003-Unstacked-etcd-and-controlplane-upgrade.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0003-Unstacked-etcd-and-controlplane-upgrade.patch @@ -1,7 +1,7 @@ -From b058b9408a0991cc9422bcfedc5612897cb3c51a Mon Sep 17 00:00:00 2001 +From e348b690525d2d7d9da803525d8cae30082aa817 Mon Sep 17 00:00:00 2001 From: Rajashree Mandaogane Date: Fri, 6 Aug 2021 17:16:39 -0700 -Subject: [PATCH 03/40] Unstacked etcd and controlplane upgrade +Subject: [PATCH 03/37] Unstacked etcd and controlplane upgrade Rename controlplane upgrade annotation variable @@ -48,24 +48,22 @@ previous clients that expect this orchestration by default. .../kubeadm/api/v1beta1/condition_consts.go | 8 + .../internal/controllers/controller.go | 116 ++++++-- .../internal/controllers/controller_test.go | 209 +++++++++++++- - .../kubeadm/internal/controllers/upgrade.go | 6 + .../kubeadm/internal/workload_cluster.go | 1 + .../kubeadm/internal/workload_cluster_etcd.go | 8 + .../controllers/cluster/cluster_controller.go | 2 +- - .../cluster/cluster_controller_phases.go | 104 +++---- + .../cluster/cluster_controller_phases.go | 105 +++---- .../cluster/cluster_controller_test.go | 257 ++++++++++++++++++ - .../machine_controller_noderef_test.go | 6 +- internal/test/builder/builders.go | 10 + internal/test/builder/etcd.go | 80 ++++++ util/annotations/helpers.go | 5 + - 15 files changed, 778 insertions(+), 70 deletions(-) + 13 files changed, 768 insertions(+), 69 deletions(-) create mode 100644 internal/test/builder/etcd.go diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go -index 017f7f675..cea6c9b90 100644 +index 28fd03296..f0e2c140b 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go -@@ -161,6 +161,9 @@ const ( +@@ -168,6 +168,9 @@ const ( // will receive the resulting object. TopologyDryRunAnnotation = "topology.cluster.x-k8s.io/dry-run" @@ -75,7 +73,7 @@ index 017f7f675..cea6c9b90 100644 // ReplicasManagedByAnnotation is an annotation that indicates external (non-Cluster API) management of infra scaling. // The practical effect of this is that the capi "replica" count should be passively derived from the number of observed infra machines, // instead of being a source of truth for eventual consistency. -@@ -190,6 +193,10 @@ const ( +@@ -197,6 +200,10 @@ const ( // VariableDefinitionFromInline indicates a patch or variable was defined in the `.spec` of a ClusterClass // rather than from an external patch extension. VariableDefinitionFromInline = "inline" @@ -87,10 +85,10 @@ index 017f7f675..cea6c9b90 100644 // MachineSetPreflightCheck defines a valid MachineSet preflight check. diff --git a/controllers/external/util.go b/controllers/external/util.go -index 7e0fd392a..5b6443c78 100644 +index 182d680e2..7e6f22203 100644 --- a/controllers/external/util.go +++ b/controllers/external/util.go -@@ -254,3 +254,32 @@ func GetExternalEtcdEndpoints(externalEtcd *unstructured.Unstructured) (string, +@@ -266,3 +266,32 @@ func GetExternalEtcdEndpoints(externalEtcd *unstructured.Unstructured) (string, return endpoints, found, nil } @@ -143,7 +141,7 @@ index e9870d34c..adc1b2a0a 100644 const ( diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go -index 9bdafa7ec..bc2da3e25 100644 +index a3a67dadd..45da8201c 100644 --- a/controlplane/kubeadm/internal/controllers/controller.go +++ b/controlplane/kubeadm/internal/controllers/controller.go @@ -25,6 +25,7 @@ import ( @@ -154,7 +152,7 @@ index 9bdafa7ec..bc2da3e25 100644 "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" -@@ -174,28 +175,12 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl. +@@ -175,28 +176,12 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl. } if cluster.Spec.ManagedExternalEtcdRef != nil { @@ -294,7 +292,7 @@ index 9bdafa7ec..bc2da3e25 100644 } } diff --git a/controlplane/kubeadm/internal/controllers/controller_test.go b/controlplane/kubeadm/internal/controllers/controller_test.go -index 988ce54be..d352f7863 100644 +index 6459174a9..3c49022ae 100644 --- a/controlplane/kubeadm/internal/controllers/controller_test.go +++ b/controlplane/kubeadm/internal/controllers/controller_test.go @@ -24,6 +24,7 @@ import ( @@ -305,7 +303,7 @@ index 988ce54be..d352f7863 100644 "sync" "testing" "time" -@@ -58,6 +59,7 @@ import ( +@@ -56,6 +57,7 @@ import ( "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/internal/webhooks" "sigs.k8s.io/cluster-api/util" @@ -313,7 +311,7 @@ index 988ce54be..d352f7863 100644 "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" -@@ -84,7 +86,8 @@ func TestClusterToKubeadmControlPlane(t *testing.T) { +@@ -82,7 +84,8 @@ func TestClusterToKubeadmControlPlane(t *testing.T) { { NamespacedName: client.ObjectKey{ Namespace: cluster.Spec.ControlPlaneRef.Namespace, @@ -323,7 +321,7 @@ index 988ce54be..d352f7863 100644 }, } -@@ -2285,6 +2288,210 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) { +@@ -2280,6 +2283,210 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) { }) } @@ -534,49 +532,32 @@ index 988ce54be..d352f7863 100644 // test utils. func newFakeClient(initObjs ...client.Object) client.Client { -diff --git a/controlplane/kubeadm/internal/controllers/upgrade.go b/controlplane/kubeadm/internal/controllers/upgrade.go -index 6abf13694..647d87f6a 100644 ---- a/controlplane/kubeadm/internal/controllers/upgrade.go -+++ b/controlplane/kubeadm/internal/controllers/upgrade.go -@@ -104,6 +104,12 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( - } - } - -+ if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil && controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External != nil { -+ if err := workloadCluster.UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.Endpoints, parsedVersion); err != nil { -+ return ctrl.Result{}, errors.Wrap(err, "failed to update the external etcd endpoints in the kubeadm config map") -+ } -+ } -+ - if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil { - if err := workloadCluster.UpdateAPIServerInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer, parsedVersion); err != nil { - return ctrl.Result{}, errors.Wrap(err, "failed to update api server in the kubeadm config map") diff --git a/controlplane/kubeadm/internal/workload_cluster.go b/controlplane/kubeadm/internal/workload_cluster.go -index d4c41eb89..cf6675f2f 100644 +index 9034dd1e0..9d7cb609f 100644 --- a/controlplane/kubeadm/internal/workload_cluster.go +++ b/controlplane/kubeadm/internal/workload_cluster.go @@ -109,6 +109,7 @@ type WorkloadCluster interface { - UpdateImageRepositoryInKubeadmConfigMap(ctx context.Context, imageRepository string, version semver.Version) error - UpdateEtcdVersionInKubeadmConfigMap(ctx context.Context, imageRepository, imageTag string, version semver.Version) error - UpdateEtcdExtraArgsInKubeadmConfigMap(ctx context.Context, extraArgs map[string]string, version semver.Version) error + UpdateImageRepositoryInKubeadmConfigMap(imageRepository string) func(*bootstrapv1.ClusterConfiguration) + UpdateFeatureGatesInKubeadmConfigMap(featureGates map[string]bool) func(*bootstrapv1.ClusterConfiguration) + UpdateEtcdLocalInKubeadmConfigMap(localEtcd *bootstrapv1.LocalEtcd) func(*bootstrapv1.ClusterConfiguration) + UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx context.Context, endpoints []string, version semver.Version) error - UpdateAPIServerInKubeadmConfigMap(ctx context.Context, apiServer bootstrapv1.APIServer, version semver.Version) error - UpdateControllerManagerInKubeadmConfigMap(ctx context.Context, controllerManager bootstrapv1.ControlPlaneComponent, version semver.Version) error - UpdateSchedulerInKubeadmConfigMap(ctx context.Context, scheduler bootstrapv1.ControlPlaneComponent, version semver.Version) error + UpdateEtcdExternalInKubeadmConfigMap(externalEtcd *bootstrapv1.ExternalEtcd) func(*bootstrapv1.ClusterConfiguration) + UpdateAPIServerInKubeadmConfigMap(apiServer bootstrapv1.APIServer) func(*bootstrapv1.ClusterConfiguration) + UpdateControllerManagerInKubeadmConfigMap(controllerManager bootstrapv1.ControlPlaneComponent) func(*bootstrapv1.ClusterConfiguration) diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd.go b/controlplane/kubeadm/internal/workload_cluster_etcd.go -index bb4c4d417..d2850c14e 100644 +index 48c06bc3f..fcf4beb69 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd.go -@@ -111,6 +111,14 @@ func (w *Workload) UpdateEtcdExtraArgsInKubeadmConfigMap(ctx context.Context, ex - }, version) +@@ -110,6 +110,14 @@ func (w *Workload) UpdateEtcdExternalInKubeadmConfigMap(etcdExternal *bootstrapv + } } +func (w *Workload) UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx context.Context, endpoints []string, version semver.Version) error { -+ return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { ++ return w.UpdateClusterConfiguration(ctx, version, func(c *bootstrapv1.ClusterConfiguration) { + if c.Etcd.External != nil { + c.Etcd.External.Endpoints = endpoints + } -+ }, version) ++ }) +} + // RemoveEtcdMemberForMachine removes the etcd member from the target cluster's etcd cluster. @@ -599,10 +580,10 @@ index 269007490..b41895e51 100644 res := ctrl.Result{} diff --git a/internal/controllers/cluster/cluster_controller_phases.go b/internal/controllers/cluster/cluster_controller_phases.go -index 590967dd6..cb6e878e8 100644 +index 73ff4f789..0482afb3f 100644 --- a/internal/controllers/cluster/cluster_controller_phases.go +++ b/internal/controllers/cluster/cluster_controller_phases.go -@@ -19,13 +19,13 @@ package cluster +@@ -19,10 +19,11 @@ package cluster import ( "context" "fmt" @@ -610,15 +591,13 @@ index 590967dd6..cb6e878e8 100644 - "sigs.k8s.io/controller-runtime/pkg/client" "time" ++ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ++ + "github.com/go-logr/logr" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" -+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/utils/pointer" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" -@@ -223,37 +223,13 @@ func (r *Reconciler) reconcileControlPlane(ctx context.Context, cluster *cluster +@@ -223,37 +224,13 @@ func (r *Reconciler) reconcileControlPlane(ctx context.Context, cluster *cluster if cluster.Spec.ControlPlaneRef == nil { return ctrl.Result{}, nil } @@ -633,13 +612,13 @@ index 590967dd6..cb6e878e8 100644 - log.Info("Could not find external object for cluster, requeuing", "refGroupVersionKind", etcdRef.GroupVersionKind(), "refName", etcdRef.Name) - return ctrl.Result{RequeueAfter: 30 * time.Second}, nil - } -+ log := ctrl.LoggerFrom(ctx) -+ if result, err := r.handlePauseControlPlaneWithExternalManagedEtcd(ctx, log, cluster); err != nil { - return ctrl.Result{}, err +- return ctrl.Result{}, err - } - externalEtcdReady, err := external.IsReady(externalEtcd) - if err != nil { -- return ctrl.Result{}, err ++ log := ctrl.LoggerFrom(ctx) ++ if result, err := r.handlePauseControlPlaneWithExternalManagedEtcd(ctx, log, cluster); err != nil { + return ctrl.Result{}, err - } - if !externalEtcdReady { - // External Etcd Cluster has not been created, pause control plane provisioning by setting the paused annotation on the Control plane object @@ -661,7 +640,7 @@ index 590967dd6..cb6e878e8 100644 } } -@@ -312,6 +288,55 @@ func (r *Reconciler) reconcileControlPlane(ctx context.Context, cluster *cluster +@@ -312,6 +289,55 @@ func (r *Reconciler) reconcileControlPlane(ctx context.Context, cluster *cluster return ctrl.Result{}, nil } @@ -717,7 +696,7 @@ index 590967dd6..cb6e878e8 100644 func (r *Reconciler) reconcileEtcdCluster(ctx context.Context, cluster *clusterv1.Cluster) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) -@@ -345,23 +370,6 @@ func (r *Reconciler) reconcileEtcdCluster(ctx context.Context, cluster *clusterv +@@ -345,23 +371,6 @@ func (r *Reconciler) reconcileEtcdCluster(ctx context.Context, cluster *clusterv } cluster.Status.ManagedExternalEtcdReady = ready @@ -742,7 +721,7 @@ index 590967dd6..cb6e878e8 100644 conditions.SetMirror(cluster, clusterv1.ManagedExternalEtcdClusterReadyCondition, conditions.UnstructuredGetter(etcdPlaneConfig), diff --git a/internal/controllers/cluster/cluster_controller_test.go b/internal/controllers/cluster/cluster_controller_test.go -index bce99a762..d6afe09dc 100644 +index 0439ca397..4708101ab 100644 --- a/internal/controllers/cluster/cluster_controller_test.go +++ b/internal/controllers/cluster/cluster_controller_test.go @@ -18,16 +18,21 @@ package cluster @@ -758,7 +737,7 @@ index bce99a762..d6afe09dc 100644 + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/client-go/tools/record" utilfeature "k8s.io/component-base/featuregate/testing" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -1030,29 +1009,11 @@ index bce99a762..d6afe09dc 100644 + g.Expect(err).NotTo(HaveOccurred()) + }) +} -diff --git a/internal/controllers/machine/machine_controller_noderef_test.go b/internal/controllers/machine/machine_controller_noderef_test.go -index f3586efa5..465b837a3 100644 ---- a/internal/controllers/machine/machine_controller_noderef_test.go -+++ b/internal/controllers/machine/machine_controller_noderef_test.go -@@ -807,8 +807,12 @@ func TestReconcileNodeForEtcdMachines(t *testing.T) { - t.Run(tc.name, func(t *testing.T) { - g := NewWithT(t) - r := Reconciler{Client: env} -+ s := &scope{ -+ cluster: &clusterv1.Cluster{}, -+ machine: tc.machine, -+ } - -- g.Expect(r.reconcileNode(ctx, &clusterv1.Cluster{}, tc.machine)).To(Equal(ctrl.Result{})) -+ g.Expect(r.reconcileNode(ctx, s)).To(Equal(ctrl.Result{})) - g.Expect(conditions.Get(tc.machine, clusterv1.MachineNodeHealthyCondition)).To(BeNil()) - }) - } diff --git a/internal/test/builder/builders.go b/internal/test/builder/builders.go -index 24e00c201..d87b0424b 100644 +index 1d7a2bb6d..7bca0d085 100644 --- a/internal/test/builder/builders.go +++ b/internal/test/builder/builders.go -@@ -39,6 +39,7 @@ type ClusterBuilder struct { +@@ -38,6 +38,7 @@ type ClusterBuilder struct { topology *clusterv1.Topology infrastructureCluster *unstructured.Unstructured controlPlane *unstructured.Unstructured @@ -1060,7 +1021,7 @@ index 24e00c201..d87b0424b 100644 network *clusterv1.ClusterNetwork } -@@ -80,6 +81,12 @@ func (c *ClusterBuilder) WithControlPlane(t *unstructured.Unstructured) *Cluster +@@ -79,6 +80,12 @@ func (c *ClusterBuilder) WithControlPlane(t *unstructured.Unstructured) *Cluster return c } @@ -1073,7 +1034,7 @@ index 24e00c201..d87b0424b 100644 // WithTopology adds the passed Topology object to the ClusterBuilder. func (c *ClusterBuilder) WithTopology(topology *clusterv1.Topology) *ClusterBuilder { c.topology = topology -@@ -110,6 +117,9 @@ func (c *ClusterBuilder) Build() *clusterv1.Cluster { +@@ -109,6 +116,9 @@ func (c *ClusterBuilder) Build() *clusterv1.Cluster { if c.controlPlane != nil { obj.Spec.ControlPlaneRef = objToRef(c.controlPlane) } @@ -1170,10 +1131,10 @@ index 000000000..9c187575f + return c.obj +} diff --git a/util/annotations/helpers.go b/util/annotations/helpers.go -index 47dc7fc6b..e611502ae 100644 +index e4990032b..a68d61ae8 100644 --- a/util/annotations/helpers.go +++ b/util/annotations/helpers.go -@@ -83,6 +83,11 @@ func AddAnnotations(o metav1.Object, desired map[string]string) bool { +@@ -88,6 +88,11 @@ func AddAnnotations(o metav1.Object, desired map[string]string) bool { return hasChanged } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0004-Patch-config-path-in-kubevip-manifest-for-kubeadm-co.patch b/projects/kubernetes-sigs/cluster-api/patches/0004-Patch-config-path-in-kubevip-manifest-for-kubeadm-co.patch index 7aeaf6f5ee..60a14ba623 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0004-Patch-config-path-in-kubevip-manifest-for-kubeadm-co.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0004-Patch-config-path-in-kubevip-manifest-for-kubeadm-co.patch @@ -1,7 +1,7 @@ -From 5f47bffb6265117f37202b7caa9184cb47fa84b3 Mon Sep 17 00:00:00 2001 +From bb5986732ed7b383fc6154b79a77e5b5ce62c750 Mon Sep 17 00:00:00 2001 From: Guillermo Gaston Date: Thu, 19 Aug 2021 21:52:52 +0000 -Subject: [PATCH 04/40] Patch config path in kubevip manifest for kubeadm +Subject: [PATCH 04/37] Patch config path in kubevip manifest for kubeadm control plane join with bottlerocket format cr: https://code.amazon.com/reviews/CR-55711271 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0005-Make-pause-and-bottlerocket-bootstrap-images-updatab.patch b/projects/kubernetes-sigs/cluster-api/patches/0005-Make-pause-and-bottlerocket-bootstrap-images-updatab.patch index 7452e63203..168c944a0f 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0005-Make-pause-and-bottlerocket-bootstrap-images-updatab.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0005-Make-pause-and-bottlerocket-bootstrap-images-updatab.patch @@ -1,7 +1,7 @@ -From 9eb0a8e8fa5eea978b8e63a935b7d80f3a9352fe Mon Sep 17 00:00:00 2001 +From 671a679640f22d14f3a234dd1bf368ee07da18b9 Mon Sep 17 00:00:00 2001 From: Guillermo Gaston Date: Tue, 31 Aug 2021 15:56:28 +0000 -Subject: [PATCH 05/40] Make pause and bottlerocket bootstrap images updatable +Subject: [PATCH 05/37] Make pause and bottlerocket bootstrap images updatable in validation webhook cr: https://code.amazon.com/reviews/CR-56335855 @@ -11,10 +11,10 @@ cr: https://code.amazon.com/reviews/CR-56335855 2 files changed, 40 insertions(+) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 4338b8b11..230b0bebb 100644 +index d848d4616..ac736fcc8 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -162,6 +162,8 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -163,6 +163,8 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne // metadata {"metadata", "*"}, // spec.kubeadmConfigSpec.clusterConfiguration @@ -23,7 +23,7 @@ index 4338b8b11..230b0bebb 100644 {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageRepository"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageTag"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "extraArgs"}, -@@ -202,6 +204,8 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -205,6 +207,8 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, joinConfiguration, "controlPlane", "*"}, {spec, kubeadmConfigSpec, joinConfiguration, "discovery"}, {spec, kubeadmConfigSpec, joinConfiguration, "discovery", "*"}, @@ -33,7 +33,7 @@ index 4338b8b11..230b0bebb 100644 {spec, kubeadmConfigSpec, preKubeadmCommands}, {spec, kubeadmConfigSpec, postKubeadmCommands}, diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -index bc6dcc07f..275f2cb12 100644 +index 9c62b22ad..d92a27d14 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go @@ -705,6 +705,18 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0006-add-support-for-registry-mirror-for-bottlerocket.patch b/projects/kubernetes-sigs/cluster-api/patches/0006-add-support-for-registry-mirror-for-bottlerocket.patch index 42ede18a0b..bc1a7ec516 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0006-add-support-for-registry-mirror-for-bottlerocket.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0006-add-support-for-registry-mirror-for-bottlerocket.patch @@ -1,22 +1,88 @@ -From 35980864878f7856bcdce370844acb25057e7bd9 Mon Sep 17 00:00:00 2001 +From 569866cc7241a3b5bf6a9f7a38801dc79e6a2bea Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 21 Sep 2021 08:57:56 -0700 -Subject: [PATCH 06/40] add support for registry mirror for bottlerocket +Subject: [PATCH 06/37] add support for registry mirror for bottlerocket --- - .../kubeadm/api/v1beta1/kubeadm_types.go | 19 +++++++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 48 +++++++++++++++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 52 +++++++++++++++++++ - .../internal/bottlerocket/bootstrap.go | 19 +++++++ - .../internal/bottlerocket/bottlerocket.go | 20 +++++-- - .../controllers/kubeadmconfig_controller.go | 9 ++++ - .../kubeadm/types/upstreamv1beta1/types.go | 19 +++++++ - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 52 +++++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 26 ++++++++++ - 9 files changed, 260 insertions(+), 4 deletions(-) + api/v1beta1/zz_generated.deepcopy.go | 5 + + api/v1beta1/zz_generated.openapi.go | 22 +++ + .../kubeadm/api/v1beta1/kubeadm_types.go | 19 +++ + .../api/v1beta1/zz_generated.deepcopy.go | 17 ++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 52 ++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 56 ++++++ + .../internal/bottlerocket/bootstrap.go | 19 +++ + .../internal/bottlerocket/bottlerocket.go | 20 ++- + .../controllers/kubeadmconfig_controller.go | 9 + + .../kubeadm/types/upstreamv1beta1/types.go | 19 +++ + .../upstreamv1beta1/zz_generated.deepcopy.go | 17 ++ + .../zz_generated.conversion.go | 2 + + .../zz_generated.conversion.go | 2 + + .../crd/bases/cluster.x-k8s.io_clusters.yaml | 159 ++++++++++-------- + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 56 ++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 28 +++ + .../v1alpha4/zz_generated.conversion.go | 2 + + .../core/v1alpha4/zz_generated.conversion.go | 6 + + .../test/builder/zz_generated.deepcopy.go | 23 +++ + 19 files changed, 460 insertions(+), 73 deletions(-) +diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go +index cd8e2982e..d68175409 100644 +--- a/api/v1beta1/zz_generated.deepcopy.go ++++ b/api/v1beta1/zz_generated.deepcopy.go +@@ -409,6 +409,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = new(v1.ObjectReference) + **out = **in + } ++ if in.ManagedExternalEtcdRef != nil { ++ in, out := &in.ManagedExternalEtcdRef, &out.ManagedExternalEtcdRef ++ *out = new(v1.ObjectReference) ++ **out = **in ++ } + if in.InfrastructureRef != nil { + in, out := &in.InfrastructureRef, &out.InfrastructureRef + *out = new(v1.ObjectReference) +diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go +index 26d1d1785..c5f394fe3 100644 +--- a/api/v1beta1/zz_generated.openapi.go ++++ b/api/v1beta1/zz_generated.openapi.go +@@ -781,6 +781,12 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, ++ "managedExternalEtcdRef": { ++ SchemaProps: spec.SchemaProps{ ++ Description: "ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details for provisioning an external etcd cluster", ++ Ref: ref("k8s.io/api/core/v1.ObjectReference"), ++ }, ++ }, + "infrastructureRef": { + SchemaProps: spec.SchemaProps{ + Description: "InfrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.", +@@ -881,6 +887,22 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference + Format: "int64", + }, + }, ++ "managedExternalEtcdInitialized": { ++ SchemaProps: spec.SchemaProps{ ++ Description: "ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, so remaining etcd members can lookup the address to join the cluster", ++ Default: false, ++ Type: []string{"boolean"}, ++ Format: "", ++ }, ++ }, ++ "managedExternalEtcdReady": { ++ SchemaProps: spec.SchemaProps{ ++ Description: "ManagedExternalEtcdReady indicates external etcd cluster is fully provisioned", ++ Default: false, ++ Type: []string{"boolean"}, ++ Format: "", ++ }, ++ }, + }, + }, + }, diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 11aa737a7..9676d26a8 100644 +index f49a64302..1833dda87 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -88,6 +88,11 @@ type ClusterConfiguration struct { @@ -59,16 +125,59 @@ index 11aa737a7..9676d26a8 100644 // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration +diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +index 1c034ec0d..90c8c89be 100644 +--- a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +@@ -165,6 +165,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap + in.Proxy.DeepCopyInto(&out.Proxy) ++ out.RegistryMirror = in.RegistryMirror + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) +@@ -577,6 +578,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap + in.Proxy.DeepCopyInto(&out.Proxy) ++ out.RegistryMirror = in.RegistryMirror + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { +@@ -1110,6 +1112,21 @@ func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { ++ *out = *in ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. ++func (in *RegistryMirrorConfiguration) DeepCopy() *RegistryMirrorConfiguration { ++ if in == nil { ++ return nil ++ } ++ out := new(RegistryMirrorConfiguration) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { + *out = *in diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index e2ebd6fb6..ab6e724ca 100644 +index ec42c300e..da0f86d84 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -349,6 +349,18 @@ spec: +@@ -370,6 +370,19 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror information ++ description: |- ++ RegistryMirror holds the image registry mirror information + This is only for bottlerocket + properties: + caCert: @@ -82,12 +191,13 @@ index e2ebd6fb6..ab6e724ca 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -918,6 +930,18 @@ spec: +@@ -935,6 +948,19 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror information ++ description: |- ++ RegistryMirror holds the image registry mirror information + This is only for bottlerocket + properties: + caCert: @@ -101,12 +211,13 @@ index e2ebd6fb6..ab6e724ca 100644 type: object mounts: description: Mounts specifies a list of mount points to be setup. -@@ -1428,6 +1452,18 @@ spec: +@@ -2489,6 +2515,19 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror information ++ description: |- ++ RegistryMirror holds the image registry mirror information + This is only for bottlerocket + properties: + caCert: @@ -120,12 +231,13 @@ index e2ebd6fb6..ab6e724ca 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -2863,6 +2899,18 @@ spec: +@@ -3149,6 +3188,19 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror information ++ description: |- ++ RegistryMirror holds the image registry mirror information + This is only for bottlerocket + properties: + caCert: @@ -137,19 +249,20 @@ index e2ebd6fb6..ab6e724ca 100644 + type: string + type: object skipPhases: - description: SkipPhases is a list of phases to skip during command - execution. The list of phases can be obtained with the "kubeadm + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index adf6c718e..bdf596e4c 100644 +index 478c8baf6..8a1574b1d 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -373,6 +373,19 @@ spec: +@@ -383,6 +383,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -163,13 +276,14 @@ index adf6c718e..bdf596e4c 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -977,6 +990,19 @@ spec: +@@ -959,6 +973,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -183,13 +297,14 @@ index adf6c718e..bdf596e4c 100644 type: object mounts: description: Mounts specifies a list of mount points to be -@@ -1447,6 +1473,19 @@ spec: +@@ -2444,6 +2472,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -203,13 +318,14 @@ index adf6c718e..bdf596e4c 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -2930,6 +2969,19 @@ spec: +@@ -3119,6 +3161,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -221,8 +337,8 @@ index adf6c718e..bdf596e4c 100644 + type: string + type: object skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index e4be8d945..886af6d87 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -312,10 +428,10 @@ index b6eec374f..8d118c70c 100644 bottlerocketNodeUserData, err := generateNodeUserData("InitBottlerocketNode", bottlerocketNodeInitSettingsTemplate, bottlerocketInput) diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index ba57b38a8..cbc236823 100644 +index 000a4c5bd..b500f0973 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -479,6 +479,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -511,6 +511,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy } @@ -325,7 +441,7 @@ index ba57b38a8..cbc236823 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -674,6 +677,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -706,6 +709,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy } @@ -335,7 +451,7 @@ index ba57b38a8..cbc236823 100644 bootstrapJoinData, err = bottlerocket.NewNode(nodeInput, bottlerocketConfig) if err != nil { scope.Error(err, "Failed to create a worker bottlerocket join configuration") -@@ -791,6 +797,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -825,6 +831,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy } @@ -389,17 +505,347 @@ index 2570daa4f..8fe3ee5ae 100644 // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration +diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go +index 17a1e2aec..258534eb0 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go +@@ -164,6 +164,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap + in.Proxy.DeepCopyInto(&out.Proxy) ++ out.RegistryMirror = in.RegistryMirror + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) +@@ -431,6 +432,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap + in.Proxy.DeepCopyInto(&out.Proxy) ++ out.RegistryMirror = in.RegistryMirror + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { +@@ -586,3 +588,18 @@ func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { + in.DeepCopyInto(out) + return out + } ++ ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { ++ *out = *in ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. ++func (in *RegistryMirrorConfiguration) DeepCopy() *RegistryMirrorConfiguration { ++ if in == nil { ++ return nil ++ } ++ out := new(RegistryMirrorConfiguration) ++ in.DeepCopyInto(out) ++ return out ++} +diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +index b39352d39..99cf9a8ff 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +@@ -412,6 +412,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfigur + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -704,6 +705,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration( + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } +diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +index b487d3ba8..d9a815828 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +@@ -416,6 +416,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfigur + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -696,6 +697,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration( + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } +diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml +index 5d9abbe89..5f5fdc3cd 100644 +--- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml ++++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml +@@ -190,41 +190,48 @@ spec: + type: object + x-kubernetes-map-type: atomic + managedExternalEtcdRef: +- description: ManagedExternalEtcdRef is an optional reference to an +- etcd provider resource that holds details for provisioning an external +- etcd cluster ++ description: |- ++ ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details ++ for provisioning an external etcd cluster + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: +- description: 'If referring to a piece of an object instead of +- an entire object, this string should contain a valid JSON/Go +- field access statement, such as desiredState.manifest.containers[2]. +- For example, if the object reference is to a container within +- a pod, this would take on a value like: "spec.containers{name}" +- (where "name" refers to the name of the container that triggered +- the event) or if no container name is specified "spec.containers[2]" +- (container with index 2 in this pod). This syntax is chosen +- only to have some well-defined way of referencing a part of +- an object. TODO: this design is not final and this field is +- subject to change in the future.' ++ description: |- ++ If referring to a piece of an object instead of an entire object, this string ++ should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. ++ For example, if the object reference is to a container within a pod, this would take on a value like: ++ "spec.containers{name}" (where "name" refers to the name of the container that triggered ++ the event) or if no container name is specified "spec.containers[2]" (container with ++ index 2 in this pod). This syntax is chosen only to have some well-defined way of ++ referencing a part of an object. ++ TODO: this design is not final and this field is subject to change in the future. + type: string + kind: +- description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' ++ description: |- ++ Kind of the referent. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: +- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' ++ description: |- ++ Name of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: +- description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' ++ description: |- ++ Namespace of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: +- description: 'Specific resourceVersion to which this reference +- is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' ++ description: |- ++ Specific resourceVersion to which this reference is made, if any. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: +- description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' ++ description: |- ++ UID of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic +@@ -323,9 +330,9 @@ spec: + provider. + type: boolean + managedExternalEtcdInitialized: +- description: ManagedExternalEtcdInitialized indicates that first etcd +- member's IP address is set by machine controller, so remaining etcd +- members can lookup the address to join the cluster ++ description: |- ++ ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, ++ so remaining etcd members can lookup the address to join the cluster + type: boolean + managedExternalEtcdReady: + description: ManagedExternalEtcdReady indicates external etcd cluster +@@ -527,41 +534,48 @@ spec: + type: object + x-kubernetes-map-type: atomic + managedExternalEtcdRef: +- description: ManagedExternalEtcdRef is an optional reference to an +- etcd provider resource that holds details for provisioning an external +- etcd cluster ++ description: |- ++ ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details ++ for provisioning an external etcd cluster + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: +- description: 'If referring to a piece of an object instead of +- an entire object, this string should contain a valid JSON/Go +- field access statement, such as desiredState.manifest.containers[2]. +- For example, if the object reference is to a container within +- a pod, this would take on a value like: "spec.containers{name}" +- (where "name" refers to the name of the container that triggered +- the event) or if no container name is specified "spec.containers[2]" +- (container with index 2 in this pod). This syntax is chosen +- only to have some well-defined way of referencing a part of +- an object. TODO: this design is not final and this field is +- subject to change in the future.' ++ description: |- ++ If referring to a piece of an object instead of an entire object, this string ++ should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. ++ For example, if the object reference is to a container within a pod, this would take on a value like: ++ "spec.containers{name}" (where "name" refers to the name of the container that triggered ++ the event) or if no container name is specified "spec.containers[2]" (container with ++ index 2 in this pod). This syntax is chosen only to have some well-defined way of ++ referencing a part of an object. ++ TODO: this design is not final and this field is subject to change in the future. + type: string + kind: +- description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' ++ description: |- ++ Kind of the referent. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: +- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' ++ description: |- ++ Name of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: +- description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' ++ description: |- ++ Namespace of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: +- description: 'Specific resourceVersion to which this reference +- is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' ++ description: |- ++ Specific resourceVersion to which this reference is made, if any. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: +- description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' ++ description: |- ++ UID of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic +@@ -784,9 +798,9 @@ spec: + provider. + type: boolean + managedExternalEtcdInitialized: +- description: ManagedExternalEtcdInitialized indicates that first etcd +- member's IP address is set by machine controller, so remaining etcd +- members can lookup the address to join the cluster ++ description: |- ++ ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, ++ so remaining etcd members can lookup the address to join the cluster + type: boolean + managedExternalEtcdReady: + description: ManagedExternalEtcdReady indicates external etcd cluster +@@ -992,41 +1006,48 @@ spec: + type: object + x-kubernetes-map-type: atomic + managedExternalEtcdRef: +- description: ManagedExternalEtcdRef is an optional reference to an +- etcd provider resource that holds details for provisioning an external +- etcd cluster ++ description: |- ++ ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details ++ for provisioning an external etcd cluster + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: +- description: 'If referring to a piece of an object instead of +- an entire object, this string should contain a valid JSON/Go +- field access statement, such as desiredState.manifest.containers[2]. +- For example, if the object reference is to a container within +- a pod, this would take on a value like: "spec.containers{name}" +- (where "name" refers to the name of the container that triggered +- the event) or if no container name is specified "spec.containers[2]" +- (container with index 2 in this pod). This syntax is chosen +- only to have some well-defined way of referencing a part of +- an object. TODO: this design is not final and this field is +- subject to change in the future.' ++ description: |- ++ If referring to a piece of an object instead of an entire object, this string ++ should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. ++ For example, if the object reference is to a container within a pod, this would take on a value like: ++ "spec.containers{name}" (where "name" refers to the name of the container that triggered ++ the event) or if no container name is specified "spec.containers[2]" (container with ++ index 2 in this pod). This syntax is chosen only to have some well-defined way of ++ referencing a part of an object. ++ TODO: this design is not final and this field is subject to change in the future. + type: string + kind: +- description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' ++ description: |- ++ Kind of the referent. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: +- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' ++ description: |- ++ Name of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: +- description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' ++ description: |- ++ Namespace of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: +- description: 'Specific resourceVersion to which this reference +- is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' ++ description: |- ++ Specific resourceVersion to which this reference is made, if any. ++ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: +- description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' ++ description: |- ++ UID of the referent. ++ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic +@@ -1806,9 +1827,9 @@ spec: + provider. + type: boolean + managedExternalEtcdInitialized: +- description: ManagedExternalEtcdInitialized indicates that first etcd +- member's IP address is set by machine controller, so remaining etcd +- members can lookup the address to join the cluster ++ description: |- ++ ManagedExternalEtcdInitialized indicates that first etcd member's IP address is set by machine controller, ++ so remaining etcd members can lookup the address to join the cluster + type: boolean + managedExternalEtcdReady: + description: ManagedExternalEtcdReady indicates external etcd cluster diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 4c5037de1..0e19a7e4a 100644 +index 2fb57cc98..07c5d6c85 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -433,6 +433,19 @@ spec: +@@ -457,6 +457,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -413,13 +859,14 @@ index 4c5037de1..0e19a7e4a 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -1024,6 +1037,19 @@ spec: +@@ -1028,6 +1042,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -433,13 +880,14 @@ index 4c5037de1..0e19a7e4a 100644 type: object mounts: description: Mounts specifies a list of mount points to be setup. -@@ -1663,6 +1689,19 @@ spec: +@@ -2961,6 +2989,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -453,13 +901,14 @@ index 4c5037de1..0e19a7e4a 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -3351,6 +3390,19 @@ spec: +@@ -3629,6 +3671,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the registry @@ -471,19 +920,20 @@ index 4c5037de1..0e19a7e4a 100644 + type: string + type: object skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained with + description: |- + SkipPhases is a list of phases to skip during command execution. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index dd4f1e72f..e68ddbdee 100644 +index 54f1f373d..883a32273 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -1587,6 +1587,19 @@ spec: +@@ -1554,6 +1554,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry -+ mirror information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the @@ -497,13 +947,14 @@ index dd4f1e72f..e68ddbdee 100644 scheduler: description: Scheduler contains extra settings for the scheduler control plane component -@@ -2329,6 +2342,19 @@ spec: +@@ -2233,6 +2247,20 @@ spec: type: string type: array type: object + registryMirror: -+ description: RegistryMirror holds the image registry -+ mirror information This is only for bottlerocket ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket + properties: + caCert: + description: CACert defines the CA cert for the @@ -515,8 +966,107 @@ index dd4f1e72f..e68ddbdee 100644 + type: string + type: object skipPhases: - description: SkipPhases is a list of phases to skip - during command execution. The list of phases can + description: |- + SkipPhases is a list of phases to skip during command execution. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 4d45e86af..68ff783ce 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -578,6 +578,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } +@@ -974,6 +975,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + // WARNING: in.Pause requires manual conversion: does not exist in peer-type + // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type + // WARNING: in.Proxy requires manual conversion: does not exist in peer-type ++ // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } +diff --git a/internal/apis/core/v1alpha4/zz_generated.conversion.go b/internal/apis/core/v1alpha4/zz_generated.conversion.go +index e89720cc1..cd4de3836 100644 +--- a/internal/apis/core/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/core/v1alpha4/zz_generated.conversion.go +@@ -731,6 +731,7 @@ func autoConvert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, ou + return err + } + out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) ++ out.ManagedExternalEtcdRef = (*v1.ObjectReference)(unsafe.Pointer(in.ManagedExternalEtcdRef)) + out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) + if in.Topology != nil { + in, out := &in.Topology, &out.Topology +@@ -756,6 +757,7 @@ func autoConvert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(in *v1beta1.Cluster + return err + } + out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) ++ out.ManagedExternalEtcdRef = (*v1.ObjectReference)(unsafe.Pointer(in.ManagedExternalEtcdRef)) + out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) + if in.Topology != nil { + in, out := &in.Topology, &out.Topology +@@ -783,6 +785,8 @@ func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStat + out.ControlPlaneReady = in.ControlPlaneReady + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration ++ out.ManagedExternalEtcdInitialized = in.ManagedExternalEtcdInitialized ++ out.ManagedExternalEtcdReady = in.ManagedExternalEtcdReady + return nil + } + +@@ -800,6 +804,8 @@ func autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.Clu + out.ControlPlaneReady = in.ControlPlaneReady + out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration ++ out.ManagedExternalEtcdInitialized = in.ManagedExternalEtcdInitialized ++ out.ManagedExternalEtcdReady = in.ManagedExternalEtcdReady + return nil + } + +diff --git a/internal/test/builder/zz_generated.deepcopy.go b/internal/test/builder/zz_generated.deepcopy.go +index 73cee564d..b8b495742 100644 +--- a/internal/test/builder/zz_generated.deepcopy.go ++++ b/internal/test/builder/zz_generated.deepcopy.go +@@ -95,6 +95,10 @@ func (in *ClusterBuilder) DeepCopyInto(out *ClusterBuilder) { + in, out := &in.controlPlane, &out.controlPlane + *out = (*in).DeepCopy() + } ++ if in.managedEtcd != nil { ++ in, out := &in.managedEtcd, &out.managedEtcd ++ *out = (*in).DeepCopy() ++ } + if in.network != nil { + in, out := &in.network, &out.network + *out = new(v1beta1.ClusterNetwork) +@@ -274,6 +278,25 @@ func (in *ControlPlaneTemplateBuilder) DeepCopy() *ControlPlaneTemplateBuilder { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *EtcdPlaneBuilder) DeepCopyInto(out *EtcdPlaneBuilder) { ++ *out = *in ++ if in.obj != nil { ++ in, out := &in.obj, &out.obj ++ *out = (*in).DeepCopy() ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdPlaneBuilder. ++func (in *EtcdPlaneBuilder) DeepCopy() *EtcdPlaneBuilder { ++ if in == nil { ++ return nil ++ } ++ out := new(EtcdPlaneBuilder) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *InfrastructureClusterBuilder) DeepCopyInto(out *InfrastructureClusterBuilder) { + *out = *in -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0007-Fix-proxy-template-for-bottlerocket-bootstrap.patch b/projects/kubernetes-sigs/cluster-api/patches/0007-Fix-proxy-template-for-bottlerocket-bootstrap.patch index 7f990ba7d7..b40eceb1d6 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0007-Fix-proxy-template-for-bottlerocket-bootstrap.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0007-Fix-proxy-template-for-bottlerocket-bootstrap.patch @@ -1,7 +1,7 @@ -From 59c4a195890abb159fa404bdba5547366f1c7f5f Mon Sep 17 00:00:00 2001 +From 23c675f9c7a6ec3cb6107b920440d60d48a00ee6 Mon Sep 17 00:00:00 2001 From: Rajashree Mandaogane Date: Thu, 30 Sep 2021 14:04:36 -0700 -Subject: [PATCH 07/40] Fix proxy template for bottlerocket bootstrap +Subject: [PATCH 07/37] Fix proxy template for bottlerocket bootstrap Bottlerocket expects no-proxy setting to be a comma-separated list of strings. The proxy template was parsing the input no-proxy list diff --git a/projects/kubernetes-sigs/cluster-api/patches/0009-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch b/projects/kubernetes-sigs/cluster-api/patches/0008-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch similarity index 63% rename from projects/kubernetes-sigs/cluster-api/patches/0009-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch rename to projects/kubernetes-sigs/cluster-api/patches/0008-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch index eab3c2a4cf..61b90d23d5 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0009-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0008-Add-bottlerocket-changes-to-capbk-v1alpha4-api.patch @@ -1,64 +1,351 @@ -From c4fbbdaae5d4f51d9241578ed44acef0ac83c6d7 Mon Sep 17 00:00:00 2001 +From 4d04bfc5e05b2d4846b91e875935877a43a7b255 Mon Sep 17 00:00:00 2001 From: Rajashree Mandaogane Date: Sun, 21 Nov 2021 20:59:58 -0800 -Subject: [PATCH 09/40] Add bottlerocket changes to capbk v1alpha4 api +Subject: [PATCH 08/37] Add bottlerocket changes to capbk v1alpha4 api --- - api/v1alpha4/zz_generated.deepcopy.go | 5 + - api/v1beta1/zz_generated.deepcopy.go | 5 + - .../kubeadm/api/v1alpha4/kubeadm_types.go | 72 +++++++ - .../api/v1alpha4/kubeadmconfig_types.go | 2 +- - .../api/v1alpha4/zz_generated.conversion.go | 180 ++++++++++++++++++ - .../api/v1alpha4/zz_generated.deepcopy.go | 75 ++++++++ - .../api/v1beta1/zz_generated.deepcopy.go | 75 ++++++++ - .../upstreamv1beta1/zz_generated.deepcopy.go | 75 ++++++++ - .../kubeadm/types/upstreamv1beta2/types.go | 72 +++++++ - .../zz_generated.conversion.go | 180 ++++++++++++++++++ - .../upstreamv1beta2/zz_generated.deepcopy.go | 75 ++++++++ - .../kubeadm/types/upstreamv1beta3/types.go | 72 +++++++ - .../zz_generated.conversion.go | 180 ++++++++++++++++++ - .../upstreamv1beta3/zz_generated.deepcopy.go | 75 ++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 125 ++++++++++++ - .../test/builder/zz_generated.deepcopy.go | 23 +++ - 16 files changed, 1290 insertions(+), 1 deletion(-) + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 119 ++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 123 +++++++++++ + .../kubeadm/types/upstreamv1beta2/types.go | 72 ++++++ + .../zz_generated.conversion.go | 188 +++++++++++++++- + .../upstreamv1beta2/zz_generated.deepcopy.go | 75 +++++++ + .../kubeadm/types/upstreamv1beta3/types.go | 72 ++++++ + .../zz_generated.conversion.go | 188 +++++++++++++++- + .../upstreamv1beta3/zz_generated.deepcopy.go | 75 +++++++ + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 123 +++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 123 +++++++++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 72 ++++++ + .../kubeadm/v1alpha4/kubeadmconfig_types.go | 2 +- + .../v1alpha4/zz_generated.conversion.go | 208 +++++++++++++++--- + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 75 +++++++ + .../core/v1alpha4/zz_generated.deepcopy.go | 5 + + 15 files changed, 1477 insertions(+), 43 deletions(-) -diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go -index ac1ae21e3..7aa525c07 100644 ---- a/api/v1alpha4/zz_generated.deepcopy.go -+++ b/api/v1alpha4/zz_generated.deepcopy.go -@@ -247,6 +247,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { - *out = new(v1.ObjectReference) - **out = **in - } -+ if in.ManagedExternalEtcdRef != nil { -+ in, out := &in.ManagedExternalEtcdRef, &out.ManagedExternalEtcdRef -+ *out = new(v1.ObjectReference) -+ **out = **in -+ } - if in.InfrastructureRef != nil { - in, out := &in.InfrastructureRef, &out.InfrastructureRef - *out = new(v1.ObjectReference) -diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go -index 7eb964845..5629c4a37 100644 ---- a/api/v1beta1/zz_generated.deepcopy.go -+++ b/api/v1beta1/zz_generated.deepcopy.go -@@ -378,6 +378,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { - *out = new(v1.ObjectReference) - **out = **in - } -+ if in.ManagedExternalEtcdRef != nil { -+ in, out := &in.ManagedExternalEtcdRef, &out.ManagedExternalEtcdRef -+ *out = new(v1.ObjectReference) -+ **out = **in -+ } - if in.InfrastructureRef != nil { - in, out := &in.InfrastructureRef, &out.InfrastructureRef - *out = new(v1.ObjectReference) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 6e91e00ae..29df78f5c 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -61,6 +61,26 @@ type InitConfiguration struct { +diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +index da0f86d84..f27cbc4a9 100644 +--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml ++++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +@@ -1250,6 +1250,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1457,6 +1473,49 @@ spec: + to "10.96.0.0/12" if that's unset. + type: string + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror endpoint ++ to use for pulling images ++ type: string ++ type: object + scheduler: + description: Scheduler contains extra settings for the scheduler + control plane component +@@ -1642,6 +1701,7 @@ spec: + description: Format specifies the output format of the bootstrap data + enum: + - cloud-config ++ - bottlerocket + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration are +@@ -1808,6 +1868,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1975,6 +2051,49 @@ spec: + type: object + type: array + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror endpoint ++ to use for pulling images ++ type: string ++ type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be setup. +diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +index 8a1574b1d..19fed6b15 100644 +--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml ++++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +@@ -1216,6 +1216,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1427,6 +1443,51 @@ spec: + to "10.96.0.0/12" if that's unset. + type: string + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not ++ use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry ++ mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror ++ endpoint to use for pulling images ++ type: string ++ type: object + scheduler: + description: Scheduler contains extra settings for the + scheduler control plane component +@@ -1620,6 +1681,7 @@ spec: + data + enum: + - cloud-config ++ - bottlerocket + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration +@@ -1787,6 +1849,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1957,6 +2035,51 @@ spec: + type: object + type: array + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not ++ use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry ++ mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror ++ endpoint to use for pulling images ++ type: string ++ type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be +diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/types.go b/bootstrap/kubeadm/types/upstreamv1beta2/types.go +index 413f6fe9b..ff9a01d04 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta2/types.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta2/types.go +@@ -64,6 +64,26 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` @@ -85,7 +372,7 @@ index 6e91e00ae..29df78f5c 100644 // Etcd holds configuration for etcd. // NB: This value defaults to a Local (stacked) etcd // +optional -@@ -128,6 +148,38 @@ type ClusterConfiguration struct { +@@ -138,6 +158,38 @@ type ClusterConfiguration struct { ClusterName string `json:"clusterName,omitempty"` } @@ -124,7 +411,7 @@ index 6e91e00ae..29df78f5c 100644 // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { // ExtraArgs is an extra set of flags to pass to the control plane component. -@@ -338,6 +390,26 @@ type ExternalEtcd struct { +@@ -349,6 +401,26 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` @@ -151,258 +438,250 @@ index 6e91e00ae..29df78f5c 100644 // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go -index ccaea9dbc..2682067e8 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go -@@ -23,7 +23,7 @@ import ( - ) - - // Format specifies the output format of the bootstrap data --// +kubebuilder:validation:Enum=cloud-config -+// +kubebuilder:validation:Enum=cloud-config;bottlerocket - type Format string - - const ( -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index bcc2c3a8c..0e60d4e59 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -90,6 +90,16 @@ func RegisterConversions(s *runtime.Scheme) error { +diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +index 99cf9a8ff..ae1158152 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +@@ -88,6 +88,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) ++ return Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootstrap)(nil), (*BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) ++ return Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) + }); err != nil { + return err + } - if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) }); err != nil { -@@ -360,6 +370,36 @@ func RegisterConversions(s *runtime.Scheme) error { +@@ -213,6 +223,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Pause)(nil), (*v1beta1.Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) ++ return Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Pause)(nil), (*Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_Pause_To_v1alpha4_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) ++ return Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProxyConfiguration)(nil), (*v1beta1.ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) ++ return Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ProxyConfiguration)(nil), (*ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) ++ return Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RegistryMirrorConfiguration)(nil), (*v1beta1.RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) ++ return Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RegistryMirrorConfiguration)(nil), (*RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) ++ return Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } - if err := s.AddGeneratedConversionFunc((*SecretFileSource)(nil), (*v1beta1.SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(a.(*SecretFileSource), b.(*v1beta1.SecretFileSource), scope) + if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) }); err != nil { -@@ -541,7 +581,43 @@ func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v - return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) +@@ -379,7 +419,43 @@ func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenStrin + return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(in, out, s) } -+func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) ++// Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) +} + -+func autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) ++// Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in, out, s) +} + - func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1alpha4_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -575,6 +651,18 @@ func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *C +@@ -409,10 +485,18 @@ func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfigur } - func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_v1alpha4_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -951,6 +1039,18 @@ func autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *v1b +@@ -677,6 +761,18 @@ func autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration( } - func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err } -@@ -968,6 +1068,18 @@ func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinCon +@@ -702,10 +798,18 @@ func Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in * } - func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_v1alpha4_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err } -@@ -1481,6 +1593,74 @@ func Convert_v1beta1_Partition_To_v1alpha4_Partition(in *v1beta1.Partition, out - return autoConvert_v1beta1_Partition_To_v1alpha4_Partition(in, out, s) +@@ -826,3 +930,71 @@ func autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistra + // WARNING: in.ImagePullPolicy requires manual conversion: does not exist in peer-type + return nil } - -+func autoConvert_v1alpha4_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ ++func autoConvert_upstreamv1beta2_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1alpha4_Pause_To_v1beta1_Pause is an autogenerated conversion function. -+func Convert_v1alpha4_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ return autoConvert_v1alpha4_Pause_To_v1beta1_Pause(in, out, s) ++// Convert_upstreamv1beta2_Pause_To_v1beta1_Pause is an autogenerated conversion function. ++func Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta2_Pause_To_v1beta1_Pause(in, out, s) +} + -+func autoConvert_v1beta1_Pause_To_v1alpha4_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_Pause_To_upstreamv1beta2_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_Pause_To_v1alpha4_Pause is an autogenerated conversion function. -+func Convert_v1beta1_Pause_To_v1alpha4_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ return autoConvert_v1beta1_Pause_To_v1alpha4_Pause(in, out, s) ++// Convert_v1beta1_Pause_To_upstreamv1beta2_Pause is an autogenerated conversion function. ++func Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ return autoConvert_v1beta1_Pause_To_upstreamv1beta2_Pause(in, out, s) +} + -+func autoConvert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. -+func Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) ++// Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. ++func Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in, out, s) ++// Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in, out, s) +} + -+func autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) ++// Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in, out, s) ++// Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in, out, s) +} -+ - func autoConvert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { - out.Name = in.Name - out.Key = in.Key -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 085cafb92..460e2c11c 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -142,10 +142,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { +diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go +index c4cecbaad..1caece2f9 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go +@@ -141,10 +141,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { return out } @@ -433,7 +712,7 @@ index 085cafb92..460e2c11c 100644 in.Etcd.DeepCopyInto(&out.Etcd) out.Networking = in.Networking in.APIServer.DeepCopyInto(&out.APIServer) -@@ -510,6 +530,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { +@@ -409,6 +429,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { *out = *in out.TypeMeta = in.TypeMeta @@ -444,10 +723,11 @@ index 085cafb92..460e2c11c 100644 in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) in.Discovery.DeepCopyInto(&out.Discovery) if in.ControlPlane != nil { -@@ -960,6 +984,57 @@ func (in *Partition) DeepCopy() *Partition { +@@ -533,3 +557,54 @@ func (in *NodeRegistrationOptions) DeepCopy() *NodeRegistrationOptions { + in.DeepCopyInto(out) return out } - ++ +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Pause) DeepCopyInto(out *Pause) { + *out = *in @@ -498,227 +778,18 @@ index 085cafb92..460e2c11c 100644 + in.DeepCopyInto(out) + return out +} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { - *out = *in -diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go -index 425b90eda..90c8c89be 100644 ---- a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go -@@ -142,10 +142,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { - return out - } +diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/types.go b/bootstrap/kubeadm/types/upstreamv1beta3/types.go +index abc993a88..42bda5ca0 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta3/types.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta3/types.go +@@ -73,6 +73,26 @@ type InitConfiguration struct { + type ClusterConfiguration struct { + metav1.TypeMeta `json:",inline"` -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrap. -+func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketBootstrap) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta -+ out.Pause = in.Pause -+ out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ in.Proxy.DeepCopyInto(&out.Proxy) -+ out.RegistryMirror = in.RegistryMirror - in.Etcd.DeepCopyInto(&out.Etcd) - out.Networking = in.Networking - in.APIServer.DeepCopyInto(&out.APIServer) -@@ -555,6 +575,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { - func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta -+ out.Pause = in.Pause -+ out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ in.Proxy.DeepCopyInto(&out.Proxy) -+ out.RegistryMirror = in.RegistryMirror - in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) - in.Discovery.DeepCopyInto(&out.Discovery) - if in.ControlPlane != nil { -@@ -1052,6 +1076,57 @@ func (in *Patches) DeepCopy() *Patches { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *Pause) DeepCopyInto(out *Pause) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pause. -+func (in *Pause) DeepCopy() *Pause { -+ if in == nil { -+ return nil -+ } -+ out := new(Pause) -+ in.DeepCopyInto(out) -+ return out -+} -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration) { -+ *out = *in -+ if in.NoProxy != nil { -+ in, out := &in.NoProxy, &out.NoProxy -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. -+func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { -+ if in == nil { -+ return nil -+ } -+ out := new(ProxyConfiguration) -+ in.DeepCopyInto(out) -+ return out -+} -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { -+ *out = *in -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. -+func (in *RegistryMirrorConfiguration) DeepCopy() *RegistryMirrorConfiguration { -+ if in == nil { -+ return nil -+ } -+ out := new(RegistryMirrorConfiguration) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { - *out = *in -diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go -index aeaaa3aff..258534eb0 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go -@@ -141,10 +141,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrap. -+func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketBootstrap) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta -+ out.Pause = in.Pause -+ out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ in.Proxy.DeepCopyInto(&out.Proxy) -+ out.RegistryMirror = in.RegistryMirror - in.Etcd.DeepCopyInto(&out.Etcd) - out.Networking = in.Networking - in.APIServer.DeepCopyInto(&out.APIServer) -@@ -409,6 +429,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { - func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta -+ out.Pause = in.Pause -+ out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ in.Proxy.DeepCopyInto(&out.Proxy) -+ out.RegistryMirror = in.RegistryMirror - in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) - in.Discovery.DeepCopyInto(&out.Discovery) - if in.ControlPlane != nil { -@@ -528,3 +552,54 @@ func (in *NodeRegistrationOptions) DeepCopy() *NodeRegistrationOptions { - in.DeepCopyInto(out) - return out - } -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *Pause) DeepCopyInto(out *Pause) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pause. -+func (in *Pause) DeepCopy() *Pause { -+ if in == nil { -+ return nil -+ } -+ out := new(Pause) -+ in.DeepCopyInto(out) -+ return out -+} -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration) { -+ *out = *in -+ if in.NoProxy != nil { -+ in, out := &in.NoProxy, &out.NoProxy -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. -+func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { -+ if in == nil { -+ return nil -+ } -+ out := new(ProxyConfiguration) -+ in.DeepCopyInto(out) -+ return out -+} -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { -+ *out = *in -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. -+func (in *RegistryMirrorConfiguration) DeepCopy() *RegistryMirrorConfiguration { -+ if in == nil { -+ return nil -+ } -+ out := new(RegistryMirrorConfiguration) -+ in.DeepCopyInto(out) -+ return out -+} -diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/types.go b/bootstrap/kubeadm/types/upstreamv1beta2/types.go -index 413f6fe9b..ff9a01d04 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta2/types.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta2/types.go -@@ -64,6 +64,26 @@ type InitConfiguration struct { - type ClusterConfiguration struct { - metav1.TypeMeta `json:",inline"` - -+ // Pause holds the image source for pause container -+ // This is only for bottlerocket -+ // +optional -+ Pause Pause `json:"pause,omitempty"` ++ // Pause holds the image source for pause container ++ // This is only for bottlerocket ++ // +optional ++ Pause Pause `json:"pause,omitempty"` + + // BottlerocketBootstrap holds the image source for kubeadm bootstrap container + // This is only for bottlerocket @@ -736,9 +807,9 @@ index 413f6fe9b..ff9a01d04 100644 + RegistryMirror RegistryMirrorConfiguration `json:"registryMirror,omitempty"` + // Etcd holds configuration for etcd. - // NB: This value defaults to a Local (stacked) etcd // +optional -@@ -138,6 +158,38 @@ type ClusterConfiguration struct { + Etcd Etcd `json:"etcd,omitempty"` +@@ -135,6 +155,38 @@ type ClusterConfiguration struct { ClusterName string `json:"clusterName,omitempty"` } @@ -777,7 +848,7 @@ index 413f6fe9b..ff9a01d04 100644 // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { // ExtraArgs is an extra set of flags to pass to the control plane component. -@@ -349,6 +401,26 @@ type ExternalEtcd struct { +@@ -335,6 +387,26 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` @@ -801,244 +872,252 @@ index 413f6fe9b..ff9a01d04 100644 + // +optional + RegistryMirror RegistryMirrorConfiguration `json:"registryMirror,omitempty"` + - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - // When used in the context of control plane nodes, NodeRegistration should remain consistent - // across both InitConfiguration and JoinConfiguration -diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go -index 9a40da3b2..ae1158152 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go + // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster + // +optional + NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` +diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +index d9a815828..9b0c13356 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go @@ -88,6 +88,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) ++ return Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootstrap)(nil), (*BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) ++ return Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) + }); err != nil { + return err + } - if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) }); err != nil { -@@ -213,6 +223,36 @@ func RegisterConversions(s *runtime.Scheme) error { +@@ -228,6 +238,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Pause)(nil), (*v1beta1.Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) ++ return Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Pause)(nil), (*Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) ++ return Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProxyConfiguration)(nil), (*v1beta1.ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) ++ return Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ProxyConfiguration)(nil), (*ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) ++ return Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RegistryMirrorConfiguration)(nil), (*v1beta1.RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) ++ return Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RegistryMirrorConfiguration)(nil), (*RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) ++ return Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } - if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) }); err != nil { -@@ -379,7 +419,43 @@ func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenStrin - return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(in, out, s) +@@ -379,7 +419,43 @@ func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenStrin + return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(in, out, s) } -+func autoConvert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) ++// Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) +} + -+func autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(in, out, s) ++// Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in, out, s) +} + - func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -409,6 +485,18 @@ func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfigur +@@ -413,10 +489,18 @@ func Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguratio } - func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -673,6 +761,18 @@ func autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration( +@@ -672,6 +756,18 @@ func Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(in * } - func autoConvert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err } -@@ -698,6 +798,18 @@ func Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in * +@@ -694,10 +790,18 @@ func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration( } - func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta2_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err - } -@@ -818,3 +930,71 @@ func autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistra - // WARNING: in.ImagePullPolicy requires manual conversion: does not exist in peer-type - return nil + } +@@ -844,3 +948,71 @@ func autoConvert_v1beta1_Patches_To_upstreamv1beta3_Patches(in *v1beta1.Patches, + func Convert_v1beta1_Patches_To_upstreamv1beta3_Patches(in *v1beta1.Patches, out *Patches, s conversion.Scope) error { + return autoConvert_v1beta1_Patches_To_upstreamv1beta3_Patches(in, out, s) } + -+func autoConvert_upstreamv1beta2_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_upstreamv1beta3_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_upstreamv1beta2_Pause_To_v1beta1_Pause is an autogenerated conversion function. -+func Convert_upstreamv1beta2_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta2_Pause_To_v1beta1_Pause(in, out, s) ++// Convert_upstreamv1beta3_Pause_To_v1beta1_Pause is an autogenerated conversion function. ++func Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta3_Pause_To_v1beta1_Pause(in, out, s) +} + -+func autoConvert_v1beta1_Pause_To_upstreamv1beta2_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_Pause_To_upstreamv1beta3_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_Pause_To_upstreamv1beta2_Pause is an autogenerated conversion function. -+func Convert_v1beta1_Pause_To_upstreamv1beta2_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ return autoConvert_v1beta1_Pause_To_upstreamv1beta2_Pause(in, out, s) ++// Convert_v1beta1_Pause_To_upstreamv1beta3_Pause is an autogenerated conversion function. ++func Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ return autoConvert_v1beta1_Pause_To_upstreamv1beta3_Pause(in, out, s) +} + -+func autoConvert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. -+func Convert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta2_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) ++// Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. ++func Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta2_ProxyConfiguration(in, out, s) ++// Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in, out, s) +} + -+func autoConvert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta2_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) ++// Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta2_RegistryMirrorConfiguration(in, out, s) ++// Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in, out, s) +} -diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go -index c4cecbaad..1caece2f9 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go +diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go +index 77bc8ac51..b7b976a49 100644 +--- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go ++++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go @@ -141,10 +141,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { return out } @@ -1070,7 +1149,7 @@ index c4cecbaad..1caece2f9 100644 in.Etcd.DeepCopyInto(&out.Etcd) out.Networking = in.Networking in.APIServer.DeepCopyInto(&out.APIServer) -@@ -409,6 +429,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { +@@ -388,6 +408,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { *out = *in out.TypeMeta = in.TypeMeta @@ -1081,7 +1160,7 @@ index c4cecbaad..1caece2f9 100644 in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) in.Discovery.DeepCopyInto(&out.Discovery) if in.ControlPlane != nil { -@@ -533,3 +557,54 @@ func (in *NodeRegistrationOptions) DeepCopy() *NodeRegistrationOptions { +@@ -537,3 +561,54 @@ func (in *Patches) DeepCopy() *Patches { in.DeepCopyInto(out) return out } @@ -1136,11 +1215,335 @@ index c4cecbaad..1caece2f9 100644 + in.DeepCopyInto(out) + return out +} -diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/types.go b/bootstrap/kubeadm/types/upstreamv1beta3/types.go -index abc993a88..42bda5ca0 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta3/types.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta3/types.go -@@ -73,6 +73,26 @@ type InitConfiguration struct { +diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +index 07c5d6c85..0d23a71cc 100644 +--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml ++++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +@@ -1478,6 +1478,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1687,6 +1703,51 @@ spec: + to "10.96.0.0/12" if that's unset. + type: string + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not use ++ proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry ++ mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror endpoint ++ to use for pulling images ++ type: string ++ type: object + scheduler: + description: Scheduler contains extra settings for the scheduler + control plane component +@@ -1877,6 +1938,7 @@ spec: + data + enum: + - cloud-config ++ - bottlerocket + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration +@@ -2044,6 +2106,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2212,6 +2290,51 @@ spec: + type: object + type: array + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should not use ++ proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the registry ++ mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror endpoint ++ to use for pulling images ++ type: string ++ type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be setup. +diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +index 883a32273..76ca445aa 100644 +--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml ++++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +@@ -134,6 +134,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -347,6 +363,51 @@ spec: + to "10.96.0.0/12" if that's unset. + type: string + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should ++ not use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the ++ registry mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror ++ endpoint to use for pulling images ++ type: string ++ type: object + scheduler: + description: Scheduler contains extra settings for + the scheduler control plane component +@@ -544,6 +605,7 @@ spec: + bootstrap data + enum: + - cloud-config ++ - bottlerocket + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration +@@ -711,6 +773,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string ++ bottlerocketBootstrap: ++ description: |- ++ BottlerocketBootstrap holds the image source for kubeadm bootstrap container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -881,6 +959,51 @@ spec: + type: object + type: array + type: object ++ pause: ++ description: |- ++ Pause holds the image source for pause container ++ This is only for bottlerocket ++ properties: ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ++ type: string ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ++ type: string ++ type: object ++ proxy: ++ description: |- ++ Proxy holds the https and no proxy information ++ This is only for bottlerocket ++ properties: ++ httpsProxy: ++ description: HTTPS proxy ++ type: string ++ noProxy: ++ description: No proxy, list of ips that should ++ not use proxy ++ items: ++ type: string ++ type: array ++ type: object ++ registryMirror: ++ description: |- ++ RegistryMirror holds the image registry mirror information ++ This is only for bottlerocket ++ properties: ++ caCert: ++ description: CACert defines the CA cert for the ++ registry mirror ++ type: string ++ endpoint: ++ description: Endpoint defines the registry mirror ++ endpoint to use for pulling images ++ type: string ++ type: object + type: object + mounts: + description: Mounts specifies a list of mount points to +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 6e91e00ae..29df78f5c 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -61,6 +61,26 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` @@ -1165,9 +1568,9 @@ index abc993a88..42bda5ca0 100644 + RegistryMirror RegistryMirrorConfiguration `json:"registryMirror,omitempty"` + // Etcd holds configuration for etcd. + // NB: This value defaults to a Local (stacked) etcd // +optional - Etcd Etcd `json:"etcd,omitempty"` -@@ -135,6 +155,38 @@ type ClusterConfiguration struct { +@@ -128,6 +148,38 @@ type ClusterConfiguration struct { ClusterName string `json:"clusterName,omitempty"` } @@ -1206,7 +1609,7 @@ index abc993a88..42bda5ca0 100644 // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { // ExtraArgs is an extra set of flags to pass to the control plane component. -@@ -335,6 +387,26 @@ type ExternalEtcd struct { +@@ -338,6 +390,26 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` @@ -1230,245 +1633,303 @@ index abc993a88..42bda5ca0 100644 + // +optional + RegistryMirror RegistryMirrorConfiguration `json:"registryMirror,omitempty"` + - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster - // +optional - NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` -diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go -index d849616cb..9b0c13356 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go -@@ -88,6 +88,16 @@ func RegisterConversions(s *runtime.Scheme) error { + // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // When used in the context of control plane nodes, NodeRegistration should remain consistent + // across both InitConfiguration and JoinConfiguration +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go +index 64425edf6..a231641e4 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go +@@ -23,7 +23,7 @@ import ( + ) + + // Format specifies the output format of the bootstrap data +-// +kubebuilder:validation:Enum=cloud-config ++// +kubebuilder:validation:Enum=cloud-config;bottlerocket + type Format string + + const ( +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 68ff783ce..9c1b31ed0 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -90,6 +90,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) ++ return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootstrap)(nil), (*BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) ++ return Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(a.(*v1beta1.BottlerocketBootstrap), b.(*BottlerocketBootstrap), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) }); err != nil { -@@ -228,6 +238,36 @@ func RegisterConversions(s *runtime.Scheme) error { +@@ -360,6 +370,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Pause)(nil), (*v1beta1.Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) ++ return Convert_v1alpha4_Pause_To_v1beta1_Pause(a.(*Pause), b.(*v1beta1.Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Pause)(nil), (*Pause)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) ++ return Convert_v1beta1_Pause_To_v1alpha4_Pause(a.(*v1beta1.Pause), b.(*Pause), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProxyConfiguration)(nil), (*v1beta1.ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) ++ return Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(a.(*ProxyConfiguration), b.(*v1beta1.ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ProxyConfiguration)(nil), (*ProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) ++ return Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(a.(*v1beta1.ProxyConfiguration), b.(*ProxyConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RegistryMirrorConfiguration)(nil), (*v1beta1.RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) ++ return Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(a.(*RegistryMirrorConfiguration), b.(*v1beta1.RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RegistryMirrorConfiguration)(nil), (*RegistryMirrorConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) ++ return Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(a.(*v1beta1.RegistryMirrorConfiguration), b.(*RegistryMirrorConfiguration), scope) + }); err != nil { + return err + } - if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + if err := s.AddGeneratedConversionFunc((*SecretFileSource)(nil), (*v1beta1.SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(a.(*SecretFileSource), b.(*v1beta1.SecretFileSource), scope) }); err != nil { -@@ -379,7 +419,43 @@ func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenStrin - return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(in, out, s) +@@ -541,7 +581,43 @@ func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v + return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) } -+func autoConvert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) ++// Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in, out, s) +} + -+func autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(in, out, s) ++// Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in *v1beta1.BottlerocketBootstrap, out *BottlerocketBootstrap, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) +} + - func autoConvert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { ++ if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_v1alpha4_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -413,6 +489,18 @@ func Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguratio +@@ -575,10 +651,18 @@ func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *C } - func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_v1alpha4_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { return err } -@@ -668,6 +756,18 @@ func Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(in * +@@ -955,6 +1039,18 @@ func autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *v1b } - func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { ++ if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err } -@@ -690,6 +790,18 @@ func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration( +@@ -972,10 +1068,18 @@ func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinCon } - func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { -+ if err := Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(&in.Pause, &out.Pause, s); err != nil { + func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { +- // WARNING: in.Pause requires manual conversion: does not exist in peer-type +- // WARNING: in.BottlerocketBootstrap requires manual conversion: does not exist in peer-type +- // WARNING: in.Proxy requires manual conversion: does not exist in peer-type +- // WARNING: in.RegistryMirror requires manual conversion: does not exist in peer-type ++ if err := Convert_v1beta1_Pause_To_v1alpha4_Pause(&in.Pause, &out.Pause, s); err != nil { + return err + } -+ if err := Convert_v1beta1_BottlerocketBootstrap_To_upstreamv1beta3_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { ++ if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } -+ if err := Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { ++ if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } -+ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { ++ if err := Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(&in.RegistryMirror, &out.RegistryMirror, s); err != nil { + return err + } - if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { return err } -@@ -836,3 +948,71 @@ func autoConvert_v1beta1_Patches_To_upstreamv1beta3_Patches(in *v1beta1.Patches, - func Convert_v1beta1_Patches_To_upstreamv1beta3_Patches(in *v1beta1.Patches, out *Patches, s conversion.Scope) error { - return autoConvert_v1beta1_Patches_To_upstreamv1beta3_Patches(in, out, s) +@@ -1088,15 +1192,7 @@ func Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1 } -+ -+func autoConvert_upstreamv1beta3_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + + func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { +- if in.ClusterConfiguration != nil { +- in, out := &in.ClusterConfiguration, &out.ClusterConfiguration +- *out = new(v1beta1.ClusterConfiguration) +- if err := Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { +- return err +- } +- } else { +- out.ClusterConfiguration = nil +- } ++ out.ClusterConfiguration = (*v1beta1.ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(v1beta1.InitConfiguration) +@@ -1154,15 +1250,7 @@ func Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *Kubeadm + } + + func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { +- if in.ClusterConfiguration != nil { +- in, out := &in.ClusterConfiguration, &out.ClusterConfiguration +- *out = new(ClusterConfiguration) +- if err := Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(*in, *out, s); err != nil { +- return err +- } +- } else { +- out.ClusterConfiguration = nil +- } ++ out.ClusterConfiguration = (*ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(InitConfiguration) +@@ -1505,6 +1593,74 @@ func Convert_v1beta1_Partition_To_v1alpha4_Partition(in *v1beta1.Partition, out + return autoConvert_v1beta1_Partition_To_v1alpha4_Partition(in, out, s) + } + ++func autoConvert_v1alpha4_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_upstreamv1beta3_Pause_To_v1beta1_Pause is an autogenerated conversion function. -+func Convert_upstreamv1beta3_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta3_Pause_To_v1beta1_Pause(in, out, s) ++// Convert_v1alpha4_Pause_To_v1beta1_Pause is an autogenerated conversion function. ++func Convert_v1alpha4_Pause_To_v1beta1_Pause(in *Pause, out *v1beta1.Pause, s conversion.Scope) error { ++ return autoConvert_v1alpha4_Pause_To_v1beta1_Pause(in, out, s) +} + -+func autoConvert_v1beta1_Pause_To_upstreamv1beta3_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++func autoConvert_v1beta1_Pause_To_v1alpha4_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + -+// Convert_v1beta1_Pause_To_upstreamv1beta3_Pause is an autogenerated conversion function. -+func Convert_v1beta1_Pause_To_upstreamv1beta3_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { -+ return autoConvert_v1beta1_Pause_To_upstreamv1beta3_Pause(in, out, s) ++// Convert_v1beta1_Pause_To_v1alpha4_Pause is an autogenerated conversion function. ++func Convert_v1beta1_Pause_To_v1alpha4_Pause(in *v1beta1.Pause, out *Pause, s conversion.Scope) error { ++ return autoConvert_v1beta1_Pause_To_v1alpha4_Pause(in, out, s) +} + -+func autoConvert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. -+func Convert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta3_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) ++// Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration is an autogenerated conversion function. ++func Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in *ProxyConfiguration, out *v1beta1.ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { + out.HTTPSProxy = in.HTTPSProxy + out.NoProxy = *(*[]string)(unsafe.Pointer(&in.NoProxy)) + return nil +} + -+// Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_ProxyConfiguration_To_upstreamv1beta3_ProxyConfiguration(in, out, s) ++// Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1beta1.ProxyConfiguration, out *ProxyConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in, out, s) +} + -+func autoConvert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_upstreamv1beta3_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) ++// Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in, out, s) +} + -+func autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++func autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert + return nil +} + -+// Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration is an autogenerated conversion function. -+func Convert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { -+ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_upstreamv1beta3_RegistryMirrorConfiguration(in, out, s) ++// Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration is an autogenerated conversion function. ++func Convert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { ++ return autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in, out, s) +} -diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go -index 77bc8ac51..b7b976a49 100644 ---- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go -@@ -141,10 +141,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { ++ + func autoConvert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { + out.Name = in.Name + out.Key = in.Key +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index dbae328d9..d7b753a82 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -142,10 +142,30 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { return out } @@ -1499,7 +1960,7 @@ index 77bc8ac51..b7b976a49 100644 in.Etcd.DeepCopyInto(&out.Etcd) out.Networking = in.Networking in.APIServer.DeepCopyInto(&out.APIServer) -@@ -388,6 +408,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { +@@ -510,6 +530,10 @@ func (in *InitConfiguration) DeepCopyObject() runtime.Object { func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { *out = *in out.TypeMeta = in.TypeMeta @@ -1510,11 +1971,10 @@ index 77bc8ac51..b7b976a49 100644 in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) in.Discovery.DeepCopyInto(&out.Discovery) if in.ControlPlane != nil { -@@ -537,3 +561,54 @@ func (in *Patches) DeepCopy() *Patches { - in.DeepCopyInto(out) +@@ -960,6 +984,57 @@ func (in *Partition) DeepCopy() *Partition { return out } -+ + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Pause) DeepCopyInto(out *Pause) { + *out = *in @@ -1565,211 +2025,26 @@ index 77bc8ac51..b7b976a49 100644 + in.DeepCopyInto(out) + return out +} -diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index e68ddbdee..d4d5e0073 100644 ---- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -125,6 +125,24 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image -+ source for kubeadm bootstrap container This is only -+ for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. -+ type: string -+ type: object - certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -347,6 +365,50 @@ spec: - or to "10.96.0.0/12" if that's unset. - type: string - type: object -+ pause: -+ description: Pause holds the image source for pause -+ container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should -+ not use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry -+ mirror information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the -+ registry mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror -+ endpoint to use for pulling images -+ type: string -+ type: object - scheduler: - description: Scheduler contains extra settings for - the scheduler control plane component -@@ -549,6 +611,7 @@ spec: - bootstrap data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -738,6 +801,24 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image -+ source for kubeadm bootstrap container This is only -+ for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -929,6 +1010,50 @@ spec: - type: object - type: array - type: object -+ pause: -+ description: Pause holds the image source for pause -+ container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should -+ not use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry -+ mirror information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the -+ registry mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror -+ endpoint to use for pulling images -+ type: string -+ type: object - type: object - mounts: - description: Mounts specifies a list of mount points to -diff --git a/internal/test/builder/zz_generated.deepcopy.go b/internal/test/builder/zz_generated.deepcopy.go -index 4ca1c64ca..64e72d45b 100644 ---- a/internal/test/builder/zz_generated.deepcopy.go -+++ b/internal/test/builder/zz_generated.deepcopy.go -@@ -95,6 +95,10 @@ func (in *ClusterBuilder) DeepCopyInto(out *ClusterBuilder) { - in, out := &in.controlPlane, &out.controlPlane - *out = (*in).DeepCopy() - } -+ if in.managedEtcd != nil { -+ in, out := &in.managedEtcd, &out.managedEtcd -+ *out = (*in).DeepCopy() -+ } - if in.network != nil { - in, out := &in.network, &out.network - *out = new(v1beta1.ClusterNetwork) -@@ -274,6 +278,25 @@ func (in *ControlPlaneTemplateBuilder) DeepCopy() *ControlPlaneTemplateBuilder { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *EtcdPlaneBuilder) DeepCopyInto(out *EtcdPlaneBuilder) { -+ *out = *in -+ if in.obj != nil { -+ in, out := &in.obj, &out.obj -+ *out = (*in).DeepCopy() -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdPlaneBuilder. -+func (in *EtcdPlaneBuilder) DeepCopy() *EtcdPlaneBuilder { -+ if in == nil { -+ return nil -+ } -+ out := new(EtcdPlaneBuilder) -+ in.DeepCopyInto(out) -+ return out -+} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *InfrastructureClusterBuilder) DeepCopyInto(out *InfrastructureClusterBuilder) { + func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { *out = *in +diff --git a/internal/apis/core/v1alpha4/zz_generated.deepcopy.go b/internal/apis/core/v1alpha4/zz_generated.deepcopy.go +index ac1ae21e3..7aa525c07 100644 +--- a/internal/apis/core/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/core/v1alpha4/zz_generated.deepcopy.go +@@ -247,6 +247,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = new(v1.ObjectReference) + **out = **in + } ++ if in.ManagedExternalEtcdRef != nil { ++ in, out := &in.ManagedExternalEtcdRef, &out.ManagedExternalEtcdRef ++ *out = new(v1.ObjectReference) ++ **out = **in ++ } + if in.InfrastructureRef != nil { + in, out := &in.InfrastructureRef, &out.InfrastructureRef + *out = new(v1.ObjectReference) -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0008-Update-core-conversion-spoke-versions.patch b/projects/kubernetes-sigs/cluster-api/patches/0008-Update-core-conversion-spoke-versions.patch deleted file mode 100644 index 67ebbcf53e..0000000000 --- a/projects/kubernetes-sigs/cluster-api/patches/0008-Update-core-conversion-spoke-versions.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b6716a5f79319e8919304dc8213399fd05f9269b Mon Sep 17 00:00:00 2001 -From: Rajashree Mandaogane -Date: Sun, 21 Nov 2021 01:16:11 -0800 -Subject: [PATCH 08/40] Update core conversion spoke versions - ---- - api/v1alpha4/zz_generated.conversion.go | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/api/v1alpha4/zz_generated.conversion.go b/api/v1alpha4/zz_generated.conversion.go -index e89720cc1..cd4de3836 100644 ---- a/api/v1alpha4/zz_generated.conversion.go -+++ b/api/v1alpha4/zz_generated.conversion.go -@@ -731,6 +731,7 @@ func autoConvert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, ou - return err - } - out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) -+ out.ManagedExternalEtcdRef = (*v1.ObjectReference)(unsafe.Pointer(in.ManagedExternalEtcdRef)) - out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) - if in.Topology != nil { - in, out := &in.Topology, &out.Topology -@@ -756,6 +757,7 @@ func autoConvert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(in *v1beta1.Cluster - return err - } - out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) -+ out.ManagedExternalEtcdRef = (*v1.ObjectReference)(unsafe.Pointer(in.ManagedExternalEtcdRef)) - out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) - if in.Topology != nil { - in, out := &in.Topology, &out.Topology -@@ -783,6 +785,8 @@ func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStat - out.ControlPlaneReady = in.ControlPlaneReady - out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.ObservedGeneration = in.ObservedGeneration -+ out.ManagedExternalEtcdInitialized = in.ManagedExternalEtcdInitialized -+ out.ManagedExternalEtcdReady = in.ManagedExternalEtcdReady - return nil - } - -@@ -800,6 +804,8 @@ func autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.Clu - out.ControlPlaneReady = in.ControlPlaneReady - out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) - out.ObservedGeneration = in.ObservedGeneration -+ out.ManagedExternalEtcdInitialized = in.ManagedExternalEtcdInitialized -+ out.ManagedExternalEtcdReady = in.ManagedExternalEtcdReady - return nil - } - --- -2.42.0 - diff --git a/projects/kubernetes-sigs/cluster-api/patches/0010-Add-status.version-to-list-of-fields-to-ignore-for-u.patch b/projects/kubernetes-sigs/cluster-api/patches/0009-Add-status.version-to-list-of-fields-to-ignore-for-u.patch similarity index 82% rename from projects/kubernetes-sigs/cluster-api/patches/0010-Add-status.version-to-list-of-fields-to-ignore-for-u.patch rename to projects/kubernetes-sigs/cluster-api/patches/0009-Add-status.version-to-list-of-fields-to-ignore-for-u.patch index 20fe268f51..fa0beae983 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0010-Add-status.version-to-list-of-fields-to-ignore-for-u.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0009-Add-status.version-to-list-of-fields-to-ignore-for-u.patch @@ -1,7 +1,7 @@ -From 2e6facdcabaa3a7b037fe911dac4e7d081f5e880 Mon Sep 17 00:00:00 2001 +From 888718854494f0ce329f3d11b23ecdcc6dec42ef Mon Sep 17 00:00:00 2001 From: Vivek Koppuru Date: Wed, 12 Jan 2022 19:04:15 -0800 -Subject: [PATCH 10/40] Add status.version to list of fields to ignore for +Subject: [PATCH 09/37] Add status.version to list of fields to ignore for update --- @@ -9,7 +9,7 @@ Subject: [PATCH 10/40] Add status.version to list of fields to ignore for 1 file changed, 2 insertions(+) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 230b0bebb..477aef2e2 100644 +index ac736fcc8..c76cb3073 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go @@ -132,6 +132,7 @@ func (webhook *KubeadmControlPlane) ValidateCreate(_ context.Context, obj runtim @@ -20,7 +20,7 @@ index 230b0bebb..477aef2e2 100644 kubeadmConfigSpec = "kubeadmConfigSpec" clusterConfiguration = "clusterConfiguration" initConfiguration = "initConfiguration" -@@ -240,6 +241,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -243,6 +244,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, "rolloutBefore", "*"}, {spec, "rolloutStrategy"}, {spec, "rolloutStrategy", "*"}, diff --git a/projects/kubernetes-sigs/cluster-api/patches/0011-Add-node-labels-support-for-bottlerocket.patch b/projects/kubernetes-sigs/cluster-api/patches/0010-Add-node-labels-support-for-bottlerocket.patch similarity index 94% rename from projects/kubernetes-sigs/cluster-api/patches/0011-Add-node-labels-support-for-bottlerocket.patch rename to projects/kubernetes-sigs/cluster-api/patches/0010-Add-node-labels-support-for-bottlerocket.patch index cc5584519d..8f13d55caa 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0011-Add-node-labels-support-for-bottlerocket.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0010-Add-node-labels-support-for-bottlerocket.patch @@ -1,7 +1,7 @@ -From 5b15eaf1d7bf84063f80765324c3886996897cbd Mon Sep 17 00:00:00 2001 +From f490cac2e8baa2b5f5fa2b10461aad11f81a8a06 Mon Sep 17 00:00:00 2001 From: Vivek Koppuru Date: Mon, 24 Jan 2022 00:46:44 -0800 -Subject: [PATCH 11/40] Add node labels support for bottlerocket +Subject: [PATCH 10/37] Add node labels support for bottlerocket --- .../internal/bottlerocket/bootstrap.go | 9 ++++++++ @@ -96,10 +96,10 @@ index 74aa7e029..dd4214699 100644 func getAllAuthorizedKeys(users []bootstrapv1.User) string { var sshAuthorizedKeys []string diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index cbc236823..97376f758 100644 +index b500f0973..389b33f84 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -482,6 +482,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -514,6 +514,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.ClusterConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.ClusterConfiguration.RegistryMirror } @@ -109,7 +109,7 @@ index cbc236823..97376f758 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -680,6 +683,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -712,6 +715,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if scope.Config.Spec.JoinConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.JoinConfiguration.RegistryMirror } @@ -119,7 +119,7 @@ index cbc236823..97376f758 100644 bootstrapJoinData, err = bottlerocket.NewNode(nodeInput, bottlerocketConfig) if err != nil { scope.Error(err, "Failed to create a worker bottlerocket join configuration") -@@ -800,6 +806,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -834,6 +840,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if scope.Config.Spec.ClusterConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.ClusterConfiguration.RegistryMirror } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0012-Support-worker-node-taints.patch b/projects/kubernetes-sigs/cluster-api/patches/0011-Support-worker-node-taints.patch similarity index 96% rename from projects/kubernetes-sigs/cluster-api/patches/0012-Support-worker-node-taints.patch rename to projects/kubernetes-sigs/cluster-api/patches/0011-Support-worker-node-taints.patch index 7780ed29c0..ccdef2300a 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0012-Support-worker-node-taints.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0011-Support-worker-node-taints.patch @@ -1,7 +1,7 @@ -From ecfdde4fd678977cd76907d54b4be21167f80daf Mon Sep 17 00:00:00 2001 +From 6a53cf605a46eec31db899a2310cbde569e5acda Mon Sep 17 00:00:00 2001 From: Daniel Budris Date: Fri, 17 Dec 2021 13:38:39 -0800 -Subject: [PATCH 12/40] Support worker node taints +Subject: [PATCH 11/37] Support worker node taints seperate taints template into its own template @@ -129,10 +129,10 @@ index dd4214699..fd3c9d15d 100644 if nodeLabels == "" { return "" diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 97376f758..5ea943c27 100644 +index 389b33f84..d7814f210 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -686,6 +686,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -718,6 +718,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0013-support-bottle-rocket-control-plane-taints.patch b/projects/kubernetes-sigs/cluster-api/patches/0012-support-bottle-rocket-control-plane-taints.patch similarity index 85% rename from projects/kubernetes-sigs/cluster-api/patches/0013-support-bottle-rocket-control-plane-taints.patch rename to projects/kubernetes-sigs/cluster-api/patches/0012-support-bottle-rocket-control-plane-taints.patch index 61684138fe..28d89957b9 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0013-support-bottle-rocket-control-plane-taints.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0012-support-bottle-rocket-control-plane-taints.patch @@ -1,17 +1,17 @@ -From ca85c8ede9cc798059c76dcb51f7a0ae41aed087 Mon Sep 17 00:00:00 2001 +From 46e2a5a1160aeb8b38c1ce23a9b9811f42d4a3d7 Mon Sep 17 00:00:00 2001 From: danbudris Date: Fri, 18 Feb 2022 09:24:32 -0500 -Subject: [PATCH 13/40] support bottle rocket control plane taints +Subject: [PATCH 12/37] support bottle rocket control plane taints --- .../internal/controllers/kubeadmconfig_controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 5ea943c27..1cc21be4b 100644 +index d7814f210..954b26b80 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -485,6 +485,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -517,6 +517,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.InitConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.InitConfiguration.NodeRegistration.KubeletExtraArgs } @@ -21,7 +21,7 @@ index 5ea943c27..1cc21be4b 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -812,6 +815,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -846,6 +849,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0014-Support-configuring-bottlerocket-control-container-u.patch b/projects/kubernetes-sigs/cluster-api/patches/0013-Support-configuring-bottlerocket-control-container-u.patch similarity index 50% rename from projects/kubernetes-sigs/cluster-api/patches/0014-Support-configuring-bottlerocket-control-container-u.patch rename to projects/kubernetes-sigs/cluster-api/patches/0013-Support-configuring-bottlerocket-control-container-u.patch index 811a3f3048..7dce313971 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0014-Support-configuring-bottlerocket-control-container-u.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0013-Support-configuring-bottlerocket-control-container-u.patch @@ -1,215 +1,39 @@ -From f20a0f56cf88953eebc1828ad7da9e085c6c5110 Mon Sep 17 00:00:00 2001 +From 8f7fbc1c16a914e47018b05bd67b3beab5ae9ee7 Mon Sep 17 00:00:00 2001 From: Michael Chu Date: Mon, 28 Feb 2022 09:51:25 -0800 -Subject: [PATCH 14/40] Support configuring bottlerocket control container uri +Subject: [PATCH 13/37] Support configuring bottlerocket control container uri Signed-off-by: Michael Chu --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 17 + - .../api/v1alpha4/zz_generated.conversion.go | 46 +++ - .../api/v1alpha4/zz_generated.deepcopy.go | 18 ++ - .../kubeadm/api/v1beta1/kubeadm_types.go | 17 + - .../api/v1beta1/zz_generated.deepcopy.go | 18 ++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 282 +++++++++++++--- - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 302 +++++++++++++++--- - .../internal/bottlerocket/bootstrap.go | 12 + - .../internal/bottlerocket/bottlerocket.go | 8 + - .../controllers/kubeadmconfig_controller.go | 3 + - .../kubeadm/types/upstreamv1beta1/types.go | 17 + - .../upstreamv1beta1/zz_generated.deepcopy.go | 18 ++ - .../kubeadm/types/upstreamv1beta2/types.go | 17 + - .../zz_generated.conversion.go | 46 +++ - .../upstreamv1beta2/zz_generated.deepcopy.go | 18 ++ - .../kubeadm/types/upstreamv1beta3/types.go | 17 + - .../zz_generated.conversion.go | 46 +++ - .../upstreamv1beta3/zz_generated.deepcopy.go | 18 ++ - bootstrap/kubeadm/types/utils_test.go | 34 +- - cmd/clusterctl/client/cluster/mover_test.go | 6 +- - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 302 +++++++++++++++--- - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 68 ++++ - .../internal/workload_cluster_coredns_test.go | 5 + - .../internal/workload_cluster_etcd_test.go | 10 + - .../kubeadm/internal/workload_cluster_test.go | 25 ++ - 25 files changed, 1236 insertions(+), 134 deletions(-) + .../kubeadm/api/v1beta1/kubeadm_types.go | 17 ++++ + .../api/v1beta1/zz_generated.deepcopy.go | 18 ++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 96 +++++++++++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 96 +++++++++++++++++++ + .../internal/bottlerocket/bootstrap.go | 12 +++ + .../internal/bottlerocket/bottlerocket.go | 8 ++ + .../controllers/kubeadmconfig_controller.go | 3 + + .../kubeadm/types/upstreamv1beta1/types.go | 17 ++++ + .../upstreamv1beta1/zz_generated.deepcopy.go | 18 ++++ + .../kubeadm/types/upstreamv1beta2/types.go | 17 ++++ + .../zz_generated.conversion.go | 46 +++++++++ + .../upstreamv1beta2/zz_generated.deepcopy.go | 18 ++++ + .../kubeadm/types/upstreamv1beta3/types.go | 17 ++++ + .../zz_generated.conversion.go | 46 +++++++++ + .../upstreamv1beta3/zz_generated.deepcopy.go | 18 ++++ + bootstrap/kubeadm/types/utils_test.go | 34 ++++++- + cmd/clusterctl/client/cluster/mover_test.go | 6 +- + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 96 +++++++++++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 64 +++++++++++++ + .../internal/workload_cluster_coredns_test.go | 5 + + .../internal/workload_cluster_etcd_test.go | 10 ++ + .../kubeadm/internal/workload_cluster_test.go | 25 +++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 17 ++++ + .../v1alpha4/zz_generated.conversion.go | 46 +++++++++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 18 ++++ + 25 files changed, 763 insertions(+), 5 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 29df78f5c..9027f336f 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -71,6 +71,11 @@ type ClusterConfiguration struct { - // +optional - BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` - -+ // BottlerocketControl holds the image source for control container -+ // This is only for bottlerocket -+ // +optional -+ BottlerocketControl BottlerocketControl `json:"bottlerocketControl,omitempty"` -+ - // Proxy holds the https and no proxy information - // This is only for bottlerocket - // +optional -@@ -162,6 +167,13 @@ type BottlerocketBootstrap struct { - ImageMeta `json:",inline"` - } - -+// BottlerocketControl holds the settings of control container for bottlerocket nodes -+// This setting is ONLY for bottlerocket nodes. -+type BottlerocketControl struct { -+ // ImageMeta allows to customize the image used for the BottlerocketControl component -+ ImageMeta `json:",inline"` -+} -+ - // ProxyConfiguration holds the settings for proxying bottlerocket services - type ProxyConfiguration struct { - // HTTPS proxy -@@ -400,6 +412,11 @@ type JoinConfiguration struct { - // +optional - BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` - -+ // BottlerocketControl holds the image source for control container -+ // This is only for bottlerocket -+ // +optional -+ BottlerocketControl BottlerocketControl `json:"bottlerocketControl,omitempty"` -+ - // Proxy holds the https and no proxy information - // This is only for bottlerocket - // +optional -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 0e60d4e59..5c36c5ca4 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketControl)(nil), (*v1beta1.BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(a.(*BottlerocketControl), b.(*v1beta1.BottlerocketControl), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketControl)(nil), (*BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(a.(*v1beta1.BottlerocketControl), b.(*BottlerocketControl), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) - }); err != nil { -@@ -605,6 +615,30 @@ func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in - return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1beta1.BottlerocketControl, out *BottlerocketControl, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1beta1.BottlerocketControl, out *BottlerocketControl, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in, out, s) -+} -+ - func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { - return err -@@ -612,6 +646,9 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { -+ return err -+ } - if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { - return err - } -@@ -657,6 +694,9 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { -+ return err -+ } - if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { - return err - } -@@ -1045,6 +1085,9 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { -+ return err -+ } - if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { - return err - } -@@ -1074,6 +1117,9 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { -+ return err -+ } - if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { - return err - } -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 460e2c11c..5bf4e0d97 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -158,12 +158,29 @@ func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketControl) DeepCopyInto(out *BottlerocketControl) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketControl. -+func (in *BottlerocketControl) DeepCopy() *BottlerocketControl { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketControl) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - out.Pause = in.Pause - out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) - out.RegistryMirror = in.RegistryMirror - in.Etcd.DeepCopyInto(&out.Etcd) -@@ -532,6 +549,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - out.TypeMeta = in.TypeMeta - out.Pause = in.Pause - out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) - out.RegistryMirror = in.RegistryMirror - in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 9676d26a8..8c9dcac00 100644 +index 1833dda87..988074aec 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -83,6 +83,11 @@ type ClusterConfiguration struct { @@ -293,765 +117,289 @@ index 90c8c89be..80d9362bb 100644 out.RegistryMirror = in.RegistryMirror in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index ab6e724ca..f0e8338be 100644 +index f27cbc4a9..871582862 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -118,6 +118,21 @@ spec: - the version of the above components during upgrades. +@@ -130,6 +130,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -550,7 +565,6 @@ spec: - description: Format specifies the output format of the bootstrap data - enum: - - cloud-config -- - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration are -@@ -732,6 +746,21 @@ spec: - the version of the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -752,6 +768,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -1224,6 +1253,21 @@ spec: - the version of the above components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1266,6 +1298,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -1648,6 +1692,7 @@ spec: - description: Format specifies the output format of the bootstrap data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration are -@@ -1832,6 +1877,21 @@ spec: - the version of the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1884,6 +1932,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -2003,6 +2063,46 @@ spec: - type: object - type: array - type: object -+ pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string -+ noProxy: -+ description: No proxy, list of ips that should not use proxy -+ items: -+ type: string -+ type: array + type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror information -+ This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images -+ type: string -+ type: object - type: object - mounts: - description: Mounts specifies a list of mount points to be setup. -@@ -2267,6 +2367,36 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object - certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -2473,6 +2603,46 @@ spec: - if that's unset. + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2390,6 +2454,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -+ pause: -+ description: Pause holds the image source for pause container ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object -+ proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror information -+ This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images -+ type: string -+ type: object - scheduler: - description: Scheduler contains extra settings for the scheduler - control plane component -@@ -2871,46 +3041,6 @@ spec: - content inline or by referencing a secret. + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3079,6 +3159,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -- pause: -- description: Pause holds the image source for pause container -- This is only for bottlerocket -- properties: -- imageRepository: -- description: ImageRepository sets the container registry to -- pull images from. if not set, the ImageRepository defined -- in ClusterConfiguration will be used instead. -- type: string -- imageTag: -- description: ImageTag allows to specify a tag for the image. -- In case this value is set, kubeadm does not change automatically -- the version of the above components during upgrades. -- type: string -- type: object -- proxy: -- description: Proxy holds the https and no proxy information This -- is only for bottlerocket -- properties: -- httpsProxy: -- description: HTTPS proxy -- type: string -- noProxy: -- description: No proxy, list of ips that should not use proxy -- items: -- type: string -- type: array -- type: object -- registryMirror: -- description: RegistryMirror holds the image registry mirror information -- This is only for bottlerocket -- properties: -- caCert: -- description: CACert defines the CA cert for the registry mirror -- type: string -- endpoint: -- description: Endpoint defines the registry mirror endpoint -- to use for pulling images -- type: string -- type: object - skipPhases: - description: SkipPhases is a list of phases to skip during command - execution. The list of phases can be obtained with the "kubeadm -@@ -2930,6 +3060,36 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source for -+ kubeadm bootstrap container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for control -+ container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -3133,6 +3293,46 @@ spec: - content inline or by referencing a secret. - type: string - type: object -+ pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object -+ proxy: -+ description: Proxy holds the https and no proxy information This -+ is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror information -+ This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images -+ type: string -+ type: object - skipPhases: - description: SkipPhases is a list of phases to skip during command - execution. The list of phases can be obtained with the "kubeadm + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index bdf596e4c..6586d0dbf 100644 +index 19fed6b15..a105eda5c 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -127,6 +127,22 @@ spec: - components during upgrades. - type: string - type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object - certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -586,7 +602,6 @@ spec: - data - enum: - - cloud-config -- - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -779,6 +794,22 @@ spec: - components during upgrades. - type: string - type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -1229,6 +1260,22 @@ spec: - components during upgrades. +@@ -138,6 +138,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object - certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -1681,6 +1728,7 @@ spec: - data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -1877,6 +1925,22 @@ spec: - components during upgrades. - type: string - type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -2060,6 +2124,49 @@ spec: - type: object - type: array - type: object -+ pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not -+ use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror -+ endpoint to use for pulling images -+ type: string -+ type: object - type: object - mounts: - description: Mounts specifies a list of mount points to be -@@ -2291,6 +2398,38 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. -+ type: string -+ type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -2512,6 +2651,49 @@ spec: - or to "10.96.0.0/12" if that's unset. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -774,6 +790,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -+ pause: -+ description: Pause holds the image source for pause container ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not -+ use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror -+ endpoint to use for pulling images -+ type: string -+ type: object - scheduler: - description: Scheduler contains extra settings for the - scheduler control plane component -@@ -2939,49 +3121,6 @@ spec: - content inline or by referencing a secret. + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1232,6 +1264,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -- pause: -- description: Pause holds the image source for pause container -- This is only for bottlerocket -- properties: -- imageRepository: -- description: ImageRepository sets the container registry -- to pull images from. if not set, the ImageRepository -- defined in ClusterConfiguration will be used instead. -- type: string -- imageTag: -- description: ImageTag allows to specify a tag for -- the image. In case this value is set, kubeadm does -- not change automatically the version of the above -- components during upgrades. -- type: string -- type: object -- proxy: -- description: Proxy holds the https and no proxy information -- This is only for bottlerocket -- properties: -- httpsProxy: -- description: HTTPS proxy -- type: string -- noProxy: -- description: No proxy, list of ips that should not -- use proxy -- items: -- type: string -- type: array -- type: object -- registryMirror: -- description: RegistryMirror holds the image registry mirror -- information This is only for bottlerocket -- properties: -- caCert: -- description: CACert defines the CA cert for the registry -- mirror -- type: string -- endpoint: -- description: Endpoint defines the registry mirror -- endpoint to use for pulling images -- type: string -- type: object - skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained -@@ -3001,6 +3140,38 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1865,6 +1913,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -3220,6 +3391,49 @@ spec: - content inline or by referencing a secret. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2346,6 +2410,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -+ pause: -+ description: Pause holds the image source for pause container ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object -+ proxy: -+ description: Proxy holds the https and no proxy information + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3052,6 +3132,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not -+ use proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror ++ imageRepository: ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string -+ endpoint: -+ description: Endpoint defines the registry mirror -+ endpoint to use for pulling images ++ imageTag: ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object - skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index dd769a78d..f8f1b97cb 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -1122,10 +470,10 @@ index fd3c9d15d..833f2d1c6 100644 for _, noProxy := range config.ProxyConfiguration.NoProxy { bottlerocketInput.NoProxyEndpoints = append(bottlerocketInput.NoProxyEndpoints, strconv.Quote(noProxy)) diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 1cc21be4b..fd96264ea 100644 +index 954b26b80..77583e23e 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -475,6 +475,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -507,6 +507,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex bottlerocketConfig = &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.ClusterConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.ClusterConfiguration.BottlerocketBootstrap, @@ -1133,7 +481,7 @@ index 1cc21be4b..fd96264ea 100644 } if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy -@@ -679,6 +680,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -711,6 +712,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) bottlerocketConfig := &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.JoinConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.JoinConfiguration.BottlerocketBootstrap, @@ -1141,7 +489,7 @@ index 1cc21be4b..fd96264ea 100644 } if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy -@@ -805,6 +807,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -839,6 +841,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S bottlerocketConfig := &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.JoinConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.JoinConfiguration.BottlerocketBootstrap, @@ -1695,7 +1043,7 @@ index 49c9450b9..ae560aa39 100644 }, want: &bootstrapv1.ClusterConfiguration{}, diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go -index b4100b007..dee567918 100644 +index edc307714..40255c3c2 100644 --- a/cmd/clusterctl/client/cluster/mover_test.go +++ b/cmd/clusterctl/client/cluster/mover_test.go @@ -692,7 +692,7 @@ var backupRestoreTests = []struct { @@ -1722,501 +1070,249 @@ index b4100b007..dee567918 100644 "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n", "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"bar","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n", diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 0e19a7e4a..b207309b9 100644 +index 0d23a71cc..1de21de6c 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -194,6 +194,22 @@ spec: - upgrades. +@@ -214,6 +214,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -642,7 +658,6 @@ spec: - data - enum: - - cloud-config -- - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -831,6 +846,22 @@ spec: - upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -845,6 +861,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -1453,6 +1484,22 @@ spec: - upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1494,6 +1526,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -1893,6 +1940,7 @@ spec: - data - enum: - - cloud-config -+ - bottlerocket - type: string - initConfiguration: - description: InitConfiguration along with ClusterConfiguration -@@ -2085,6 +2133,22 @@ spec: - upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2122,6 +2170,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -2263,6 +2327,49 @@ spec: - type: object - type: array - type: object -+ pause: -+ description: Pause holds the image source for pause container -+ This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not use -+ proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images -+ type: string -+ type: object - type: object - mounts: - description: Mounts specifies a list of mount points to be setup. -@@ -2732,6 +2839,38 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object -+ bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket -+ properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object - certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -2945,6 +3084,49 @@ spec: - "10.96.0.0/12" if that's unset. + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2865,6 +2929,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -+ pause: -+ description: Pause holds the image source for pause container ++ bottlerocketControl: ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not use -+ proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object - scheduler: - description: Scheduler contains extra settings for the scheduler - control plane component -@@ -3360,49 +3542,6 @@ spec: - or by referencing a secret. + certificatesDir: + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3564,6 +3644,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object -- pause: -- description: Pause holds the image source for pause container -- This is only for bottlerocket -- properties: -- imageRepository: -- description: ImageRepository sets the container registry -- to pull images from. if not set, the ImageRepository -- defined in ClusterConfiguration will be used instead. -- type: string -- imageTag: -- description: ImageTag allows to specify a tag for the -- image. In case this value is set, kubeadm does not change -- automatically the version of the above components during -- upgrades. -- type: string -- type: object -- proxy: -- description: Proxy holds the https and no proxy information -- This is only for bottlerocket -- properties: -- httpsProxy: -- description: HTTPS proxy -- type: string -- noProxy: -- description: No proxy, list of ips that should not use -- proxy -- items: -- type: string -- type: array -- type: object -- registryMirror: -- description: RegistryMirror holds the image registry mirror -- information This is only for bottlerocket -- properties: -- caCert: -- description: CACert defines the CA cert for the registry -- mirror -- type: string -- endpoint: -- description: Endpoint defines the registry mirror endpoint -- to use for pulling images -- type: string -- type: object - skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained with -@@ -3422,6 +3561,38 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string -+ bottlerocketBootstrap: -+ description: BottlerocketBootstrap holds the image source -+ for kubeadm bootstrap container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source for -+ control container This is only for bottlerocket -+ properties: -+ imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. -+ type: string -+ imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. -+ type: string -+ type: object - caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -3635,6 +3806,49 @@ spec: - or by referencing a secret. - type: string - type: object -+ pause: -+ description: Pause holds the image source for pause container ++ description: |- ++ BottlerocketControl holds the image source for control container + This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object -+ proxy: -+ description: Proxy holds the https and no proxy information -+ This is only for bottlerocket -+ properties: -+ httpsProxy: -+ description: HTTPS proxy -+ type: string -+ noProxy: -+ description: No proxy, list of ips that should not use -+ proxy -+ items: -+ type: string -+ type: array -+ type: object -+ registryMirror: -+ description: RegistryMirror holds the image registry mirror -+ information This is only for bottlerocket -+ properties: -+ caCert: -+ description: CACert defines the CA cert for the registry -+ mirror -+ type: string -+ endpoint: -+ description: Endpoint defines the registry mirror endpoint -+ to use for pulling images -+ type: string -+ type: object - skipPhases: - description: SkipPhases is a list of phases to skip during - command execution. The list of phases can be obtained with + caCertPath: + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index d4d5e0073..1d69bbe38 100644 +index 76ca445aa..7a0b638bd 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -143,6 +143,23 @@ spec: - the above components during upgrades. +@@ -150,6 +150,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -819,6 +836,23 @@ spec: - the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -789,6 +805,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -1452,6 +1486,23 @@ spec: - the above components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1426,6 +1458,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -2207,6 +2258,23 @@ spec: - the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2138,6 +2186,22 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketControl: -+ description: BottlerocketControl holds the image source -+ for control container This is only for bottlerocket ++ description: |- ++ BottlerocketControl holds the image source for control container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go -index 12bf01c42..141ef0ae6 100644 +index fd68d0a15..96c3a711b 100644 --- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go @@ -1423,6 +1423,8 @@ func TestUpdateCoreDNSImageInfoInKubeadmConfigMap(t *testing.T) { - wantClusterConfiguration: yaml.Raw(` + wantClusterConfiguration: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2235,11 +1331,11 @@ index 12bf01c42..141ef0ae6 100644 `), }, diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go -index e80e869a5..e1bb84967 100644 +index 3c8f8736a..e764b606b 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go -@@ -58,6 +58,8 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - wantClusterConfiguration: yaml.Raw(` +@@ -62,6 +62,8 @@ func TestUpdateEtcdExternalInKubeadmConfigMap(t *testing.T) { + wantClusterConfiguration: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2247,8 +1343,8 @@ index e80e869a5..e1bb84967 100644 controllerManager: {} dns: {} etcd: -@@ -66,6 +68,9 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - imageTag: v1.6.0 +@@ -73,6 +75,9 @@ func TestUpdateEtcdExternalInKubeadmConfigMap(t *testing.T) { + keyFile: /tmp/key_file.key kind: ClusterConfiguration networking: {} + pause: {} @@ -2257,8 +1353,8 @@ index e80e869a5..e1bb84967 100644 scheduler: {} `), }, -@@ -139,6 +144,8 @@ func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { - wantClusterConfiguration: yaml.Raw(` +@@ -156,6 +161,8 @@ func TestUpdateEtcdLocalInKubeadmConfigMap(t *testing.T) { + wantClusterConfiguration: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2266,8 +1362,8 @@ index e80e869a5..e1bb84967 100644 controllerManager: {} dns: {} etcd: -@@ -147,6 +154,9 @@ func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { - foo: bar +@@ -166,6 +173,9 @@ func TestUpdateEtcdLocalInKubeadmConfigMap(t *testing.T) { + imageTag: v1.6.0 kind: ClusterConfiguration networking: {} + pause: {} @@ -2277,11 +1373,11 @@ index e80e869a5..e1bb84967 100644 `), }, diff --git a/controlplane/kubeadm/internal/workload_cluster_test.go b/controlplane/kubeadm/internal/workload_cluster_test.go -index 8a29aaf52..56d79d966 100644 +index eb475a89c..98ff3e89e 100644 --- a/controlplane/kubeadm/internal/workload_cluster_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_test.go -@@ -626,12 +626,17 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - clusterConfigurationKey: yaml.Raw(` +@@ -627,12 +627,17 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { + clusterConfigurationKey: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2298,8 +1394,8 @@ index 8a29aaf52..56d79d966 100644 scheduler: {} `), }, -@@ -665,12 +670,17 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - clusterConfigurationKey: yaml.Raw(` +@@ -666,12 +671,17 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { + clusterConfigurationKey: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta3 + bottlerocketBootstrap: {} @@ -2316,7 +1412,7 @@ index 8a29aaf52..56d79d966 100644 scheduler: {} `), }, -@@ -990,11 +1000,16 @@ func TestUpdateApiServerInKubeadmConfigMap(t *testing.T) { +@@ -992,11 +1002,16 @@ func TestUpdateApiServerInKubeadmConfigMap(t *testing.T) { mountPath: /foo/bar name: mount2 apiVersion: kubeadm.k8s.io/v1beta2 @@ -2333,8 +1429,8 @@ index 8a29aaf52..56d79d966 100644 scheduler: {} `), }, -@@ -1059,6 +1074,8 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { - wantClusterConfiguration: yaml.Raw(` +@@ -1061,6 +1076,8 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { + wantClusterConfiguration: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2342,7 +1438,7 @@ index 8a29aaf52..56d79d966 100644 controllerManager: extraArgs: bar: baz -@@ -1071,6 +1088,9 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { +@@ -1073,6 +1090,9 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { etcd: {} kind: ClusterConfiguration networking: {} @@ -2352,8 +1448,8 @@ index 8a29aaf52..56d79d966 100644 scheduler: {} `), }, -@@ -1135,11 +1155,16 @@ func TestUpdateSchedulerInKubeadmConfigMap(t *testing.T) { - wantClusterConfiguration: yaml.Raw(` +@@ -1137,11 +1157,16 @@ func TestUpdateSchedulerInKubeadmConfigMap(t *testing.T) { + wantClusterConfiguration: utilyaml.Raw(` apiServer: {} apiVersion: kubeadm.k8s.io/v1beta2 + bottlerocketBootstrap: {} @@ -2369,6 +1465,182 @@ index 8a29aaf52..56d79d966 100644 scheduler: extraArgs: bar: baz +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 29df78f5c..9027f336f 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -71,6 +71,11 @@ type ClusterConfiguration struct { + // +optional + BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` + ++ // BottlerocketControl holds the image source for control container ++ // This is only for bottlerocket ++ // +optional ++ BottlerocketControl BottlerocketControl `json:"bottlerocketControl,omitempty"` ++ + // Proxy holds the https and no proxy information + // This is only for bottlerocket + // +optional +@@ -162,6 +167,13 @@ type BottlerocketBootstrap struct { + ImageMeta `json:",inline"` + } + ++// BottlerocketControl holds the settings of control container for bottlerocket nodes ++// This setting is ONLY for bottlerocket nodes. ++type BottlerocketControl struct { ++ // ImageMeta allows to customize the image used for the BottlerocketControl component ++ ImageMeta `json:",inline"` ++} ++ + // ProxyConfiguration holds the settings for proxying bottlerocket services + type ProxyConfiguration struct { + // HTTPS proxy +@@ -400,6 +412,11 @@ type JoinConfiguration struct { + // +optional + BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` + ++ // BottlerocketControl holds the image source for control container ++ // This is only for bottlerocket ++ // +optional ++ BottlerocketControl BottlerocketControl `json:"bottlerocketControl,omitempty"` ++ + // Proxy holds the https and no proxy information + // This is only for bottlerocket + // +optional +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 9c1b31ed0..5342a596c 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketControl)(nil), (*v1beta1.BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(a.(*BottlerocketControl), b.(*v1beta1.BottlerocketControl), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketControl)(nil), (*BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(a.(*v1beta1.BottlerocketControl), b.(*BottlerocketControl), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { +@@ -605,6 +615,30 @@ func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in + return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1beta1.BottlerocketControl, out *BottlerocketControl, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1beta1.BottlerocketControl, out *BottlerocketControl, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in, out, s) ++} ++ + func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err +@@ -612,6 +646,9 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { ++ return err ++ } + if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } +@@ -657,6 +694,9 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { ++ return err ++ } + if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } +@@ -1045,6 +1085,9 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { ++ return err ++ } + if err := Convert_v1alpha4_ProxyConfiguration_To_v1beta1_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } +@@ -1074,6 +1117,9 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { ++ return err ++ } + if err := Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(&in.Proxy, &out.Proxy, s); err != nil { + return err + } +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index d7b753a82..5aec0f4bf 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -158,12 +158,29 @@ func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketControl) DeepCopyInto(out *BottlerocketControl) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketControl. ++func (in *BottlerocketControl) DeepCopy() *BottlerocketControl { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketControl) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) + out.RegistryMirror = in.RegistryMirror + in.Etcd.DeepCopyInto(&out.Etcd) +@@ -532,6 +549,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + out.TypeMeta = in.TypeMeta + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) + out.RegistryMirror = in.RegistryMirror + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0015-Change-format-for-storing-etcd-machine-address.patch b/projects/kubernetes-sigs/cluster-api/patches/0014-Change-format-for-storing-etcd-machine-address.patch similarity index 92% rename from projects/kubernetes-sigs/cluster-api/patches/0015-Change-format-for-storing-etcd-machine-address.patch rename to projects/kubernetes-sigs/cluster-api/patches/0014-Change-format-for-storing-etcd-machine-address.patch index 5cac6e8de7..3d01454b02 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0015-Change-format-for-storing-etcd-machine-address.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0014-Change-format-for-storing-etcd-machine-address.patch @@ -1,7 +1,7 @@ -From 94f59d11a503717d73a5fe1b6afc13d1cbeddc9f Mon Sep 17 00:00:00 2001 +From faba11dc9dd515f8b40ea108d645e4248d4fa015 Mon Sep 17 00:00:00 2001 From: Rajashree Mandaogane Date: Thu, 3 Mar 2022 15:01:35 -0800 -Subject: [PATCH 15/40] Change format for storing etcd machine address +Subject: [PATCH 14/37] Change format for storing etcd machine address Once the first etcd member is initialized, the machine controller has to update the secret with the address of the machine, so it can be used @@ -19,7 +19,7 @@ condition needs to be set based on the existence of this Secret. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controllers/machine/machine_controller_phases.go b/internal/controllers/machine/machine_controller_phases.go -index e22977cc0..41382bbaf 100644 +index 32cddef3d..7408232ee 100644 --- a/internal/controllers/machine/machine_controller_phases.go +++ b/internal/controllers/machine/machine_controller_phases.go @@ -376,7 +376,6 @@ func (r *Reconciler) reconcileInfrastructure(ctx context.Context, s *scope) (ctr diff --git a/projects/kubernetes-sigs/cluster-api/patches/0016-Parse-provider-id-from-kubelet-extra-args.patch b/projects/kubernetes-sigs/cluster-api/patches/0015-Parse-provider-id-from-kubelet-extra-args.patch similarity index 94% rename from projects/kubernetes-sigs/cluster-api/patches/0016-Parse-provider-id-from-kubelet-extra-args.patch rename to projects/kubernetes-sigs/cluster-api/patches/0015-Parse-provider-id-from-kubelet-extra-args.patch index 97b6c05cd6..29848e28e9 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0016-Parse-provider-id-from-kubelet-extra-args.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0015-Parse-provider-id-from-kubelet-extra-args.patch @@ -1,7 +1,7 @@ -From 995c5441e2293a643ea58ce3f0b16d0f61fbe6d1 Mon Sep 17 00:00:00 2001 +From 81709932c9ebdff0043f91106aa6a14d06555fa7 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Wed, 8 Jun 2022 10:27:26 -0700 -Subject: [PATCH 16/40] Parse provider-id from kubelet extra args +Subject: [PATCH 15/37] Parse provider-id from kubelet extra args Signed-off-by: Vignesh Goutham Ganesh --- diff --git a/projects/kubernetes-sigs/cluster-api/patches/0017-Add-feature-to-specifiy-additional-host-containers-i.patch b/projects/kubernetes-sigs/cluster-api/patches/0016-Add-feature-to-specifiy-additional-host-containers-i.patch similarity index 76% rename from projects/kubernetes-sigs/cluster-api/patches/0017-Add-feature-to-specifiy-additional-host-containers-i.patch rename to projects/kubernetes-sigs/cluster-api/patches/0016-Add-feature-to-specifiy-additional-host-containers-i.patch index 6bed0f731e..e5c92282e8 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0017-Add-feature-to-specifiy-additional-host-containers-i.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0016-Add-feature-to-specifiy-additional-host-containers-i.patch @@ -1,7 +1,7 @@ -From 1a511864eb2ada9796e05a31155b0a156ac7b449 Mon Sep 17 00:00:00 2001 +From 3c5aa5ce07532bf7ac7360e4858eebc12d4adae6 Mon Sep 17 00:00:00 2001 From: Victor Pineda Date: Tue, 21 Jun 2022 07:50:19 -0700 -Subject: [PATCH 17/40] Add feature to specifiy additional host containers in +Subject: [PATCH 16/37] Add feature to specifiy additional host containers in BR Host containers are a feature within BR that allows us to pull images @@ -18,16 +18,12 @@ template to be reused as much as a user wants to. SIM: https://i.amazon.com/P66557529 cr: https://code.amazon.com/reviews/CR-71408825 --- - bootstrap/kubeadm/api/v1alpha4/conversion.go | 5 + - .../kubeadm/api/v1alpha4/kubeadm_types.go | 25 ++ - .../api/v1alpha4/zz_generated.conversion.go | 77 +++++- - .../api/v1alpha4/zz_generated.deepcopy.go | 26 ++ .../kubeadm/api/v1beta1/kubeadm_types.go | 25 ++ .../api/v1beta1/zz_generated.deepcopy.go | 26 ++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 252 +++++++++++++++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 258 ++++++++++++++++++ - .../internal/bottlerocket/bootstrap.go | 44 ++- - .../internal/bottlerocket/bottlerocket.go | 105 ++++--- + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 246 ++++++++++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 246 ++++++++++++++++++ + .../internal/bottlerocket/bootstrap.go | 44 ++-- + .../internal/bottlerocket/bottlerocket.go | 105 +++++--- .../controllers/kubeadmconfig_controller.go | 21 +- .../kubeadm/types/upstreamv1beta1/types.go | 25 ++ .../upstreamv1beta1/zz_generated.deepcopy.go | 26 ++ @@ -35,272 +31,16 @@ cr: https://code.amazon.com/reviews/CR-71408825 .../zz_generated.conversion.go | 17 +- .../types/upstreamv1beta3/conversion.go | 10 + .../zz_generated.conversion.go | 32 +-- - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 258 ++++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 180 ++++++++++++ - 19 files changed, 1302 insertions(+), 115 deletions(-) + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 246 ++++++++++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 168 ++++++++++++ + .../bootstrap/kubeadm/v1alpha4/conversion.go | 5 + + .../kubeadm/v1alpha4/kubeadm_types.go | 25 ++ + .../v1alpha4/zz_generated.conversion.go | 77 +++++- + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 26 ++ + 19 files changed, 1260 insertions(+), 115 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/conversion.go b/bootstrap/kubeadm/api/v1alpha4/conversion.go -index 576fceebd..5457cd58d 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/conversion.go -@@ -210,6 +210,11 @@ func Convert_v1beta1_User_To_v1alpha4_User(in *bootstrapv1.User, out *User, s ap - return autoConvert_v1beta1_User_To_v1alpha4_User(in, out, s) - } - -+func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *bootstrapv1.ClusterConfiguration, out *ClusterConfiguration, s apiconversion.Scope) error { -+ // ClusterConfiguration.BottlerocketCustomHostContainers exists in bootstrapv1.ClusterConfiguration but not in v1alpha4 -+ return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) -+} -+ - func Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *bootstrapv1.NodeRegistrationOptions, out *NodeRegistrationOptions, s apiconversion.Scope) error { - // NodeRegistrationOptions.ImagePullPolicy does not exit in - // kubeadm v1alpha4 API. -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 9027f336f..7f54b3b1d 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -151,6 +151,11 @@ type ClusterConfiguration struct { - // The cluster name - // +optional - ClusterName string `json:"clusterName,omitempty"` -+ -+ // BottlerocketHostContainers contains the information of any additional images -+ // that we will deploy as host containers in the CPIs -+ // +optional -+ BottlerocketHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` - } - - // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. -@@ -449,6 +454,26 @@ type JoinConfiguration struct { - // If nil, no additional control plane instance will be deployed. - // +optional - ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` -+ -+ // BottlerocketCustomHostContainers contains the information of any additional images -+ // that we will deploy as host containers in the CPIs -+ // +optional -+ BottlerocketCustomHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` -+} -+ -+// BottlerocketHostContainer describes a host image for Bottlerocket -+type BottlerocketHostContainer struct { -+ // Name is the host container name that will be given to the container in BR's `apiserver` -+ // +kubebuilder:validation:Required -+ Name string `json:"name"` -+ // Superpowered indicates if the container will be superpowered -+ // +kubebuilder:validation:Required -+ Superpowered bool `json:"superpowered"` -+ // ImageMeta is the actual location of the container image -+ ImageMeta `json:"source"` -+ // UserData is the userdata that will be attached to the image. -+ // +optional -+ UserData string `json:"userData,omitempty"` - } - - // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 5c36c5ca4..02edbefcf 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -110,13 +110,18 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -- if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -- return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) -+ if err := s.AddGeneratedConversionFunc((*BottlerocketHostContainer)(nil), (*v1beta1.BottlerocketHostContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(a.(*BottlerocketHostContainer), b.(*v1beta1.BottlerocketHostContainer), scope) - }); err != nil { - return err - } -- if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -- return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketHostContainer)(nil), (*BottlerocketHostContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(a.(*v1beta1.BottlerocketHostContainer), b.(*BottlerocketHostContainer), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) - }); err != nil { - return err - } -@@ -425,6 +430,11 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddConversionFunc((*v1beta1.File)(nil), (*File)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_File_To_v1alpha4_File(a.(*v1beta1.File), b.(*File), scope) - }); err != nil { -@@ -639,6 +649,36 @@ func Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1b - return autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in *BottlerocketHostContainer, out *v1beta1.BottlerocketHostContainer, s conversion.Scope) error { -+ out.Name = in.Name -+ out.Superpowered = in.Superpowered -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ out.UserData = in.UserData -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in *BottlerocketHostContainer, out *v1beta1.BottlerocketHostContainer, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in *v1beta1.BottlerocketHostContainer, out *BottlerocketHostContainer, s conversion.Scope) error { -+ out.Name = in.Name -+ out.Superpowered = in.Superpowered -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ out.UserData = in.UserData -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in *v1beta1.BottlerocketHostContainer, out *BottlerocketHostContainer, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) -+} -+ - func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { - return err -@@ -679,6 +719,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName -+ out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - return nil - } - -@@ -727,14 +768,10 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName -+ out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - return nil - } - --// Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration is an autogenerated conversion function. --func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { -- return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) --} -- - func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { - out.APIEndpoints = *(*map[string]v1beta1.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) - return nil -@@ -1102,6 +1139,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - return err - } - out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) -+ out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - return nil - } - -@@ -1136,6 +1174,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - out.ControlPlane = (*JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) - // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type - // WARNING: in.Patches requires manual conversion: does not exist in peer-type -+ out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - return nil - } - -@@ -1238,7 +1277,15 @@ func Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1 - } - - func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { -- out.ClusterConfiguration = (*v1beta1.ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) -+ if in.ClusterConfiguration != nil { -+ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration -+ *out = new(v1beta1.ClusterConfiguration) -+ if err := Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { -+ return err -+ } -+ } else { -+ out.ClusterConfiguration = nil -+ } - if in.InitConfiguration != nil { - in, out := &in.InitConfiguration, &out.InitConfiguration - *out = new(v1beta1.InitConfiguration) -@@ -1296,7 +1343,15 @@ func Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *Kubeadm - } - - func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { -- out.ClusterConfiguration = (*ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) -+ if in.ClusterConfiguration != nil { -+ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration -+ *out = new(ClusterConfiguration) -+ if err := Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(*in, *out, s); err != nil { -+ return err -+ } -+ } else { -+ out.ClusterConfiguration = nil -+ } - if in.InitConfiguration != nil { - in, out := &in.InitConfiguration, &out.InitConfiguration - *out = new(InitConfiguration) -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 5bf4e0d97..f8a680800 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -174,6 +174,22 @@ func (in *BottlerocketControl) DeepCopy() *BottlerocketControl { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketHostContainer) DeepCopyInto(out *BottlerocketHostContainer) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketHostContainer. -+func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketHostContainer) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in -@@ -196,6 +212,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - (*out)[key] = val - } - } -+ if in.BottlerocketHostContainers != nil { -+ in, out := &in.BottlerocketHostContainers, &out.BottlerocketHostContainers -+ *out = make([]BottlerocketHostContainer, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. -@@ -559,6 +580,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = new(JoinControlPlane) - **out = **in - } -+ if in.BottlerocketCustomHostContainers != nil { -+ in, out := &in.BottlerocketCustomHostContainers, &out.BottlerocketCustomHostContainers -+ *out = make([]BottlerocketHostContainer, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 8c9dcac00..44ffa00f3 100644 +index 988074aec..34b0d9575 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -170,6 +170,11 @@ type ClusterConfiguration struct { @@ -394,17 +134,17 @@ index 80d9362bb..8da1eb4c5 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index f0e8338be..b2b01cb68 100644 +index 871582862..aa63477a9 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -133,6 +133,48 @@ spec: - the version of the above components during upgrades. +@@ -146,6 +146,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -418,15 +158,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -444,16 +183,16 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -761,6 +803,48 @@ spec: - the version of the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -784,6 +825,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -467,15 +206,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -493,16 +231,16 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -1268,6 +1352,48 @@ spec: - the version of the above components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1314,6 +1396,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -516,15 +254,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -542,16 +279,16 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -1892,6 +2018,48 @@ spec: - the version of the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1948,6 +2071,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -565,15 +302,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -591,16 +327,16 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. -@@ -2397,6 +2565,48 @@ spec: - the version of the above components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2470,6 +2634,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -614,15 +350,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -640,16 +375,16 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -3090,6 +3300,48 @@ spec: - the version of the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3175,6 +3380,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host image + for Bottlerocket @@ -663,15 +398,14 @@ index f0e8338be..b2b01cb68 100644 + image + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -689,20 +423,20 @@ index f0e8338be..b2b01cb68 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate authority - used to secure comunications between node and control-plane. + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 6586d0dbf..311b5d79f 100644 +index a105eda5c..c46e9cec0 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -143,6 +143,49 @@ spec: - components during upgrades. +@@ -154,6 +154,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host -+ containers in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -716,16 +450,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -743,16 +475,16 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -810,6 +853,49 @@ spec: - components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -806,6 +847,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains -+ the information of any additional images that we will -+ deploy as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -766,16 +498,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -793,16 +523,16 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -1276,6 +1362,49 @@ spec: - components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1280,6 +1362,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host -+ containers in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -816,16 +546,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -843,16 +571,16 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -1941,6 +2070,49 @@ spec: - components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1929,6 +2052,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains -+ the information of any additional images that we will -+ deploy as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -866,16 +594,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -893,16 +619,16 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -2430,6 +2602,49 @@ spec: - components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2426,6 +2590,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host -+ containers in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -916,16 +642,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -943,16 +667,16 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -3172,6 +3387,49 @@ spec: - components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3148,6 +3353,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains -+ the information of any additional images that we will -+ deploy as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -966,16 +690,14 @@ index 6586d0dbf..311b5d79f 100644 + the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -993,8 +715,8 @@ index 6586d0dbf..311b5d79f 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index efdb51fef..bc5094eb1 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -1219,10 +941,10 @@ index c9391fedb..0e6124b4c 100644 var taintsToml strings.Builder diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index fd96264ea..8eb1d6c02 100644 +index 77583e23e..8b4f92fd9 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -473,9 +473,10 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -505,9 +505,10 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex } bottlerocketConfig = &bottlerocket.BottlerocketConfig{ @@ -1236,7 +958,7 @@ index fd96264ea..8eb1d6c02 100644 } if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy -@@ -678,9 +679,10 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -710,9 +711,10 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) }) case bootstrapv1.Bottlerocket: bottlerocketConfig := &bottlerocket.BottlerocketConfig{ @@ -1250,7 +972,7 @@ index fd96264ea..8eb1d6c02 100644 } if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy -@@ -805,9 +807,10 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -839,9 +841,10 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S }) case bootstrapv1.Bottlerocket: bottlerocketConfig := &bottlerocket.BottlerocketConfig{ @@ -1522,17 +1244,17 @@ index 197c2ef74..d290e4d94 100644 if err := Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { return err diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index b207309b9..77ca12b3b 100644 +index 1de21de6c..56937c7bc 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -210,6 +210,49 @@ spec: - upgrades. +@@ -230,6 +230,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1546,16 +1268,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1573,16 +1293,16 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -862,6 +905,49 @@ spec: - upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -877,6 +918,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the -+ information of any additional images that we will deploy -+ as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1596,16 +1316,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1623,16 +1341,16 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -1500,6 +1586,49 @@ spec: - upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1542,6 +1624,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1646,16 +1364,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1673,16 +1389,16 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -2149,6 +2278,49 @@ spec: - upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2186,6 +2309,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the -+ information of any additional images that we will deploy -+ as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1696,16 +1412,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1723,16 +1437,16 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and -@@ -2871,6 +3043,49 @@ spec: - upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -2945,6 +3109,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the information -+ of any additional images that we will deploy as host containers -+ in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1746,16 +1460,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1773,16 +1485,16 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -3593,6 +3808,49 @@ spec: - upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -3660,6 +3865,47 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains the -+ information of any additional images that we will deploy -+ as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes a host + image for Bottlerocket @@ -1796,16 +1508,14 @@ index b207309b9..77ca12b3b 100644 + container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1823,20 +1533,20 @@ index b207309b9..77ca12b3b 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node and + description: |- + CACertPath is the path to the SSL certificate authority used to diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index 1d69bbe38..2f9941558 100644 +index 7a0b638bd..5c7b6820f 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -160,6 +160,51 @@ spec: - the above components during upgrades. +@@ -166,6 +166,48 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the -+ information of any additional images that we will -+ deploy as host containers in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes + a host image for Bottlerocket @@ -1851,17 +1561,14 @@ index 1d69bbe38..2f9941558 100644 + of the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify -+ a tag for the image. In case this value -+ is set, kubeadm does not change automatically -+ the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1879,16 +1586,16 @@ index 1d69bbe38..2f9941558 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -853,6 +898,51 @@ spec: - the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -821,6 +863,48 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains -+ the information of any additional images that we -+ will deploy as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes + a host image for Bottlerocket @@ -1903,17 +1610,14 @@ index 1d69bbe38..2f9941558 100644 + of the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify -+ a tag for the image. In case this value -+ is set, kubeadm does not change automatically -+ the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1931,16 +1635,16 @@ index 1d69bbe38..2f9941558 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node -@@ -1503,6 +1593,51 @@ spec: - the above components during upgrades. + description: |- + CACertPath is the path to the SSL certificate authority used to +@@ -1474,6 +1558,48 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketHostContainers contains the -+ information of any additional images that we will -+ deploy as host containers in the CPIs ++ description: |- ++ BottlerocketHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes + a host image for Bottlerocket @@ -1955,17 +1659,14 @@ index 1d69bbe38..2f9941558 100644 + of the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify -+ a tag for the image. In case this value -+ is set, kubeadm does not change automatically -+ the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -1983,16 +1684,16 @@ index 1d69bbe38..2f9941558 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -2275,6 +2410,51 @@ spec: - the above components during upgrades. + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2202,6 +2328,48 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomHostContainers: -+ description: BottlerocketCustomHostContainers contains -+ the information of any additional images that we -+ will deploy as host containers in the CPIs ++ description: |- ++ BottlerocketCustomHostContainers contains the information of any additional images ++ that we will deploy as host containers in the CPIs + items: + description: BottlerocketHostContainer describes + a host image for Bottlerocket @@ -2007,17 +1708,14 @@ index 1d69bbe38..2f9941558 100644 + of the container image + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify -+ a tag for the image. In case this value -+ is set, kubeadm does not change automatically -+ the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object + superpowered: @@ -2035,8 +1733,268 @@ index 1d69bbe38..2f9941558 100644 + type: object + type: array caCertPath: - description: 'CACertPath is the path to the SSL certificate - authority used to secure comunications between node + description: |- + CACertPath is the path to the SSL certificate authority used to +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go +index 576fceebd..5457cd58d 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go +@@ -210,6 +210,11 @@ func Convert_v1beta1_User_To_v1alpha4_User(in *bootstrapv1.User, out *User, s ap + return autoConvert_v1beta1_User_To_v1alpha4_User(in, out, s) + } + ++func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *bootstrapv1.ClusterConfiguration, out *ClusterConfiguration, s apiconversion.Scope) error { ++ // ClusterConfiguration.BottlerocketCustomHostContainers exists in bootstrapv1.ClusterConfiguration but not in v1alpha4 ++ return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) ++} ++ + func Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *bootstrapv1.NodeRegistrationOptions, out *NodeRegistrationOptions, s apiconversion.Scope) error { + // NodeRegistrationOptions.ImagePullPolicy does not exit in + // kubeadm v1alpha4 API. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 9027f336f..7f54b3b1d 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -151,6 +151,11 @@ type ClusterConfiguration struct { + // The cluster name + // +optional + ClusterName string `json:"clusterName,omitempty"` ++ ++ // BottlerocketHostContainers contains the information of any additional images ++ // that we will deploy as host containers in the CPIs ++ // +optional ++ BottlerocketHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` + } + + // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. +@@ -449,6 +454,26 @@ type JoinConfiguration struct { + // If nil, no additional control plane instance will be deployed. + // +optional + ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` ++ ++ // BottlerocketCustomHostContainers contains the information of any additional images ++ // that we will deploy as host containers in the CPIs ++ // +optional ++ BottlerocketCustomHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` ++} ++ ++// BottlerocketHostContainer describes a host image for Bottlerocket ++type BottlerocketHostContainer struct { ++ // Name is the host container name that will be given to the container in BR's `apiserver` ++ // +kubebuilder:validation:Required ++ Name string `json:"name"` ++ // Superpowered indicates if the container will be superpowered ++ // +kubebuilder:validation:Required ++ Superpowered bool `json:"superpowered"` ++ // ImageMeta is the actual location of the container image ++ ImageMeta `json:"source"` ++ // UserData is the userdata that will be attached to the image. ++ // +optional ++ UserData string `json:"userData,omitempty"` + } + + // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 5342a596c..facd5de61 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -110,13 +110,18 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } +- if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { +- return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) ++ if err := s.AddGeneratedConversionFunc((*BottlerocketHostContainer)(nil), (*v1beta1.BottlerocketHostContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(a.(*BottlerocketHostContainer), b.(*v1beta1.BottlerocketHostContainer), scope) + }); err != nil { + return err + } +- if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { +- return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketHostContainer)(nil), (*BottlerocketHostContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(a.(*v1beta1.BottlerocketHostContainer), b.(*BottlerocketHostContainer), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { + return err + } +@@ -425,6 +430,11 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddConversionFunc((*v1beta1.File)(nil), (*File)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_File_To_v1alpha4_File(a.(*v1beta1.File), b.(*File), scope) + }); err != nil { +@@ -639,6 +649,36 @@ func Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in *v1b + return autoConvert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in *BottlerocketHostContainer, out *v1beta1.BottlerocketHostContainer, s conversion.Scope) error { ++ out.Name = in.Name ++ out.Superpowered = in.Superpowered ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ out.UserData = in.UserData ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in *BottlerocketHostContainer, out *v1beta1.BottlerocketHostContainer, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketHostContainer_To_v1beta1_BottlerocketHostContainer(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in *v1beta1.BottlerocketHostContainer, out *BottlerocketHostContainer, s conversion.Scope) error { ++ out.Name = in.Name ++ out.Superpowered = in.Superpowered ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ out.UserData = in.UserData ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in *v1beta1.BottlerocketHostContainer, out *BottlerocketHostContainer, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) ++} ++ + func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err +@@ -679,6 +719,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName ++ out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + return nil + } + +@@ -727,14 +768,10 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName ++ out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + return nil + } + +-// Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration is an autogenerated conversion function. +-func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { +- return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) +-} +- + func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]v1beta1.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +@@ -1102,6 +1139,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + return err + } + out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) ++ out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + return nil + } + +@@ -1136,6 +1174,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + out.ControlPlane = (*JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type + // WARNING: in.Patches requires manual conversion: does not exist in peer-type ++ out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + return nil + } + +@@ -1238,7 +1277,15 @@ func Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1 + } + + func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { +- out.ClusterConfiguration = (*v1beta1.ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) ++ if in.ClusterConfiguration != nil { ++ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration ++ *out = new(v1beta1.ClusterConfiguration) ++ if err := Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { ++ return err ++ } ++ } else { ++ out.ClusterConfiguration = nil ++ } + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(v1beta1.InitConfiguration) +@@ -1296,7 +1343,15 @@ func Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *Kubeadm + } + + func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { +- out.ClusterConfiguration = (*ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) ++ if in.ClusterConfiguration != nil { ++ in, out := &in.ClusterConfiguration, &out.ClusterConfiguration ++ *out = new(ClusterConfiguration) ++ if err := Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(*in, *out, s); err != nil { ++ return err ++ } ++ } else { ++ out.ClusterConfiguration = nil ++ } + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(InitConfiguration) +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 5aec0f4bf..caed0611e 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -174,6 +174,22 @@ func (in *BottlerocketControl) DeepCopy() *BottlerocketControl { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketHostContainer) DeepCopyInto(out *BottlerocketHostContainer) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketHostContainer. ++func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketHostContainer) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in +@@ -196,6 +212,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + (*out)[key] = val + } + } ++ if in.BottlerocketHostContainers != nil { ++ in, out := &in.BottlerocketHostContainers, &out.BottlerocketHostContainers ++ *out = make([]BottlerocketHostContainer, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +@@ -559,6 +580,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = new(JoinControlPlane) + **out = **in + } ++ if in.BottlerocketCustomHostContainers != nil { ++ in, out := &in.BottlerocketCustomHostContainers, &out.BottlerocketCustomHostContainers ++ *out = make([]BottlerocketHostContainer, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0018-Add-bottlerocket-custom-bootstrap-containers-config-.patch b/projects/kubernetes-sigs/cluster-api/patches/0017-Add-bottlerocket-custom-bootstrap-containers-config-.patch similarity index 69% rename from projects/kubernetes-sigs/cluster-api/patches/0018-Add-bottlerocket-custom-bootstrap-containers-config-.patch rename to projects/kubernetes-sigs/cluster-api/patches/0017-Add-bottlerocket-custom-bootstrap-containers-config-.patch index 7296b3b584..5a9fd02b3c 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0018-Add-bottlerocket-custom-bootstrap-containers-config-.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0017-Add-bottlerocket-custom-bootstrap-containers-config-.patch @@ -1,233 +1,32 @@ -From b0a1e39aa3ab58e0023cab81d0bd940b1569cf5f Mon Sep 17 00:00:00 2001 +From 70f48598824fba06a2e0a3162c82f524bf0ccd15 Mon Sep 17 00:00:00 2001 From: Jiayi Wang Date: Mon, 21 Nov 2022 17:31:22 -0500 -Subject: [PATCH 18/40] Add bottlerocket custom bootstrap containers config +Subject: [PATCH 17/37] Add bottlerocket custom bootstrap containers config option --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 33 ++ - .../api/v1alpha4/zz_generated.conversion.go | 46 +++ - .../api/v1alpha4/zz_generated.deepcopy.go | 26 ++ .../kubeadm/api/v1beta1/kubeadm_types.go | 36 ++- .../api/v1beta1/zz_generated.deepcopy.go | 26 ++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 252 ++++++++++++++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 282 ++++++++++++++++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 258 +++++++++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 264 ++++++++++++++++++ .../internal/bottlerocket/bootstrap.go | 24 ++ - .../internal/bottlerocket/bootstrap_test.go | 99 ++++++ + .../internal/bottlerocket/bootstrap_test.go | 99 +++++++ .../internal/bottlerocket/bottlerocket.go | 27 +- .../controllers/kubeadmconfig_controller.go | 27 +- - .../kubeadm/types/upstreamv1beta1/types.go | 33 ++ + .../kubeadm/types/upstreamv1beta1/types.go | 33 +++ .../upstreamv1beta1/zz_generated.deepcopy.go | 26 ++ .../zz_generated.conversion.go | 2 + .../zz_generated.conversion.go | 2 + - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 276 +++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 200 +++++++++++++ - 17 files changed, 1394 insertions(+), 23 deletions(-) + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 264 ++++++++++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 184 ++++++++++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 33 +++ + .../v1alpha4/zz_generated.conversion.go | 46 +++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 26 ++ + 17 files changed, 1354 insertions(+), 23 deletions(-) create mode 100644 bootstrap/kubeadm/internal/bottlerocket/bootstrap_test.go -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 7f54b3b1d..592c257b8 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -156,6 +156,11 @@ type ClusterConfiguration struct { - // that we will deploy as host containers in the CPIs - // +optional - BottlerocketHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` -+ -+ // BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. -+ // This is only for bottlerocket. -+ // +optional -+ BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` - } - - // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. -@@ -459,6 +464,11 @@ type JoinConfiguration struct { - // that we will deploy as host containers in the CPIs - // +optional - BottlerocketCustomHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` -+ -+ // BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. -+ // This is only for bottlerocket. -+ // +optional -+ BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` - } - - // BottlerocketHostContainer describes a host image for Bottlerocket -@@ -476,6 +486,29 @@ type BottlerocketHostContainer struct { - UserData string `json:"userData,omitempty"` - } - -+// BottlerocketBootstrapContainer holds the bootstrap container setting for Bottlerocket -+type BottlerocketBootstrapContainer struct { -+ // Name is the bootstrap container name that will be given to the container in BR's `apiserver`. -+ Name string `json:"name"` -+ -+ // ImageMeta is the actual image used for Bottlerocket bootstrap. -+ ImageMeta `json:",inline"` -+ -+ // Essential decides whether or not the container should fail the boot process. -+ // Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. -+ // Default is false. -+ // +optional -+ Essential bool `json:"essential"` -+ -+ // Mode represents the bootstrap container mode. -+ // +kubebuilder:validation:Enum=always;off;once -+ Mode string `json:"mode"` -+ -+ // UserData is the base64-encoded userdata. -+ // +optional -+ UserData string `json:"userData,omitempty"` -+} -+ - // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. - type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 02edbefcf..2b70d0c11 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrapContainer)(nil), (*v1beta1.BottlerocketBootstrapContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(a.(*BottlerocketBootstrapContainer), b.(*v1beta1.BottlerocketBootstrapContainer), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootstrapContainer)(nil), (*BottlerocketBootstrapContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(a.(*v1beta1.BottlerocketBootstrapContainer), b.(*BottlerocketBootstrapContainer), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*BottlerocketControl)(nil), (*v1beta1.BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(a.(*BottlerocketControl), b.(*v1beta1.BottlerocketControl), scope) - }); err != nil { -@@ -625,6 +635,38 @@ func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in - return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in *BottlerocketBootstrapContainer, out *v1beta1.BottlerocketBootstrapContainer, s conversion.Scope) error { -+ out.Name = in.Name -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ out.Essential = in.Essential -+ out.Mode = in.Mode -+ out.UserData = in.UserData -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in *BottlerocketBootstrapContainer, out *v1beta1.BottlerocketBootstrapContainer, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in *v1beta1.BottlerocketBootstrapContainer, out *BottlerocketBootstrapContainer, s conversion.Scope) error { -+ out.Name = in.Name -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ out.Essential = in.Essential -+ out.Mode = in.Mode -+ out.UserData = in.UserData -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in *v1beta1.BottlerocketBootstrapContainer, out *BottlerocketBootstrapContainer, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in, out, s) -+} -+ - func autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err -@@ -720,6 +762,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) -+ out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - return nil - } - -@@ -769,6 +812,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) -+ out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - return nil - } - -@@ -1140,6 +1184,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - } - out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) - out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) -+ out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - return nil - } - -@@ -1175,6 +1220,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type - // WARNING: in.Patches requires manual conversion: does not exist in peer-type - out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) -+ out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index f8a680800..c7f644c8f 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -158,6 +158,22 @@ func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketBootstrapContainer) DeepCopyInto(out *BottlerocketBootstrapContainer) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrapContainer. -+func (in *BottlerocketBootstrapContainer) DeepCopy() *BottlerocketBootstrapContainer { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketBootstrapContainer) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *BottlerocketControl) DeepCopyInto(out *BottlerocketControl) { - *out = *in -@@ -217,6 +233,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = make([]BottlerocketHostContainer, len(*in)) - copy(*out, *in) - } -+ if in.BottlerocketCustomBootstrapContainers != nil { -+ in, out := &in.BottlerocketCustomBootstrapContainers, &out.BottlerocketCustomBootstrapContainers -+ *out = make([]BottlerocketBootstrapContainer, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. -@@ -585,6 +606,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = make([]BottlerocketHostContainer, len(*in)) - copy(*out, *in) - } -+ if in.BottlerocketCustomBootstrapContainers != nil { -+ in, out := &in.BottlerocketCustomBootstrapContainers, &out.BottlerocketCustomBootstrapContainers -+ *out = make([]BottlerocketBootstrapContainer, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 44ffa00f3..48e5f4b8e 100644 +index 34b0d9575..5e6f200e0 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -175,6 +175,11 @@ type ClusterConfiguration struct { @@ -353,35 +152,36 @@ index 8da1eb4c5..64e4eeff7 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index b2b01cb68..b395ccd39 100644 +index aa63477a9..e1d3687cf 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -133,6 +133,48 @@ spec: - the version of the above components during upgrades. +@@ -146,6 +146,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -403,34 +203,35 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -803,6 +845,48 @@ spec: - the version of the above components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -825,6 +868,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -452,34 +253,35 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -1352,6 +1436,48 @@ spec: - the version of the above components during upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -1396,6 +1482,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -501,34 +303,35 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -2018,6 +2144,48 @@ spec: - the version of the above components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -2071,6 +2200,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -550,34 +353,35 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -2565,6 +2733,48 @@ spec: - the version of the above components during upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -2634,6 +2806,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -599,34 +403,35 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -3300,6 +3510,48 @@ spec: - the version of the above components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -3380,6 +3595,49 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers configured -+ with essential = true will stop the boot process if they -+ exit code is a non-zero value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container mode. @@ -648,42 +453,39 @@ index b2b01cb68..b395ccd39 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the information - of any additional images that we will deploy as host containers + description: |- + BottlerocketCustomHostContainers contains the information of any additional images diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 311b5d79f..866c5de60 100644 +index c46e9cec0..5046e9f62 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -143,6 +143,53 @@ spec: - components during upgrades. +@@ -154,6 +154,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -706,38 +508,35 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host -@@ -853,6 +900,53 @@ spec: - components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -847,6 +891,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -760,38 +559,35 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains - the information of any additional images that we will -@@ -1362,6 +1456,53 @@ spec: - components during upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -1362,6 +1450,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -814,38 +610,35 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host -@@ -2070,6 +2211,53 @@ spec: - components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -2052,6 +2184,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -868,38 +661,35 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains - the information of any additional images that we will -@@ -2602,6 +2790,53 @@ spec: - components during upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -2590,6 +2766,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -922,38 +712,35 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host -@@ -3387,6 +3622,53 @@ spec: - components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -3353,6 +3573,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds -+ additional bootstrap containers for Bottlerocket. This -+ is only for bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the + bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the -+ container should fail the boot process. Bootstrap -+ containers configured with essential = true will -+ stop the boot process if they exit code is a non-zero -+ value. Default is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm -+ does not change automatically the version of the -+ above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -976,8 +763,8 @@ index 311b5d79f..866c5de60 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains - the information of any additional images that we will + description: |- + BottlerocketCustomHostContainers contains the information of any additional images diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index bc5094eb1..fe280e091 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -1187,10 +974,10 @@ index 0e6124b4c..e504684a0 100644 if len(config.ProxyConfiguration.NoProxy) > 0 { diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 8eb1d6c02..7cc63012c 100644 +index 8b4f92fd9..f1be0a695 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -473,10 +473,11 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -505,10 +505,11 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex } bottlerocketConfig = &bottlerocket.BottlerocketConfig{ @@ -1206,7 +993,7 @@ index 8eb1d6c02..7cc63012c 100644 } if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy -@@ -679,10 +680,11 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -711,10 +712,11 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) }) case bootstrapv1.Bottlerocket: bottlerocketConfig := &bottlerocket.BottlerocketConfig{ @@ -1222,7 +1009,7 @@ index 8eb1d6c02..7cc63012c 100644 } if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy -@@ -807,10 +809,11 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -841,10 +843,11 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S }) case bootstrapv1.Bottlerocket: bottlerocketConfig := &bottlerocket.BottlerocketConfig{ @@ -1388,38 +1175,36 @@ index d290e4d94..1b2d94a1d 100644 } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 77ca12b3b..83e45839a 100644 +index 56937c7bc..a36dc6ffb 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -210,6 +210,52 @@ spec: - upgrades. +@@ -230,6 +230,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1442,37 +1227,35 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -905,6 +951,52 @@ spec: - upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -918,6 +962,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1495,37 +1278,35 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the - information of any additional images that we will deploy -@@ -1586,6 +1678,52 @@ spec: - upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -1624,6 +1712,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1548,37 +1329,35 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -2278,6 +2416,52 @@ spec: - upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -2309,6 +2441,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1601,37 +1380,35 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the - information of any additional images that we will deploy -@@ -3043,6 +3227,52 @@ spec: - upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -3109,6 +3285,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1654,37 +1431,35 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the information - of any additional images that we will deploy as host containers -@@ -3808,6 +4038,52 @@ spec: - upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -3865,6 +4085,50 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers adds additional -+ bootstrap containers for Bottlerocket. This is only for -+ bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds the bootstrap + container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not the container -+ should fail the boot process. Bootstrap containers -+ configured with essential = true will stop the boot -+ process if they exit code is a non-zero value. Default -+ is false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not -+ change automatically the version of the above components -+ during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1707,43 +1482,39 @@ index 77ca12b3b..83e45839a 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains the - information of any additional images that we will deploy + description: |- + BottlerocketCustomHostContainers contains the information of any additional images diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index 2f9941558..8ddae49c7 100644 +index 5c7b6820f..4e81dac1c 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -160,6 +160,56 @@ spec: - the above components during upgrades. +@@ -166,6 +166,52 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers -+ adds additional bootstrap containers for Bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. + This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds + the bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not -+ the container should fail the boot process. -+ Bootstrap containers configured with essential -+ = true will stop the boot process if they -+ exit code is a non-zero value. Default is -+ false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1768,39 +1539,35 @@ index 2f9941558..8ddae49c7 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the - information of any additional images that we will -@@ -898,6 +948,56 @@ spec: - the above components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -863,6 +909,52 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers -+ adds additional bootstrap containers for Bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. + This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds + the bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not -+ the container should fail the boot process. -+ Bootstrap containers configured with essential -+ = true will stop the boot process if they -+ exit code is a non-zero value. Default is -+ false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1825,39 +1592,35 @@ index 2f9941558..8ddae49c7 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains - the information of any additional images that we -@@ -1593,6 +1693,56 @@ spec: - the above components during upgrades. + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +@@ -1558,6 +1650,52 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers -+ adds additional bootstrap containers for Bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. + This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds + the bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not -+ the container should fail the boot process. -+ Bootstrap containers configured with essential -+ = true will stop the boot process if they -+ exit code is a non-zero value. Default is -+ false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1882,39 +1645,35 @@ index 2f9941558..8ddae49c7 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketHostContainers contains the - information of any additional images that we will -@@ -2410,6 +2560,56 @@ spec: - the above components during upgrades. + description: |- + BottlerocketHostContainers contains the information of any additional images +@@ -2328,6 +2466,52 @@ spec: + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. type: string type: object + bottlerocketCustomBootstrapContainers: -+ description: BottlerocketCustomBootstrapContainers -+ adds additional bootstrap containers for Bottlerocket. ++ description: |- ++ BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. + This is only for bottlerocket. + items: + description: BottlerocketBootstrapContainer holds + the bootstrap container setting for Bottlerocket + properties: + essential: -+ description: Essential decides whether or not -+ the container should fail the boot process. -+ Bootstrap containers configured with essential -+ = true will stop the boot process if they -+ exit code is a non-zero value. Default is -+ false. ++ description: |- ++ Essential decides whether or not the container should fail the boot process. ++ Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ Default is false. + type: boolean + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, -+ the ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, -+ kubeadm does not change automatically the -+ version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + mode: + description: Mode represents the bootstrap container @@ -1939,8 +1698,209 @@ index 2f9941558..8ddae49c7 100644 + type: object + type: array bottlerocketCustomHostContainers: - description: BottlerocketCustomHostContainers contains - the information of any additional images that we + description: |- + BottlerocketCustomHostContainers contains the information of any additional images +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 7f54b3b1d..592c257b8 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -156,6 +156,11 @@ type ClusterConfiguration struct { + // that we will deploy as host containers in the CPIs + // +optional + BottlerocketHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` ++ ++ // BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ // This is only for bottlerocket. ++ // +optional ++ BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` + } + + // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. +@@ -459,6 +464,11 @@ type JoinConfiguration struct { + // that we will deploy as host containers in the CPIs + // +optional + BottlerocketCustomHostContainers []BottlerocketHostContainer `json:"bottlerocketCustomHostContainers,omitempty"` ++ ++ // BottlerocketCustomBootstrapContainers adds additional bootstrap containers for Bottlerocket. ++ // This is only for bottlerocket. ++ // +optional ++ BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` + } + + // BottlerocketHostContainer describes a host image for Bottlerocket +@@ -476,6 +486,29 @@ type BottlerocketHostContainer struct { + UserData string `json:"userData,omitempty"` + } + ++// BottlerocketBootstrapContainer holds the bootstrap container setting for Bottlerocket ++type BottlerocketBootstrapContainer struct { ++ // Name is the bootstrap container name that will be given to the container in BR's `apiserver`. ++ Name string `json:"name"` ++ ++ // ImageMeta is the actual image used for Bottlerocket bootstrap. ++ ImageMeta `json:",inline"` ++ ++ // Essential decides whether or not the container should fail the boot process. ++ // Bootstrap containers configured with essential = true will stop the boot process if they exit code is a non-zero value. ++ // Default is false. ++ // +optional ++ Essential bool `json:"essential"` ++ ++ // Mode represents the bootstrap container mode. ++ // +kubebuilder:validation:Enum=always;off;once ++ Mode string `json:"mode"` ++ ++ // UserData is the base64-encoded userdata. ++ // +optional ++ UserData string `json:"userData,omitempty"` ++} ++ + // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. + type JoinControlPlane struct { + // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index facd5de61..2426450f0 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrapContainer)(nil), (*v1beta1.BottlerocketBootstrapContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(a.(*BottlerocketBootstrapContainer), b.(*v1beta1.BottlerocketBootstrapContainer), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootstrapContainer)(nil), (*BottlerocketBootstrapContainer)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(a.(*v1beta1.BottlerocketBootstrapContainer), b.(*BottlerocketBootstrapContainer), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*BottlerocketControl)(nil), (*v1beta1.BottlerocketControl)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(a.(*BottlerocketControl), b.(*v1beta1.BottlerocketControl), scope) + }); err != nil { +@@ -625,6 +635,38 @@ func Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in + return autoConvert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in *BottlerocketBootstrapContainer, out *v1beta1.BottlerocketBootstrapContainer, s conversion.Scope) error { ++ out.Name = in.Name ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ out.Essential = in.Essential ++ out.Mode = in.Mode ++ out.UserData = in.UserData ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in *BottlerocketBootstrapContainer, out *v1beta1.BottlerocketBootstrapContainer, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketBootstrapContainer_To_v1beta1_BottlerocketBootstrapContainer(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in *v1beta1.BottlerocketBootstrapContainer, out *BottlerocketBootstrapContainer, s conversion.Scope) error { ++ out.Name = in.Name ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ out.Essential = in.Essential ++ out.Mode = in.Mode ++ out.UserData = in.UserData ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in *v1beta1.BottlerocketBootstrapContainer, out *BottlerocketBootstrapContainer, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketBootstrapContainer_To_v1alpha4_BottlerocketBootstrapContainer(in, out, s) ++} ++ + func autoConvert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(in *BottlerocketControl, out *v1beta1.BottlerocketControl, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err +@@ -720,6 +762,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) ++ out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + return nil + } + +@@ -769,6 +812,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) ++ out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + return nil + } + +@@ -1140,6 +1184,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + } + out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) ++ out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + return nil + } + +@@ -1175,6 +1220,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type + // WARNING: in.Patches requires manual conversion: does not exist in peer-type + out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) ++ out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index caed0611e..4e60b7369 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -158,6 +158,22 @@ func (in *BottlerocketBootstrap) DeepCopy() *BottlerocketBootstrap { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketBootstrapContainer) DeepCopyInto(out *BottlerocketBootstrapContainer) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootstrapContainer. ++func (in *BottlerocketBootstrapContainer) DeepCopy() *BottlerocketBootstrapContainer { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketBootstrapContainer) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *BottlerocketControl) DeepCopyInto(out *BottlerocketControl) { + *out = *in +@@ -217,6 +233,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = make([]BottlerocketHostContainer, len(*in)) + copy(*out, *in) + } ++ if in.BottlerocketCustomBootstrapContainers != nil { ++ in, out := &in.BottlerocketCustomBootstrapContainers, &out.BottlerocketCustomBootstrapContainers ++ *out = make([]BottlerocketBootstrapContainer, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +@@ -585,6 +606,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = make([]BottlerocketHostContainer, len(*in)) + copy(*out, *in) + } ++ if in.BottlerocketCustomBootstrapContainers != nil { ++ in, out := &in.BottlerocketCustomBootstrapContainers, &out.BottlerocketCustomBootstrapContainers ++ *out = make([]BottlerocketBootstrapContainer, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0019-Support-configuring-bottlerocket-admin-container-ima.patch b/projects/kubernetes-sigs/cluster-api/patches/0018-Support-configuring-bottlerocket-admin-container-ima.patch similarity index 58% rename from projects/kubernetes-sigs/cluster-api/patches/0019-Support-configuring-bottlerocket-admin-container-ima.patch rename to projects/kubernetes-sigs/cluster-api/patches/0018-Support-configuring-bottlerocket-admin-container-ima.patch index f3dcee0c02..ae98755433 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0019-Support-configuring-bottlerocket-admin-container-ima.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0018-Support-configuring-bottlerocket-admin-container-ima.patch @@ -1,15 +1,12 @@ -From 53074d3ab3f3bdd81b4679ff14636289f28f22cc Mon Sep 17 00:00:00 2001 +From d4e16765d43a8567b2d9a7bfa54738a2bf5ec3a0 Mon Sep 17 00:00:00 2001 From: Jiayi Wang Date: Wed, 23 Nov 2022 09:26:28 -0500 -Subject: [PATCH 19/40] Support configuring bottlerocket admin container image +Subject: [PATCH 18/37] Support configuring bottlerocket admin container image --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 17 ++++ - .../api/v1alpha4/zz_generated.conversion.go | 46 +++++++++ - .../api/v1alpha4/zz_generated.deepcopy.go | 18 ++++ .../kubeadm/api/v1beta1/kubeadm_types.go | 17 ++++ .../api/v1beta1/zz_generated.deepcopy.go | 18 ++++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 90 +++++++++++++++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 96 +++++++++++++++++++ ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 96 +++++++++++++++++++ .../internal/bottlerocket/bootstrap_test.go | 82 +++++++++++++++- .../internal/bottlerocket/bottlerocket.go | 2 + @@ -19,188 +16,14 @@ Subject: [PATCH 19/40] Support configuring bottlerocket admin container image .../zz_generated.conversion.go | 2 + .../zz_generated.conversion.go | 2 + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 96 +++++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 68 +++++++++++++ - 16 files changed, 590 insertions(+), 2 deletions(-) + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 64 +++++++++++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 17 ++++ + .../v1alpha4/zz_generated.conversion.go | 46 +++++++++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 18 ++++ + 16 files changed, 592 insertions(+), 2 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 592c257b8..f1e5eee19 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -71,6 +71,11 @@ type ClusterConfiguration struct { - // +optional - BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` - -+ // BottlerocketAdmin holds the image source for admin container -+ // This is only for bottlerocket -+ // +optional -+ BottlerocketAdmin BottlerocketAdmin `json:"bottlerocketAdmin,omitempty"` -+ - // BottlerocketControl holds the image source for control container - // This is only for bottlerocket - // +optional -@@ -177,6 +182,13 @@ type BottlerocketBootstrap struct { - ImageMeta `json:",inline"` - } - -+// BottlerocketAdmin holds the settings of admin container for bottlerocket nodes -+// This setting is ONLY for bottlerocket nodes. -+type BottlerocketAdmin struct { -+ // ImageMeta allows to customize the image used for the BottlerocketAdmin component -+ ImageMeta `json:",inline"` -+} -+ - // BottlerocketControl holds the settings of control container for bottlerocket nodes - // This setting is ONLY for bottlerocket nodes. - type BottlerocketControl struct { -@@ -422,6 +434,11 @@ type JoinConfiguration struct { - // +optional - BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` - -+ // BottlerocketAdmin holds the image source for admin container -+ // This is only for bottlerocket -+ // +optional -+ BottlerocketAdmin BottlerocketAdmin `json:"bottlerocketAdmin,omitempty"` -+ - // BottlerocketControl holds the image source for control container - // This is only for bottlerocket - // +optional -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 2b70d0c11..c3bdb3831 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -90,6 +90,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketAdmin)(nil), (*v1beta1.BottlerocketAdmin)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(a.(*BottlerocketAdmin), b.(*v1beta1.BottlerocketAdmin), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketAdmin)(nil), (*BottlerocketAdmin)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(a.(*v1beta1.BottlerocketAdmin), b.(*BottlerocketAdmin), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) - }); err != nil { -@@ -611,6 +621,30 @@ func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v - return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in *BottlerocketAdmin, out *v1beta1.BottlerocketAdmin, s conversion.Scope) error { -+ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in *BottlerocketAdmin, out *v1beta1.BottlerocketAdmin, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1.BottlerocketAdmin, out *BottlerocketAdmin, s conversion.Scope) error { -+ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { -+ return err -+ } -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1.BottlerocketAdmin, out *BottlerocketAdmin, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in, out, s) -+} -+ - func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err -@@ -728,6 +762,9 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { -+ return err -+ } - if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { - return err - } -@@ -778,6 +815,9 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { -+ return err -+ } - if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { - return err - } -@@ -1166,6 +1206,9 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { -+ return err -+ } - if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { - return err - } -@@ -1200,6 +1243,9 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { - return err - } -+ if err := Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { -+ return err -+ } - if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { - return err - } -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index c7f644c8f..4688180f0 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -142,6 +142,22 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketAdmin) DeepCopyInto(out *BottlerocketAdmin) { -+ *out = *in -+ out.ImageMeta = in.ImageMeta -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketAdmin. -+func (in *BottlerocketAdmin) DeepCopy() *BottlerocketAdmin { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketAdmin) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { - *out = *in -@@ -212,6 +228,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - out.TypeMeta = in.TypeMeta - out.Pause = in.Pause - out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ out.BottlerocketAdmin = in.BottlerocketAdmin - out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) - out.RegistryMirror = in.RegistryMirror -@@ -591,6 +608,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - out.TypeMeta = in.TypeMeta - out.Pause = in.Pause - out.BottlerocketBootstrap = in.BottlerocketBootstrap -+ out.BottlerocketAdmin = in.BottlerocketAdmin - out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) - out.RegistryMirror = in.RegistryMirror diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 48e5f4b8e..409d724b3 100644 +index 5e6f200e0..2d5fb7e6d 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -83,6 +83,11 @@ type ClusterConfiguration struct { @@ -285,283 +108,289 @@ index 64e4eeff7..ca5525885 100644 in.Proxy.DeepCopyInto(&out.Proxy) out.RegistryMirror = in.RegistryMirror diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index b395ccd39..aad4846c8 100644 +index e1d3687cf..d256ac98c 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -103,6 +103,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -114,6 +114,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket -@@ -815,6 +830,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -836,6 +852,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket -@@ -1406,6 +1436,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -1450,6 +1482,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket -@@ -2114,6 +2159,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2168,6 +2216,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket -@@ -2703,6 +2763,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2774,6 +2838,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket -@@ -3480,6 +3555,21 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -3563,6 +3643,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for admin -+ container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry to -+ pull images from. if not set, the ImageRepository defined -+ in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the image. -+ In case this value is set, kubeadm does not change automatically -+ the version of the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source for - kubeadm bootstrap container This is only for bottlerocket + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 866c5de60..67d0f44e5 100644 +index 5046e9f62..b99285258 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -111,6 +111,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -122,6 +122,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -868,6 +884,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -859,6 +875,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -1424,6 +1456,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -1418,6 +1450,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -2179,6 +2227,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2152,6 +2200,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -2758,6 +2822,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2734,6 +2798,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -3590,6 +3670,22 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -3541,6 +3621,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for -+ the image. In case this value is set, kubeadm does -+ not change automatically the version of the above -+ components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap_test.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap_test.go index 9065a7c58..5ee1b0d45 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap_test.go @@ -690,10 +519,10 @@ index e504684a0..9848f47e8 100644 }, { diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 7cc63012c..f4f3624c4 100644 +index f1be0a695..3e3ee9d21 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -475,6 +475,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -507,6 +507,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex bottlerocketConfig = &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.ClusterConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.ClusterConfiguration.BottlerocketBootstrap, @@ -701,7 +530,7 @@ index 7cc63012c..f4f3624c4 100644 BottlerocketControl: scope.Config.Spec.ClusterConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketCustomBootstrapContainers, -@@ -682,6 +683,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -714,6 +715,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) bottlerocketConfig := &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.JoinConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.JoinConfiguration.BottlerocketBootstrap, @@ -709,7 +538,7 @@ index 7cc63012c..f4f3624c4 100644 BottlerocketControl: scope.Config.Spec.JoinConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomBootstrapContainers, -@@ -811,6 +813,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -845,6 +847,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S bottlerocketConfig := &bottlerocket.BottlerocketConfig{ Pause: scope.Config.Spec.JoinConfiguration.Pause, BottlerocketBootstrap: scope.Config.Spec.JoinConfiguration.BottlerocketBootstrap, @@ -843,247 +672,420 @@ index 1b2d94a1d..4584e6266 100644 return err } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 83e45839a..119558689 100644 +index a36dc6ffb..842b5df46 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -178,6 +178,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -198,6 +198,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -919,6 +935,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -930,6 +946,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -1646,6 +1678,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -1680,6 +1712,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -2384,6 +2432,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2409,6 +2457,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -3195,6 +3259,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -3253,6 +3317,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket -@@ -4006,6 +4086,22 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -4053,6 +4133,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source for -+ admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container registry -+ to pull images from. if not set, the ImageRepository -+ defined in ClusterConfiguration will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag for the -+ image. In case this value is set, kubeadm does not change -+ automatically the version of the above components during -+ upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image source - for kubeadm bootstrap container This is only for bottlerocket + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index 8ddae49c7..66e39e74a 100644 +index 4e81dac1c..a83251f01 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -125,6 +125,23 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -134,6 +134,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image - source for kubeadm bootstrap container This is only -@@ -913,6 +930,23 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -877,6 +893,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image - source for kubeadm bootstrap container This is only -@@ -1658,6 +1692,23 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -1618,6 +1650,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image - source for kubeadm bootstrap container This is only -@@ -2525,6 +2576,23 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +@@ -2434,6 +2482,22 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocketAdmin: -+ description: BottlerocketAdmin holds the image source -+ for admin container This is only for bottlerocket ++ description: |- ++ BottlerocketAdmin holds the image source for admin container ++ This is only for bottlerocket + properties: + imageRepository: -+ description: ImageRepository sets the container -+ registry to pull images from. if not set, the -+ ImageRepository defined in ClusterConfiguration -+ will be used instead. ++ description: |- ++ ImageRepository sets the container registry to pull images from. ++ if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + type: string + imageTag: -+ description: ImageTag allows to specify a tag -+ for the image. In case this value is set, kubeadm -+ does not change automatically the version of -+ the above components during upgrades. ++ description: |- ++ ImageTag allows to specify a tag for the image. ++ In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + type: string + type: object bottlerocketBootstrap: - description: BottlerocketBootstrap holds the image - source for kubeadm bootstrap container This is only + description: |- + BottlerocketBootstrap holds the image source for kubeadm bootstrap container +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 592c257b8..f1e5eee19 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -71,6 +71,11 @@ type ClusterConfiguration struct { + // +optional + BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` + ++ // BottlerocketAdmin holds the image source for admin container ++ // This is only for bottlerocket ++ // +optional ++ BottlerocketAdmin BottlerocketAdmin `json:"bottlerocketAdmin,omitempty"` ++ + // BottlerocketControl holds the image source for control container + // This is only for bottlerocket + // +optional +@@ -177,6 +182,13 @@ type BottlerocketBootstrap struct { + ImageMeta `json:",inline"` + } + ++// BottlerocketAdmin holds the settings of admin container for bottlerocket nodes ++// This setting is ONLY for bottlerocket nodes. ++type BottlerocketAdmin struct { ++ // ImageMeta allows to customize the image used for the BottlerocketAdmin component ++ ImageMeta `json:",inline"` ++} ++ + // BottlerocketControl holds the settings of control container for bottlerocket nodes + // This setting is ONLY for bottlerocket nodes. + type BottlerocketControl struct { +@@ -422,6 +434,11 @@ type JoinConfiguration struct { + // +optional + BottlerocketBootstrap BottlerocketBootstrap `json:"bottlerocketBootstrap,omitempty"` + ++ // BottlerocketAdmin holds the image source for admin container ++ // This is only for bottlerocket ++ // +optional ++ BottlerocketAdmin BottlerocketAdmin `json:"bottlerocketAdmin,omitempty"` ++ + // BottlerocketControl holds the image source for control container + // This is only for bottlerocket + // +optional +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 2426450f0..e64081071 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -90,6 +90,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketAdmin)(nil), (*v1beta1.BottlerocketAdmin)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(a.(*BottlerocketAdmin), b.(*v1beta1.BottlerocketAdmin), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketAdmin)(nil), (*BottlerocketAdmin)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(a.(*v1beta1.BottlerocketAdmin), b.(*BottlerocketAdmin), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) + }); err != nil { +@@ -611,6 +621,30 @@ func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v + return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in *BottlerocketAdmin, out *v1beta1.BottlerocketAdmin, s conversion.Scope) error { ++ if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in *BottlerocketAdmin, out *v1beta1.BottlerocketAdmin, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1.BottlerocketAdmin, out *BottlerocketAdmin, s conversion.Scope) error { ++ if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { ++ return err ++ } ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1.BottlerocketAdmin, out *BottlerocketAdmin, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in, out, s) ++} ++ + func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err +@@ -728,6 +762,9 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { ++ return err ++ } + if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { + return err + } +@@ -778,6 +815,9 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { ++ return err ++ } + if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { + return err + } +@@ -1166,6 +1206,9 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + if err := Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1alpha4_BottlerocketAdmin_To_v1beta1_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { ++ return err ++ } + if err := Convert_v1alpha4_BottlerocketControl_To_v1beta1_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { + return err + } +@@ -1200,6 +1243,9 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + if err := Convert_v1beta1_BottlerocketBootstrap_To_v1alpha4_BottlerocketBootstrap(&in.BottlerocketBootstrap, &out.BottlerocketBootstrap, s); err != nil { + return err + } ++ if err := Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(&in.BottlerocketAdmin, &out.BottlerocketAdmin, s); err != nil { ++ return err ++ } + if err := Convert_v1beta1_BottlerocketControl_To_v1alpha4_BottlerocketControl(&in.BottlerocketControl, &out.BottlerocketControl, s); err != nil { + return err + } +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 4e60b7369..082b6114c 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -142,6 +142,22 @@ func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketAdmin) DeepCopyInto(out *BottlerocketAdmin) { ++ *out = *in ++ out.ImageMeta = in.ImageMeta ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketAdmin. ++func (in *BottlerocketAdmin) DeepCopy() *BottlerocketAdmin { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketAdmin) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { + *out = *in +@@ -212,6 +228,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + out.TypeMeta = in.TypeMeta + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ out.BottlerocketAdmin = in.BottlerocketAdmin + out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) + out.RegistryMirror = in.RegistryMirror +@@ -591,6 +608,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + out.TypeMeta = in.TypeMeta + out.Pause = in.Pause + out.BottlerocketBootstrap = in.BottlerocketBootstrap ++ out.BottlerocketAdmin = in.BottlerocketAdmin + out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) + out.RegistryMirror = in.RegistryMirror -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0020-Make-bottlerocket-admin-control-custom-bootstrap-con.patch b/projects/kubernetes-sigs/cluster-api/patches/0019-Make-bottlerocket-admin-control-custom-bootstrap-con.patch similarity index 94% rename from projects/kubernetes-sigs/cluster-api/patches/0020-Make-bottlerocket-admin-control-custom-bootstrap-con.patch rename to projects/kubernetes-sigs/cluster-api/patches/0019-Make-bottlerocket-admin-control-custom-bootstrap-con.patch index 3a2e022369..ef6eea9ef5 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0020-Make-bottlerocket-admin-control-custom-bootstrap-con.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0019-Make-bottlerocket-admin-control-custom-bootstrap-con.patch @@ -1,7 +1,7 @@ -From 1a30bcd6ee3a114754750e8ecef7e98959588602 Mon Sep 17 00:00:00 2001 +From 7e9f681fe40d6fd13caa33d37f9e21df41528753 Mon Sep 17 00:00:00 2001 From: Jiayi Wang Date: Thu, 5 Jan 2023 14:56:09 -0500 -Subject: [PATCH 20/40] Make bottlerocket admin, control, custom bootstrap +Subject: [PATCH 19/37] Make bottlerocket admin, control, custom bootstrap container images updatable in webhook --- @@ -10,10 +10,10 @@ Subject: [PATCH 20/40] Make bottlerocket admin, control, custom bootstrap 2 files changed, 60 insertions(+) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 477aef2e2..553220d8a 100644 +index c76cb3073..0ddcda3d7 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -164,6 +164,9 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -165,6 +165,9 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {"metadata", "*"}, // spec.kubeadmConfigSpec.clusterConfiguration {spec, kubeadmConfigSpec, clusterConfiguration, "bottlerocketBootstrap", "*"}, @@ -23,7 +23,7 @@ index 477aef2e2..553220d8a 100644 {spec, kubeadmConfigSpec, clusterConfiguration, "pause", "*"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageRepository"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageTag"}, -@@ -206,6 +209,9 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -209,6 +212,9 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, joinConfiguration, "discovery"}, {spec, kubeadmConfigSpec, joinConfiguration, "discovery", "*"}, {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketBootstrap", "*"}, @@ -34,7 +34,7 @@ index 477aef2e2..553220d8a 100644 // spec.kubeadmConfigSpec {spec, kubeadmConfigSpec, preKubeadmCommands}, diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -index 275f2cb12..0fb9025d1 100644 +index d92a27d14..36a152e6e 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go @@ -717,6 +717,24 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0021-Mark-etcd-machine-status-to-running-after-etcd-contr.patch b/projects/kubernetes-sigs/cluster-api/patches/0020-Mark-etcd-machine-status-to-running-after-etcd-contr.patch similarity index 92% rename from projects/kubernetes-sigs/cluster-api/patches/0021-Mark-etcd-machine-status-to-running-after-etcd-contr.patch rename to projects/kubernetes-sigs/cluster-api/patches/0020-Mark-etcd-machine-status-to-running-after-etcd-contr.patch index 7c716c71c3..fc5feba090 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0021-Mark-etcd-machine-status-to-running-after-etcd-contr.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0020-Mark-etcd-machine-status-to-running-after-etcd-contr.patch @@ -1,7 +1,7 @@ -From 613a7e58f0ae851a40607568b7091ad75d37e6c9 Mon Sep 17 00:00:00 2001 +From ffbd065e7dc9036e58d5545796ca48630fabaf04 Mon Sep 17 00:00:00 2001 From: Jiayi Wang Date: Mon, 9 Jan 2023 15:41:05 -0500 -Subject: [PATCH 21/40] Mark etcd machine status to running after etcd +Subject: [PATCH 20/37] Mark etcd machine status to running after etcd controller adds the etcd machine ready label --- @@ -28,7 +28,7 @@ index 07395019e..30c29647c 100644 ExcludeNodeDrainingAnnotation = "machine.cluster.x-k8s.io/exclude-node-draining" diff --git a/internal/controllers/machine/machine_controller_phases.go b/internal/controllers/machine/machine_controller_phases.go -index 41382bbaf..16febdda8 100644 +index 7408232ee..49e4359ac 100644 --- a/internal/controllers/machine/machine_controller_phases.go +++ b/internal/controllers/machine/machine_controller_phases.go @@ -70,8 +70,7 @@ func (r *Reconciler) reconcilePhase(_ context.Context, m *clusterv1.Machine) { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0022-add-support-for-registry-credentials.patch b/projects/kubernetes-sigs/cluster-api/patches/0021-add-support-for-registry-credentials.patch similarity index 94% rename from projects/kubernetes-sigs/cluster-api/patches/0022-add-support-for-registry-credentials.patch rename to projects/kubernetes-sigs/cluster-api/patches/0021-add-support-for-registry-credentials.patch index 520489b4ad..0e04efb150 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0022-add-support-for-registry-credentials.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0021-add-support-for-registry-credentials.patch @@ -1,7 +1,7 @@ -From bd865ca607bc55d77950aa7319d3e6d97d878893 Mon Sep 17 00:00:00 2001 +From c1729923c6ef9b4e95e91b89f3e8ee716853c007 Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Wed, 14 Dec 2022 12:47:42 -0800 -Subject: [PATCH 22/40] add support for registry credentials +Subject: [PATCH 21/37] add support for registry credentials Signed-off-by: Ahree Hong --- @@ -104,10 +104,10 @@ index 9848f47e8..374c7e313 100644 if err != nil { return nil, err diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index f4f3624c4..6018d66ea 100644 +index 3e3ee9d21..add3f6f82 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -65,6 +65,11 @@ const ( +@@ -67,6 +67,11 @@ const ( DefaultTokenTTL = 15 * time.Minute ) @@ -119,7 +119,7 @@ index f4f3624c4..6018d66ea 100644 // InitLocker is a lock that is used around kubeadm init. type InitLocker interface { Lock(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) bool -@@ -485,6 +490,13 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -517,6 +522,13 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex } if scope.Config.Spec.ClusterConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.ClusterConfiguration.RegistryMirror @@ -133,7 +133,7 @@ index f4f3624c4..6018d66ea 100644 } if scope.Config.Spec.InitConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.InitConfiguration.NodeRegistration.KubeletExtraArgs -@@ -492,6 +504,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -524,6 +536,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if len(scope.Config.Spec.InitConfiguration.NodeRegistration.Taints) > 0 { bottlerocketConfig.Taints = scope.Config.Spec.InitConfiguration.NodeRegistration.Taints } @@ -141,7 +141,7 @@ index f4f3624c4..6018d66ea 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -693,6 +706,13 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -725,6 +738,13 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) } if scope.Config.Spec.JoinConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.JoinConfiguration.RegistryMirror @@ -155,7 +155,7 @@ index f4f3624c4..6018d66ea 100644 } if scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs -@@ -823,6 +843,13 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -857,6 +877,13 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S } if scope.Config.Spec.ClusterConfiguration.RegistryMirror.Endpoint != "" { bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.ClusterConfiguration.RegistryMirror @@ -169,8 +169,8 @@ index f4f3624c4..6018d66ea 100644 } if scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs != nil { bottlerocketConfig.KubeletExtraArgs = scope.Config.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs -@@ -929,6 +956,27 @@ func (r *KubeadmConfigReconciler) resolveSecretPasswordContent(ctx context.Conte - return data, nil +@@ -985,6 +1012,27 @@ func (r *KubeadmConfigReconciler) tokenCheckRefreshOrRotationInterval() time.Dur + return r.TokenTTL / 3 } +// resolveRegistryCredentials returns username and password fetched from a secret object. diff --git a/projects/kubernetes-sigs/cluster-api/patches/0023-Add-support-for-configuring-NTP-servers-on-bottleroc.patch b/projects/kubernetes-sigs/cluster-api/patches/0022-Add-support-for-configuring-NTP-servers-on-bottleroc.patch similarity index 95% rename from projects/kubernetes-sigs/cluster-api/patches/0023-Add-support-for-configuring-NTP-servers-on-bottleroc.patch rename to projects/kubernetes-sigs/cluster-api/patches/0022-Add-support-for-configuring-NTP-servers-on-bottleroc.patch index ebb067bf34..8462b0a7bc 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0023-Add-support-for-configuring-NTP-servers-on-bottleroc.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0022-Add-support-for-configuring-NTP-servers-on-bottleroc.patch @@ -1,7 +1,7 @@ -From d1fccd9530ab23cea8bf106f92a4ff7fd9f19555 Mon Sep 17 00:00:00 2001 +From 4dbd67f641686e8c69e33fbf2f61fceec4b49128 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Wed, 1 Feb 2023 16:34:23 -0800 -Subject: [PATCH 23/40] Add support for configuring NTP servers on bottlerocket +Subject: [PATCH 22/37] Add support for configuring NTP servers on bottlerocket through CAPI Signed-off-by: Abhinav @@ -138,10 +138,10 @@ index 374c7e313..e21afb266 100644 bottlerocketNodeUserData, err := generateNodeUserData("InitBottlerocketNode", bottlerocketNodeInitSettingsTemplate, bottlerocketInput) if err != nil { diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 6018d66ea..83be3a157 100644 +index add3f6f82..f65477490 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -504,6 +504,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -536,6 +536,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if len(scope.Config.Spec.InitConfiguration.NodeRegistration.Taints) > 0 { bottlerocketConfig.Taints = scope.Config.Spec.InitConfiguration.NodeRegistration.Taints } @@ -151,7 +151,7 @@ index 6018d66ea..83be3a157 100644 } -@@ -720,6 +723,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -752,6 +755,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if len(scope.Config.Spec.JoinConfiguration.NodeRegistration.Taints) > 0 { bottlerocketConfig.Taints = scope.Config.Spec.JoinConfiguration.NodeRegistration.Taints } @@ -161,7 +161,7 @@ index 6018d66ea..83be3a157 100644 bootstrapJoinData, err = bottlerocket.NewNode(nodeInput, bottlerocketConfig) if err != nil { scope.Error(err, "Failed to create a worker bottlerocket join configuration") -@@ -857,6 +863,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -891,6 +897,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if len(scope.Config.Spec.JoinConfiguration.NodeRegistration.Taints) > 0 { bottlerocketConfig.Taints = scope.Config.Spec.JoinConfiguration.NodeRegistration.Taints } diff --git a/projects/kubernetes-sigs/cluster-api/patches/0024-set-hostname-for-BR-nodes.patch b/projects/kubernetes-sigs/cluster-api/patches/0023-set-hostname-for-BR-nodes.patch similarity index 95% rename from projects/kubernetes-sigs/cluster-api/patches/0024-set-hostname-for-BR-nodes.patch rename to projects/kubernetes-sigs/cluster-api/patches/0023-set-hostname-for-BR-nodes.patch index 8538c3f368..fc0aff32c1 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0024-set-hostname-for-BR-nodes.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0023-set-hostname-for-BR-nodes.patch @@ -1,7 +1,7 @@ -From 4b777c2b2dca545ca36134bc06101afef51901fa Mon Sep 17 00:00:00 2001 +From e010596fb56b506f3a3f72bf778c7f42356a7774 Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Tue, 7 Feb 2023 14:26:36 -0800 -Subject: [PATCH 24/40] set hostname for BR nodes +Subject: [PATCH 23/37] set hostname for BR nodes Signed-off-by: Ahree Hong --- @@ -202,10 +202,10 @@ index e21afb266..658f3a05e 100644 BootstrapContainers: config.BottlerocketCustomBootstrapContainers, } diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 83be3a157..4f6bc18af 100644 +index f65477490..007a6fda2 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -484,6 +484,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -516,6 +516,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex BottlerocketControl: scope.Config.Spec.ClusterConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketCustomBootstrapContainers, @@ -213,7 +213,7 @@ index 83be3a157..4f6bc18af 100644 } if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy -@@ -631,6 +632,11 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -663,6 +664,11 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) return res, nil } @@ -225,7 +225,7 @@ index 83be3a157..4f6bc18af 100644 kubernetesVersion := scope.ConfigOwner.KubernetesVersion() parsedVersion, err := semver.ParseTolerant(kubernetesVersion) if err != nil { -@@ -703,6 +709,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -735,6 +741,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) BottlerocketControl: scope.Config.Spec.JoinConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomBootstrapContainers, @@ -233,7 +233,7 @@ index 83be3a157..4f6bc18af 100644 } if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy -@@ -758,6 +765,11 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -792,6 +799,11 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S scope.Config.Spec.JoinConfiguration.ControlPlane = &bootstrapv1.JoinControlPlane{} } @@ -245,7 +245,7 @@ index 83be3a157..4f6bc18af 100644 certificates := secret.NewControlPlaneJoinCerts(scope.Config.Spec.ClusterConfiguration) err := certificates.LookupCached( ctx, -@@ -843,6 +855,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -877,6 +889,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S BottlerocketControl: scope.Config.Spec.JoinConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomBootstrapContainers, diff --git a/projects/kubernetes-sigs/cluster-api/patches/0025-Add-bottlerocket-k8s-settings-support.patch b/projects/kubernetes-sigs/cluster-api/patches/0024-Add-bottlerocket-k8s-settings-support.patch similarity index 85% rename from projects/kubernetes-sigs/cluster-api/patches/0025-Add-bottlerocket-k8s-settings-support.patch rename to projects/kubernetes-sigs/cluster-api/patches/0024-Add-bottlerocket-k8s-settings-support.patch index 3e8ff23b9f..7c2371c333 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0025-Add-bottlerocket-k8s-settings-support.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0024-Add-bottlerocket-k8s-settings-support.patch @@ -1,18 +1,15 @@ -From 7eac371a51ec52e040e809123051e089ffa81568 Mon Sep 17 00:00:00 2001 +From fee560dd3d35ebc8645967e0e907a31de509a9fa Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Thu, 2 Mar 2023 10:18:07 -0800 -Subject: [PATCH 25/40] Add bottlerocket k8s settings support +Subject: [PATCH 24/37] Add bottlerocket k8s settings support Signed-off-by: Abhinav Pandey --- api/v1beta1/zz_generated.openapi.go | 22 + - .../kubeadm/api/v1alpha4/kubeadm_types.go | 30 + - .../api/v1alpha4/zz_generated.conversion.go | 68 +++ - .../api/v1alpha4/zz_generated.deepcopy.go | 55 ++ .../kubeadm/api/v1beta1/kubeadm_types.go | 30 + .../api/v1beta1/zz_generated.deepcopy.go | 55 ++ - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 156 +++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 162 ++++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 162 ++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 168 ++++++ .../internal/bottlerocket/bootstrap.go | 21 +- .../internal/bottlerocket/bootstrap_test.go | 534 ++++++++++++------ .../internal/bottlerocket/bottlerocket.go | 31 +- @@ -21,29 +18,19 @@ Signed-off-by: Abhinav Pandey .../upstreamv1beta1/zz_generated.deepcopy.go | 55 ++ .../zz_generated.conversion.go | 2 + .../zz_generated.conversion.go | 2 + - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 156 +++++ + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 162 ++++++ ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 112 ++++ .../webhooks/kubeadm_control_plane.go | 2 + - 19 files changed, 1343 insertions(+), 184 deletions(-) + .../kubeadm/v1alpha4/kubeadm_types.go | 30 + + .../v1alpha4/zz_generated.conversion.go | 68 +++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 55 ++ + 19 files changed, 1361 insertions(+), 184 deletions(-) diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go -index d49f8303a..96fc5fcfb 100644 +index c5f394fe3..9e16acde8 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go -@@ -723,6 +723,12 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, -+ "managedExternalEtcdRef": { -+ SchemaProps: spec.SchemaProps{ -+ Description: "ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details for provisioning an external etcd cluster", -+ Ref: ref("k8s.io/api/core/v1.ObjectReference"), -+ }, -+ }, - "infrastructureRef": { - SchemaProps: spec.SchemaProps{ - Description: "InfrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.", -@@ -823,6 +829,22 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference +@@ -467,6 +467,22 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref common.Refe Format: "int64", }, }, @@ -66,250 +53,21 @@ index d49f8303a..96fc5fcfb 100644 }, }, }, -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index f1e5eee19..5fe836370 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -166,6 +166,31 @@ type ClusterConfiguration struct { - // This is only for bottlerocket. - // +optional - BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` -+ -+ // Bottlerocket holds configuration for certain bottlerocket settings. -+ // This is only for bottlerocket. -+ // +optional -+ Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` -+} -+ -+// BottlerocketSettings define bottlerocket settings that can be configured on bottlerocket nodes. -+// This setting is ONLY for bottlerocket nodes. -+type BottlerocketSettings struct { -+ // Kubernetes holds the kubernetes settings for bottlerocket nodes. -+ Kubernetes *BottlerocketKubernetesSettings `json:"kubernetes,omitempty"` -+} -+ -+// BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. -+// This setting is ONLY for bottlerocket nodes. -+type BottlerocketKubernetesSettings struct { -+ // MaxPods defines the maximum number of pods that can run on a node. -+ MaxPods int `json:"maxPods,omitempty"` -+ -+ // AllowedUnsafeSysctls defines the list of unsafe sysctls that can be set on a node. -+ AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` -+ -+ // ClusterDNSIPs defines IP addresses of the DNS servers. -+ ClusterDNSIPs []string `json:"clusterDNSIPs,omitempty"` - } - - // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. -@@ -486,6 +511,11 @@ type JoinConfiguration struct { - // This is only for bottlerocket. - // +optional - BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` -+ -+ // Bottlerocket holds configuration for certain bottlerocket settings. -+ // This is only for bottlerocket. -+ // +optional -+ Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` - } - - // BottlerocketHostContainer describes a host image for Bottlerocket -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index c3bdb3831..bc25ef023 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -140,6 +140,26 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketKubernetesSettings)(nil), (*v1beta1.BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(a.(*BottlerocketKubernetesSettings), b.(*v1beta1.BottlerocketKubernetesSettings), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketKubernetesSettings)(nil), (*BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(a.(*v1beta1.BottlerocketKubernetesSettings), b.(*BottlerocketKubernetesSettings), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketSettings)(nil), (*v1beta1.BottlerocketSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(a.(*BottlerocketSettings), b.(*v1beta1.BottlerocketSettings), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketSettings)(nil), (*BottlerocketSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(a.(*v1beta1.BottlerocketSettings), b.(*BottlerocketSettings), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) - }); err != nil { -@@ -755,6 +775,50 @@ func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostConta - return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { -+ out.MaxPods = in.MaxPods -+ out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) -+ out.ClusterDNSIPs = *(*[]string)(unsafe.Pointer(&in.ClusterDNSIPs)) -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in *v1beta1.BottlerocketKubernetesSettings, out *BottlerocketKubernetesSettings, s conversion.Scope) error { -+ out.MaxPods = in.MaxPods -+ out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) -+ out.ClusterDNSIPs = *(*[]string)(unsafe.Pointer(&in.ClusterDNSIPs)) -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in *v1beta1.BottlerocketKubernetesSettings, out *BottlerocketKubernetesSettings, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in, out, s) -+} -+ -+func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { -+ out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { -+ out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in, out, s) -+} -+ - func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { - return err -@@ -800,6 +864,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - out.ClusterName = in.ClusterName - out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) -+ out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) - return nil - } - -@@ -853,6 +918,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - out.ClusterName = in.ClusterName - out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) -+ out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) - return nil - } - -@@ -1228,6 +1294,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) - out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) -+ out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) - return nil - } - -@@ -1267,6 +1334,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - // WARNING: in.Patches requires manual conversion: does not exist in peer-type - out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) -+ out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 4688180f0..876da90f3 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -222,6 +222,51 @@ func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketKubernetesSettings) DeepCopyInto(out *BottlerocketKubernetesSettings) { -+ *out = *in -+ if in.AllowedUnsafeSysctls != nil { -+ in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+ if in.ClusterDNSIPs != nil { -+ in, out := &in.ClusterDNSIPs, &out.ClusterDNSIPs -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketKubernetesSettings. -+func (in *BottlerocketKubernetesSettings) DeepCopy() *BottlerocketKubernetesSettings { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketKubernetesSettings) -+ in.DeepCopyInto(out) -+ return out -+} -+ -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { -+ *out = *in -+ if in.Kubernetes != nil { -+ in, out := &in.Kubernetes, &out.Kubernetes -+ *out = new(BottlerocketKubernetesSettings) -+ (*in).DeepCopyInto(*out) -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. -+func (in *BottlerocketSettings) DeepCopy() *BottlerocketSettings { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketSettings) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in -@@ -255,6 +300,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = make([]BottlerocketBootstrapContainer, len(*in)) - copy(*out, *in) - } -+ if in.Bottlerocket != nil { -+ in, out := &in.Bottlerocket, &out.Bottlerocket -+ *out = new(BottlerocketSettings) -+ (*in).DeepCopyInto(*out) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. -@@ -629,6 +679,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = make([]BottlerocketBootstrapContainer, len(*in)) - copy(*out, *in) - } -+ if in.Bottlerocket != nil { -+ in, out := &in.Bottlerocket, &out.Bottlerocket -+ *out = new(BottlerocketSettings) -+ (*in).DeepCopyInto(*out) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. +@@ -787,6 +803,12 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, ++ "managedExternalEtcdRef": { ++ SchemaProps: spec.SchemaProps{ ++ Description: "ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details for provisioning an external etcd cluster", ++ Ref: ref("k8s.io/api/core/v1.ObjectReference"), ++ }, ++ }, + "infrastructureRef": { + SchemaProps: spec.SchemaProps{ + Description: "InfrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.", diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 409d724b3..b3814c089 100644 +index 2d5fb7e6d..d3ca16308 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -185,6 +185,31 @@ type ClusterConfiguration struct { @@ -437,16 +195,17 @@ index ca5525885..5e614f3cc 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index aad4846c8..811f6c3ee 100644 +index d256ac98c..ed03573f2 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -103,6 +103,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -114,6 +114,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -471,15 +230,16 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket -@@ -830,6 +856,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -852,6 +879,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -504,15 +264,16 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket -@@ -1436,6 +1488,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -1482,6 +1536,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -537,15 +298,16 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket -@@ -2159,6 +2237,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2216,6 +2297,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -570,15 +332,16 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket -@@ -2763,6 +2867,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2838,6 +2946,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -603,15 +366,16 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket -@@ -3555,6 +3685,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -3643,6 +3778,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain bottlerocket -+ settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings for @@ -636,19 +400,20 @@ index aad4846c8..811f6c3ee 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for admin - container This is only for bottlerocket + description: |- + BottlerocketAdmin holds the image source for admin container diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 67d0f44e5..18eb3988a 100644 +index b99285258..8accf0961 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -111,6 +111,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -122,6 +122,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -674,15 +439,16 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -884,6 +911,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -875,6 +903,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -708,15 +474,16 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -1456,6 +1510,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -1450,6 +1506,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -742,15 +509,16 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -2227,6 +2308,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2200,6 +2284,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -776,15 +544,16 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -2822,6 +2930,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2798,6 +2910,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -810,15 +579,16 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -3670,6 +3805,33 @@ spec: - convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -3621,6 +3761,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -844,8 +614,8 @@ index 67d0f44e5..18eb3988a 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket + description: |- + BottlerocketAdmin holds the image source for admin container diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index 9cf4a909a..e5926de86 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -1637,10 +1407,10 @@ index 658f3a05e..cbab7c7a4 100644 // bottlerocket configuration accepts taints in the format diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 4f6bc18af..b63a64589 100644 +index 007a6fda2..64213e5be 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -484,6 +484,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -516,6 +516,7 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex BottlerocketControl: scope.Config.Spec.ClusterConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.ClusterConfiguration.BottlerocketCustomBootstrapContainers, @@ -1648,7 +1418,7 @@ index 4f6bc18af..b63a64589 100644 Hostname: machine.Name, } if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { -@@ -508,7 +509,6 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -540,7 +541,6 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.NTP != nil && scope.Config.Spec.NTP.Enabled != nil && *scope.Config.Spec.NTP.Enabled { bottlerocketConfig.NTPServers = scope.Config.Spec.NTP.Servers } @@ -1656,7 +1426,7 @@ index 4f6bc18af..b63a64589 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -709,6 +709,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -741,6 +741,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) BottlerocketControl: scope.Config.Spec.JoinConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomBootstrapContainers, @@ -1664,7 +1434,7 @@ index 4f6bc18af..b63a64589 100644 Hostname: machine.Name, } if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { -@@ -855,6 +856,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -889,6 +890,7 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S BottlerocketControl: scope.Config.Spec.JoinConfiguration.BottlerocketControl, BottlerocketCustomHostContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomHostContainers, BottlerocketCustomBootstrapContainers: scope.Config.Spec.JoinConfiguration.BottlerocketCustomBootstrapContainers, @@ -1841,16 +1611,17 @@ index 4584e6266..c613bdd12 100644 } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 119558689..cda7db3f5 100644 +index 842b5df46..47cc32add 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -178,6 +178,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -198,6 +198,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -1875,15 +1646,16 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket -@@ -935,6 +961,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -946,6 +973,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -1908,15 +1680,16 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket -@@ -1678,6 +1730,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -1712,6 +1766,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -1941,15 +1714,16 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket -@@ -2432,6 +2510,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2457,6 +2538,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -1974,15 +1748,16 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket -@@ -3259,6 +3363,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -3317,6 +3425,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2007,15 +1782,16 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket -@@ -4086,6 +4216,32 @@ spec: - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -4133,6 +4268,33 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for certain -+ bottlerocket settings. This is only for bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2040,20 +1816,20 @@ index 119558689..cda7db3f5 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source for - admin container This is only for bottlerocket + description: |- + BottlerocketAdmin holds the image source for admin container diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index 66e39e74a..055b51899 100644 +index a83251f01..775b979a5 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -125,6 +125,34 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' +@@ -134,6 +134,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for -+ certain bottlerocket settings. This is only for -+ bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2079,16 +1855,16 @@ index 66e39e74a..055b51899 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -930,6 +958,34 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -893,6 +921,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for -+ certain bottlerocket settings. This is only for -+ bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2114,16 +1890,16 @@ index 66e39e74a..055b51899 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -1692,6 +1748,34 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -1650,6 +1706,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for -+ certain bottlerocket settings. This is only for -+ bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2149,16 +1925,16 @@ index 66e39e74a..055b51899 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket -@@ -2576,6 +2660,34 @@ spec: - value, and may reject unrecognized values. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + BottlerocketAdmin holds the image source for admin container +@@ -2482,6 +2566,34 @@ spec: + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + bottlerocket: -+ description: Bottlerocket holds configuration for -+ certain bottlerocket settings. This is only for -+ bottlerocket. ++ description: |- ++ Bottlerocket holds configuration for certain bottlerocket settings. ++ This is only for bottlerocket. + properties: + kubernetes: + description: Kubernetes holds the kubernetes settings @@ -2184,13 +1960,13 @@ index 66e39e74a..055b51899 100644 + type: object + type: object bottlerocketAdmin: - description: BottlerocketAdmin holds the image source - for admin container This is only for bottlerocket + description: |- + BottlerocketAdmin holds the image source for admin container diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 553220d8a..0aaf0c3a5 100644 +index 0ddcda3d7..e760800b8 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -167,6 +167,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -168,6 +168,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, clusterConfiguration, "bottlerocketAdmin", "*"}, {spec, kubeadmConfigSpec, clusterConfiguration, "bottlerocketControl", "*"}, {spec, kubeadmConfigSpec, clusterConfiguration, "bottlerocketCustomBootstrapContainers"}, @@ -2198,7 +1974,7 @@ index 553220d8a..0aaf0c3a5 100644 {spec, kubeadmConfigSpec, clusterConfiguration, "pause", "*"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageRepository"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageTag"}, -@@ -212,6 +213,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -215,6 +216,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketAdmin", "*"}, {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketControl", "*"}, {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketCustomBootstrapContainers"}, @@ -2206,6 +1982,248 @@ index 553220d8a..0aaf0c3a5 100644 {spec, kubeadmConfigSpec, joinConfiguration, "pause", "*"}, // spec.kubeadmConfigSpec {spec, kubeadmConfigSpec, preKubeadmCommands}, +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index f1e5eee19..5fe836370 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -166,6 +166,31 @@ type ClusterConfiguration struct { + // This is only for bottlerocket. + // +optional + BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` ++ ++ // Bottlerocket holds configuration for certain bottlerocket settings. ++ // This is only for bottlerocket. ++ // +optional ++ Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` ++} ++ ++// BottlerocketSettings define bottlerocket settings that can be configured on bottlerocket nodes. ++// This setting is ONLY for bottlerocket nodes. ++type BottlerocketSettings struct { ++ // Kubernetes holds the kubernetes settings for bottlerocket nodes. ++ Kubernetes *BottlerocketKubernetesSettings `json:"kubernetes,omitempty"` ++} ++ ++// BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. ++// This setting is ONLY for bottlerocket nodes. ++type BottlerocketKubernetesSettings struct { ++ // MaxPods defines the maximum number of pods that can run on a node. ++ MaxPods int `json:"maxPods,omitempty"` ++ ++ // AllowedUnsafeSysctls defines the list of unsafe sysctls that can be set on a node. ++ AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` ++ ++ // ClusterDNSIPs defines IP addresses of the DNS servers. ++ ClusterDNSIPs []string `json:"clusterDNSIPs,omitempty"` + } + + // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. +@@ -486,6 +511,11 @@ type JoinConfiguration struct { + // This is only for bottlerocket. + // +optional + BottlerocketCustomBootstrapContainers []BottlerocketBootstrapContainer `json:"bottlerocketCustomBootstrapContainers,omitempty"` ++ ++ // Bottlerocket holds configuration for certain bottlerocket settings. ++ // This is only for bottlerocket. ++ // +optional ++ Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` + } + + // BottlerocketHostContainer describes a host image for Bottlerocket +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index e64081071..c9adca760 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -140,6 +140,26 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketKubernetesSettings)(nil), (*v1beta1.BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(a.(*BottlerocketKubernetesSettings), b.(*v1beta1.BottlerocketKubernetesSettings), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketKubernetesSettings)(nil), (*BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(a.(*v1beta1.BottlerocketKubernetesSettings), b.(*BottlerocketKubernetesSettings), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketSettings)(nil), (*v1beta1.BottlerocketSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(a.(*BottlerocketSettings), b.(*v1beta1.BottlerocketSettings), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketSettings)(nil), (*BottlerocketSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(a.(*v1beta1.BottlerocketSettings), b.(*BottlerocketSettings), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { +@@ -755,6 +775,50 @@ func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostConta + return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { ++ out.MaxPods = in.MaxPods ++ out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) ++ out.ClusterDNSIPs = *(*[]string)(unsafe.Pointer(&in.ClusterDNSIPs)) ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in *v1beta1.BottlerocketKubernetesSettings, out *BottlerocketKubernetesSettings, s conversion.Scope) error { ++ out.MaxPods = in.MaxPods ++ out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) ++ out.ClusterDNSIPs = *(*[]string)(unsafe.Pointer(&in.ClusterDNSIPs)) ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in *v1beta1.BottlerocketKubernetesSettings, out *BottlerocketKubernetesSettings, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKubernetesSettings(in, out, s) ++} ++ ++func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { ++ out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { ++ out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in, out, s) ++} ++ + func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err +@@ -800,6 +864,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + out.ClusterName = in.ClusterName + out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) ++ out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) + return nil + } + +@@ -853,6 +918,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + out.ClusterName = in.ClusterName + out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) ++ out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) + return nil + } + +@@ -1228,6 +1294,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) ++ out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) + return nil + } + +@@ -1267,6 +1334,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + // WARNING: in.Patches requires manual conversion: does not exist in peer-type + out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) ++ out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 082b6114c..9d54e9139 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -222,6 +222,51 @@ func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketKubernetesSettings) DeepCopyInto(out *BottlerocketKubernetesSettings) { ++ *out = *in ++ if in.AllowedUnsafeSysctls != nil { ++ in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++ if in.ClusterDNSIPs != nil { ++ in, out := &in.ClusterDNSIPs, &out.ClusterDNSIPs ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketKubernetesSettings. ++func (in *BottlerocketKubernetesSettings) DeepCopy() *BottlerocketKubernetesSettings { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketKubernetesSettings) ++ in.DeepCopyInto(out) ++ return out ++} ++ ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { ++ *out = *in ++ if in.Kubernetes != nil { ++ in, out := &in.Kubernetes, &out.Kubernetes ++ *out = new(BottlerocketKubernetesSettings) ++ (*in).DeepCopyInto(*out) ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. ++func (in *BottlerocketSettings) DeepCopy() *BottlerocketSettings { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketSettings) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in +@@ -255,6 +300,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = make([]BottlerocketBootstrapContainer, len(*in)) + copy(*out, *in) + } ++ if in.Bottlerocket != nil { ++ in, out := &in.Bottlerocket, &out.Bottlerocket ++ *out = new(BottlerocketSettings) ++ (*in).DeepCopyInto(*out) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +@@ -629,6 +679,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = make([]BottlerocketBootstrapContainer, len(*in)) + copy(*out, *in) + } ++ if in.Bottlerocket != nil { ++ in, out := &in.Bottlerocket, &out.Bottlerocket ++ *out = new(BottlerocketSettings) ++ (*in).DeepCopyInto(*out) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0026-add-br-kernel.sysctl-settings.patch b/projects/kubernetes-sigs/cluster-api/patches/0025-add-br-kernel.sysctl-settings.patch similarity index 93% rename from projects/kubernetes-sigs/cluster-api/patches/0026-add-br-kernel.sysctl-settings.patch rename to projects/kubernetes-sigs/cluster-api/patches/0025-add-br-kernel.sysctl-settings.patch index 170849b2a8..b6865f79f6 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0026-add-br-kernel.sysctl-settings.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0025-add-br-kernel.sysctl-settings.patch @@ -1,13 +1,10 @@ -From 5fb56abd889b2307a62426b2e910232aa4600a0b Mon Sep 17 00:00:00 2001 +From 69c5bcd2f94aeb599a432cc38981869bda1bb479 Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Tue, 7 Mar 2023 14:01:39 -0800 -Subject: [PATCH 26/40] add br kernel.sysctl settings +Subject: [PATCH 25/37] add br kernel.sysctl settings Signed-off-by: Ahree Hong --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 10 + - .../api/v1alpha4/zz_generated.conversion.go | 32 ++ - .../api/v1alpha4/zz_generated.deepcopy.go | 27 + .../kubeadm/api/v1beta1/kubeadm_types.go | 10 + .../api/v1beta1/zz_generated.deepcopy.go | 27 + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 66 +++ @@ -20,147 +17,13 @@ Signed-off-by: Ahree Hong .../upstreamv1beta1/zz_generated.deepcopy.go | 27 + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 66 +++ ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 48 ++ + .../kubeadm/v1alpha4/kubeadm_types.go | 10 + + .../v1alpha4/zz_generated.conversion.go | 32 ++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 27 + 15 files changed, 934 insertions(+), 7 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 5fe836370..c00ea0a53 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -178,6 +178,10 @@ type ClusterConfiguration struct { - type BottlerocketSettings struct { - // Kubernetes holds the kubernetes settings for bottlerocket nodes. - Kubernetes *BottlerocketKubernetesSettings `json:"kubernetes,omitempty"` -+ -+ // KernelSettings contains additional kernel settings for Bottlerocket. -+ // +optional -+ Kernel *BottlerocketKernelSettings `json:"kernel,omitempty"` - } - - // BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. -@@ -193,6 +197,12 @@ type BottlerocketKubernetesSettings struct { - ClusterDNSIPs []string `json:"clusterDNSIPs,omitempty"` - } - -+// BottlerocketKernelSettings holds the kernel settings for bottlerocket nodes -+type BottlerocketKernelSettings struct { -+ // SysctlSettings defines the kernel sysctl settings to set for bottlerocket nodes. -+ SysctlSettings map[string]string `json:"sysctlSettings,omitempty"` -+} -+ - // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. - // This setting is ONLY for bottlerocket nodes, as this needs to be set pre-boot time along with user-data - type Pause struct { -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index bc25ef023..70c06fcf3 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -140,6 +140,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketKernelSettings)(nil), (*v1beta1.BottlerocketKernelSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(a.(*BottlerocketKernelSettings), b.(*v1beta1.BottlerocketKernelSettings), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketKernelSettings)(nil), (*BottlerocketKernelSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(a.(*v1beta1.BottlerocketKernelSettings), b.(*BottlerocketKernelSettings), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*BottlerocketKubernetesSettings)(nil), (*v1beta1.BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(a.(*BottlerocketKubernetesSettings), b.(*v1beta1.BottlerocketKubernetesSettings), scope) - }); err != nil { -@@ -775,6 +785,26 @@ func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostConta - return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in *BottlerocketKernelSettings, out *v1beta1.BottlerocketKernelSettings, s conversion.Scope) error { -+ out.SysctlSettings = *(*map[string]string)(unsafe.Pointer(&in.SysctlSettings)) -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in *BottlerocketKernelSettings, out *v1beta1.BottlerocketKernelSettings, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in *v1beta1.BottlerocketKernelSettings, out *BottlerocketKernelSettings, s conversion.Scope) error { -+ out.SysctlSettings = *(*map[string]string)(unsafe.Pointer(&in.SysctlSettings)) -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in *v1beta1.BottlerocketKernelSettings, out *BottlerocketKernelSettings, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in, out, s) -+} -+ - func autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { - out.MaxPods = in.MaxPods - out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) -@@ -801,6 +831,7 @@ func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKube - - func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { - out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) -+ out.Kernel = (*v1beta1.BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) - return nil - } - -@@ -811,6 +842,7 @@ func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *B - - func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { - out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) -+ out.Kernel = (*BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 876da90f3..44bbe16ce 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -222,6 +222,28 @@ func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketKernelSettings) DeepCopyInto(out *BottlerocketKernelSettings) { -+ *out = *in -+ if in.SysctlSettings != nil { -+ in, out := &in.SysctlSettings, &out.SysctlSettings -+ *out = make(map[string]string, len(*in)) -+ for key, val := range *in { -+ (*out)[key] = val -+ } -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketKernelSettings. -+func (in *BottlerocketKernelSettings) DeepCopy() *BottlerocketKernelSettings { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketKernelSettings) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *BottlerocketKubernetesSettings) DeepCopyInto(out *BottlerocketKubernetesSettings) { - *out = *in -@@ -255,6 +277,11 @@ func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { - *out = new(BottlerocketKubernetesSettings) - (*in).DeepCopyInto(*out) - } -+ if in.Kernel != nil { -+ in, out := &in.Kernel, &out.Kernel -+ *out = new(BottlerocketKernelSettings) -+ (*in).DeepCopyInto(*out) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index b3814c089..c97ef8604 100644 +index d3ca16308..f86857e62 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -197,6 +197,10 @@ type ClusterConfiguration struct { @@ -233,12 +96,12 @@ index 5e614f3cc..d335a35b1 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index 811f6c3ee..13eab82cd 100644 +index ed03573f2..798ea0395 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -107,6 +107,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -119,6 +119,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -254,9 +117,9 @@ index 811f6c3ee..13eab82cd 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -860,6 +871,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -884,6 +895,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -272,9 +135,9 @@ index 811f6c3ee..13eab82cd 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -1492,6 +1514,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -1541,6 +1563,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -290,9 +153,9 @@ index 811f6c3ee..13eab82cd 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2241,6 +2274,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -2302,6 +2335,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -308,9 +171,9 @@ index 811f6c3ee..13eab82cd 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2871,6 +2915,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -2951,6 +2995,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -326,9 +189,9 @@ index 811f6c3ee..13eab82cd 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -3689,6 +3744,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -3783,6 +3838,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel settings @@ -345,12 +208,12 @@ index 811f6c3ee..13eab82cd 100644 description: Kubernetes holds the kubernetes settings for bottlerocket nodes. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 18eb3988a..02cc4c0ed 100644 +index 8accf0961..ae0b49e93 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -115,6 +115,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -127,6 +127,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -366,9 +229,9 @@ index 18eb3988a..02cc4c0ed 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -915,6 +926,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -908,6 +919,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -384,9 +247,9 @@ index 18eb3988a..02cc4c0ed 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -1514,6 +1536,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -1511,6 +1533,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -402,9 +265,9 @@ index 18eb3988a..02cc4c0ed 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2312,6 +2345,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2289,6 +2322,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -420,9 +283,9 @@ index 18eb3988a..02cc4c0ed 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2934,6 +2978,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2915,6 +2959,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -438,9 +301,9 @@ index 18eb3988a..02cc4c0ed 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -3809,6 +3864,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -3766,6 +3821,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1230,12 +1093,12 @@ index c28f28c4c..50d010408 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index cda7db3f5..905f4575c 100644 +index 47cc32add..c70d35aa4 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -182,6 +182,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -203,6 +203,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1251,9 +1114,9 @@ index cda7db3f5..905f4575c 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -965,6 +976,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -978,6 +989,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1269,9 +1132,9 @@ index cda7db3f5..905f4575c 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -1734,6 +1756,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -1771,6 +1793,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1287,9 +1150,9 @@ index cda7db3f5..905f4575c 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2514,6 +2547,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2543,6 +2576,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1305,9 +1168,9 @@ index cda7db3f5..905f4575c 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -3367,6 +3411,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -3430,6 +3474,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1323,9 +1186,9 @@ index cda7db3f5..905f4575c 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -4220,6 +4275,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -4273,6 +4328,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional kernel @@ -1342,12 +1205,12 @@ index cda7db3f5..905f4575c 100644 description: Kubernetes holds the kubernetes settings for bottlerocket nodes. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index 055b51899..b3ca9161f 100644 +index 775b979a5..8b0ecc47d 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -130,6 +130,18 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -139,6 +139,18 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional @@ -1364,9 +1227,9 @@ index 055b51899..b3ca9161f 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -963,6 +975,18 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -926,6 +938,18 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional @@ -1383,9 +1246,9 @@ index 055b51899..b3ca9161f 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -1753,6 +1777,18 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -1711,6 +1735,18 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional @@ -1402,9 +1265,9 @@ index 055b51899..b3ca9161f 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. -@@ -2665,6 +2701,18 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -2571,6 +2607,18 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + kernel: + description: KernelSettings contains additional @@ -1421,6 +1284,143 @@ index 055b51899..b3ca9161f 100644 kubernetes: description: Kubernetes holds the kubernetes settings for bottlerocket nodes. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 5fe836370..c00ea0a53 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -178,6 +178,10 @@ type ClusterConfiguration struct { + type BottlerocketSettings struct { + // Kubernetes holds the kubernetes settings for bottlerocket nodes. + Kubernetes *BottlerocketKubernetesSettings `json:"kubernetes,omitempty"` ++ ++ // KernelSettings contains additional kernel settings for Bottlerocket. ++ // +optional ++ Kernel *BottlerocketKernelSettings `json:"kernel,omitempty"` + } + + // BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. +@@ -193,6 +197,12 @@ type BottlerocketKubernetesSettings struct { + ClusterDNSIPs []string `json:"clusterDNSIPs,omitempty"` + } + ++// BottlerocketKernelSettings holds the kernel settings for bottlerocket nodes ++type BottlerocketKernelSettings struct { ++ // SysctlSettings defines the kernel sysctl settings to set for bottlerocket nodes. ++ SysctlSettings map[string]string `json:"sysctlSettings,omitempty"` ++} ++ + // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. + // This setting is ONLY for bottlerocket nodes, as this needs to be set pre-boot time along with user-data + type Pause struct { +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index c9adca760..b1e5e7534 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -140,6 +140,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketKernelSettings)(nil), (*v1beta1.BottlerocketKernelSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(a.(*BottlerocketKernelSettings), b.(*v1beta1.BottlerocketKernelSettings), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketKernelSettings)(nil), (*BottlerocketKernelSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(a.(*v1beta1.BottlerocketKernelSettings), b.(*BottlerocketKernelSettings), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*BottlerocketKubernetesSettings)(nil), (*v1beta1.BottlerocketKubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(a.(*BottlerocketKubernetesSettings), b.(*v1beta1.BottlerocketKubernetesSettings), scope) + }); err != nil { +@@ -775,6 +785,26 @@ func Convert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostConta + return autoConvert_v1beta1_BottlerocketHostContainer_To_v1alpha4_BottlerocketHostContainer(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in *BottlerocketKernelSettings, out *v1beta1.BottlerocketKernelSettings, s conversion.Scope) error { ++ out.SysctlSettings = *(*map[string]string)(unsafe.Pointer(&in.SysctlSettings)) ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in *BottlerocketKernelSettings, out *v1beta1.BottlerocketKernelSettings, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketKernelSettings_To_v1beta1_BottlerocketKernelSettings(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in *v1beta1.BottlerocketKernelSettings, out *BottlerocketKernelSettings, s conversion.Scope) error { ++ out.SysctlSettings = *(*map[string]string)(unsafe.Pointer(&in.SysctlSettings)) ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in *v1beta1.BottlerocketKernelSettings, out *BottlerocketKernelSettings, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketKernelSettings_To_v1alpha4_BottlerocketKernelSettings(in, out, s) ++} ++ + func autoConvert_v1alpha4_BottlerocketKubernetesSettings_To_v1beta1_BottlerocketKubernetesSettings(in *BottlerocketKubernetesSettings, out *v1beta1.BottlerocketKubernetesSettings, s conversion.Scope) error { + out.MaxPods = in.MaxPods + out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) +@@ -801,6 +831,7 @@ func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKube + + func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { + out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) ++ out.Kernel = (*v1beta1.BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) + return nil + } + +@@ -811,6 +842,7 @@ func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *B + + func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { + out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) ++ out.Kernel = (*BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 9d54e9139..815f0e031 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -222,6 +222,28 @@ func (in *BottlerocketHostContainer) DeepCopy() *BottlerocketHostContainer { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketKernelSettings) DeepCopyInto(out *BottlerocketKernelSettings) { ++ *out = *in ++ if in.SysctlSettings != nil { ++ in, out := &in.SysctlSettings, &out.SysctlSettings ++ *out = make(map[string]string, len(*in)) ++ for key, val := range *in { ++ (*out)[key] = val ++ } ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketKernelSettings. ++func (in *BottlerocketKernelSettings) DeepCopy() *BottlerocketKernelSettings { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketKernelSettings) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *BottlerocketKubernetesSettings) DeepCopyInto(out *BottlerocketKubernetesSettings) { + *out = *in +@@ -255,6 +277,11 @@ func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { + *out = new(BottlerocketKubernetesSettings) + (*in).DeepCopyInto(*out) + } ++ if in.Kernel != nil { ++ in, out := &in.Kernel, &out.Kernel ++ *out = new(BottlerocketKernelSettings) ++ (*in).DeepCopyInto(*out) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0027-add-boot-kernel-settings-for-BR.patch b/projects/kubernetes-sigs/cluster-api/patches/0026-add-boot-kernel-settings-for-BR.patch similarity index 88% rename from projects/kubernetes-sigs/cluster-api/patches/0027-add-boot-kernel-settings-for-BR.patch rename to projects/kubernetes-sigs/cluster-api/patches/0026-add-boot-kernel-settings-for-BR.patch index b4cff00bff..71519df2e9 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0027-add-boot-kernel-settings-for-BR.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0026-add-boot-kernel-settings-for-BR.patch @@ -1,13 +1,10 @@ -From 18ad3d3b2795b06630ddddc47422fc9192d9279d Mon Sep 17 00:00:00 2001 +From d061670bd84aa08ef437b82f44afc4b1446d721f Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Thu, 23 Mar 2023 01:51:16 -0700 -Subject: [PATCH 27/40] add boot kernel settings for BR +Subject: [PATCH 26/37] add boot kernel settings for BR Signed-off-by: Ahree Hong --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 8 +++ - .../api/v1alpha4/zz_generated.conversion.go | 32 +++++++++ - .../api/v1alpha4/zz_generated.deepcopy.go | 36 ++++++++++ .../kubeadm/api/v1beta1/kubeadm_types.go | 8 +++ .../api/v1beta1/zz_generated.deepcopy.go | 36 ++++++++++ ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 66 +++++++++++++++++++ @@ -20,155 +17,14 @@ Signed-off-by: Ahree Hong .../upstreamv1beta1/zz_generated.deepcopy.go | 36 ++++++++++ ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 66 +++++++++++++++++++ ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 44 +++++++++++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 8 +++ + .../v1alpha4/zz_generated.conversion.go | 32 +++++++++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 36 ++++++++++ .../machine/machine_controller_phases.go | 5 +- 16 files changed, 535 insertions(+), 2 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index c00ea0a53..010efa948 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -182,6 +182,9 @@ type BottlerocketSettings struct { - // KernelSettings contains additional kernel settings for Bottlerocket. - // +optional - Kernel *BottlerocketKernelSettings `json:"kernel,omitempty"` -+ -+ // Boot holds the boot-related settings for bottlerocket nodes -+ Boot *BottlerocketBootSettings `json:"boot,omitempty"` - } - - // BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. -@@ -203,6 +206,11 @@ type BottlerocketKernelSettings struct { - SysctlSettings map[string]string `json:"sysctlSettings,omitempty"` - } - -+// BottlerocketBootSettings holds the boot-related settings for bottlerocket nodes. -+type BottlerocketBootSettings struct { -+ BootKernelParameters map[string][]string `json:"bootKernelParameters,omitempty"` -+} -+ - // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. - // This setting is ONLY for bottlerocket nodes, as this needs to be set pre-boot time along with user-data - type Pause struct { -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 70c06fcf3..8f36b6a13 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*BottlerocketBootSettings)(nil), (*v1beta1.BottlerocketBootSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(a.(*BottlerocketBootSettings), b.(*v1beta1.BottlerocketBootSettings), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootSettings)(nil), (*BottlerocketBootSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(a.(*v1beta1.BottlerocketBootSettings), b.(*BottlerocketBootSettings), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) - }); err != nil { -@@ -675,6 +685,26 @@ func Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1 - return autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in, out, s) - } - -+func autoConvert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in *BottlerocketBootSettings, out *v1beta1.BottlerocketBootSettings, s conversion.Scope) error { -+ out.BootKernelParameters = *(*map[string][]string)(unsafe.Pointer(&in.BootKernelParameters)) -+ return nil -+} -+ -+// Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings is an autogenerated conversion function. -+func Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in *BottlerocketBootSettings, out *v1beta1.BottlerocketBootSettings, s conversion.Scope) error { -+ return autoConvert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in, out, s) -+} -+ -+func autoConvert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in *v1beta1.BottlerocketBootSettings, out *BottlerocketBootSettings, s conversion.Scope) error { -+ out.BootKernelParameters = *(*map[string][]string)(unsafe.Pointer(&in.BootKernelParameters)) -+ return nil -+} -+ -+// Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings is an autogenerated conversion function. -+func Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in *v1beta1.BottlerocketBootSettings, out *BottlerocketBootSettings, s conversion.Scope) error { -+ return autoConvert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in, out, s) -+} -+ - func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err -@@ -832,6 +862,7 @@ func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKube - func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { - out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) - out.Kernel = (*v1beta1.BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) -+ out.Boot = (*v1beta1.BottlerocketBootSettings)(unsafe.Pointer(in.Boot)) - return nil - } - -@@ -843,6 +874,7 @@ func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *B - func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { - out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) - out.Kernel = (*BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) -+ out.Boot = (*BottlerocketBootSettings)(unsafe.Pointer(in.Boot)) - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 44bbe16ce..f8d8004c0 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -158,6 +158,37 @@ func (in *BottlerocketAdmin) DeepCopy() *BottlerocketAdmin { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *BottlerocketBootSettings) DeepCopyInto(out *BottlerocketBootSettings) { -+ *out = *in -+ if in.BootKernelParameters != nil { -+ in, out := &in.BootKernelParameters, &out.BootKernelParameters -+ *out = make(map[string][]string, len(*in)) -+ for key, val := range *in { -+ var outVal []string -+ if val == nil { -+ (*out)[key] = nil -+ } else { -+ inVal := (*in)[key] -+ in, out := &inVal, &outVal -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+ (*out)[key] = outVal -+ } -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootSettings. -+func (in *BottlerocketBootSettings) DeepCopy() *BottlerocketBootSettings { -+ if in == nil { -+ return nil -+ } -+ out := new(BottlerocketBootSettings) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { - *out = *in -@@ -282,6 +313,11 @@ func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { - *out = new(BottlerocketKernelSettings) - (*in).DeepCopyInto(*out) - } -+ if in.Boot != nil { -+ in, out := &in.Boot, &out.Boot -+ *out = new(BottlerocketBootSettings) -+ (*in).DeepCopyInto(*out) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index c97ef8604..434d2c088 100644 +index f86857e62..68dd4b9a9 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -201,6 +201,9 @@ type BottlerocketSettings struct { @@ -248,12 +104,12 @@ index d335a35b1..c89d4aa1f 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index 13eab82cd..0591279db 100644 +index 798ea0395..662a68087 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -107,6 +107,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -119,6 +119,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -269,9 +125,9 @@ index 13eab82cd..0591279db 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -871,6 +882,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -895,6 +906,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -287,9 +143,9 @@ index 13eab82cd..0591279db 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -1514,6 +1536,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -1563,6 +1585,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -305,9 +161,9 @@ index 13eab82cd..0591279db 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2274,6 +2307,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -2335,6 +2368,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -323,9 +179,9 @@ index 13eab82cd..0591279db 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2915,6 +2959,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -2995,6 +3039,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -341,9 +197,9 @@ index 13eab82cd..0591279db 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -3744,6 +3799,17 @@ spec: - description: Bottlerocket holds configuration for certain bottlerocket - settings. This is only for bottlerocket. +@@ -3838,6 +3893,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for bottlerocket @@ -360,12 +216,12 @@ index 13eab82cd..0591279db 100644 description: KernelSettings contains additional kernel settings for Bottlerocket. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 02cc4c0ed..75574d5e7 100644 +index ae0b49e93..01f1b0d6d 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -115,6 +115,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -127,6 +127,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -381,9 +237,9 @@ index 02cc4c0ed..75574d5e7 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -926,6 +937,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -919,6 +930,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -399,9 +255,9 @@ index 02cc4c0ed..75574d5e7 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -1536,6 +1558,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -1533,6 +1555,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -417,9 +273,9 @@ index 02cc4c0ed..75574d5e7 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2345,6 +2378,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2322,6 +2355,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -435,9 +291,9 @@ index 02cc4c0ed..75574d5e7 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2978,6 +3022,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2959,6 +3003,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -453,9 +309,9 @@ index 02cc4c0ed..75574d5e7 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -3864,6 +3919,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -3821,6 +3876,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -781,12 +637,12 @@ index 50d010408..2043410cf 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index 905f4575c..fc37c0601 100644 +index c70d35aa4..b5e63af3d 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -182,6 +182,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -203,6 +203,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -802,9 +658,9 @@ index 905f4575c..fc37c0601 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -976,6 +987,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -989,6 +1000,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -820,9 +676,9 @@ index 905f4575c..fc37c0601 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -1756,6 +1778,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -1793,6 +1815,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -838,9 +694,9 @@ index 905f4575c..fc37c0601 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2547,6 +2580,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -2576,6 +2609,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -856,9 +712,9 @@ index 905f4575c..fc37c0601 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -3411,6 +3455,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -3474,6 +3518,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -874,9 +730,9 @@ index 905f4575c..fc37c0601 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -4275,6 +4330,17 @@ spec: - description: Bottlerocket holds configuration for certain - bottlerocket settings. This is only for bottlerocket. +@@ -4328,6 +4383,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings for @@ -893,12 +749,12 @@ index 905f4575c..fc37c0601 100644 description: KernelSettings contains additional kernel settings for Bottlerocket. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index b3ca9161f..c09d11044 100644 +index 8b0ecc47d..2653f0a36 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -130,6 +130,17 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -139,6 +139,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -914,9 +770,9 @@ index b3ca9161f..c09d11044 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -975,6 +986,17 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -938,6 +949,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -932,9 +788,9 @@ index b3ca9161f..c09d11044 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -1777,6 +1799,17 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -1735,6 +1757,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -950,9 +806,9 @@ index b3ca9161f..c09d11044 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. -@@ -2701,6 +2734,17 @@ spec: - certain bottlerocket settings. This is only for - bottlerocket. +@@ -2607,6 +2640,17 @@ spec: + Bottlerocket holds configuration for certain bottlerocket settings. + This is only for bottlerocket. properties: + boot: + description: Boot holds the boot-related settings @@ -968,8 +824,152 @@ index b3ca9161f..c09d11044 100644 kernel: description: KernelSettings contains additional kernel settings for Bottlerocket. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index c00ea0a53..010efa948 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -182,6 +182,9 @@ type BottlerocketSettings struct { + // KernelSettings contains additional kernel settings for Bottlerocket. + // +optional + Kernel *BottlerocketKernelSettings `json:"kernel,omitempty"` ++ ++ // Boot holds the boot-related settings for bottlerocket nodes ++ Boot *BottlerocketBootSettings `json:"boot,omitempty"` + } + + // BottlerocketKubernetesSettings holds the settings for kubernetes on bottlerocket nodes. +@@ -203,6 +206,11 @@ type BottlerocketKernelSettings struct { + SysctlSettings map[string]string `json:"sysctlSettings,omitempty"` + } + ++// BottlerocketBootSettings holds the boot-related settings for bottlerocket nodes. ++type BottlerocketBootSettings struct { ++ BootKernelParameters map[string][]string `json:"bootKernelParameters,omitempty"` ++} ++ + // Pause defines the pause image repo and tag that should be run on the bootstrapped nodes. + // This setting is ONLY for bottlerocket nodes, as this needs to be set pre-boot time along with user-data + type Pause struct { +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index b1e5e7534..4fcb86e9b 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -100,6 +100,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*BottlerocketBootSettings)(nil), (*v1beta1.BottlerocketBootSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(a.(*BottlerocketBootSettings), b.(*v1beta1.BottlerocketBootSettings), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.BottlerocketBootSettings)(nil), (*BottlerocketBootSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(a.(*v1beta1.BottlerocketBootSettings), b.(*BottlerocketBootSettings), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*BottlerocketBootstrap)(nil), (*v1beta1.BottlerocketBootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(a.(*BottlerocketBootstrap), b.(*v1beta1.BottlerocketBootstrap), scope) + }); err != nil { +@@ -675,6 +685,26 @@ func Convert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in *v1beta1 + return autoConvert_v1beta1_BottlerocketAdmin_To_v1alpha4_BottlerocketAdmin(in, out, s) + } + ++func autoConvert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in *BottlerocketBootSettings, out *v1beta1.BottlerocketBootSettings, s conversion.Scope) error { ++ out.BootKernelParameters = *(*map[string][]string)(unsafe.Pointer(&in.BootKernelParameters)) ++ return nil ++} ++ ++// Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings is an autogenerated conversion function. ++func Convert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in *BottlerocketBootSettings, out *v1beta1.BottlerocketBootSettings, s conversion.Scope) error { ++ return autoConvert_v1alpha4_BottlerocketBootSettings_To_v1beta1_BottlerocketBootSettings(in, out, s) ++} ++ ++func autoConvert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in *v1beta1.BottlerocketBootSettings, out *BottlerocketBootSettings, s conversion.Scope) error { ++ out.BootKernelParameters = *(*map[string][]string)(unsafe.Pointer(&in.BootKernelParameters)) ++ return nil ++} ++ ++// Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings is an autogenerated conversion function. ++func Convert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in *v1beta1.BottlerocketBootSettings, out *BottlerocketBootSettings, s conversion.Scope) error { ++ return autoConvert_v1beta1_BottlerocketBootSettings_To_v1alpha4_BottlerocketBootSettings(in, out, s) ++} ++ + func autoConvert_v1alpha4_BottlerocketBootstrap_To_v1beta1_BottlerocketBootstrap(in *BottlerocketBootstrap, out *v1beta1.BottlerocketBootstrap, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err +@@ -832,6 +862,7 @@ func Convert_v1beta1_BottlerocketKubernetesSettings_To_v1alpha4_BottlerocketKube + func autoConvert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *BottlerocketSettings, out *v1beta1.BottlerocketSettings, s conversion.Scope) error { + out.Kubernetes = (*v1beta1.BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) + out.Kernel = (*v1beta1.BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) ++ out.Boot = (*v1beta1.BottlerocketBootSettings)(unsafe.Pointer(in.Boot)) + return nil + } + +@@ -843,6 +874,7 @@ func Convert_v1alpha4_BottlerocketSettings_To_v1beta1_BottlerocketSettings(in *B + func autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v1beta1.BottlerocketSettings, out *BottlerocketSettings, s conversion.Scope) error { + out.Kubernetes = (*BottlerocketKubernetesSettings)(unsafe.Pointer(in.Kubernetes)) + out.Kernel = (*BottlerocketKernelSettings)(unsafe.Pointer(in.Kernel)) ++ out.Boot = (*BottlerocketBootSettings)(unsafe.Pointer(in.Boot)) + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 815f0e031..e3e959285 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -158,6 +158,37 @@ func (in *BottlerocketAdmin) DeepCopy() *BottlerocketAdmin { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *BottlerocketBootSettings) DeepCopyInto(out *BottlerocketBootSettings) { ++ *out = *in ++ if in.BootKernelParameters != nil { ++ in, out := &in.BootKernelParameters, &out.BootKernelParameters ++ *out = make(map[string][]string, len(*in)) ++ for key, val := range *in { ++ var outVal []string ++ if val == nil { ++ (*out)[key] = nil ++ } else { ++ inVal := (*in)[key] ++ in, out := &inVal, &outVal ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++ (*out)[key] = outVal ++ } ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketBootSettings. ++func (in *BottlerocketBootSettings) DeepCopy() *BottlerocketBootSettings { ++ if in == nil { ++ return nil ++ } ++ out := new(BottlerocketBootSettings) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *BottlerocketBootstrap) DeepCopyInto(out *BottlerocketBootstrap) { + *out = *in +@@ -282,6 +313,11 @@ func (in *BottlerocketSettings) DeepCopyInto(out *BottlerocketSettings) { + *out = new(BottlerocketKernelSettings) + (*in).DeepCopyInto(*out) + } ++ if in.Boot != nil { ++ in, out := &in.Boot, &out.Boot ++ *out = new(BottlerocketBootSettings) ++ (*in).DeepCopyInto(*out) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BottlerocketSettings. diff --git a/internal/controllers/machine/machine_controller_phases.go b/internal/controllers/machine/machine_controller_phases.go -index 16febdda8..1da2d82ed 100644 +index 49e4359ac..ae6a37217 100644 --- a/internal/controllers/machine/machine_controller_phases.go +++ b/internal/controllers/machine/machine_controller_phases.go @@ -19,9 +19,10 @@ package machine diff --git a/projects/kubernetes-sigs/cluster-api/patches/0028-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch b/projects/kubernetes-sigs/cluster-api/patches/0027-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch similarity index 90% rename from projects/kubernetes-sigs/cluster-api/patches/0028-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch rename to projects/kubernetes-sigs/cluster-api/patches/0027-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch index 6a2c76a859..227787b949 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0028-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0027-Patch-haproxy-maxconn-value-to-avoid-ulimit-issue.patch @@ -1,7 +1,7 @@ -From fe91076f036b835b3a5fb5aec3c75ca2f070f0af Mon Sep 17 00:00:00 2001 +From 2bb481e68c56eeb5da6ce40d6c60f25ed96f036c Mon Sep 17 00:00:00 2001 From: Jackson West Date: Sat, 6 May 2023 14:08:17 -0500 -Subject: [PATCH 28/40] Patch haproxy maxconn value to avoid ulimit issue +Subject: [PATCH 27/37] Patch haproxy maxconn value to avoid ulimit issue EKS-A uses haproxy 2.5 which errors if the maxconn value requires more FDs than allowed by the ulimit setting of docker. diff --git a/projects/kubernetes-sigs/cluster-api/patches/0029-Add-support-for-custom-cert-bundles-in-BR-21.patch b/projects/kubernetes-sigs/cluster-api/patches/0028-Add-support-for-custom-cert-bundles-in-BR-21.patch similarity index 87% rename from projects/kubernetes-sigs/cluster-api/patches/0029-Add-support-for-custom-cert-bundles-in-BR-21.patch rename to projects/kubernetes-sigs/cluster-api/patches/0028-Add-support-for-custom-cert-bundles-in-BR-21.patch index df7984aeef..922d15fadb 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0029-Add-support-for-custom-cert-bundles-in-BR-21.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0028-Add-support-for-custom-cert-bundles-in-BR-21.patch @@ -1,7 +1,7 @@ -From 3a2f54810f88c77f125a1d4226f7f928123e0fe1 Mon Sep 17 00:00:00 2001 +From 3cd2343abf92e4265e6273766defa6e8278c0d44 Mon Sep 17 00:00:00 2001 From: ahreehong <46465244+ahreehong@users.noreply.github.com> Date: Fri, 19 May 2023 16:29:08 -0400 -Subject: [PATCH 29/40] Add support for custom cert bundles in BR (#21) +Subject: [PATCH 28/37] Add support for custom cert bundles in BR (#21) * add support for custom cert bundles br @@ -9,9 +9,7 @@ Subject: [PATCH 29/40] Add support for custom cert bundles in BR (#21) Signed-off-by: Ahree Hong --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 17 +++ - .../api/v1alpha4/zz_generated.conversion.go | 36 +++++++ - .../api/v1alpha4/zz_generated.deepcopy.go | 25 +++++ + api/v1beta1/zz_generated.openapi.go | 6 -- .../kubeadm/api/v1beta1/kubeadm_types.go | 17 +++ .../api/v1beta1/zz_generated.deepcopy.go | 25 +++++ ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 96 +++++++++++++++++ @@ -27,184 +25,30 @@ Signed-off-by: Ahree Hong .../zz_generated.conversion.go | 2 + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 96 +++++++++++++++++ ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 68 ++++++++++++ - 18 files changed, 656 insertions(+) + .../kubeadm/v1alpha4/kubeadm_types.go | 17 +++ + .../v1alpha4/zz_generated.conversion.go | 36 +++++++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 25 +++++ + 19 files changed, 656 insertions(+), 6 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 010efa948..3d43cae72 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -171,6 +171,10 @@ type ClusterConfiguration struct { - // This is only for bottlerocket. - // +optional - Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` -+ -+ // CertBundles holds additional trusted cert bundles. -+ // +optional -+ CertBundles []CertBundle `json:"certBundles,omitempty"` - } - - // BottlerocketSettings define bottlerocket settings that can be configured on bottlerocket nodes. -@@ -534,6 +538,10 @@ type JoinConfiguration struct { - // This is only for bottlerocket. - // +optional - Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` -+ -+ // CertBundles holds additional trusted cert bundles. -+ // +optional -+ CertBundles []CertBundle `json:"certBundles,omitempty"` - } - - // BottlerocketHostContainer describes a host image for Bottlerocket -@@ -574,6 +582,15 @@ type BottlerocketBootstrapContainer struct { - UserData string `json:"userData,omitempty"` - } - -+// CertBundle holds the cert data. -+type CertBundle struct { -+ // Name is the name of the cert bundle. -+ Name string `json:"name"` -+ -+ // Data is the actual cert. -+ Data string `json:"data"` -+} -+ - // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. - type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index 8f36b6a13..c02aee696 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -180,6 +180,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*CertBundle)(nil), (*v1beta1.CertBundle)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle(a.(*CertBundle), b.(*v1beta1.CertBundle), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.CertBundle)(nil), (*CertBundle)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle(a.(*v1beta1.CertBundle), b.(*CertBundle), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) - }); err != nil { -@@ -883,6 +893,28 @@ func Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v - return autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in, out, s) - } - -+func autoConvert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in *CertBundle, out *v1beta1.CertBundle, s conversion.Scope) error { -+ out.Name = in.Name -+ out.Data = in.Data -+ return nil -+} -+ -+// Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle is an autogenerated conversion function. -+func Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in *CertBundle, out *v1beta1.CertBundle, s conversion.Scope) error { -+ return autoConvert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in, out, s) -+} -+ -+func autoConvert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in *v1beta1.CertBundle, out *CertBundle, s conversion.Scope) error { -+ out.Name = in.Name -+ out.Data = in.Data -+ return nil -+} -+ -+// Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle is an autogenerated conversion function. -+func Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in *v1beta1.CertBundle, out *CertBundle, s conversion.Scope) error { -+ return autoConvert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in, out, s) -+} -+ - func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { - return err -@@ -929,6 +961,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i - out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) -+ out.CertBundles = *(*[]v1beta1.CertBundle)(unsafe.Pointer(&in.CertBundles)) - return nil - } - -@@ -983,6 +1016,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i - out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) -+ out.CertBundles = *(*[]CertBundle)(unsafe.Pointer(&in.CertBundles)) - return nil - } - -@@ -1359,6 +1393,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi - out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) -+ out.CertBundles = *(*[]v1beta1.CertBundle)(unsafe.Pointer(&in.CertBundles)) - return nil - } - -@@ -1399,6 +1434,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b - out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) - out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) - out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) -+ out.CertBundles = *(*[]CertBundle)(unsafe.Pointer(&in.CertBundles)) - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index f8d8004c0..4c3225e59 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -330,6 +330,21 @@ func (in *BottlerocketSettings) DeepCopy() *BottlerocketSettings { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *CertBundle) DeepCopyInto(out *CertBundle) { -+ *out = *in -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertBundle. -+func (in *CertBundle) DeepCopy() *CertBundle { -+ if in == nil { -+ return nil -+ } -+ out := new(CertBundle) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = *in -@@ -368,6 +383,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - *out = new(BottlerocketSettings) - (*in).DeepCopyInto(*out) - } -+ if in.CertBundles != nil { -+ in, out := &in.CertBundles, &out.CertBundles -+ *out = make([]CertBundle, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. -@@ -747,6 +767,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - *out = new(BottlerocketSettings) - (*in).DeepCopyInto(*out) - } -+ if in.CertBundles != nil { -+ in, out := &in.CertBundles, &out.CertBundles -+ *out = make([]CertBundle, len(*in)) -+ copy(*out, *in) -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. +diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go +index 9e16acde8..9db7f3712 100644 +--- a/api/v1beta1/zz_generated.openapi.go ++++ b/api/v1beta1/zz_generated.openapi.go +@@ -803,12 +803,6 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, +- "managedExternalEtcdRef": { +- SchemaProps: spec.SchemaProps{ +- Description: "ManagedExternalEtcdRef is an optional reference to an etcd provider resource that holds details for provisioning an external etcd cluster", +- Ref: ref("k8s.io/api/core/v1.ObjectReference"), +- }, +- }, + "infrastructureRef": { + SchemaProps: spec.SchemaProps{ + Description: "InfrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.", diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index 434d2c088..ed965709a 100644 +index 68dd4b9a9..6b228b547 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -190,6 +190,10 @@ type ClusterConfiguration struct { @@ -296,10 +140,10 @@ index c89d4aa1f..9fefdcb62 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index 0591279db..3b4cbbf3f 100644 +index 662a68087..fbdd8a47a 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -280,6 +280,22 @@ spec: +@@ -295,6 +295,22 @@ spec: - superpowered type: object type: array @@ -320,11 +164,11 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -1061,6 +1077,22 @@ spec: - Defaults to "/etc/kubernetes/pki/ca.crt". TODO: revisit when - there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1089,6 +1105,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -343,9 +187,9 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no additional -@@ -1709,6 +1741,22 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -1761,6 +1793,22 @@ spec: - superpowered type: object type: array @@ -366,11 +210,11 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -2486,6 +2534,22 @@ spec: - Defaults to "/etc/kubernetes/pki/ca.crt". TODO: revisit when - there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2551,6 +2599,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -389,9 +233,9 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no additional -@@ -3132,6 +3196,22 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -3215,6 +3279,22 @@ spec: - superpowered type: object type: array @@ -412,11 +256,11 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or look - for all required certificates. NB: if not provided, this will -@@ -3978,6 +4058,22 @@ spec: - Defaults to "/etc/kubernetes/pki/ca.crt". TODO: revisit when - there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -4076,6 +4156,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -435,13 +279,13 @@ index 0591279db..3b4cbbf3f 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no additional + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index 75574d5e7..e25795947 100644 +index 01f1b0d6d..88f5085e0 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -298,6 +298,23 @@ spec: +@@ -305,6 +305,23 @@ spec: - superpowered type: object type: array @@ -463,11 +307,11 @@ index 75574d5e7..e25795947 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -1126,6 +1143,23 @@ spec: - and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1115,6 +1132,23 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert @@ -487,9 +331,9 @@ index 75574d5e7..e25795947 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control - plane instance to be deployed on the joining node. If -@@ -1741,6 +1775,23 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -1733,6 +1767,23 @@ spec: - superpowered type: object type: array @@ -511,11 +355,11 @@ index 75574d5e7..e25795947 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -2567,6 +2618,23 @@ spec: - and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2540,6 +2591,23 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert @@ -535,9 +379,9 @@ index 75574d5e7..e25795947 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control - plane instance to be deployed on the joining node. If -@@ -3205,6 +3273,23 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -3181,6 +3249,23 @@ spec: - superpowered type: object type: array @@ -559,11 +403,11 @@ index 75574d5e7..e25795947 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not provided, -@@ -4108,6 +4193,23 @@ spec: - and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -4061,6 +4146,23 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert @@ -583,8 +427,8 @@ index 75574d5e7..e25795947 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control - plane instance to be deployed on the joining node. If + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index 901db1cb7..df222b943 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -736,10 +580,10 @@ index 7b7131829..ce796f206 100644 return generateNodeUserData("InitBottlerocketNode", bottlerocketNodeInitSettingsTemplate, bottlerocketInput) } diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index b63a64589..4e8b7c5e0 100644 +index 64213e5be..e64be18ea 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -509,6 +509,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -541,6 +541,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.NTP != nil && scope.Config.Spec.NTP.Enabled != nil && *scope.Config.Spec.NTP.Enabled { bottlerocketConfig.NTPServers = scope.Config.Spec.NTP.Servers } @@ -749,7 +593,7 @@ index b63a64589..4e8b7c5e0 100644 } clusterdata, err := kubeadmtypes.MarshalClusterConfigurationForVersion(scope.Config.Spec.ClusterConfiguration, parsedVersion) -@@ -734,6 +737,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -766,6 +769,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if scope.Config.Spec.NTP != nil && scope.Config.Spec.NTP.Enabled != nil && *scope.Config.Spec.NTP.Enabled { bottlerocketConfig.NTPServers = scope.Config.Spec.NTP.Servers } @@ -759,7 +603,7 @@ index b63a64589..4e8b7c5e0 100644 bootstrapJoinData, err = bottlerocket.NewNode(nodeInput, bottlerocketConfig) if err != nil { scope.Error(err, "Failed to create a worker bottlerocket join configuration") -@@ -881,6 +887,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -915,6 +921,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if scope.Config.Spec.NTP != nil && scope.Config.Spec.NTP.Enabled != nil && *scope.Config.Spec.NTP.Enabled { bottlerocketConfig.NTPServers = scope.Config.Spec.NTP.Servers } @@ -984,10 +828,10 @@ index c613bdd12..6d812f516 100644 } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index fc37c0601..fc1332eef 100644 +index b5e63af3d..bb8edc495 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -363,6 +363,22 @@ spec: +@@ -380,6 +380,22 @@ spec: - superpowered type: object type: array @@ -1008,11 +852,11 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -1174,6 +1190,22 @@ spec: - control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1184,6 +1200,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -1031,9 +875,9 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no -@@ -1959,6 +1991,22 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -1992,6 +2024,22 @@ spec: - superpowered type: object type: array @@ -1054,11 +898,11 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -2767,6 +2815,22 @@ spec: - control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2793,6 +2841,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -1077,9 +921,9 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no -@@ -3636,6 +3700,22 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -3695,6 +3759,22 @@ spec: - superpowered type: object type: array @@ -1100,11 +944,11 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store or - look for all required certificates. NB: if not provided, -@@ -4517,6 +4597,22 @@ spec: - control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -4567,6 +4647,22 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted cert bundles. @@ -1123,13 +967,13 @@ index fc37c0601..fc1332eef 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control plane - instance to be deployed on the joining node. If nil, no + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index c09d11044..ee4180f67 100644 +index 2653f0a36..8ba0071b1 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -323,6 +323,23 @@ spec: +@@ -321,6 +321,23 @@ spec: - superpowered type: object type: array @@ -1151,11 +995,11 @@ index c09d11044..ee4180f67 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -1185,6 +1202,23 @@ spec: - and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -1138,6 +1155,23 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted @@ -1175,9 +1019,9 @@ index c09d11044..ee4180f67 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control - plane instance to be deployed on the joining node. -@@ -1992,6 +2026,23 @@ spec: + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +@@ -1939,6 +1973,23 @@ spec: - superpowered type: object type: array @@ -1199,11 +1043,11 @@ index c09d11044..ee4180f67 100644 + type: object + type: array certificatesDir: - description: 'CertificatesDir specifies where to store - or look for all required certificates. NB: if not -@@ -2933,6 +2984,23 @@ spec: - and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". - TODO: revisit when there is defaulting from k/k' + description: |- + CertificatesDir specifies where to store or look for all required certificates. +@@ -2829,6 +2880,23 @@ spec: + Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k type: string + certBundles: + description: CertBundles holds additional trusted @@ -1223,8 +1067,182 @@ index c09d11044..ee4180f67 100644 + type: object + type: array controlPlane: - description: ControlPlane defines the additional control - plane instance to be deployed on the joining node. + description: |- + ControlPlane defines the additional control plane instance to be deployed on the joining node. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 010efa948..3d43cae72 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -171,6 +171,10 @@ type ClusterConfiguration struct { + // This is only for bottlerocket. + // +optional + Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` ++ ++ // CertBundles holds additional trusted cert bundles. ++ // +optional ++ CertBundles []CertBundle `json:"certBundles,omitempty"` + } + + // BottlerocketSettings define bottlerocket settings that can be configured on bottlerocket nodes. +@@ -534,6 +538,10 @@ type JoinConfiguration struct { + // This is only for bottlerocket. + // +optional + Bottlerocket *BottlerocketSettings `json:"bottlerocket,omitempty"` ++ ++ // CertBundles holds additional trusted cert bundles. ++ // +optional ++ CertBundles []CertBundle `json:"certBundles,omitempty"` + } + + // BottlerocketHostContainer describes a host image for Bottlerocket +@@ -574,6 +582,15 @@ type BottlerocketBootstrapContainer struct { + UserData string `json:"userData,omitempty"` + } + ++// CertBundle holds the cert data. ++type CertBundle struct { ++ // Name is the name of the cert bundle. ++ Name string `json:"name"` ++ ++ // Data is the actual cert. ++ Data string `json:"data"` ++} ++ + // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. + type JoinControlPlane struct { + // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 4fcb86e9b..57400b3c0 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -180,6 +180,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*CertBundle)(nil), (*v1beta1.CertBundle)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle(a.(*CertBundle), b.(*v1beta1.CertBundle), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.CertBundle)(nil), (*CertBundle)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle(a.(*v1beta1.CertBundle), b.(*CertBundle), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { +@@ -883,6 +893,28 @@ func Convert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in *v + return autoConvert_v1beta1_BottlerocketSettings_To_v1alpha4_BottlerocketSettings(in, out, s) + } + ++func autoConvert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in *CertBundle, out *v1beta1.CertBundle, s conversion.Scope) error { ++ out.Name = in.Name ++ out.Data = in.Data ++ return nil ++} ++ ++// Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle is an autogenerated conversion function. ++func Convert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in *CertBundle, out *v1beta1.CertBundle, s conversion.Scope) error { ++ return autoConvert_v1alpha4_CertBundle_To_v1beta1_CertBundle(in, out, s) ++} ++ ++func autoConvert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in *v1beta1.CertBundle, out *CertBundle, s conversion.Scope) error { ++ out.Name = in.Name ++ out.Data = in.Data ++ return nil ++} ++ ++// Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle is an autogenerated conversion function. ++func Convert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in *v1beta1.CertBundle, out *CertBundle, s conversion.Scope) error { ++ return autoConvert_v1beta1_CertBundle_To_v1alpha4_CertBundle(in, out, s) ++} ++ + func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_Pause_To_v1beta1_Pause(&in.Pause, &out.Pause, s); err != nil { + return err +@@ -929,6 +961,7 @@ func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(i + out.BottlerocketHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) ++ out.CertBundles = *(*[]v1beta1.CertBundle)(unsafe.Pointer(&in.CertBundles)) + return nil + } + +@@ -983,6 +1016,7 @@ func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(i + out.BottlerocketHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) ++ out.CertBundles = *(*[]CertBundle)(unsafe.Pointer(&in.CertBundles)) + return nil + } + +@@ -1359,6 +1393,7 @@ func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *Joi + out.BottlerocketCustomHostContainers = *(*[]v1beta1.BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]v1beta1.BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + out.Bottlerocket = (*v1beta1.BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) ++ out.CertBundles = *(*[]v1beta1.CertBundle)(unsafe.Pointer(&in.CertBundles)) + return nil + } + +@@ -1399,6 +1434,7 @@ func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1b + out.BottlerocketCustomHostContainers = *(*[]BottlerocketHostContainer)(unsafe.Pointer(&in.BottlerocketCustomHostContainers)) + out.BottlerocketCustomBootstrapContainers = *(*[]BottlerocketBootstrapContainer)(unsafe.Pointer(&in.BottlerocketCustomBootstrapContainers)) + out.Bottlerocket = (*BottlerocketSettings)(unsafe.Pointer(in.Bottlerocket)) ++ out.CertBundles = *(*[]CertBundle)(unsafe.Pointer(&in.CertBundles)) + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index e3e959285..7331e32eb 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -330,6 +330,21 @@ func (in *BottlerocketSettings) DeepCopy() *BottlerocketSettings { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *CertBundle) DeepCopyInto(out *CertBundle) { ++ *out = *in ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertBundle. ++func (in *CertBundle) DeepCopy() *CertBundle { ++ if in == nil { ++ return nil ++ } ++ out := new(CertBundle) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in +@@ -368,6 +383,11 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = new(BottlerocketSettings) + (*in).DeepCopyInto(*out) + } ++ if in.CertBundles != nil { ++ in, out := &in.CertBundles, &out.CertBundles ++ *out = make([]CertBundle, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +@@ -747,6 +767,11 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = new(BottlerocketSettings) + (*in).DeepCopyInto(*out) + } ++ if in.CertBundles != nil { ++ in, out := &in.CertBundles, &out.CertBundles ++ *out = make([]CertBundle, len(*in)) ++ copy(*out, *in) ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0030-CAPI-Move-Cluster-Filter.patch b/projects/kubernetes-sigs/cluster-api/patches/0029-CAPI-Move-Cluster-Filter.patch similarity index 98% rename from projects/kubernetes-sigs/cluster-api/patches/0030-CAPI-Move-Cluster-Filter.patch rename to projects/kubernetes-sigs/cluster-api/patches/0029-CAPI-Move-Cluster-Filter.patch index c44b7d04dc..6bff41f841 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0030-CAPI-Move-Cluster-Filter.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0029-CAPI-Move-Cluster-Filter.patch @@ -1,7 +1,7 @@ -From 8cdc5a1a602948c5393358d38147549b50c75e07 Mon Sep 17 00:00:00 2001 +From 67d623b4578573af4507485d11cdc77751ba62d7 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 16 May 2023 11:03:09 -0500 -Subject: [PATCH 30/40] CAPI Move Cluster Filter +Subject: [PATCH 29/37] CAPI Move Cluster Filter Signed-off-by: Vignesh Goutham Ganesh --- @@ -15,7 +15,7 @@ Signed-off-by: Vignesh Goutham Ganesh 7 files changed, 214 insertions(+), 33 deletions(-) diff --git a/cmd/clusterctl/client/cluster/mover.go b/cmd/clusterctl/client/cluster/mover.go -index 61270d3a7..ca2757e7f 100644 +index 4910963e6..547a9beda 100644 --- a/cmd/clusterctl/client/cluster/mover.go +++ b/cmd/clusterctl/client/cluster/mover.go @@ -51,13 +51,16 @@ type ResourceMutatorFunc func(u *unstructured.Unstructured) error @@ -113,7 +113,7 @@ index 61270d3a7..ca2757e7f 100644 } diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go -index dee567918..78776c5b4 100644 +index 40255c3c2..41f6c2b27 100644 --- a/cmd/clusterctl/client/cluster/mover_test.go +++ b/cmd/clusterctl/client/cluster/mover_test.go @@ -738,7 +738,7 @@ func Test_objectMover_backupTargetObject(t *testing.T) { @@ -207,7 +207,7 @@ index dee567918..78776c5b4 100644 backoff := wait.Backoff{ Steps: 1, diff --git a/cmd/clusterctl/client/cluster/objectgraph.go b/cmd/clusterctl/client/cluster/objectgraph.go -index 454ec27a8..42e1e2ef1 100644 +index 942d1fc09..cb436dc83 100644 --- a/cmd/clusterctl/client/cluster/objectgraph.go +++ b/cmd/clusterctl/client/cluster/objectgraph.go @@ -417,8 +417,8 @@ func getCRDList(ctx context.Context, proxy Proxy, crdList *apiextensionsv1.Custo @@ -504,7 +504,7 @@ index 83ad30d67..f5c516859 100644 return f.fromDirectoryErr } diff --git a/cmd/clusterctl/cmd/move.go b/cmd/clusterctl/cmd/move.go -index c8316b376..7ba98b264 100644 +index 2a51bf2c0..55ca608ec 100644 --- a/cmd/clusterctl/cmd/move.go +++ b/cmd/clusterctl/cmd/move.go @@ -31,6 +31,7 @@ type moveOptions struct { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0031-Move-objects-with-force-move-label-and-no-cluster-te.patch b/projects/kubernetes-sigs/cluster-api/patches/0030-Move-objects-with-force-move-label-and-no-cluster-te.patch similarity index 95% rename from projects/kubernetes-sigs/cluster-api/patches/0031-Move-objects-with-force-move-label-and-no-cluster-te.patch rename to projects/kubernetes-sigs/cluster-api/patches/0030-Move-objects-with-force-move-label-and-no-cluster-te.patch index 7db681e55d..db00032781 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0031-Move-objects-with-force-move-label-and-no-cluster-te.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0030-Move-objects-with-force-move-label-and-no-cluster-te.patch @@ -1,7 +1,7 @@ -From bf669819e8578a91a2b7062741a8a526ee1d9afd Mon Sep 17 00:00:00 2001 +From 1f8e5af5c4dbfa7b6aa9afdf52834de517045baf Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 30 May 2023 10:14:31 -0500 -Subject: [PATCH 31/40] Move objects with force move label and no cluster +Subject: [PATCH 30/37] Move objects with force move label and no cluster tenants Signed-off-by: Vignesh Goutham Ganesh @@ -11,7 +11,7 @@ Signed-off-by: Vignesh Goutham Ganesh 2 files changed, 51 insertions(+) diff --git a/cmd/clusterctl/client/cluster/objectgraph.go b/cmd/clusterctl/client/cluster/objectgraph.go -index 42e1e2ef1..d922c51c1 100644 +index cb436dc83..d995dc57f 100644 --- a/cmd/clusterctl/client/cluster/objectgraph.go +++ b/cmd/clusterctl/client/cluster/objectgraph.go @@ -510,6 +510,14 @@ func (o *objectGraph) filterCluster(clusterName string) error { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0032-allow-registry-mirror-configurations-to-be-mutable-f.patch b/projects/kubernetes-sigs/cluster-api/patches/0031-allow-registry-mirror-configurations-to-be-mutable-f.patch similarity index 93% rename from projects/kubernetes-sigs/cluster-api/patches/0032-allow-registry-mirror-configurations-to-be-mutable-f.patch rename to projects/kubernetes-sigs/cluster-api/patches/0031-allow-registry-mirror-configurations-to-be-mutable-f.patch index 3a13cac526..3de3e638ea 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0032-allow-registry-mirror-configurations-to-be-mutable-f.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0031-allow-registry-mirror-configurations-to-be-mutable-f.patch @@ -1,7 +1,7 @@ -From 971c67418f5db0575cdd63785bbb50f9872e7963 Mon Sep 17 00:00:00 2001 +From 5dc60169cd69e5294a21c499ac54d397fe369a52 Mon Sep 17 00:00:00 2001 From: Cavaughn Browne Date: Thu, 20 Jul 2023 11:05:49 -0500 -Subject: [PATCH 32/40] allow registry mirror configurations to be mutable for +Subject: [PATCH 31/37] allow registry mirror configurations to be mutable for BR --- @@ -10,10 +10,10 @@ Subject: [PATCH 32/40] allow registry mirror configurations to be mutable for 2 files changed, 47 insertions(+) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 0aaf0c3a5..772d1409d 100644 +index e760800b8..e6b95e49a 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -189,6 +189,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -192,6 +192,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager, "*"}, {spec, kubeadmConfigSpec, clusterConfiguration, scheduler}, {spec, kubeadmConfigSpec, clusterConfiguration, scheduler, "*"}, @@ -21,7 +21,7 @@ index 0aaf0c3a5..772d1409d 100644 // spec.kubeadmConfigSpec.initConfiguration {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration}, {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration, "*"}, -@@ -214,6 +215,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne +@@ -217,6 +218,7 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketControl", "*"}, {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketCustomBootstrapContainers"}, {spec, kubeadmConfigSpec, joinConfiguration, "bottlerocketSettings", "*"}, @@ -30,7 +30,7 @@ index 0aaf0c3a5..772d1409d 100644 // spec.kubeadmConfigSpec {spec, kubeadmConfigSpec, preKubeadmCommands}, diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -index 0fb9025d1..efccae0a0 100644 +index 36a152e6e..244dda3a4 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go @@ -331,6 +331,10 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { diff --git a/projects/kubernetes-sigs/cluster-api/patches/0033-Add-support-for-external-etcd-machines-in-Kind-mappe.patch b/projects/kubernetes-sigs/cluster-api/patches/0032-Add-support-for-external-etcd-machines-in-Kind-mappe.patch similarity index 94% rename from projects/kubernetes-sigs/cluster-api/patches/0033-Add-support-for-external-etcd-machines-in-Kind-mappe.patch rename to projects/kubernetes-sigs/cluster-api/patches/0032-Add-support-for-external-etcd-machines-in-Kind-mappe.patch index e34d5c38e9..ef274b14c2 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0033-Add-support-for-external-etcd-machines-in-Kind-mappe.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0032-Add-support-for-external-etcd-machines-in-Kind-mappe.patch @@ -1,7 +1,7 @@ -From 615140b4beffdc72afb1ff8a0a635d26487701e8 Mon Sep 17 00:00:00 2001 +From 1620bce645113e9e7fcf8f01cda4084c8df245e3 Mon Sep 17 00:00:00 2001 From: Prow Bot Date: Wed, 16 Aug 2023 19:58:01 -0700 -Subject: [PATCH 33/40] Add support for external etcd machines in Kind mapper +Subject: [PATCH 32/37] Add support for external etcd machines in Kind mapper --- .../client/cluster/objectgraph_test.go | 2 +- @@ -24,10 +24,10 @@ index 2b92ba3bc..48b617339 100644 objs := []client.Object{} objs = append(objs, test.NewFakeCluster("ns1", "cluster1").Objs()...) diff --git a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go -index 1a7201c53..caf71e708 100644 +index 7e4726246..2b79c351c 100644 --- a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go +++ b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go -@@ -98,7 +98,7 @@ func createDockerContainer(ctx context.Context, name string, cluster *clusterv1. +@@ -99,7 +99,7 @@ func createDockerContainer(ctx context.Context, name string, cluster *clusterv1. } log.Info("Creating container for machinePool", "name", name, "machinePool", machinePool.Name) @@ -37,10 +37,10 @@ index 1a7201c53..caf71e708 100644 } return nil diff --git a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go -index 30128dcc4..21fa98f41 100644 +index 029c5614b..cc9162212 100644 --- a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go +++ b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go -@@ -294,7 +294,7 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * +@@ -295,7 +295,7 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * if !externalMachine.Exists() { // NOTE: FailureDomains don't mean much in CAPD since it's all local, but we are setting a label on // each container, so we can check placement. @@ -49,7 +49,7 @@ index 30128dcc4..21fa98f41 100644 return ctrl.Result{}, errors.Wrap(err, "failed to create worker DockerMachine") } } -@@ -379,7 +379,7 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * +@@ -386,7 +386,7 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * }() // Run the bootstrap script. Simulates cloud-init/Ignition. @@ -58,7 +58,7 @@ index 30128dcc4..21fa98f41 100644 conditions.MarkFalse(dockerMachine, infrav1.BootstrapExecSucceededCondition, infrav1.BootstrapFailedReason, clusterv1.ConditionSeverityWarning, "Repeating bootstrap") return ctrl.Result{}, errors.Wrap(err, "failed to exec DockerMachine bootstrap") } -@@ -409,12 +409,12 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * +@@ -416,12 +416,12 @@ func (r *DockerMachineReconciler) reconcileNormal(ctx context.Context, cluster * // Machine will never get a node ref as ProviderID is required to set the node ref, so we would get a deadlock. if cluster.Spec.ControlPlaneRef != nil && !conditions.IsTrue(cluster, clusterv1.ControlPlaneInitializedCondition) && @@ -73,7 +73,7 @@ index 30128dcc4..21fa98f41 100644 // Usually a cloud provider will do this, but there is no docker-cloud provider. // Requeue if there is an error, as this is likely momentary load balancer // state changes during control plane provisioning. -@@ -603,8 +603,3 @@ func setMachineAddress(ctx context.Context, dockerMachine *infrav1.DockerMachine +@@ -610,8 +610,3 @@ func setMachineAddress(ctx context.Context, dockerMachine *infrav1.DockerMachine return nil } @@ -83,7 +83,7 @@ index 30128dcc4..21fa98f41 100644 - return ok -} diff --git a/test/infrastructure/docker/internal/docker/machine.go b/test/infrastructure/docker/internal/docker/machine.go -index 96c9df5ed..3a5090e0b 100644 +index daa98e4be..2e5f306b8 100644 --- a/test/infrastructure/docker/internal/docker/machine.go +++ b/test/infrastructure/docker/internal/docker/machine.go @@ -48,6 +48,7 @@ import ( diff --git a/projects/kubernetes-sigs/cluster-api/patches/0034-disable-cgroupns-private-to-fix-AL2.patch b/projects/kubernetes-sigs/cluster-api/patches/0033-disable-cgroupns-private-to-fix-AL2.patch similarity index 82% rename from projects/kubernetes-sigs/cluster-api/patches/0034-disable-cgroupns-private-to-fix-AL2.patch rename to projects/kubernetes-sigs/cluster-api/patches/0033-disable-cgroupns-private-to-fix-AL2.patch index 57cea847d8..22e158e636 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0034-disable-cgroupns-private-to-fix-AL2.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0033-disable-cgroupns-private-to-fix-AL2.patch @@ -1,25 +1,25 @@ -From 9ad487081cefcfc37bba3dc5c0c7798adb2dfbd0 Mon Sep 17 00:00:00 2001 +From 44e673bd86eb2370fdb39e9057165e4660e98d3b Mon Sep 17 00:00:00 2001 From: Jackson West Date: Sat, 19 Aug 2023 09:35:39 -0500 -Subject: [PATCH 34/40] disable cgroupns=private to fix AL2 +Subject: [PATCH 33/37] disable cgroupns=private to fix AL2 --- test/infrastructure/container/docker.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/infrastructure/container/docker.go b/test/infrastructure/container/docker.go -index fbf988762..38e5056c8 100644 +index 01f8a4ffe..2912580d3 100644 --- a/test/infrastructure/container/docker.go +++ b/test/infrastructure/container/docker.go -@@ -41,7 +41,6 @@ import ( - "k8s.io/utils/pointer" +@@ -42,7 +42,6 @@ import ( + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/test/infrastructure/kind" ) const ( -@@ -410,9 +409,11 @@ func (d *dockerRuntime) RunContainer(ctx context.Context, runConfig *RunContaine +@@ -411,9 +410,11 @@ func (d *dockerRuntime) RunContainer(ctx context.Context, runConfig *RunContaine networkConfig := network.NetworkingConfig{} // NOTE: starting from Kind 0.20 kind requires CgroupnsMode to be set to private. diff --git a/projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrade-in-KCP.patch b/projects/kubernetes-sigs/cluster-api/patches/0034-Add-support-for-in-place-upgrade-in-KCP.patch similarity index 90% rename from projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrade-in-KCP.patch rename to projects/kubernetes-sigs/cluster-api/patches/0034-Add-support-for-in-place-upgrade-in-KCP.patch index af596a3296..b65f8abe42 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrade-in-KCP.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0034-Add-support-for-in-place-upgrade-in-KCP.patch @@ -1,7 +1,7 @@ -From b683bc9eecdb0971840f3b8fbe3f3b967614676b Mon Sep 17 00:00:00 2001 +From cc5a405a8c6ffc98943060b2dde6b3c0ac077cf9 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Wed, 17 Jan 2024 09:28:18 -0800 -Subject: [PATCH 35/40] Add support for in-place upgrade in KCP +Subject: [PATCH 34/37] Add support for in-place upgrade in KCP --- .../kubeadm/api/v1beta1/kubeadm_control_plane_types.go | 8 ++++++++ @@ -36,7 +36,7 @@ index 8e488f187..32b297f12 100644 // machine unrelated from the previous remediation. DefaultMinHealthyPeriod = 1 * time.Hour diff --git a/controlplane/kubeadm/internal/controllers/upgrade.go b/controlplane/kubeadm/internal/controllers/upgrade.go -index 647d87f6a..e436eb546 100644 +index 651d0c2a7..ff8df3c9a 100644 --- a/controlplane/kubeadm/internal/controllers/upgrade.go +++ b/controlplane/kubeadm/internal/controllers/upgrade.go @@ -18,6 +18,7 @@ package controllers @@ -47,7 +47,7 @@ index 647d87f6a..e436eb546 100644 "github.com/blang/semver/v4" "github.com/pkg/errors" -@@ -26,6 +27,7 @@ import ( +@@ -27,6 +28,7 @@ import ( controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" @@ -55,7 +55,7 @@ index 647d87f6a..e436eb546 100644 "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/version" ) -@@ -37,7 +39,7 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( +@@ -38,7 +40,7 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( ) (ctrl.Result, error) { logger := ctrl.LoggerFrom(ctx) @@ -64,7 +64,7 @@ index 647d87f6a..e436eb546 100644 return ctrl.Result{}, errors.New("rolloutStrategy is not set") } -@@ -138,8 +140,12 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( +@@ -124,8 +126,12 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( return r.scaleUpControlPlane(ctx, controlPlane) } return r.scaleDownControlPlane(ctx, controlPlane, machinesRequireUpgrade) @@ -79,10 +79,10 @@ index 647d87f6a..e436eb546 100644 } } diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 772d1409d..39d22a6a4 100644 +index e6b95e49a..cd9909827 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -428,7 +428,7 @@ func validateRolloutBefore(rolloutBefore *controlplanev1.RolloutBefore, pathPref +@@ -431,7 +431,7 @@ func validateRolloutBefore(rolloutBefore *controlplanev1.RolloutBefore, pathPref func validateRolloutStrategy(rolloutStrategy *controlplanev1.RolloutStrategy, replicas *int32, pathPrefix *field.Path) field.ErrorList { allErrs := field.ErrorList{} @@ -91,7 +91,7 @@ index 772d1409d..39d22a6a4 100644 return allErrs } -@@ -437,7 +437,7 @@ func validateRolloutStrategy(rolloutStrategy *controlplanev1.RolloutStrategy, re +@@ -440,7 +440,7 @@ func validateRolloutStrategy(rolloutStrategy *controlplanev1.RolloutStrategy, re allErrs, field.Required( pathPrefix.Child("type"), diff --git a/projects/kubernetes-sigs/cluster-api/patches/0036-Add-support-for-in-place-upgrades-in-MachineDeployme.patch b/projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrades-in-MachineDeployme.patch similarity index 95% rename from projects/kubernetes-sigs/cluster-api/patches/0036-Add-support-for-in-place-upgrades-in-MachineDeployme.patch rename to projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrades-in-MachineDeployme.patch index d332abdc1e..7783c5e1e2 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0036-Add-support-for-in-place-upgrades-in-MachineDeployme.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0035-Add-support-for-in-place-upgrades-in-MachineDeployme.patch @@ -1,7 +1,7 @@ -From 2446085f27f564efd79dc9a216cb0a54714831b7 Mon Sep 17 00:00:00 2001 +From ee8cc2cbcf1ed805e3c4641347130ab00d6f6ed1 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Wed, 24 Jan 2024 00:00:03 -0800 -Subject: [PATCH 36/40] Add support for in-place upgrades in MachineDeployments +Subject: [PATCH 35/37] Add support for in-place upgrades in MachineDeployments --- api/v1beta1/machinedeployment_types.go | 11 +- @@ -53,10 +53,10 @@ index 13a023d07..c55d17b6b 100644 Type MachineDeploymentStrategyType `json:"type,omitempty"` diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml -index 34823e44b..328bd1c7c 100644 +index b3e867b70..b93c6580b 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml -@@ -1294,6 +1294,7 @@ spec: +@@ -1401,6 +1401,7 @@ spec: enum: - RollingUpdate - OnDelete @@ -65,10 +65,10 @@ index 34823e44b..328bd1c7c 100644 type: object template: diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml -index a10bee3ce..863caf281 100644 +index 5f5fdc3cd..3f247f854 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml -@@ -1477,6 +1477,7 @@ spec: +@@ -1561,6 +1561,7 @@ spec: enum: - RollingUpdate - OnDelete @@ -77,10 +77,10 @@ index a10bee3ce..863caf281 100644 type: object variables: diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml -index 5b9790178..98c907371 100644 +index 160819dd0..d9860f8de 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml -@@ -703,6 +703,7 @@ spec: +@@ -775,6 +775,7 @@ spec: enum: - RollingUpdate - OnDelete @@ -89,10 +89,10 @@ index 5b9790178..98c907371 100644 type: object template: diff --git a/internal/controllers/machinedeployment/machinedeployment_controller.go b/internal/controllers/machinedeployment/machinedeployment_controller.go -index a5d5fdbe7..756262348 100644 +index 64ac90c58..974aae3f4 100644 --- a/internal/controllers/machinedeployment/machinedeployment_controller.go +++ b/internal/controllers/machinedeployment/machinedeployment_controller.go -@@ -277,6 +277,10 @@ func (r *Reconciler) reconcile(ctx context.Context, cluster *clusterv1.Cluster, +@@ -276,6 +276,10 @@ func (r *Reconciler) reconcile(ctx context.Context, cluster *clusterv1.Cluster, return r.rolloutRolling(ctx, md, msList) } @@ -270,10 +270,10 @@ index 000000000..cbda181cb + +} diff --git a/internal/controllers/machinedeployment/mdutil/util.go b/internal/controllers/machinedeployment/mdutil/util.go -index 2cf9d3427..203cd90f8 100644 +index a8624ac2d..fc168d8cb 100644 --- a/internal/controllers/machinedeployment/mdutil/util.go +++ b/internal/controllers/machinedeployment/mdutil/util.go -@@ -563,6 +563,8 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster +@@ -566,6 +566,8 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster // the desired number of replicas in the MachineDeployment scaleUpCount := *(deployment.Spec.Replicas) - currentMachineCount return newMSReplicas + scaleUpCount, nil diff --git a/projects/kubernetes-sigs/cluster-api/patches/0037-Adding-support-for-multiple-registry-mirrors-in-bott.patch b/projects/kubernetes-sigs/cluster-api/patches/0036-Adding-support-for-multiple-registry-mirrors-in-bott.patch similarity index 86% rename from projects/kubernetes-sigs/cluster-api/patches/0037-Adding-support-for-multiple-registry-mirrors-in-bott.patch rename to projects/kubernetes-sigs/cluster-api/patches/0036-Adding-support-for-multiple-registry-mirrors-in-bott.patch index 9fce469f50..b229e5c583 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0037-Adding-support-for-multiple-registry-mirrors-in-bott.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0036-Adding-support-for-multiple-registry-mirrors-in-bott.patch @@ -1,20 +1,17 @@ -From d7aa8cb0b30ac47ada8109ace606567240ad29d1 Mon Sep 17 00:00:00 2001 +From 164cde63d8cc5cf89d156268231dc0fb5de30f9f Mon Sep 17 00:00:00 2001 From: Aravind Ramalingam Date: Mon, 22 Jan 2024 12:47:26 -0800 -Subject: [PATCH 37/40] Adding support for multiple registry mirrors in +Subject: [PATCH 36/37] Adding support for multiple registry mirrors in bottlerocket --- - .../kubeadm/api/v1alpha4/kubeadm_types.go | 15 +++ - .../api/v1alpha4/zz_generated.conversion.go | 34 +++++ - .../api/v1alpha4/zz_generated.deepcopy.go | 31 ++++- .../kubeadm/api/v1beta1/kubeadm_types.go | 15 +++ .../api/v1beta1/zz_generated.deepcopy.go | 31 ++++- - ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 114 ++++++++++++++++ - ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 126 ++++++++++++++++++ + ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 108 ++++++++++++++++ + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 120 ++++++++++++++++++ .../internal/bottlerocket/bootstrap.go | 20 ++- - .../internal/bottlerocket/bootstrap_test.go | 72 +++++++++- - .../internal/bottlerocket/bottlerocket.go | 44 ++++-- + .../internal/bottlerocket/bootstrap_test.go | 72 ++++++++++- + .../internal/bottlerocket/bottlerocket.go | 44 +++++-- .../controllers/kubeadmconfig_controller.go | 12 +- .../kubeadm/types/upstreamv1beta1/types.go | 15 +++ .../zz_generated.conversion.go | 34 +++++ @@ -22,167 +19,15 @@ Subject: [PATCH 37/40] Adding support for multiple registry mirrors in .../zz_generated.conversion.go | 1 + .../zz_generated.conversion.go | 1 + .../cluster.x-k8s.io_machinedeployments.yaml | 2 +- - ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 126 ++++++++++++++++++ - ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 88 ++++++++++++ - 19 files changed, 783 insertions(+), 29 deletions(-) + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 120 ++++++++++++++++++ + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 80 ++++++++++++ + .../kubeadm/v1alpha4/kubeadm_types.go | 15 +++ + .../v1alpha4/zz_generated.conversion.go | 34 +++++ + .../kubeadm/v1alpha4/zz_generated.deepcopy.go | 31 ++++- + 19 files changed, 757 insertions(+), 29 deletions(-) -diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -index 3d43cae72..ab4ae1aa7 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -+++ b/bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go -@@ -259,6 +259,21 @@ type RegistryMirrorConfiguration struct { - - // CACert defines the CA cert for the registry mirror - CACert string `json:"caCert,omitempty"` -+ -+ // Mirrors defines a list of image registry mirrors. -+ // +k8s:conversion-gen=false -+ // +optional -+ Mirrors []Mirror `json:"mirrors,omitempty"` -+} -+ -+// Mirror holds the settings for mirroring a registry. -+type Mirror struct { -+ // Registry defines the registry we are mirroring to the endpoint. -+ Registry string `json:"registry,omitempty"` -+ -+ // Endpoints defines the registry mirror endpoints to use for pulling images. -+ // Currently we support only one private registry. Hence endpoints would have only one entry. -+ Endpoints []string `json:"endpoints,omitempty"` - } - - // ControlPlaneComponent holds settings common to control plane component of the cluster. -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -index c02aee696..a4cb4b3ab 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go -@@ -420,6 +420,16 @@ func RegisterConversions(s *runtime.Scheme) error { - }); err != nil { - return err - } -+ if err := s.AddGeneratedConversionFunc((*Mirror)(nil), (*v1beta1.Mirror)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1alpha4_Mirror_To_v1beta1_Mirror(a.(*Mirror), b.(*v1beta1.Mirror), scope) -+ }); err != nil { -+ return err -+ } -+ if err := s.AddGeneratedConversionFunc((*v1beta1.Mirror)(nil), (*Mirror)(nil), func(a, b interface{}, scope conversion.Scope) error { -+ return Convert_v1beta1_Mirror_To_v1alpha4_Mirror(a.(*v1beta1.Mirror), b.(*Mirror), scope) -+ }); err != nil { -+ return err -+ } - if err := s.AddGeneratedConversionFunc((*NTP)(nil), (*v1beta1.NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NTP_To_v1beta1_NTP(a.(*NTP), b.(*v1beta1.NTP), scope) - }); err != nil { -@@ -1858,6 +1868,28 @@ func Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *v1beta1.LocalEtcd, out - return autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) - } - -+func autoConvert_v1alpha4_Mirror_To_v1beta1_Mirror(in *Mirror, out *v1beta1.Mirror, s conversion.Scope) error { -+ out.Registry = in.Registry -+ out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) -+ return nil -+} -+ -+// Convert_v1alpha4_Mirror_To_v1beta1_Mirror is an autogenerated conversion function. -+func Convert_v1alpha4_Mirror_To_v1beta1_Mirror(in *Mirror, out *v1beta1.Mirror, s conversion.Scope) error { -+ return autoConvert_v1alpha4_Mirror_To_v1beta1_Mirror(in, out, s) -+} -+ -+func autoConvert_v1beta1_Mirror_To_v1alpha4_Mirror(in *v1beta1.Mirror, out *Mirror, s conversion.Scope) error { -+ out.Registry = in.Registry -+ out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) -+ return nil -+} -+ -+// Convert_v1beta1_Mirror_To_v1alpha4_Mirror is an autogenerated conversion function. -+func Convert_v1beta1_Mirror_To_v1alpha4_Mirror(in *v1beta1.Mirror, out *Mirror, s conversion.Scope) error { -+ return autoConvert_v1beta1_Mirror_To_v1alpha4_Mirror(in, out, s) -+} -+ - func autoConvert_v1alpha4_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { - out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) - out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) -@@ -2003,6 +2035,7 @@ func Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1bet - func autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { - out.Endpoint = in.Endpoint - out.CACert = in.CACert -+ // INFO: in.Mirrors opted out of conversion generation - return nil - } - -@@ -2014,6 +2047,7 @@ func Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfi - func autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { - out.Endpoint = in.Endpoint - out.CACert = in.CACert -+ // INFO: in.Mirrors opted out of conversion generation - return nil - } - -diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -index 4c3225e59..615ea1651 100644 ---- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -+++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go -@@ -354,7 +354,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { - out.BottlerocketAdmin = in.BottlerocketAdmin - out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) -- out.RegistryMirror = in.RegistryMirror -+ in.RegistryMirror.DeepCopyInto(&out.RegistryMirror) - in.Etcd.DeepCopyInto(&out.Etcd) - out.Networking = in.Networking - in.APIServer.DeepCopyInto(&out.APIServer) -@@ -744,7 +744,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { - out.BottlerocketAdmin = in.BottlerocketAdmin - out.BottlerocketControl = in.BottlerocketControl - in.Proxy.DeepCopyInto(&out.Proxy) -- out.RegistryMirror = in.RegistryMirror -+ in.RegistryMirror.DeepCopyInto(&out.RegistryMirror) - in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) - in.Discovery.DeepCopyInto(&out.Discovery) - if in.ControlPlane != nil { -@@ -1097,6 +1097,26 @@ func (in *LocalEtcd) DeepCopy() *LocalEtcd { - return out - } - -+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -+func (in *Mirror) DeepCopyInto(out *Mirror) { -+ *out = *in -+ if in.Endpoints != nil { -+ in, out := &in.Endpoints, &out.Endpoints -+ *out = make([]string, len(*in)) -+ copy(*out, *in) -+ } -+} -+ -+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mirror. -+func (in *Mirror) DeepCopy() *Mirror { -+ if in == nil { -+ return nil -+ } -+ out := new(Mirror) -+ in.DeepCopyInto(out) -+ return out -+} -+ - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in MountPoints) DeepCopyInto(out *MountPoints) { - { -@@ -1254,6 +1274,13 @@ func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. - func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { - *out = *in -+ if in.Mirrors != nil { -+ in, out := &in.Mirrors, &out.Mirrors -+ *out = make([]Mirror, len(*in)) -+ for i := range *in { -+ (*in)[i].DeepCopyInto(&(*out)[i]) -+ } -+ } - } - - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go -index ed965709a..e3e4f3ef8 100644 +index 6b228b547..c613e2827 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -278,6 +278,21 @@ type RegistryMirrorConfiguration struct { @@ -271,10 +116,10 @@ index 9fefdcb62..7faf6f8c9 100644 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -index 3b4cbbf3f..4a8934c6e 100644 +index fbdd8a47a..9239acb13 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml -@@ -538,6 +538,25 @@ spec: +@@ -563,6 +563,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -284,10 +129,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -300,7 +144,7 @@ index 3b4cbbf3f..4a8934c6e 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -1296,6 +1315,25 @@ spec: +@@ -1322,6 +1340,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -310,10 +154,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -326,7 +169,7 @@ index 3b4cbbf3f..4a8934c6e 100644 type: object type: object mounts: -@@ -1996,6 +2034,25 @@ spec: +@@ -2058,6 +2094,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -336,10 +179,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -352,7 +194,7 @@ index 3b4cbbf3f..4a8934c6e 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -2754,6 +2811,25 @@ spec: +@@ -2817,6 +2871,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -362,10 +204,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -378,7 +219,7 @@ index 3b4cbbf3f..4a8934c6e 100644 type: object type: object mounts: -@@ -3457,6 +3533,25 @@ spec: +@@ -3551,6 +3623,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -388,10 +229,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -404,7 +244,7 @@ index 3b4cbbf3f..4a8934c6e 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -4310,6 +4405,25 @@ spec: +@@ -4405,6 +4495,24 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -414,10 +254,9 @@ index 3b4cbbf3f..4a8934c6e 100644 + description: Mirror holds the settings for mirroring a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror endpoints -+ to use for pulling images. Currently we support only -+ one private registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -429,12 +268,12 @@ index 3b4cbbf3f..4a8934c6e 100644 + type: array type: object skipPhases: - description: SkipPhases is a list of phases to skip during command + description: |- diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -index e25795947..235a375d2 100644 +index 88f5085e0..bfa011658 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml -@@ -573,6 +573,27 @@ spec: +@@ -580,6 +580,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -446,10 +285,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -462,7 +300,7 @@ index e25795947..235a375d2 100644 type: object scheduler: description: Scheduler contains extra settings for the -@@ -1377,6 +1398,27 @@ spec: +@@ -1354,6 +1374,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -474,10 +312,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -490,7 +327,7 @@ index e25795947..235a375d2 100644 type: object type: object mounts: -@@ -2048,6 +2090,27 @@ spec: +@@ -2039,6 +2079,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -502,10 +339,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -518,7 +354,7 @@ index e25795947..235a375d2 100644 type: object scheduler: description: Scheduler contains extra settings for the -@@ -2854,6 +2917,27 @@ spec: +@@ -2815,6 +2875,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -530,10 +366,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -546,7 +381,7 @@ index e25795947..235a375d2 100644 type: object type: object mounts: -@@ -3553,6 +3637,27 @@ spec: +@@ -3528,6 +3608,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -558,10 +393,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -574,7 +408,7 @@ index e25795947..235a375d2 100644 type: object scheduler: description: Scheduler contains extra settings for the -@@ -4465,6 +4570,27 @@ spec: +@@ -4401,6 +4501,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -586,10 +420,9 @@ index e25795947..235a375d2 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private registry. -+ Hence endpoints would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -601,7 +434,7 @@ index e25795947..235a375d2 100644 + type: array type: object skipPhases: - description: SkipPhases is a list of phases to skip during + description: |- diff --git a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go b/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go index df222b943..f378c3362 100644 --- a/bootstrap/kubeadm/internal/bottlerocket/bootstrap.go @@ -838,10 +671,10 @@ index ce796f206..f596d7b01 100644 bottlerocketInput.RegistryMirrorCACert = base64.StdEncoding.EncodeToString([]byte(config.RegistryMirrorConfiguration.CACert)) } diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -index 4e8b7c5e0..4d3d251d6 100644 +index e64be18ea..0f416e7c2 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go -@@ -490,7 +490,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex +@@ -522,7 +522,9 @@ func (r *KubeadmConfigReconciler) handleClusterNotInitialized(ctx context.Contex if scope.Config.Spec.ClusterConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.ClusterConfiguration.Proxy } @@ -852,7 +685,7 @@ index 4e8b7c5e0..4d3d251d6 100644 bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.ClusterConfiguration.RegistryMirror registryUsername, registryPassword, err := r.resolveRegistryCredentials(ctx, scope.Config) if err != nil { -@@ -718,7 +720,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) +@@ -750,7 +752,9 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope) if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy } @@ -863,7 +696,7 @@ index 4e8b7c5e0..4d3d251d6 100644 bottlerocketConfig.RegistryMirrorConfiguration = scope.Config.Spec.JoinConfiguration.RegistryMirror registryUsername, registryPassword, err := r.resolveRegistryCredentials(ctx, scope.Config) if err != nil { -@@ -868,7 +872,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S +@@ -902,7 +906,9 @@ func (r *KubeadmConfigReconciler) joinControlplane(ctx context.Context, scope *S if scope.Config.Spec.JoinConfiguration.Proxy.HTTPSProxy != "" { bottlerocketConfig.ProxyConfiguration = scope.Config.Spec.JoinConfiguration.Proxy } @@ -1054,10 +887,10 @@ index 6d812f516..dfff19e2d 100644 } diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml -index 98c907371..2062fe6ff 100644 +index d9860f8de..e0c9c2316 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml -@@ -703,7 +703,6 @@ spec: +@@ -775,7 +775,6 @@ spec: enum: - RollingUpdate - OnDelete @@ -1065,7 +898,7 @@ index 98c907371..2062fe6ff 100644 type: string type: object template: -@@ -1197,6 +1196,7 @@ spec: +@@ -1300,6 +1299,7 @@ spec: enum: - RollingUpdate - OnDelete @@ -1074,10 +907,10 @@ index 98c907371..2062fe6ff 100644 type: object template: diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -index fc1332eef..9cca28afb 100644 +index bb8edc495..ae70bcb06 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml -@@ -630,6 +630,27 @@ spec: +@@ -652,6 +652,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1089,10 +922,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1105,7 +937,7 @@ index fc1332eef..9cca28afb 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -1418,6 +1439,27 @@ spec: +@@ -1419,6 +1439,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1117,10 +949,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1133,7 +964,7 @@ index fc1332eef..9cca28afb 100644 type: object type: object mounts: -@@ -2255,6 +2297,27 @@ spec: +@@ -2293,6 +2333,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1145,10 +976,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1161,7 +991,7 @@ index fc1332eef..9cca28afb 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -3045,6 +3108,27 @@ spec: +@@ -3062,6 +3122,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1173,10 +1003,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1189,7 +1018,7 @@ index fc1332eef..9cca28afb 100644 type: object type: object mounts: -@@ -3971,6 +4055,27 @@ spec: +@@ -4035,6 +4115,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1201,10 +1030,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1217,7 +1045,7 @@ index fc1332eef..9cca28afb 100644 type: object scheduler: description: Scheduler contains extra settings for the scheduler -@@ -4862,6 +4967,27 @@ spec: +@@ -4899,6 +4999,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1229,10 +1057,9 @@ index fc1332eef..9cca28afb 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry mirror -+ endpoints to use for pulling images. Currently -+ we support only one private registry. Hence endpoints -+ would have only one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1244,12 +1071,12 @@ index fc1332eef..9cca28afb 100644 + type: array type: object skipPhases: - description: SkipPhases is a list of phases to skip during + description: |- diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -index ee4180f67..44712fe7a 100644 +index 8ba0071b1..4b82b2e72 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml -@@ -605,6 +605,28 @@ spec: +@@ -595,6 +595,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1261,11 +1088,9 @@ index ee4180f67..44712fe7a 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private -+ registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1278,7 +1103,7 @@ index ee4180f67..44712fe7a 100644 type: object scheduler: description: Scheduler contains extra settings for -@@ -1447,6 +1469,28 @@ spec: +@@ -1379,6 +1399,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1290,11 +1115,9 @@ index ee4180f67..44712fe7a 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private -+ registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1307,7 +1130,7 @@ index ee4180f67..44712fe7a 100644 type: object type: object mounts: -@@ -2315,6 +2359,28 @@ spec: +@@ -2254,6 +2294,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1319,11 +1142,9 @@ index ee4180f67..44712fe7a 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private -+ registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1336,7 +1157,7 @@ index ee4180f67..44712fe7a 100644 type: object scheduler: description: Scheduler contains extra settings for -@@ -3267,6 +3333,28 @@ spec: +@@ -3135,6 +3195,26 @@ spec: description: Endpoint defines the registry mirror endpoint to use for pulling images type: string @@ -1348,11 +1169,9 @@ index ee4180f67..44712fe7a 100644 + a registry. + properties: + endpoints: -+ description: Endpoints defines the registry -+ mirror endpoints to use for pulling images. -+ Currently we support only one private -+ registry. Hence endpoints would have only -+ one entry. ++ description: |- ++ Endpoints defines the registry mirror endpoints to use for pulling images. ++ Currently we support only one private registry. Hence endpoints would have only one entry. + items: + type: string + type: array @@ -1364,7 +1183,162 @@ index ee4180f67..44712fe7a 100644 + type: array type: object skipPhases: - description: SkipPhases is a list of phases to skip + description: |- +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +index 3d43cae72..ab4ae1aa7 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +@@ -259,6 +259,21 @@ type RegistryMirrorConfiguration struct { + + // CACert defines the CA cert for the registry mirror + CACert string `json:"caCert,omitempty"` ++ ++ // Mirrors defines a list of image registry mirrors. ++ // +k8s:conversion-gen=false ++ // +optional ++ Mirrors []Mirror `json:"mirrors,omitempty"` ++} ++ ++// Mirror holds the settings for mirroring a registry. ++type Mirror struct { ++ // Registry defines the registry we are mirroring to the endpoint. ++ Registry string `json:"registry,omitempty"` ++ ++ // Endpoints defines the registry mirror endpoints to use for pulling images. ++ // Currently we support only one private registry. Hence endpoints would have only one entry. ++ Endpoints []string `json:"endpoints,omitempty"` + } + + // ControlPlaneComponent holds settings common to control plane component of the cluster. +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +index 57400b3c0..c18bd4e93 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +@@ -420,6 +420,16 @@ func RegisterConversions(s *runtime.Scheme) error { + }); err != nil { + return err + } ++ if err := s.AddGeneratedConversionFunc((*Mirror)(nil), (*v1beta1.Mirror)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1alpha4_Mirror_To_v1beta1_Mirror(a.(*Mirror), b.(*v1beta1.Mirror), scope) ++ }); err != nil { ++ return err ++ } ++ if err := s.AddGeneratedConversionFunc((*v1beta1.Mirror)(nil), (*Mirror)(nil), func(a, b interface{}, scope conversion.Scope) error { ++ return Convert_v1beta1_Mirror_To_v1alpha4_Mirror(a.(*v1beta1.Mirror), b.(*Mirror), scope) ++ }); err != nil { ++ return err ++ } + if err := s.AddGeneratedConversionFunc((*NTP)(nil), (*v1beta1.NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NTP_To_v1beta1_NTP(a.(*NTP), b.(*v1beta1.NTP), scope) + }); err != nil { +@@ -1858,6 +1868,28 @@ func Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *v1beta1.LocalEtcd, out + return autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) + } + ++func autoConvert_v1alpha4_Mirror_To_v1beta1_Mirror(in *Mirror, out *v1beta1.Mirror, s conversion.Scope) error { ++ out.Registry = in.Registry ++ out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) ++ return nil ++} ++ ++// Convert_v1alpha4_Mirror_To_v1beta1_Mirror is an autogenerated conversion function. ++func Convert_v1alpha4_Mirror_To_v1beta1_Mirror(in *Mirror, out *v1beta1.Mirror, s conversion.Scope) error { ++ return autoConvert_v1alpha4_Mirror_To_v1beta1_Mirror(in, out, s) ++} ++ ++func autoConvert_v1beta1_Mirror_To_v1alpha4_Mirror(in *v1beta1.Mirror, out *Mirror, s conversion.Scope) error { ++ out.Registry = in.Registry ++ out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) ++ return nil ++} ++ ++// Convert_v1beta1_Mirror_To_v1alpha4_Mirror is an autogenerated conversion function. ++func Convert_v1beta1_Mirror_To_v1alpha4_Mirror(in *v1beta1.Mirror, out *Mirror, s conversion.Scope) error { ++ return autoConvert_v1beta1_Mirror_To_v1alpha4_Mirror(in, out, s) ++} ++ + func autoConvert_v1alpha4_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { + out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) +@@ -2003,6 +2035,7 @@ func Convert_v1beta1_ProxyConfiguration_To_v1alpha4_ProxyConfiguration(in *v1bet + func autoConvert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfiguration(in *RegistryMirrorConfiguration, out *v1beta1.RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert ++ // INFO: in.Mirrors opted out of conversion generation + return nil + } + +@@ -2014,6 +2047,7 @@ func Convert_v1alpha4_RegistryMirrorConfiguration_To_v1beta1_RegistryMirrorConfi + func autoConvert_v1beta1_RegistryMirrorConfiguration_To_v1alpha4_RegistryMirrorConfiguration(in *v1beta1.RegistryMirrorConfiguration, out *RegistryMirrorConfiguration, s conversion.Scope) error { + out.Endpoint = in.Endpoint + out.CACert = in.CACert ++ // INFO: in.Mirrors opted out of conversion generation + return nil + } + +diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +index 7331e32eb..c725e9a02 100644 +--- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go ++++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +@@ -354,7 +354,7 @@ func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + out.BottlerocketAdmin = in.BottlerocketAdmin + out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) +- out.RegistryMirror = in.RegistryMirror ++ in.RegistryMirror.DeepCopyInto(&out.RegistryMirror) + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) +@@ -744,7 +744,7 @@ func (in *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + out.BottlerocketAdmin = in.BottlerocketAdmin + out.BottlerocketControl = in.BottlerocketControl + in.Proxy.DeepCopyInto(&out.Proxy) +- out.RegistryMirror = in.RegistryMirror ++ in.RegistryMirror.DeepCopyInto(&out.RegistryMirror) + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { +@@ -1097,6 +1097,26 @@ func (in *LocalEtcd) DeepCopy() *LocalEtcd { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *Mirror) DeepCopyInto(out *Mirror) { ++ *out = *in ++ if in.Endpoints != nil { ++ in, out := &in.Endpoints, &out.Endpoints ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mirror. ++func (in *Mirror) DeepCopy() *Mirror { ++ if in == nil { ++ return nil ++ } ++ out := new(Mirror) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in MountPoints) DeepCopyInto(out *MountPoints) { + { +@@ -1254,6 +1274,13 @@ func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *RegistryMirrorConfiguration) DeepCopyInto(out *RegistryMirrorConfiguration) { + *out = *in ++ if in.Mirrors != nil { ++ in, out := &in.Mirrors, &out.Mirrors ++ *out = make([]Mirror, len(*in)) ++ for i := range *in { ++ (*in)[i].DeepCopyInto(&(*out)[i]) ++ } ++ } + } + + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryMirrorConfiguration. -- 2.42.0 diff --git a/projects/kubernetes-sigs/cluster-api/patches/0038-Fix-MD-controller-reconcilation-with-in-place.patch b/projects/kubernetes-sigs/cluster-api/patches/0037-Fix-MD-controller-reconcilation-with-in-place.patch similarity index 97% rename from projects/kubernetes-sigs/cluster-api/patches/0038-Fix-MD-controller-reconcilation-with-in-place.patch rename to projects/kubernetes-sigs/cluster-api/patches/0037-Fix-MD-controller-reconcilation-with-in-place.patch index e4a5de89c2..faced45adc 100644 --- a/projects/kubernetes-sigs/cluster-api/patches/0038-Fix-MD-controller-reconcilation-with-in-place.patch +++ b/projects/kubernetes-sigs/cluster-api/patches/0037-Fix-MD-controller-reconcilation-with-in-place.patch @@ -1,7 +1,7 @@ -From 25dc95a348a5921ae6d2b9eb9f6e59cdfd5ae012 Mon Sep 17 00:00:00 2001 +From 73f15fa283592232e9541a2ad8216e3197f22d99 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Mon, 5 Feb 2024 23:45:36 -0800 -Subject: [PATCH 38/40] Fix MD controller reconcilation with in-place +Subject: [PATCH 37/37] Fix MD controller reconcilation with in-place --- .../machinedeployment_controller_test.go | 398 ++++++++++++++++++ @@ -12,24 +12,27 @@ Subject: [PATCH 38/40] Fix MD controller reconcilation with in-place delete mode 100644 internal/controllers/machinedeployment/machinedeployment_inplace_test.go diff --git a/internal/controllers/machinedeployment/machinedeployment_controller_test.go b/internal/controllers/machinedeployment/machinedeployment_controller_test.go -index 94161271a..c23a35e10 100644 +index b54f128cb..bbe6074e2 100644 --- a/internal/controllers/machinedeployment/machinedeployment_controller_test.go +++ b/internal/controllers/machinedeployment/machinedeployment_controller_test.go -@@ -24,6 +24,7 @@ import ( +@@ -25,8 +25,10 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "k8s.io/utils/pointer" + "k8s.io/client-go/util/retry" ++ "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" -@@ -34,11 +35,14 @@ import ( + "sigs.k8s.io/controller-runtime/pkg/client/fake" +@@ -36,12 +38,14 @@ import ( "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util" + "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" -+ "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/cluster-api/util/patch" ) const ( @@ -38,9 +41,9 @@ index 94161271a..c23a35e10 100644 ) var _ reconcile.Reconciler = &Reconciler{} -@@ -970,3 +974,397 @@ func TestGetMachineSetsForDeployment(t *testing.T) { - }) - } +@@ -993,3 +997,397 @@ func updateMachineDeployment(ctx context.Context, c client.Client, md *clusterv1 + return patchHelper.Patch(ctx, md) + }) } + +func TestMachineDeploymentReconcilerInPlace(t *testing.T) { @@ -640,19 +643,19 @@ index cbda181cb..000000000 - -} diff --git a/internal/controllers/machinedeployment/mdutil/util.go b/internal/controllers/machinedeployment/mdutil/util.go -index 203cd90f8..0f4bb48f3 100644 +index fc168d8cb..814005c08 100644 --- a/internal/controllers/machinedeployment/mdutil/util.go +++ b/internal/controllers/machinedeployment/mdutil/util.go -@@ -552,7 +552,7 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster +@@ -555,7 +555,7 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster // Do not exceed the number of desired replicas. - scaleUpCount = integer.Int32Min(scaleUpCount, *(deployment.Spec.Replicas)-newMSReplicas) + scaleUpCount = min(scaleUpCount, *(deployment.Spec.Replicas)-newMSReplicas) return newMSReplicas + scaleUpCount, nil - case clusterv1.OnDeleteMachineDeploymentStrategyType: + case clusterv1.OnDeleteMachineDeploymentStrategyType, clusterv1.InPlaceMachineDeploymentStrategyType: // Find the total number of machines currentMachineCount := TotalMachineSetsReplicaSum(allMSs) if currentMachineCount >= *(deployment.Spec.Replicas) { -@@ -563,8 +563,6 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster +@@ -566,8 +566,6 @@ func NewMSNewReplicas(deployment *clusterv1.MachineDeployment, allMSs []*cluster // the desired number of replicas in the MachineDeployment scaleUpCount := *(deployment.Spec.Replicas) - currentMachineCount return newMSReplicas + scaleUpCount, nil diff --git a/projects/kubernetes-sigs/cluster-api/patches/0039-Use-controller-runtime-patch-for-restmapper-cache.patch b/projects/kubernetes-sigs/cluster-api/patches/0039-Use-controller-runtime-patch-for-restmapper-cache.patch deleted file mode 100644 index 90dd3f6649..0000000000 --- a/projects/kubernetes-sigs/cluster-api/patches/0039-Use-controller-runtime-patch-for-restmapper-cache.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 6bf3a03319f1f519850a27ad7025f926058c08d8 Mon Sep 17 00:00:00 2001 -From: Guillermo Gaston -Date: Thu, 15 Feb 2024 15:04:46 +0000 -Subject: [PATCH 39/40] Use controller-runtime patch for restmapper cache - -This fixes the issue with a race condition when making v1alpha4 not -served. - -Using a merged but unreleased change. Will update to the release tag -once this is cut. ---- - go.mod | 4 +++- - go.sum | 4 ++-- - hack/tools/go.mod | 4 +++- - hack/tools/go.sum | 4 ++-- - test/go.mod | 4 +++- - test/go.sum | 4 ++-- - 6 files changed, 15 insertions(+), 9 deletions(-) - -diff --git a/go.mod b/go.mod -index ba3c3b280..170f5a70f 100644 ---- a/go.mod -+++ b/go.mod -@@ -46,7 +46,7 @@ require ( - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 - k8s.io/kubectl v0.28.4 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 -- sigs.k8s.io/controller-runtime v0.16.5 -+ sigs.k8s.io/controller-runtime v0.17.3 - sigs.k8s.io/yaml v1.4.0 - ) - -@@ -185,3 +185,5 @@ require ( - sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - ) -+ -+replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a -diff --git a/go.sum b/go.sum -index ee115a17c..cc8887cc3 100644 ---- a/go.sum -+++ b/go.sum -@@ -1042,8 +1042,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= - rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= --sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw= --sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a h1:1veEwfhXsw2Afqx7EkhS9wOslyLuw6O8sRfGx23PfWs= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= - sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= -diff --git a/hack/tools/go.mod b/hack/tools/go.mod -index 4f789d23d..918e34c52 100644 ---- a/hack/tools/go.mod -+++ b/hack/tools/go.mod -@@ -22,7 +22,7 @@ require ( - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000 - sigs.k8s.io/cluster-api/test v0.0.0-00010101000000-000000000000 -- sigs.k8s.io/controller-runtime v0.16.5 -+ sigs.k8s.io/controller-runtime v0.17.3 - sigs.k8s.io/controller-tools v0.13.0 - sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d - sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 -@@ -139,3 +139,5 @@ require ( - sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - ) -+ -+replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a -diff --git a/hack/tools/go.sum b/hack/tools/go.sum -index 70a2716c3..483a274e1 100644 ---- a/hack/tools/go.sum -+++ b/hack/tools/go.sum -@@ -747,8 +747,8 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt - rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= - rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= - rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= --sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw= --sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a h1:1veEwfhXsw2Afqx7EkhS9wOslyLuw6O8sRfGx23PfWs= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= - sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= - sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -diff --git a/test/go.mod b/test/go.mod -index 19efdde6a..f261a9ab5 100644 ---- a/test/go.mod -+++ b/test/go.mod -@@ -32,7 +32,7 @@ require ( - k8s.io/klog/v2 v2.100.1 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000 -- sigs.k8s.io/controller-runtime v0.16.5 -+ sigs.k8s.io/controller-runtime v0.17.3 - sigs.k8s.io/kind v0.20.0 - sigs.k8s.io/yaml v1.4.0 - ) -@@ -161,3 +161,5 @@ require ( - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - ) -+ -+replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a -diff --git a/test/go.sum b/test/go.sum -index 6b1db2c3d..f10734c8a 100644 ---- a/test/go.sum -+++ b/test/go.sum -@@ -865,8 +865,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= - rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= --sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw= --sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a h1:1veEwfhXsw2Afqx7EkhS9wOslyLuw6O8sRfGx23PfWs= -+sigs.k8s.io/controller-runtime v0.16.5-0.20240215143111-dca5e8b2b00a/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= - sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8= --- -2.42.0 - diff --git a/projects/kubernetes-sigs/cluster-api/patches/0040-enable-kubeadm-feature-flags-mutation.patch b/projects/kubernetes-sigs/cluster-api/patches/0040-enable-kubeadm-feature-flags-mutation.patch deleted file mode 100644 index 6ca324af88..0000000000 --- a/projects/kubernetes-sigs/cluster-api/patches/0040-enable-kubeadm-feature-flags-mutation.patch +++ /dev/null @@ -1,1096 +0,0 @@ -From f7e923a4afa5d8db796dd3cb0d06896ba3bb3911 Mon Sep 17 00:00:00 2001 -From: Abhinav Pandey -Date: Tue, 27 Feb 2024 22:37:00 -0800 -Subject: [PATCH 40/40] enable kubeadm feature flags mutation - ---- - .../internal/controllers/controller_test.go | 3 +- - .../internal/controllers/fakes_test.go | 10 +- - .../kubeadm/internal/controllers/upgrade.go | 56 +++----- - .../webhooks/kubeadm_control_plane.go | 3 + - .../webhooks/kubeadm_control_plane_test.go | 4 +- - .../kubeadm/internal/workload_cluster.go | 67 +++++---- - .../internal/workload_cluster_coredns.go | 8 +- - .../internal/workload_cluster_coredns_test.go | 12 +- - .../kubeadm/internal/workload_cluster_etcd.go | 27 ++-- - .../internal/workload_cluster_etcd_test.go | 105 ++++++++------ - .../kubeadm/internal/workload_cluster_test.go | 132 +++++++++++++----- - 11 files changed, 262 insertions(+), 165 deletions(-) - -diff --git a/controlplane/kubeadm/internal/controllers/controller_test.go b/controlplane/kubeadm/internal/controllers/controller_test.go -index d352f7863..b531719ca 100644 ---- a/controlplane/kubeadm/internal/controllers/controller_test.go -+++ b/controlplane/kubeadm/internal/controllers/controller_test.go -@@ -1284,7 +1284,8 @@ dns: - type: CoreDNS - imageRepository: registry.k8s.io - kind: ClusterConfiguration --kubernetesVersion: metav1.16.1`, -+kubernetesVersion: metav1.16.1 -+`, - }, - } - g.Expect(env.Create(ctx, kubeadmCM)).To(Succeed()) -diff --git a/controlplane/kubeadm/internal/controllers/fakes_test.go b/controlplane/kubeadm/internal/controllers/fakes_test.go -index 3c7348bc4..cf9fcbafe 100644 ---- a/controlplane/kubeadm/internal/controllers/fakes_test.go -+++ b/controlplane/kubeadm/internal/controllers/fakes_test.go -@@ -108,11 +108,11 @@ func (f fakeWorkloadCluster) ReconcileKubeletRBACBinding(_ context.Context, _ se - return nil - } - --func (f fakeWorkloadCluster) UpdateKubernetesVersionInKubeadmConfigMap(_ context.Context, _ semver.Version) error { -+func (f fakeWorkloadCluster) UpdateKubernetesVersionInKubeadmConfigMap(semver.Version) func(*bootstrapv1.ClusterConfiguration) { - return nil - } - --func (f fakeWorkloadCluster) UpdateEtcdVersionInKubeadmConfigMap(_ context.Context, _, _ string, _ semver.Version) error { -+func (f fakeWorkloadCluster) UpdateEtcdLocalInKubeadmConfigMap(*bootstrapv1.LocalEtcd) func(*bootstrapv1.ClusterConfiguration) { - return nil - } - -@@ -132,13 +132,17 @@ func (f fakeWorkloadCluster) EtcdMembers(_ context.Context) ([]string, error) { - return f.EtcdMembersResult, nil - } - -+func (f fakeWorkloadCluster) UpdateClusterConfiguration(context.Context, semver.Version, ...func(*bootstrapv1.ClusterConfiguration)) error { -+ return nil -+} -+ - type fakeMigrator struct { - migrateCalled bool - migrateErr error - migratedCorefile string - } - --func (m *fakeMigrator) Migrate(_, _, _ string, _ bool) (string, error) { -+func (m *fakeMigrator) Migrate(string, string, string, bool) (string, error) { - m.migrateCalled = true - if m.migrateErr != nil { - return "", m.migrateErr -diff --git a/controlplane/kubeadm/internal/controllers/upgrade.go b/controlplane/kubeadm/internal/controllers/upgrade.go -index e436eb546..ff8df3c9a 100644 ---- a/controlplane/kubeadm/internal/controllers/upgrade.go -+++ b/controlplane/kubeadm/internal/controllers/upgrade.go -@@ -24,6 +24,7 @@ import ( - "github.com/pkg/errors" - ctrl "sigs.k8s.io/controller-runtime" - -+ bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" - "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" - "sigs.k8s.io/cluster-api/util" -@@ -75,9 +76,8 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( - return ctrl.Result{}, errors.Wrap(err, "failed to set cluster-admin ClusterRoleBinding for kubeadm") - } - -- if err := workloadCluster.UpdateKubernetesVersionInKubeadmConfigMap(ctx, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update the kubernetes version in the kubeadm config map") -- } -+ kubeadmCMMutators := make([]func(*bootstrapv1.ClusterConfiguration), 0) -+ kubeadmCMMutators = append(kubeadmCMMutators, workloadCluster.UpdateKubernetesVersionInKubeadmConfigMap(parsedVersion)) - - if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil { - // We intentionally only parse major/minor/patch so that the subsequent code -@@ -86,44 +86,30 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( - if err != nil { - return ctrl.Result{}, errors.Wrapf(err, "failed to parse kubernetes version %q", controlPlane.KCP.Spec.Version) - } -+ - // Get the imageRepository or the correct value if nothing is set and a migration is necessary. - imageRepository := internal.ImageRepositoryFromClusterConfig(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration, parsedVersionTolerant) - -- if err := workloadCluster.UpdateImageRepositoryInKubeadmConfigMap(ctx, imageRepository, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update the image repository in the kubeadm config map") -+ kubeadmCMMutators = append(kubeadmCMMutators, -+ workloadCluster.UpdateImageRepositoryInKubeadmConfigMap(imageRepository), -+ workloadCluster.UpdateFeatureGatesInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.FeatureGates), -+ workloadCluster.UpdateAPIServerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer), -+ workloadCluster.UpdateControllerManagerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager), -+ workloadCluster.UpdateSchedulerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler)) -+ -+ // Etcd local and external are mutually exclusive and they cannot be switched, once set. -+ if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local != nil { -+ kubeadmCMMutators = append(kubeadmCMMutators, -+ workloadCluster.UpdateEtcdLocalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local)) -+ } else { -+ kubeadmCMMutators = append(kubeadmCMMutators, -+ workloadCluster.UpdateEtcdExternalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External)) - } - } - -- if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil && controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local != nil { -- meta := controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.ImageMeta -- if err := workloadCluster.UpdateEtcdVersionInKubeadmConfigMap(ctx, meta.ImageRepository, meta.ImageTag, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update the etcd version in the kubeadm config map") -- } -- -- extraArgs := controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.ExtraArgs -- if err := workloadCluster.UpdateEtcdExtraArgsInKubeadmConfigMap(ctx, extraArgs, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update the etcd extra args in the kubeadm config map") -- } -- } -- -- if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil && controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External != nil { -- if err := workloadCluster.UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.Endpoints, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update the external etcd endpoints in the kubeadm config map") -- } -- } -- -- if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration != nil { -- if err := workloadCluster.UpdateAPIServerInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update api server in the kubeadm config map") -- } -- -- if err := workloadCluster.UpdateControllerManagerInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update controller manager in the kubeadm config map") -- } -- -- if err := workloadCluster.UpdateSchedulerInKubeadmConfigMap(ctx, controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler, parsedVersion); err != nil { -- return ctrl.Result{}, errors.Wrap(err, "failed to update scheduler in the kubeadm config map") -- } -+ // collectively update Kubeadm config map -+ if err = workloadCluster.UpdateClusterConfiguration(ctx, parsedVersion, kubeadmCMMutators...); err != nil { -+ return ctrl.Result{}, err - } - - if err := workloadCluster.UpdateKubeletConfigMap(ctx, parsedVersion); err != nil { -diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -index 39d22a6a4..cd9909827 100644 ---- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -+++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go -@@ -151,6 +151,7 @@ const ( - ntp = "ntp" - ignition = "ignition" - diskSetup = "diskSetup" -+ featureGates = "featureGates" - ) - - const minimumCertificatesExpiryDays = 7 -@@ -183,6 +184,8 @@ func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, ne - {spec, kubeadmConfigSpec, clusterConfiguration, "dns", "imageRepository"}, - {spec, kubeadmConfigSpec, clusterConfiguration, "dns", "imageTag"}, - {spec, kubeadmConfigSpec, clusterConfiguration, "imageRepository"}, -+ {spec, kubeadmConfigSpec, clusterConfiguration, featureGates}, -+ {spec, kubeadmConfigSpec, clusterConfiguration, featureGates, "*"}, - {spec, kubeadmConfigSpec, clusterConfiguration, apiServer}, - {spec, kubeadmConfigSpec, clusterConfiguration, apiServer, "*"}, - {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager}, -diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -index efccae0a0..ea5288aea 100644 ---- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -+++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go -@@ -936,8 +936,8 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { - kcp: imageRepository, - }, - { -- name: "should fail when making a change to the cluster config's featureGates", -- expectErr: true, -+ name: "should succeed when making a change to the cluster config's featureGates", -+ expectErr: false, - before: before, - kcp: featureGates, - }, -diff --git a/controlplane/kubeadm/internal/workload_cluster.go b/controlplane/kubeadm/internal/workload_cluster.go -index cf6675f2f..9034dd1e0 100644 ---- a/controlplane/kubeadm/internal/workload_cluster.go -+++ b/controlplane/kubeadm/internal/workload_cluster.go -@@ -105,14 +105,14 @@ type WorkloadCluster interface { - // Upgrade related tasks. - ReconcileKubeletRBACBinding(ctx context.Context, version semver.Version) error - ReconcileKubeletRBACRole(ctx context.Context, version semver.Version) error -- UpdateKubernetesVersionInKubeadmConfigMap(ctx context.Context, version semver.Version) error -- UpdateImageRepositoryInKubeadmConfigMap(ctx context.Context, imageRepository string, version semver.Version) error -- UpdateEtcdVersionInKubeadmConfigMap(ctx context.Context, imageRepository, imageTag string, version semver.Version) error -- UpdateEtcdExtraArgsInKubeadmConfigMap(ctx context.Context, extraArgs map[string]string, version semver.Version) error -- UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx context.Context, endpoints []string, version semver.Version) error -- UpdateAPIServerInKubeadmConfigMap(ctx context.Context, apiServer bootstrapv1.APIServer, version semver.Version) error -- UpdateControllerManagerInKubeadmConfigMap(ctx context.Context, controllerManager bootstrapv1.ControlPlaneComponent, version semver.Version) error -- UpdateSchedulerInKubeadmConfigMap(ctx context.Context, scheduler bootstrapv1.ControlPlaneComponent, version semver.Version) error -+ UpdateKubernetesVersionInKubeadmConfigMap(version semver.Version) func(*bootstrapv1.ClusterConfiguration) -+ UpdateImageRepositoryInKubeadmConfigMap(imageRepository string) func(*bootstrapv1.ClusterConfiguration) -+ UpdateFeatureGatesInKubeadmConfigMap(featureGates map[string]bool) func(*bootstrapv1.ClusterConfiguration) -+ UpdateEtcdLocalInKubeadmConfigMap(localEtcd *bootstrapv1.LocalEtcd) func(*bootstrapv1.ClusterConfiguration) -+ UpdateEtcdExternalInKubeadmConfigMap(externalEtcd *bootstrapv1.ExternalEtcd) func(*bootstrapv1.ClusterConfiguration) -+ UpdateAPIServerInKubeadmConfigMap(apiServer bootstrapv1.APIServer) func(*bootstrapv1.ClusterConfiguration) -+ UpdateControllerManagerInKubeadmConfigMap(controllerManager bootstrapv1.ControlPlaneComponent) func(*bootstrapv1.ClusterConfiguration) -+ UpdateSchedulerInKubeadmConfigMap(scheduler bootstrapv1.ControlPlaneComponent) func(*bootstrapv1.ClusterConfiguration) - UpdateKubeletConfigMap(ctx context.Context, version semver.Version) error - UpdateKubeProxyImageInfo(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, version semver.Version) error - UpdateCoreDNS(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, version semver.Version) error -@@ -122,6 +122,7 @@ type WorkloadCluster interface { - ForwardEtcdLeadership(ctx context.Context, machine *clusterv1.Machine, leaderCandidate *clusterv1.Machine) error - AllowBootstrapTokensToGetNodes(ctx context.Context) error - AllowClusterAdminPermissions(ctx context.Context, version semver.Version) error -+ UpdateClusterConfiguration(ctx context.Context, version semver.Version, mutators ...func(*bootstrapv1.ClusterConfiguration)) error - - // State recovery tasks. - ReconcileEtcdMembers(ctx context.Context, nodeNames []string, version semver.Version) ([]string, error) -@@ -174,20 +175,30 @@ func (w *Workload) getConfigMap(ctx context.Context, configMap ctrlclient.Object - } - - // UpdateImageRepositoryInKubeadmConfigMap updates the image repository in the kubeadm config map. --func (w *Workload) UpdateImageRepositoryInKubeadmConfigMap(ctx context.Context, imageRepository string, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) UpdateImageRepositoryInKubeadmConfigMap(imageRepository string) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - if imageRepository == "" { - return - } -+ - c.ImageRepository = imageRepository -- }, version) -+ } -+} -+ -+// UpdateFeatureGatesInKubeadmConfigMap updates the feature gates in the kubeadm config map. -+func (w *Workload) UpdateFeatureGatesInKubeadmConfigMap(featureGates map[string]bool) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { -+ // Even if featureGates is nil, reset it to ClusterConfiguration -+ // to override any previously set feature gates. -+ c.FeatureGates = featureGates -+ } - } - - // UpdateKubernetesVersionInKubeadmConfigMap updates the kubernetes version in the kubeadm config map. --func (w *Workload) UpdateKubernetesVersionInKubeadmConfigMap(ctx context.Context, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) UpdateKubernetesVersionInKubeadmConfigMap(version semver.Version) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - c.KubernetesVersion = fmt.Sprintf("v%s", version.String()) -- }, version) -+ } - } - - // UpdateKubeletConfigMap will create a new kubelet-config-1.x config map for a new version of the kubelet. -@@ -271,24 +282,24 @@ func (w *Workload) UpdateKubeletConfigMap(ctx context.Context, version semver.Ve - } - - // UpdateAPIServerInKubeadmConfigMap updates api server configuration in kubeadm config map. --func (w *Workload) UpdateAPIServerInKubeadmConfigMap(ctx context.Context, apiServer bootstrapv1.APIServer, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) UpdateAPIServerInKubeadmConfigMap(apiServer bootstrapv1.APIServer) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - c.APIServer = apiServer -- }, version) -+ } - } - - // UpdateControllerManagerInKubeadmConfigMap updates controller manager configuration in kubeadm config map. --func (w *Workload) UpdateControllerManagerInKubeadmConfigMap(ctx context.Context, controllerManager bootstrapv1.ControlPlaneComponent, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) UpdateControllerManagerInKubeadmConfigMap(controllerManager bootstrapv1.ControlPlaneComponent) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - c.ControllerManager = controllerManager -- }, version) -+ } - } - - // UpdateSchedulerInKubeadmConfigMap updates scheduler configuration in kubeadm config map. --func (w *Workload) UpdateSchedulerInKubeadmConfigMap(ctx context.Context, scheduler bootstrapv1.ControlPlaneComponent, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) UpdateSchedulerInKubeadmConfigMap(scheduler bootstrapv1.ControlPlaneComponent) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - c.Scheduler = scheduler -- }, version) -+ } - } - - // RemoveMachineFromKubeadmConfigMap removes the entry for the machine from the kubeadm configmap. -@@ -351,11 +362,11 @@ func (w *Workload) updateClusterStatus(ctx context.Context, mutator func(status - }) - } - --// updateClusterConfiguration gets the ClusterConfiguration kubeadm-config ConfigMap, converts it to the -+// UpdateClusterConfiguration gets the ClusterConfiguration kubeadm-config ConfigMap, converts it to the - // Cluster API representation, and then applies a mutation func; if changes are detected, the - // data are converted back into the Kubeadm API version in use for the target Kubernetes version and the - // kubeadm-config ConfigMap updated. --func (w *Workload) updateClusterConfiguration(ctx context.Context, mutator func(*bootstrapv1.ClusterConfiguration), version semver.Version) error { -+func (w *Workload) UpdateClusterConfiguration(ctx context.Context, version semver.Version, mutators ...func(*bootstrapv1.ClusterConfiguration)) error { - return retry.RetryOnConflict(retry.DefaultBackoff, func() error { - key := ctrlclient.ObjectKey{Name: kubeadmConfigKey, Namespace: metav1.NamespaceSystem} - configMap, err := w.getConfigMap(ctx, key) -@@ -374,7 +385,9 @@ func (w *Workload) updateClusterConfiguration(ctx context.Context, mutator func( - } - - updatedObj := currentObj.DeepCopy() -- mutator(updatedObj) -+ for i := range mutators { -+ mutators[i](updatedObj) -+ } - - if !reflect.DeepEqual(currentObj, updatedObj) { - updatedData, err := kubeadmtypes.MarshalClusterConfigurationForVersion(updatedObj, version) -@@ -383,7 +396,7 @@ func (w *Workload) updateClusterConfiguration(ctx context.Context, mutator func( - } - configMap.Data[clusterConfigurationKey] = updatedData - if err := w.Client.Update(ctx, configMap); err != nil { -- return errors.Wrap(err, "failed to upgrade the kubeadmConfigMap") -+ return errors.Wrap(err, "failed to upgrade cluster configuration in the kubeadmConfigMap") - } - } - return nil -diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns.go b/controlplane/kubeadm/internal/workload_cluster_coredns.go -index 5699c9c06..deb5d712d 100644 ---- a/controlplane/kubeadm/internal/workload_cluster_coredns.go -+++ b/controlplane/kubeadm/internal/workload_cluster_coredns.go -@@ -145,7 +145,7 @@ func (w *Workload) UpdateCoreDNS(ctx context.Context, kcp *controlplanev1.Kubead - } - - // Perform the upgrade. -- if err := w.updateCoreDNSImageInfoInKubeadmConfigMap(ctx, &clusterConfig.DNS, version); err != nil { -+ if err := w.UpdateClusterConfiguration(ctx, version, w.updateCoreDNSImageInfoInKubeadmConfigMap(&clusterConfig.DNS)); err != nil { - return err - } - if err := w.updateCoreDNSCorefile(ctx, info); err != nil { -@@ -270,11 +270,11 @@ func (w *Workload) updateCoreDNSDeployment(ctx context.Context, info *coreDNSInf - } - - // updateCoreDNSImageInfoInKubeadmConfigMap updates the kubernetes version in the kubeadm config map. --func (w *Workload) updateCoreDNSImageInfoInKubeadmConfigMap(ctx context.Context, dns *bootstrapv1.DNS, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+func (w *Workload) updateCoreDNSImageInfoInKubeadmConfigMap(dns *bootstrapv1.DNS) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - c.DNS.ImageRepository = dns.ImageRepository - c.DNS.ImageTag = dns.ImageTag -- }, version) -+ } - } - - // updateCoreDNSClusterRole updates the CoreDNS ClusterRole when necessary. -diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go -index 141ef0ae6..96c3a711b 100644 ---- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go -+++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go -@@ -32,7 +32,7 @@ import ( - - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" -- "sigs.k8s.io/cluster-api/util/yaml" -+ utilyaml "sigs.k8s.io/cluster-api/util/yaml" - ) - - func TestUpdateCoreDNS(t *testing.T) { -@@ -124,7 +124,7 @@ func TestUpdateCoreDNS(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- "ClusterConfiguration": yaml.Raw(` -+ "ClusterConfiguration": utilyaml.Raw(` - apiServer: - apiVersion: kubeadm.k8s.io/v1beta2 - dns: -@@ -140,7 +140,7 @@ func TestUpdateCoreDNS(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- "ClusterConfiguration": yaml.Raw(` -+ "ClusterConfiguration": utilyaml.Raw(` - apiServer: - apiVersion: kubeadm.k8s.io/v1beta2 - dns: -@@ -1410,7 +1410,7 @@ func TestUpdateCoreDNSImageInfoInKubeadmConfigMap(t *testing.T) { - }{ - { - name: "it should set the DNS image config", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - `), -@@ -1420,7 +1420,7 @@ func TestUpdateCoreDNSImageInfoInKubeadmConfigMap(t *testing.T) { - ImageTag: "v1.2.3", - }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -1456,7 +1456,7 @@ func TestUpdateCoreDNSImageInfoInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.updateCoreDNSImageInfoInKubeadmConfigMap(ctx, &tt.newDNS, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.updateCoreDNSImageInfoInKubeadmConfigMap(&tt.newDNS)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd.go b/controlplane/kubeadm/internal/workload_cluster_etcd.go -index d2850c14e..fcf4beb69 100644 ---- a/controlplane/kubeadm/internal/workload_cluster_etcd.go -+++ b/controlplane/kubeadm/internal/workload_cluster_etcd.go -@@ -92,31 +92,30 @@ loopmembers: - return removedMembers, errs - } - --// UpdateEtcdVersionInKubeadmConfigMap sets the imageRepository or the imageTag or both in the kubeadm config map. --func (w *Workload) UpdateEtcdVersionInKubeadmConfigMap(ctx context.Context, imageRepository, imageTag string, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+// UpdateEtcdLocalInKubeadmConfigMap sets etcd local configuration in the kubeadm config map. -+func (w *Workload) UpdateEtcdLocalInKubeadmConfigMap(etcdLocal *bootstrapv1.LocalEtcd) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { - if c.Etcd.Local != nil { -- c.Etcd.Local.ImageRepository = imageRepository -- c.Etcd.Local.ImageTag = imageTag -+ c.Etcd.Local = etcdLocal - } -- }, version) -+ } - } - --// UpdateEtcdExtraArgsInKubeadmConfigMap sets extraArgs in the kubeadm config map. --func (w *Workload) UpdateEtcdExtraArgsInKubeadmConfigMap(ctx context.Context, extraArgs map[string]string, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -- if c.Etcd.Local != nil { -- c.Etcd.Local.ExtraArgs = extraArgs -+// UpdateEtcdExternalInKubeadmConfigMap sets etcd external configuration in the kubeadm config map. -+func (w *Workload) UpdateEtcdExternalInKubeadmConfigMap(etcdExternal *bootstrapv1.ExternalEtcd) func(*bootstrapv1.ClusterConfiguration) { -+ return func(c *bootstrapv1.ClusterConfiguration) { -+ if c.Etcd.External != nil { -+ c.Etcd.External = etcdExternal - } -- }, version) -+ } - } - - func (w *Workload) UpdateExternalEtcdEndpointsInKubeadmConfigMap(ctx context.Context, endpoints []string, version semver.Version) error { -- return w.updateClusterConfiguration(ctx, func(c *bootstrapv1.ClusterConfiguration) { -+ return w.UpdateClusterConfiguration(ctx, version, func(c *bootstrapv1.ClusterConfiguration) { - if c.Etcd.External != nil { - c.Etcd.External.Endpoints = endpoints - } -- }, version) -+ }) - } - - // RemoveEtcdMemberForMachine removes the etcd member from the target cluster's etcd cluster. -diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go -index e1bb84967..e764b606b 100644 ---- a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go -+++ b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go -@@ -32,30 +32,34 @@ import ( - "sigs.k8s.io/controller-runtime/pkg/client/fake" - - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" -+ bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" - fake2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/fake" -- "sigs.k8s.io/cluster-api/util/yaml" -+ utilyaml "sigs.k8s.io/cluster-api/util/yaml" - ) - --func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { -+func TestUpdateEtcdExternalInKubeadmConfigMap(t *testing.T) { - tests := []struct { - name string - clusterConfigurationData string -- newImageRepository string -- newImageTag string -+ externalEtcd *bootstrapv1.ExternalEtcd - wantClusterConfiguration string - }{ - { -- name: "it should set etcd version when local etcd", -- clusterConfigurationData: yaml.Raw(` -+ name: "it should set external etcd configuration with external etcd", -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: -- local: {} -+ external: {} - `), -- newImageRepository: "example.com/k8s", -- newImageTag: "v1.6.0", -- wantClusterConfiguration: yaml.Raw(` -+ externalEtcd: &bootstrapv1.ExternalEtcd{ -+ Endpoints: []string{"1.2.3.4"}, -+ CAFile: "/tmp/ca_file.pem", -+ CertFile: "/tmp/cert_file.crt", -+ KeyFile: "/tmp/key_file.key", -+ }, -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -63,9 +67,12 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - controllerManager: {} - dns: {} - etcd: -- local: -- imageRepository: example.com/k8s -- imageTag: v1.6.0 -+ external: -+ caFile: /tmp/ca_file.pem -+ certFile: /tmp/cert_file.crt -+ endpoints: -+ - 1.2.3.4 -+ keyFile: /tmp/key_file.key - kind: ClusterConfiguration - networking: {} - pause: {} -@@ -75,20 +82,24 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - `), - }, - { -- name: "no op when external etcd", -- clusterConfigurationData: yaml.Raw(` -+ name: "no op when local etcd configuration already exists", -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: -- external: {} -+ local: {} - `), -- newImageRepository: "example.com/k8s", -- newImageTag: "v1.6.0", -- wantClusterConfiguration: yaml.Raw(` -+ externalEtcd: &bootstrapv1.ExternalEtcd{ -+ Endpoints: []string{"1.2.3.4"}, -+ CAFile: "/tmp/ca_file.pem", -+ CertFile: "/tmp/cert_file.crt", -+ KeyFile: "/tmp/key_file.key", -+ }, -+ wantClusterConfiguration: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: -- external: {} -+ local: {} - `), - }, - } -@@ -109,7 +120,7 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateEtcdVersionInKubeadmConfigMap(ctx, tt.newImageRepository, tt.newImageTag, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateEtcdExternalInKubeadmConfigMap(tt.externalEtcd)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -123,25 +134,31 @@ func TestUpdateEtcdVersionInKubeadmConfigMap(t *testing.T) { - } - } - --func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { -+func TestUpdateEtcdLocalInKubeadmConfigMap(t *testing.T) { - tests := []struct { - name string - clusterConfigurationData string -- newExtraArgs map[string]string -+ localEtcd *bootstrapv1.LocalEtcd - wantClusterConfiguration string - }{ - { -- name: "it should set etcd extraArgs when local etcd", -- clusterConfigurationData: yaml.Raw(` -+ name: "it should set local etcd configuration with local etcd", -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: - local: {} - `), -- newExtraArgs: map[string]string{ -- "foo": "bar", -+ localEtcd: &bootstrapv1.LocalEtcd{ -+ ImageMeta: bootstrapv1.ImageMeta{ -+ ImageRepository: "example.com/k8s", -+ ImageTag: "v1.6.0", -+ }, -+ ExtraArgs: map[string]string{ -+ "foo": "bar", -+ }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -152,6 +169,8 @@ func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { - local: - extraArgs: - foo: bar -+ imageRepository: example.com/k8s -+ imageTag: v1.6.0 - kind: ClusterConfiguration - networking: {} - pause: {} -@@ -161,17 +180,23 @@ func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { - `), - }, - { -- name: "no op when external etcd", -- clusterConfigurationData: yaml.Raw(` -+ name: "no op when external etcd configuration already exists", -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: - external: {} - `), -- newExtraArgs: map[string]string{ -- "foo": "bar", -+ localEtcd: &bootstrapv1.LocalEtcd{ -+ ImageMeta: bootstrapv1.ImageMeta{ -+ ImageRepository: "example.com/k8s", -+ ImageTag: "v1.6.0", -+ }, -+ ExtraArgs: map[string]string{ -+ "foo": "bar", -+ }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - etcd: -@@ -196,7 +221,7 @@ func TestUpdateEtcdExtraArgsInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateEtcdExtraArgsInKubeadmConfigMap(ctx, tt.newExtraArgs, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateEtcdLocalInKubeadmConfigMap(tt.localEtcd)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -544,7 +569,7 @@ func TestReconcileEtcdMembers(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -620,7 +645,7 @@ func TestReconcileEtcdMembers(t *testing.T) { - client.ObjectKey{Name: kubeadmConfigKey, Namespace: metav1.NamespaceSystem}, - &actualConfig, - )).To(Succeed()) -- expectedOutput := yaml.Raw(` -+ expectedOutput := utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -712,7 +737,7 @@ func TestRemoveNodeFromKubeadmConfigMap(t *testing.T) { - { - name: "removes the api endpoint", - apiEndpoint: "ip-10-0-0-2.ec2.internal", -- clusterStatusData: yaml.Raw(` -+ clusterStatusData: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -723,7 +748,7 @@ func TestRemoveNodeFromKubeadmConfigMap(t *testing.T) { - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterStatus - `), -- wantClusterStatus: yaml.Raw(` -+ wantClusterStatus: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -735,7 +760,7 @@ func TestRemoveNodeFromKubeadmConfigMap(t *testing.T) { - { - name: "no op if the api endpoint does not exists", - apiEndpoint: "ip-10-0-0-2.ec2.internal", -- clusterStatusData: yaml.Raw(` -+ clusterStatusData: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -743,7 +768,7 @@ func TestRemoveNodeFromKubeadmConfigMap(t *testing.T) { - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterStatus - `), -- wantClusterStatus: yaml.Raw(` -+ wantClusterStatus: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -diff --git a/controlplane/kubeadm/internal/workload_cluster_test.go b/controlplane/kubeadm/internal/workload_cluster_test.go -index 56d79d966..906923e3d 100644 ---- a/controlplane/kubeadm/internal/workload_cluster_test.go -+++ b/controlplane/kubeadm/internal/workload_cluster_test.go -@@ -30,12 +30,13 @@ import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" -+ "sigs.k8s.io/yaml" - - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" - "sigs.k8s.io/cluster-api/util/version" -- "sigs.k8s.io/cluster-api/util/yaml" -+ utilyaml "sigs.k8s.io/cluster-api/util/yaml" - ) - - func TestGetControlPlaneNodes(t *testing.T) { -@@ -262,7 +263,7 @@ func TestRemoveMachineFromKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -327,7 +328,7 @@ func TestRemoveMachineFromKubeadmConfigMap(t *testing.T) { - machine: machine, - objs: []client.Object{kubeadmConfig}, - expectErr: false, -- expectedEndpoints: yaml.Raw(` -+ expectedEndpoints: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-2.ec2.internal: - advertiseAddress: 10.0.0.2 -@@ -397,7 +398,7 @@ func TestUpdateKubeletConfigMap(t *testing.T) { - ResourceVersion: "some-resource-version", - }, - Data: map[string]string{ -- kubeletConfigKey: yaml.Raw(` -+ kubeletConfigKey: utilyaml.Raw(` - apiVersion: kubelet.config.k8s.io/v1beta1 - kind: KubeletConfiguration - foo: bar -@@ -416,7 +417,7 @@ func TestUpdateKubeletConfigMap(t *testing.T) { - ResourceVersion: "some-resource-version", - }, - Data: map[string]string{ -- kubeletConfigKey: yaml.Raw(` -+ kubeletConfigKey: utilyaml.Raw(` - apiVersion: kubelet.config.k8s.io/v1beta1 - kind: KubeletConfiguration - foo: bar -@@ -435,7 +436,7 @@ func TestUpdateKubeletConfigMap(t *testing.T) { - ResourceVersion: "some-resource-version", - }, - Data: map[string]string{ -- kubeletConfigKey: yaml.Raw(` -+ kubeletConfigKey: utilyaml.Raw(` - apiVersion: kubelet.config.k8s.io/v1beta1 - kind: KubeletConfiguration - foo: bar -@@ -453,7 +454,7 @@ func TestUpdateKubeletConfigMap(t *testing.T) { - ResourceVersion: "some-resource-version", - }, - Data: map[string]string{ -- kubeletConfigKey: yaml.Raw(` -+ kubeletConfigKey: utilyaml.Raw(` - apiVersion: kubelet.config.k8s.io/v1beta1 - kind: KubeletConfiguration - foo: bar -@@ -473,7 +474,7 @@ func TestUpdateKubeletConfigMap(t *testing.T) { - ResourceVersion: "some-resource-version", - }, - Data: map[string]string{ -- kubeletConfigKey: yaml.Raw(` -+ kubeletConfigKey: utilyaml.Raw(` - apiVersion: kubelet.config.k8s.io/v1beta1 - kind: KubeletConfiguration - cgroupDriver: cgroupfs -@@ -576,7 +577,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - kubernetesVersion: v1.16.1 -@@ -590,7 +591,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - kubernetesVersion: v1.16.1 -@@ -607,7 +608,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - kubernetesVersion: v1.16.1 -@@ -623,7 +624,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -651,7 +652,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - kubernetesVersion: v1.16.1 -@@ -667,7 +668,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterConfigurationKey: yaml.Raw(` -+ clusterConfigurationKey: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta3 - bottlerocketBootstrap: {} -@@ -696,7 +697,7 @@ func TestUpdateUpdateClusterConfigurationInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.updateClusterConfiguration(ctx, tt.mutator, tt.version) -+ err := w.UpdateClusterConfiguration(ctx, tt.version, tt.mutator) - if tt.wantErr { - g.Expect(err).To(HaveOccurred()) - return -@@ -764,7 +765,7 @@ func TestUpdateUpdateClusterStatusInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -781,7 +782,7 @@ func TestUpdateUpdateClusterStatusInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -801,7 +802,7 @@ func TestUpdateUpdateClusterStatusInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -820,7 +821,7 @@ func TestUpdateUpdateClusterStatusInKubeadmConfigMap(t *testing.T) { - Namespace: metav1.NamespaceSystem, - }, - Data: map[string]string{ -- clusterStatusKey: yaml.Raw(` -+ clusterStatusKey: utilyaml.Raw(` - apiEndpoints: - ip-10-0-0-1.ec2.internal: - advertiseAddress: 10.0.0.1 -@@ -869,7 +870,7 @@ func TestUpdateKubernetesVersionInKubeadmConfigMap(t *testing.T) { - { - name: "updates the config map and changes the kubeadm API version", - version: semver.MustParse("1.17.2"), -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - kubernetesVersion: v1.16.1`), -@@ -892,7 +893,8 @@ func TestUpdateKubernetesVersionInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateKubernetesVersionInKubeadmConfigMap(ctx, tt.version) -+ -+ err := w.UpdateClusterConfiguration(ctx, tt.version, w.UpdateKubernetesVersionInKubeadmConfigMap(tt.version)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -915,7 +917,7 @@ func TestUpdateImageRepositoryInKubeadmConfigMap(t *testing.T) { - }{ - { - name: "it should set the image repository", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration`), - newImageRepository: "example.com/k8s", -@@ -923,7 +925,7 @@ func TestUpdateImageRepositoryInKubeadmConfigMap(t *testing.T) { - }, - { - name: "it should preserve the existing image repository if then new value is empty", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - imageRepository: foo.bar/baz.io`), -@@ -948,7 +950,7 @@ func TestUpdateImageRepositoryInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateImageRepositoryInKubeadmConfigMap(ctx, tt.newImageRepository, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateImageRepositoryInKubeadmConfigMap(tt.newImageRepository)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -971,7 +973,7 @@ func TestUpdateApiServerInKubeadmConfigMap(t *testing.T) { - }{ - { - name: "it should set the api server config", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - `), -@@ -990,7 +992,7 @@ func TestUpdateApiServerInKubeadmConfigMap(t *testing.T) { - }, - }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: - extraArgs: - bar: baz -@@ -1031,7 +1033,7 @@ func TestUpdateApiServerInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateAPIServerInKubeadmConfigMap(ctx, tt.newAPIServer, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateAPIServerInKubeadmConfigMap(tt.newAPIServer)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -1054,7 +1056,7 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { - }{ - { - name: "it should set the controller manager config", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - `), -@@ -1071,7 +1073,7 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { - }, - }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -1112,7 +1114,7 @@ func TestUpdateControllerManagerInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateControllerManagerInKubeadmConfigMap(ctx, tt.newControllerManager, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateControllerManagerInKubeadmConfigMap(tt.newControllerManager)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -1135,7 +1137,7 @@ func TestUpdateSchedulerInKubeadmConfigMap(t *testing.T) { - }{ - { - name: "it should set the scheduler config", -- clusterConfigurationData: yaml.Raw(` -+ clusterConfigurationData: utilyaml.Raw(` - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - `), -@@ -1152,7 +1154,7 @@ func TestUpdateSchedulerInKubeadmConfigMap(t *testing.T) { - }, - }, - }, -- wantClusterConfiguration: yaml.Raw(` -+ wantClusterConfiguration: utilyaml.Raw(` - apiServer: {} - apiVersion: kubeadm.k8s.io/v1beta2 - bottlerocketBootstrap: {} -@@ -1192,7 +1194,7 @@ func TestUpdateSchedulerInKubeadmConfigMap(t *testing.T) { - w := &Workload{ - Client: fakeClient, - } -- err := w.UpdateSchedulerInKubeadmConfigMap(ctx, tt.newScheduler, semver.MustParse("1.19.1")) -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateSchedulerInKubeadmConfigMap(tt.newScheduler)) - g.Expect(err).ToNot(HaveOccurred()) - - var actualConfig corev1.ConfigMap -@@ -1285,6 +1287,70 @@ func TestClusterStatus(t *testing.T) { - } - } - -+func TestUpdateFeatureGatesInKubeadmConfigMap(t *testing.T) { -+ tests := []struct { -+ name string -+ clusterConfigurationData string -+ newFeatureGates map[string]bool -+ wantFeatureGates map[string]bool -+ }{ -+ { -+ name: "it updates feature gates", -+ clusterConfigurationData: utilyaml.Raw(` -+ apiVersion: kubeadm.k8s.io/v1beta2 -+ kind: ClusterConfiguration`), -+ newFeatureGates: map[string]bool{"EtcdLearnerMode": true}, -+ wantFeatureGates: map[string]bool{"EtcdLearnerMode": true}, -+ }, -+ { -+ name: "it should override feature gates even if new value is nil", -+ clusterConfigurationData: utilyaml.Raw(` -+ apiVersion: kubeadm.k8s.io/v1beta2 -+ kind: ClusterConfiguration -+ featureGates: -+ EtcdLearnerMode: true -+ `), -+ newFeatureGates: nil, -+ wantFeatureGates: nil, -+ }, -+ } -+ -+ for _, tt := range tests { -+ t.Run(tt.name, func(t *testing.T) { -+ g := NewWithT(t) -+ fakeClient := fake.NewClientBuilder().WithObjects(&corev1.ConfigMap{ -+ ObjectMeta: metav1.ObjectMeta{ -+ Name: kubeadmConfigKey, -+ Namespace: metav1.NamespaceSystem, -+ }, -+ Data: map[string]string{ -+ clusterConfigurationKey: tt.clusterConfigurationData, -+ }, -+ }).Build() -+ -+ w := &Workload{ -+ Client: fakeClient, -+ } -+ err := w.UpdateClusterConfiguration(ctx, semver.MustParse("1.19.1"), w.UpdateFeatureGatesInKubeadmConfigMap(tt.newFeatureGates)) -+ g.Expect(err).ToNot(HaveOccurred()) -+ -+ var actualConfig corev1.ConfigMap -+ g.Expect(w.Client.Get( -+ ctx, -+ client.ObjectKey{Name: kubeadmConfigKey, Namespace: metav1.NamespaceSystem}, -+ &actualConfig, -+ )).To(Succeed()) -+ -+ actualConfiguration := bootstrapv1.ClusterConfiguration{} -+ err = yaml.Unmarshal([]byte(actualConfig.Data[clusterConfigurationKey]), &actualConfiguration) -+ if err != nil { -+ return -+ } -+ g.Expect(actualConfiguration.FeatureGates).Should(Equal(tt.wantFeatureGates)) -+ }) -+ } -+} -+ - func getProxyImageInfo(ctx context.Context, c client.Client) (string, error) { - ds := &appsv1.DaemonSet{} - --- -2.42.0 -