Skip to content

Commit

Permalink
feat: bump k8s to v1.25.0-beta.0
Browse files Browse the repository at this point in the history
Bump k8s to v1.25.0-beta.0

Update most kubernetes `master` references to `controlplane`

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Aug 10, 2022
1 parent 7b80a74 commit 66ac99f
Show file tree
Hide file tree
Showing 55 changed files with 656 additions and 596 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
TALOSCTL_DEFAULT_TARGET := talosctl-$(OPERATING_SYSTEM)
INTEGRATION_TEST_DEFAULT_TARGET := integration-test-$(OPERATING_SYSTEM)
INTEGRATION_TEST_PROVISION_DEFAULT_TARGET := integration-test-provision-$(OPERATING_SYSTEM)
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.24.3/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBESTR_URL ?= https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Linux_amd64.tar.gz
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.25.0-beta.0/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBESTR_URL ?= https://github.com/kastenhq/kubestr/releases/download/v0.4.34/kubestr_0.4.34_Linux_amd64.tar.gz
HELM_URL ?= https://get.helm.sh/helm-v3.9.2-linux-amd64.tar.gz
CLUSTERCTL_VERSION ?= 1.1.3
CLUSTERCTL_URL ?= https://github.com/kubernetes-sigs/cluster-api/releases/download/v$(CLUSTERCTL_VERSION)/clusterctl-$(OPERATING_SYSTEM)-amd64
TESTPKGS ?= github.com/talos-systems/talos/...
Expand Down Expand Up @@ -333,12 +334,17 @@ $(ARTIFACTS)/kubestr:
@curl -L "$(KUBESTR_URL)" | tar xzf - -C $(ARTIFACTS) kubestr
@chmod +x $(ARTIFACTS)/kubestr

$(ARTIFACTS)/helm:
@mkdir -p $(ARTIFACTS)
@curl -L "$(HELM_URL)" | tar xzf - -C $(ARTIFACTS) --strip-components=1 linux-amd64/helm
@chmod +x $(ARTIFACTS)/helm

$(ARTIFACTS)/clusterctl:
@mkdir -p $(ARTIFACTS)
@curl -L -o $(ARTIFACTS)/clusterctl "$(CLUSTERCTL_URL)"
@chmod +x $(ARTIFACTS)/clusterctl

