versions: consolidate various types of Components

There used to be three definitions of a Component type, and conversion
routines between the three. Since the use case is always the same, and
the Component semantics are defined by versions.go and the installer, it
seems appropriate to define the Component type there and import it in
the necessary places.
This commit is contained in:
Markus Rudy 2023-12-11 08:08:55 +01:00 committed by Markus Rudy
parent a8fb6c5af0
commit a1dbd13f95
25 changed files with 454 additions and 379 deletions

View file

@ -59,7 +59,7 @@ func (a *Applier) Init(
StorageUri: uri.NoStoreURI,
MeasurementSalt: payload.MeasurementSalt,
KubernetesVersion: versions.VersionConfigs[payload.K8sVersion].ClusterVersion,
KubernetesComponents: versions.VersionConfigs[payload.K8sVersion].KubernetesComponents.ToInitProto(),
KubernetesComponents: versions.VersionConfigs[payload.K8sVersion].KubernetesComponents,
ConformanceMode: payload.ConformanceMode,
InitSecret: state.Infrastructure.InitSecret,
ClusterName: state.Infrastructure.Name,

View file

@ -55,8 +55,8 @@ func NewOSInstaller() *OsInstaller {
// Install downloads a resource from a URL, applies any given text transformations and extracts the resulting file if required.
// The resulting file(s) are copied to the destination. It also verifies the sha256 hash of the downloaded file.
func (i *OsInstaller) Install(ctx context.Context, kubernetesComponent components.Component) error {
tempPath, err := i.retryDownloadToTempDir(ctx, kubernetesComponent.URL)
func (i *OsInstaller) Install(ctx context.Context, kubernetesComponent *components.Component) error {
tempPath, err := i.retryDownloadToTempDir(ctx, kubernetesComponent.Url)
if err != nil {
return err
}
@ -83,7 +83,7 @@ func (i *OsInstaller) Install(ctx context.Context, kubernetesComponent component
err = i.copy(tempPath, kubernetesComponent.InstallPath, executablePerm)
}
if err != nil {
return fmt.Errorf("installing from %q: copying to destination %q: %w", kubernetesComponent.URL, kubernetesComponent.InstallPath, err)
return fmt.Errorf("installing from %q: copying to destination %q: %w", kubernetesComponent.Url, kubernetesComponent.InstallPath, err)
}
return nil

View file

@ -35,7 +35,7 @@ func TestInstall(t *testing.T) {
serverURL := "http://server/path"
testCases := map[string]struct {
server httpBufconnServer
component components.Component
component *components.Component
hash string
destination string
extract bool
@ -44,8 +44,8 @@ func TestInstall(t *testing.T) {
}{
"download works": {
server: newHTTPBufconnServerWithBody([]byte("file-contents")),
component: components.Component{
URL: serverURL,
component: &components.Component{
Url: serverURL,
Hash: "sha256:f03779b36bece74893fd6533a67549675e21573eb0e288d87158738f9c24594e",
InstallPath: "/destination",
},
@ -53,8 +53,8 @@ func TestInstall(t *testing.T) {
},
"download with extract works": {
server: newHTTPBufconnServerWithBody(createTarGz([]byte("file-contents"), "/destination")),
component: components.Component{
URL: serverURL,
component: &components.Component{
Url: serverURL,
Hash: "sha256:a52a1664ca0a6ec9790384e3d058852ab8b3a8f389a9113d150fdc6ab308d949",
InstallPath: "/prefix",
Extract: true,
@ -63,8 +63,8 @@ func TestInstall(t *testing.T) {
},
"hash validation fails": {
server: newHTTPBufconnServerWithBody([]byte("file-contents")),
component: components.Component{
URL: serverURL,
component: &components.Component{
Url: serverURL,
Hash: "sha256:abc",
InstallPath: "/destination",
},
@ -72,8 +72,8 @@ func TestInstall(t *testing.T) {
},
"download fails": {
server: newHTTPBufconnServer(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(500) }),
component: components.Component{
URL: serverURL,
component: &components.Component{
Url: serverURL,
Hash: "sha256:abc",
InstallPath: "/destination",
},

View file

@ -1,12 +1,32 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/proto:rules.bzl", "write_go_proto_srcs")
go_library(
name = "components",
srcs = ["components.go"],
embed = [":components_go_proto"],
importpath = "github.com/edgelesssys/constellation/v2/internal/versions/components",
visibility = ["//:__subpackages__"],
deps = [
"//bootstrapper/initproto",
"//joinservice/joinproto",
],
)
proto_library(
name = "components_proto",
srcs = ["components.proto"],
visibility = ["//:__subpackages__"],
)
go_proto_library(
name = "components_go_proto",
importpath = "github.com/edgelesssys/constellation/v2/internal/versions/components",
proto = ":components_proto",
visibility = ["//:__subpackages__"],
)
write_go_proto_srcs(
name = "write_generated_protos",
src = "components.pb.go",
go_proto_library = ":components_go_proto",
visibility = ["//visibility:public"],
)

View file

@ -11,63 +11,10 @@ import (
"errors"
"fmt"
"strings"
"github.com/edgelesssys/constellation/v2/bootstrapper/initproto"
"github.com/edgelesssys/constellation/v2/joinservice/joinproto"
)
// Component is a Kubernetes component.
type Component struct {
URL string
Hash string
InstallPath string
Extract bool
}
// Components is a list of Kubernetes components.
type Components []Component
// NewComponentsFromInitProto converts a protobuf KubernetesVersion to Components.
func NewComponentsFromInitProto(protoComponents []*initproto.KubernetesComponent) Components {
components := Components{}
for _, protoComponent := range protoComponents {
if protoComponent == nil {
continue
}
components = append(components, Component{URL: protoComponent.Url, Hash: protoComponent.Hash, InstallPath: protoComponent.InstallPath, Extract: protoComponent.Extract})
}
return components
}
// NewComponentsFromJoinProto converts a protobuf KubernetesVersion to Components.
func NewComponentsFromJoinProto(protoComponents []*joinproto.KubernetesComponent) Components {
components := Components{}
for _, protoComponent := range protoComponents {
if protoComponent == nil {
continue
}
components = append(components, Component{URL: protoComponent.Url, Hash: protoComponent.Hash, InstallPath: protoComponent.InstallPath, Extract: protoComponent.Extract})
}
return components
}
// ToInitProto converts Components to a protobuf KubernetesVersion.
func (c Components) ToInitProto() []*initproto.KubernetesComponent {
protoComponents := []*initproto.KubernetesComponent{}
for _, component := range c {
protoComponents = append(protoComponents, &initproto.KubernetesComponent{Url: component.URL, Hash: component.Hash, InstallPath: component.InstallPath, Extract: component.Extract})
}
return protoComponents
}
// ToJoinProto converts Components to a protobuf KubernetesVersion.
func (c Components) ToJoinProto() []*joinproto.KubernetesComponent {
protoComponents := []*joinproto.KubernetesComponent{}
for _, component := range c {
protoComponents = append(protoComponents, &joinproto.KubernetesComponent{Url: component.URL, Hash: component.Hash, InstallPath: component.InstallPath, Extract: component.Extract})
}
return protoComponents
}
type Components []*Component
// GetHash returns the hash over all component hashes.
func (c Components) GetHash() string {
@ -80,11 +27,11 @@ func (c Components) GetHash() string {
}
// GetKubeadmComponent returns the kubeadm component.
func (c Components) GetKubeadmComponent() (Component, error) {
func (c Components) GetKubeadmComponent() (*Component, error) {
for _, component := range c {
if strings.Contains(component.URL, "kubeadm") {
if strings.Contains(component.GetUrl(), "kubeadm") {
return component, nil
}
}
return Component{}, errors.New("kubeadm component not found")
return nil, errors.New("kubeadm component not found")
}

View file

@ -0,0 +1,176 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.22.1
// source: internal/versions/components/components.proto
package components
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Component struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
InstallPath string `protobuf:"bytes,3,opt,name=install_path,json=installPath,proto3" json:"install_path,omitempty"`
Extract bool `protobuf:"varint,4,opt,name=extract,proto3" json:"extract,omitempty"`
}
func (x *Component) Reset() {
*x = Component{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_versions_components_components_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Component) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Component) ProtoMessage() {}
func (x *Component) ProtoReflect() protoreflect.Message {
mi := &file_internal_versions_components_components_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Component.ProtoReflect.Descriptor instead.
func (*Component) Descriptor() ([]byte, []int) {
return file_internal_versions_components_components_proto_rawDescGZIP(), []int{0}
}
func (x *Component) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Component) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *Component) GetInstallPath() string {
if x != nil {
return x.InstallPath
}
return ""
}
func (x *Component) GetExtract() bool {
if x != nil {
return x.Extract
}
return false
}
var File_internal_versions_components_components_proto protoreflect.FileDescriptor
var file_internal_versions_components_components_proto_rawDesc = []byte{
0x0a, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63,
0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x6e, 0x0a, 0x09, 0x43,
0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61,
0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21,
0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x74,
0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x46, 0x5a, 0x44, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65,
0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_internal_versions_components_components_proto_rawDescOnce sync.Once
file_internal_versions_components_components_proto_rawDescData = file_internal_versions_components_components_proto_rawDesc
)
func file_internal_versions_components_components_proto_rawDescGZIP() []byte {
file_internal_versions_components_components_proto_rawDescOnce.Do(func() {
file_internal_versions_components_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_versions_components_components_proto_rawDescData)
})
return file_internal_versions_components_components_proto_rawDescData
}
var file_internal_versions_components_components_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_internal_versions_components_components_proto_goTypes = []interface{}{
(*Component)(nil), // 0: components.Component
}
var file_internal_versions_components_components_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_internal_versions_components_components_proto_init() }
func file_internal_versions_components_components_proto_init() {
if File_internal_versions_components_components_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_internal_versions_components_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Component); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_internal_versions_components_components_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_internal_versions_components_components_proto_goTypes,
DependencyIndexes: file_internal_versions_components_components_proto_depIdxs,
MessageInfos: file_internal_versions_components_components_proto_msgTypes,
}.Build()
File_internal_versions_components_components_proto = out.File
file_internal_versions_components_components_proto_rawDesc = nil
file_internal_versions_components_components_proto_goTypes = nil
file_internal_versions_components_components_proto_depIdxs = nil
}

View file

@ -0,0 +1,19 @@
syntax = "proto3";
package components;
option go_package = "github.com/edgelesssys/constellation/v2/internal/versions/components";
// Component is a Kubernetes component to install.
message Component {
// URL of the component. Usually, this would be an HTTP download link.
string url = 1;
// Hash contains the expected digest of the resource retrieved from the URL,
// in the format "<algo>:<hex-digest>".
string hash = 2;
// InstallPath is the path to install the component to.
string install_path = 3;
// Extract indicates whether the resource at above URL is an archive, such as
// a gzipped tarball, and should be extracted to the install_path.
bool extract = 4;
}

View file

@ -140,7 +140,7 @@ func main() {
continue
}
switch ident.Name {
case "URL":
case "Url":
url = kv
case "Hash":
hash = kv

View file

@ -198,31 +198,31 @@ var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{
ClusterVersion: "v1.26.11", // renovate:kubernetes-release
KubernetesComponents: components.Components{
{
URL: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Url: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Hash: "sha256:754a71ed60a4bd08726c3af705a7d55ee3df03122b12e389fdba4bea35d7dd7e",
InstallPath: constants.CniPluginsDir,
Extract: true,
},
{
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Url: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Hash: "sha256:8dc78774f7cbeaf787994d386eec663f0a3cf24de1ea4893598096cb39ef2508",
InstallPath: constants.BinDir,
Extract: true,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Hash: "sha256:a62953f20fa9fedff50c6c5423e68981e3382d92cf04174d5bca5f4d084de0c5",
InstallPath: constants.KubeletPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Hash: "sha256:58f886e39e517ba1a92493f136e80f1b6ea9362966ad9d2accdf2133004161f2",
InstallPath: constants.KubeadmPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.26.11/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Hash: "sha256:27c34a0870230d9dd723e1e01114634e396cd2a3d25ced263b769a4bd53e4edd",
InstallPath: constants.KubectlPath,
Extract: false,
@ -249,31 +249,31 @@ var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{
ClusterVersion: "v1.27.8", // renovate:kubernetes-release
KubernetesComponents: components.Components{
{
URL: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Url: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Hash: "sha256:754a71ed60a4bd08726c3af705a7d55ee3df03122b12e389fdba4bea35d7dd7e",
InstallPath: constants.CniPluginsDir,
Extract: true,
},
{
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Url: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Hash: "sha256:8dc78774f7cbeaf787994d386eec663f0a3cf24de1ea4893598096cb39ef2508",
InstallPath: constants.BinDir,
Extract: true,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Hash: "sha256:2e0557b38c5b9a1263eed25a0b84d741453ed9c0c7bd916f80eadaf7edfb7784",
InstallPath: constants.KubeletPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Hash: "sha256:f8864769b8b2d7a14f53eb983f23317ff14d68ab76aba71e9de17ce84c38d4eb",
InstallPath: constants.KubeadmPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.27.8/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Hash: "sha256:027b3161e99fa0a7fa529e8f17f73ee2c0807c81c721ca7cf307f6b41c17bc57",
InstallPath: constants.KubectlPath,
Extract: false,
@ -300,31 +300,31 @@ var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{
ClusterVersion: "v1.28.4", // renovate:kubernetes-release
KubernetesComponents: components.Components{
{
URL: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Url: "https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz", // renovate:cni-plugins-release
Hash: "sha256:754a71ed60a4bd08726c3af705a7d55ee3df03122b12e389fdba4bea35d7dd7e",
InstallPath: constants.CniPluginsDir,
Extract: true,
},
{
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Url: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.28.0/crictl-v1.28.0-linux-amd64.tar.gz", // renovate:crictl-release
Hash: "sha256:8dc78774f7cbeaf787994d386eec663f0a3cf24de1ea4893598096cb39ef2508",
InstallPath: constants.BinDir,
Extract: true,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubelet", // renovate:kubernetes-release
Hash: "sha256:db2a473b73c3754d4011590f2f0aa877657608499590c6b0f8b40bec96a3e9ba",
InstallPath: constants.KubeletPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
Hash: "sha256:b4d2531b7cddf782f59555436bc098485b5fa6c05afccdeecf0d62d21d84f5bd",
InstallPath: constants.KubeadmPath,
Extract: false,
},
{
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Url: "https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubectl", // renovate:kubernetes-release
Hash: "sha256:893c92053adea6edbbd4e959c871f5c21edce416988f968bec565d115383f7b8",
InstallPath: constants.KubectlPath,
Extract: false,
@ -349,7 +349,7 @@ var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{
},
}
// KubernetesVersion bundles download URLs to all version-releated binaries necessary for installing/deploying a particular Kubernetes version.
// KubernetesVersion bundles download Urls to all version-releated binaries necessary for installing/deploying a particular Kubernetes version.
type KubernetesVersion struct {
ClusterVersion string
KubernetesComponents components.Components