From 5aef2ac7687c892c1aa13258ae11dcd242b8c79f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 09:18:54 +0100 Subject: [PATCH 1/7] fix(deps): update module github.com/protonmail/gopenpgp/v2 to v2.7.4 (#1162) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 19f191fc1..a7aa2b55f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( dario.cat/mergo v1.0.0 github.com/3th1nk/cidr v0.2.0 github.com/Masterminds/sprig/v3 v3.2.3 - github.com/ProtonMail/gopenpgp/v2 v2.7.3 + github.com/ProtonMail/gopenpgp/v2 v2.7.4 github.com/blang/semver v3.5.1+incompatible github.com/blang/semver/v4 v4.0.0 github.com/coreos/go-oidc/v3 v3.6.0 diff --git a/go.sum b/go.sum index ab5853fc6..c008026dc 100644 --- a/go.sum +++ b/go.sum @@ -115,8 +115,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw= -github.com/ProtonMail/gopenpgp/v2 v2.7.3 h1:AJu1OI/1UWVYZl6QcCLKGu9OTngS2r52618uGlje84I= -github.com/ProtonMail/gopenpgp/v2 v2.7.3/go.mod h1:IhkNEDaxec6NyzSI0PlxapinnwPVIESk8/76da3Ct3g= +github.com/ProtonMail/gopenpgp/v2 v2.7.4 h1:Vz/8+HViFFnf2A6XX8JOvZMrA6F5puwNvvF21O1mRlo= +github.com/ProtonMail/gopenpgp/v2 v2.7.4/go.mod h1:IhkNEDaxec6NyzSI0PlxapinnwPVIESk8/76da3Ct3g= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= From 86b73c97c99ae31afb704eea74e8a438f2bf5169 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 09:25:21 +0100 Subject: [PATCH 2/7] chore(deps): update module github.com/containerd/containerd to v1.7.8 (#1158) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a7aa2b55f..c18e22971 100644 --- a/go.mod +++ b/go.mod @@ -222,7 +222,7 @@ require ( ) replace ( - github.com/containerd/containerd => github.com/containerd/containerd v1.7.7 // [CVE-2023-25153] + github.com/containerd/containerd => github.com/containerd/containerd v1.7.8 // [CVE-2023-25153] github.com/coreos/etcd => go.etcd.io/etcd/client/v3 v3.5.9 github.com/docker/distribution v2.7.1+incompatible => github.com/docker/distribution v2.8.0+incompatible github.com/docker/docker => github.com/moby/moby v23.0.7+incompatible From ce8f5b463176c0d00e2ebf13abe3b7a36781d4bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 11:00:59 +0100 Subject: [PATCH 3/7] chore(deps): update module go.etcd.io/etcd/client/v3 to v3.5.10 (#1160) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c18e22971..d209c8d2b 100644 --- a/go.mod +++ b/go.mod @@ -223,7 +223,7 @@ require ( replace ( github.com/containerd/containerd => github.com/containerd/containerd v1.7.8 // [CVE-2023-25153] - github.com/coreos/etcd => go.etcd.io/etcd/client/v3 v3.5.9 + github.com/coreos/etcd => go.etcd.io/etcd/client/v3 v3.5.10 github.com/docker/distribution v2.7.1+incompatible => github.com/docker/distribution v2.8.0+incompatible github.com/docker/docker => github.com/moby/moby v23.0.7+incompatible github.com/go-ldap/ldap/v3 => github.com/go-ldap/ldap/v3 v3.4.6 From 9dd3d721f3e776cea5b301a7f1315f92769ba921 Mon Sep 17 00:00:00 2001 From: Taylor Bot Date: Mon, 30 Oct 2023 11:22:55 +0100 Subject: [PATCH 4/7] Bump version to 2.45.4-dev (#1163) Co-authored-by: Gerald Pape --- pkg/project/project.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/project/project.go b/pkg/project/project.go index b23ec83cf..d11eec569 100644 --- a/pkg/project/project.go +++ b/pkg/project/project.go @@ -5,7 +5,7 @@ var ( gitSHA = "n/a" name = "kubectl-gs" source = "https://github.com/giantswarm/kubectl-gs" - version = "2.45.3" + version = "2.45.4-dev" ) func Description() string { From a5059fa21bbb5f00e76fa5689eb0bd187a20b0a3 Mon Sep 17 00:00:00 2001 From: ArchitectBot <61872893+architectbot@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:28:25 +0100 Subject: [PATCH 5/7] Align files (#1159) Co-authored-by: github-actions Co-authored-by: Marian Steinbach --- .github/workflows/zz_generated.create_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zz_generated.create_release.yaml b/.github/workflows/zz_generated.create_release.yaml index af85b3605..2fb628cf5 100644 --- a/.github/workflows/zz_generated.create_release.yaml +++ b/.github/workflows/zz_generated.create_release.yaml @@ -266,7 +266,7 @@ jobs: - windows-amd64 env: GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}" - GO_VERSION: 1.20.8 + GO_VERSION: 1.19.6 ARTIFACT_DIR: bin-dist TAG: v${{ needs.gather_facts.outputs.version }} CODE_SIGNING_CERT_BUNDLE_BASE64: ${{ secrets.CODE_SIGNING_CERT_BUNDLE_BASE64 }} From 3afe5d4522b2c8573a2546052f106f71e9298491 Mon Sep 17 00:00:00 2001 From: Jirka Kremser <535866+jkremser@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:44:29 +0100 Subject: [PATCH 6/7] args for vsphere template cluster (#1164) Signed-off-by: Jirka Kremser --- cmd/template/cluster/flag.go | 14 ++++++++------ cmd/template/cluster/provider/capv.go | 14 ++++++++------ cmd/template/cluster/provider/common.go | 5 +++-- .../cluster/provider/templates/capv/types.go | 1 + cmd/template/cluster/runner_test.go | 3 ++- .../testdata/run_template_cluster_capv.golden | 1 + 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/cmd/template/cluster/flag.go b/cmd/template/cluster/flag.go index a7625c791..d6e88b412 100644 --- a/cmd/template/cluster/flag.go +++ b/cmd/template/cluster/flag.go @@ -94,6 +94,7 @@ const ( flagVSphereControlPlaneIP = "vsphere-control-plane-ip" flagVSphereServiceLoadBalancerCIDR = "vsphere-service-load-balancer-cidr" flagVSphereNetworkName = "vsphere-network-name" + flagVSphereSvcLbIpPool = "vsphere-service-lb-pool" flagVSphereControlPlaneDiskGiB = "vsphere-control-plane-disk-gib" flagVSphereControlPlaneIpPool = "vsphere-control-plane-ip-pool" flagVSphereControlPlaneMemoryMiB = "vsphere-control-plane-memory-mib" @@ -239,10 +240,11 @@ func (f *flag) Init(cmd *cobra.Command) { cmd.Flags().IntVar(&f.OpenStack.WorkerReplicas, flagOpenStackWorkerReplicas, 0, "Default worker node pool replicas (OpenStack only).") // VSphere only - cmd.Flags().StringVar(&f.VSphere.ControlPlane.IP, flagVSphereControlPlaneIP, "", "Control plane IP, leave empty for auto allocation.") + cmd.Flags().StringVar(&f.VSphere.ControlPlane.Ip, flagVSphereControlPlaneIP, "", "Control plane IP, leave empty for auto allocation.") cmd.Flags().StringVar(&f.VSphere.ServiceLoadBalancerCIDR, flagVSphereServiceLoadBalancerCIDR, "", "CIDR for Service LB for new cluster") cmd.Flags().StringVar(&f.VSphere.NetworkName, flagVSphereNetworkName, "", "Network name in vcenter that should be used for the new VMs") - cmd.Flags().StringVar(&f.VSphere.ControlPlane.IPPoolName, flagVSphereControlPlaneIpPool, "wc-cp-ips", "Name of `GlobalInClusterIpPool` CR from which the IP for CP is taken") + cmd.Flags().StringVar(&f.VSphere.SvcLbIpPoolName, flagVSphereSvcLbIpPool, "svc-lb-ips", "Name of `GlobalInClusterIpPool` CR from which the IP for Service LB (kubevip) is taken") + cmd.Flags().StringVar(&f.VSphere.ControlPlane.IpPoolName, flagVSphereControlPlaneIpPool, "wc-cp-ips", "Name of `GlobalInClusterIpPool` CR from which the IP for CP is taken") cmd.Flags().IntVar(&f.VSphere.ControlPlane.DiskGiB, flagVSphereControlPlaneDiskGiB, 50, "Disk size in GiB for control individual plane nodes") cmd.Flags().IntVar(&f.VSphere.ControlPlane.MemoryMiB, flagVSphereControlPlaneMemoryMiB, 8096, "Memory size in MiB for individual control plane nodes") cmd.Flags().IntVar(&f.VSphere.ControlPlane.NumCPUs, flagVSphereControlPlaneNumCPUs, 4, "Number of CPUs for individual control plane nodes") @@ -430,16 +432,16 @@ func (f *flag) Validate(cmd *cobra.Command) error { return microerror.Maskf(invalidFlagError, "--%s supports one availability zone only", flagControlPlaneAZ) } case key.ProviderVSphere: - if f.VSphere.ServiceLoadBalancerCIDR == "" { - return microerror.Maskf(invalidFlagError, "CIDR range from which the public IPs for Services of type LoadBalancer are taken (required) (--%s)", flagVSphereServiceLoadBalancerCIDR) + if f.VSphere.NetworkName == "" { + return microerror.Maskf(invalidFlagError, "Provide the network name in vcenter (required) (--%s)", flagVSphereNetworkName) } - if !validateCIDR(f.VSphere.ServiceLoadBalancerCIDR) { + if f.VSphere.ServiceLoadBalancerCIDR != "" && !validateCIDR(f.VSphere.ServiceLoadBalancerCIDR) { return microerror.Maskf(invalidFlagError, "--%s must be a valid CIDR", flagVSphereServiceLoadBalancerCIDR) } if !cmd.Flags().Changed(flagKubernetesVersion) { f.KubernetesVersion = defaultVSphereKubernetesVersion } - // todo: add validation for flagVSphereImageTemplate + placeholders := strings.Count(f.VSphere.ImageTemplate, "%s") if placeholders > 1 { return microerror.Maskf(invalidFlagError, "--%s must contain at most one occurrence of '%%s' where k8s version will be injected", flagVSphereImageTemplate) diff --git a/cmd/template/cluster/provider/capv.go b/cmd/template/cluster/provider/capv.go index df4d82130..0b745c672 100644 --- a/cmd/template/cluster/provider/capv.go +++ b/cmd/template/cluster/provider/capv.go @@ -114,7 +114,7 @@ func templateClusterVSphere(ctx context.Context, k8sClient k8sclient.Interface, func BuildCapvClusterConfig(config ClusterConfig) capv.ClusterConfig { const className = "default" - return capv.ClusterConfig{ + cfg := capv.ClusterConfig{ BaseDomain: "test.gigantic.io", ClusterDescription: config.Description, Organization: config.Organization, @@ -126,14 +126,12 @@ func BuildCapvClusterConfig(config ClusterConfig) capv.ClusterConfig { Network: &capv.Network{ AllowAllEgress: true, ControlPlaneEndpoint: &capv.ControlPlaneEndpoint{ - Host: config.VSphere.ControlPlane.IP, - IpPoolName: config.VSphere.ControlPlane.IPPoolName, + Host: config.VSphere.ControlPlane.Ip, + IpPoolName: config.VSphere.ControlPlane.IpPoolName, Port: 6443, }, LoadBalancers: &capv.LoadBalancers{ - CidrBlocks: []string{ - config.VSphere.ServiceLoadBalancerCIDR, - }, + IpPoolName: config.VSphere.SvcLbIpPoolName, }, }, }, @@ -165,6 +163,10 @@ func BuildCapvClusterConfig(config ClusterConfig) capv.ClusterConfig { }, }, } + if config.VSphere.ServiceLoadBalancerCIDR != "" { + cfg.Connectivity.Network.LoadBalancers.CidrBlocks = []string{config.VSphere.ServiceLoadBalancerCIDR} + } + return cfg } func getMachineTemplate(machineTemplate *VSphereMachineTemplate, clusterConfig *ClusterConfig) *capv.MachineTemplate { diff --git a/cmd/template/cluster/provider/common.go b/cmd/template/cluster/provider/common.go index 94ab4219c..29687c038 100644 --- a/cmd/template/cluster/provider/common.go +++ b/cmd/template/cluster/provider/common.go @@ -70,6 +70,7 @@ type VSphereConfig struct { Worker VSphereMachineTemplate ResourcePool string ServiceLoadBalancerCIDR string + SvcLbIpPoolName string } type VSphereMachineTemplate struct { @@ -80,8 +81,8 @@ type VSphereMachineTemplate struct { } type VSphereControlPlane struct { - IP string - IPPoolName string + Ip string + IpPoolName string VSphereMachineTemplate } diff --git a/cmd/template/cluster/provider/templates/capv/types.go b/cmd/template/cluster/provider/templates/capv/types.go index f26b74dac..919a80fd7 100644 --- a/cmd/template/cluster/provider/templates/capv/types.go +++ b/cmd/template/cluster/provider/templates/capv/types.go @@ -40,6 +40,7 @@ type ControlPlaneEndpoint struct { type LoadBalancers struct { CidrBlocks []string `json:"cidrBlocks,omitempty"` + IpPoolName string `json:"ipPoolName,omitempty"` } type ControlPlane struct { diff --git a/cmd/template/cluster/runner_test.go b/cmd/template/cluster/runner_test.go index 62b9b711a..b9bba9254 100644 --- a/cmd/template/cluster/runner_test.go +++ b/cmd/template/cluster/runner_test.go @@ -219,6 +219,7 @@ func Test_run(t *testing.T) { ServiceLoadBalancerCIDR: "1.2.3.4/32", ResourcePool: "foopool", NetworkName: "foonet", + SvcLbIpPoolName: "svc-foo-pool", CredentialsSecretName: "foosecret", ImageTemplate: "foobar", ControlPlane: provider.VSphereControlPlane{ @@ -228,7 +229,7 @@ func Test_run(t *testing.T) { NumCPUs: 6, Replicas: 5, }, - IPPoolName: "foo-pool", + IpPoolName: "foo-pool", }, Worker: provider.VSphereMachineTemplate{ DiskGiB: 43, diff --git a/cmd/template/cluster/testdata/run_template_cluster_capv.golden b/cmd/template/cluster/testdata/run_template_cluster_capv.golden index d2387d7b8..70680b28e 100644 --- a/cmd/template/cluster/testdata/run_template_cluster_capv.golden +++ b/cmd/template/cluster/testdata/run_template_cluster_capv.golden @@ -16,6 +16,7 @@ data: loadBalancers: cidrBlocks: - 1.2.3.4/32 + ipPoolName: svc-foo-pool controlPlane: image: repository: registry.k8s.io From 4c86c5755cea352c428fa5e3ca616d20a657adc3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:41:33 +0100 Subject: [PATCH 7/7] chore(deps): update module github.com/hashicorp/consul/api to v1.26.1 (#1165) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d209c8d2b..22bd136d2 100644 --- a/go.mod +++ b/go.mod @@ -229,7 +229,7 @@ replace ( github.com/go-ldap/ldap/v3 => github.com/go-ldap/ldap/v3 v3.4.6 github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 // [CVE-2021-3121] github.com/gorilla/websocket v1.4.0 => github.com/gorilla/websocket v1.4.2 - github.com/hashicorp/consul/api => github.com/hashicorp/consul/api v1.25.1 + github.com/hashicorp/consul/api => github.com/hashicorp/consul/api v1.26.1 github.com/hashicorp/vault/api => github.com/hashicorp/vault/api v1.10.0 github.com/hashicorp/vault/sdk v0.4.1 => github.com/hashicorp/vault/sdk v1.10.0 // CVE-2023-27561