e2e-%: $(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 $(ARTIFACTS)/kubectl $(ARTIFACTS)/clusterctl $(ARTIFACTS)/kubestr ## Runs the E2E test for the specified platform (e.g. e2e-docker).
e2e-%: $(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 $(ARTIFACTS)/kubectl $(ARTIFACTS)/clusterctl $(ARTIFACTS)/kubestr $(ARTIFACTS)/helm ## Runs the E2E test for the specified platform (e.g. e2e-docker).
@$(MAKE) hack-test-$@ \
PLATFORM=$* \
TAG=$(TAG) \
Expand All @@ -353,6 +359,7 @@ e2e-%: $(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 $(ARTIFACTS)/kubect
CUSTOM_CNI_URL=$(CUSTOM_CNI_URL) \
KUBECTL=$(PWD)/$(ARTIFACTS)/kubectl \
KUBESTR=$(PWD)/$(ARTIFACTS)/kubestr \
HELM=$(PWD)/$(ARTIFACTS)/helm \
CLUSTERCTL=$(PWD)/$(ARTIFACTS)/clusterctl

provision-tests-prepare: release-artifacts $(ARTIFACTS)/$(INTEGRATION_TEST_PROVISION_DEFAULT_TARGET)-amd64
Expand Down
Binary file modified api/api.descriptors
Binary file not shown.
2 changes: 1 addition & 1 deletion api/machine/machine.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ message ClusterConfig {
string name = 1;
ControlPlaneConfig control_plane = 2;
ClusterNetworkConfig cluster_network = 3;
bool allow_scheduling_on_masters = 4;
bool allow_scheduling_on_control_planes = 4;
}

// GenerateConfigurationRequest describes a request to generate a new configuration
Expand Down
26 changes: 14 additions & 12 deletions cmd/talosctl/cmd/mgmt/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var (
nameservers []string
dnsDomain string
workers int
masters int
controlplanes int
controlPlaneCpus string
workersCpus string
controlPlaneMemory int
Expand Down Expand Up @@ -169,8 +169,8 @@ var createCmd = &cobra.Command{

//nolint:gocyclo,cyclop
func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
if masters < 1 {
return fmt.Errorf("number of masters can't be less than 1")
if controlplanes < 1 {
return fmt.Errorf("number of controlplanes can't be less than 1")
}

controlPlaneNanoCPUs, err := parseCPUShare(controlPlaneCpus)
Expand Down Expand Up @@ -232,7 +232,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
ips := make([][]net.IP, len(cidrs))

for j := range cidrs {
ips[j] = make([]net.IP, masters+workers)
ips[j] = make([]net.IP, controlplanes+workers)

for i := range ips[j] {
ips[j][i], err = talosnet.NthIPInNetwork(&cidrs[j], nodesOffset+i)
Expand Down Expand Up @@ -460,7 +460,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
defaultInternalLB, defaultEndpoint := provisioner.GetLoadBalancers(request.Network)

if defaultInternalLB == "" {
// provisioner doesn't provide internal LB, so use first master node
// provisioner doesn't provide internal LB, so use first controlplane node
defaultInternalLB = ips[0][0].String()
}

Expand All @@ -486,7 +486,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
endpointList = []string{ips[0][0].String()}
default:
// use control plane nodes as endpoints, client-side load-balancing
for i := 0; i < masters; i++ {
for i := 0; i < controlplanes; i++ {
endpointList = append(endpointList, ips[0][i].String())
}
}
Expand Down Expand Up @@ -548,7 +548,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
// Wireguard configuration.
var wireguardConfigBundle *helpers.WireguardConfigBundle
if wireguardCIDR != "" {
wireguardConfigBundle, err = helpers.NewWireguardConfigBundle(ips[0], wireguardCIDR, 51111, masters)
wireguardConfigBundle, err = helpers.NewWireguardConfigBundle(ips[0], wireguardCIDR, 51111, controlplanes)
if err != nil {
return err
}
Expand All @@ -563,8 +563,8 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
// Add talosconfig to provision options so we'll have it to parse there
provisionOptions = append(provisionOptions, provision.WithTalosConfig(configBundle.TalosConfig()))

// Create the master nodes.
for i := 0; i < masters; i++ {
// Create the controlplane nodes.
for i := 0; i < controlplanes; i++ {
var cfg config.Provider

nodeIPs := make([]net.IP, len(cidrs))
Expand All @@ -573,7 +573,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
}

nodeReq := provision.NodeRequest{
Name: fmt.Sprintf("%s-master-%d", clusterName, i+1),
Name: fmt.Sprintf("%s-controlplane-%d", clusterName, i+1),
Type: machine.TypeControlPlane,
IPs: nodeIPs,
Memory: controlPlaneMemory,
Expand Down Expand Up @@ -620,7 +620,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {

nodeIPs := make([]net.IP, len(cidrs))
for j := range nodeIPs {
nodeIPs[j] = ips[j][masters+i-1]
nodeIPs[j] = ips[j][controlplanes+i-1]
}

if wireguardConfigBundle != nil {
Expand Down Expand Up @@ -877,7 +877,9 @@ func init() {
createCmd.Flags().StringVar(&wireguardCIDR, "wireguard-cidr", "", "CIDR of the wireguard network")
createCmd.Flags().StringSliceVar(&nameservers, nameserversFlag, []string{"8.8.8.8", "1.1.1.1", "2001:4860:4860::8888", "2606:4700:4700::1111"}, "list of nameservers to use")
createCmd.Flags().IntVar(&workers, "workers", 1, "the number of workers to create")
createCmd.Flags().IntVar(&masters, "masters", 1, "the number of masters to create")
createCmd.Flags().IntVar(&controlplanes, "masters", 1, "the number of masters to create")
createCmd.Flags().MarkDeprecated("masters", "use --controlplanes instead") //nolint:errcheck
createCmd.Flags().IntVar(&controlplanes, "controlplanes", 1, "the number of controlplanes to create")
createCmd.Flags().StringVar(&controlPlaneCpus, "cpus", "2.0", "the share of CPUs as fraction (each control plane/VM)")
createCmd.Flags().StringVar(&workersCpus, "cpus-workers", "2.0", "the share of CPUs as fraction (each worker/VM)")
createCmd.Flags().IntVar(&controlPlaneMemory, "memory", 2048, "the limit on memory usage in MB (each control plane/VM)")
Expand Down
47 changes: 21 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ replace (

// Kubernetes dependencies sharing the same version.
require (
k8s.io/api v0.24.3
k8s.io/apimachinery v0.24.3
k8s.io/apiserver v0.24.3
k8s.io/client-go v0.24.3
k8s.io/component-base v0.24.3
k8s.io/cri-api v0.24.3
k8s.io/kubectl v0.24.3
k8s.io/kubelet v0.24.3
k8s.io/api v0.25.0-beta.0
k8s.io/apimachinery v0.25.0-beta.0
k8s.io/apiserver v0.25.0-beta.0
k8s.io/client-go v0.25.0-beta.0
k8s.io/component-base v0.25.0-beta.0
k8s.io/cri-api v0.25.0-beta.0
k8s.io/kubectl v0.25.0-beta.0
k8s.io/kubelet v0.25.0-beta.0
)

require (
Expand Down Expand Up @@ -139,13 +139,7 @@ require (
cloud.google.com/go/iam v0.3.0 // indirect
cloud.google.com/go/storage v1.22.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/hcsshim v0.9.4 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Expand All @@ -156,7 +150,7 @@ require (
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/briandowns/spinner v1.6.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/containerd/continuity v0.2.2 // indirect
github.com/containerd/fifo v1.0.0 // indirect
Expand All @@ -169,14 +163,15 @@ require (
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gertd/go-pluralize v0.2.1 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
Expand Down Expand Up @@ -261,7 +256,7 @@ require (
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
github.com/xlab/treeprint v1.1.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.etcd.io/etcd/client/v2 v2.305.4 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.4 // indirect
Expand All @@ -279,7 +274,7 @@ require (
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.11 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
golang.zx2c4.com/wireguard v0.0.0-20220407013110-ef5c587f782d // indirect
google.golang.org/api v0.84.0 // indirect
Expand All @@ -290,13 +285,13 @@ require (
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252 // indirect
k8s.io/cli-runtime v0.24.3 // indirect
k8s.io/cli-runtime v0.25.0-beta.0 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
kernel.org/pub/linux/libs/security/libcap/psx v1.2.65 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/kustomize/api v0.11.4 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Loading

0 comments on commit 66ac99f

Please sign in to comment.