mirror of
https://github.com/siderolabs/omni.git
synced 2026-05-05 14:46:12 +02:00
fix: do not select USB sticks by default
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-scaling (push) Blocked by required conditions
default / e2e-short (push) Blocked by required conditions
default / e2e-short-secureboot (push) Blocked by required conditions
default / e2e-templates (push) Blocked by required conditions
default / e2e-upgrades (push) Blocked by required conditions
default / e2e-workload-proxy (push) Blocked by required conditions
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-scaling (push) Blocked by required conditions
default / e2e-short (push) Blocked by required conditions
default / e2e-short-secureboot (push) Blocked by required conditions
default / e2e-templates (push) Blocked by required conditions
default / e2e-upgrades (push) Blocked by required conditions
default / e2e-workload-proxy (push) Blocked by required conditions
USB sticks priority is now lower than any other devices, virtual or physical, but having the other kinds of transport. Fixes: https://github.com/siderolabs/omni/issues/1005 Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
This commit is contained in:
parent
3650c60c4e
commit
0cd8212f59
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: common/omni.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package common
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -122,7 +123,7 @@ func (x *Context) GetName() string {
|
||||
|
||||
var File_common_omni_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_omni_proto_rawDesc = []byte{
|
||||
var file_common_omni_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x07, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
@ -134,16 +135,16 @@ var file_common_omni_proto_rawDesc = []byte{
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f,
|
||||
0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_common_omni_proto_rawDescOnce sync.Once
|
||||
file_common_omni_proto_rawDescData = file_common_omni_proto_rawDesc
|
||||
file_common_omni_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_common_omni_proto_rawDescGZIP() []byte {
|
||||
file_common_omni_proto_rawDescOnce.Do(func() {
|
||||
file_common_omni_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_omni_proto_rawDescData)
|
||||
file_common_omni_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_omni_proto_rawDesc), len(file_common_omni_proto_rawDesc)))
|
||||
})
|
||||
return file_common_omni_proto_rawDescData
|
||||
}
|
||||
@ -171,7 +172,7 @@ func file_common_omni_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_omni_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_omni_proto_rawDesc), len(file_common_omni_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
@ -183,7 +184,6 @@ func file_common_omni_proto_init() {
|
||||
MessageInfos: file_common_omni_proto_msgTypes,
|
||||
}.Build()
|
||||
File_common_omni_proto = out.File
|
||||
file_common_omni_proto_rawDesc = nil
|
||||
file_common_omni_proto_goTypes = nil
|
||||
file_common_omni_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/management/management.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package management
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
common "github.com/siderolabs/talos/pkg/machinery/api/common"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -1561,7 +1562,7 @@ func (x *GetSupportBundleResponse_Progress) GetValue() int32 {
|
||||
|
||||
var File_omni_management_management_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_management_management_proto_rawDesc = []byte{
|
||||
var file_omni_management_management_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x20, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x1b,
|
||||
@ -1856,16 +1857,16 @@ var file_omni_management_management_proto_rawDesc = []byte{
|
||||
0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x6d, 0x61, 0x6e,
|
||||
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_management_management_proto_rawDescOnce sync.Once
|
||||
file_omni_management_management_proto_rawDescData = file_omni_management_management_proto_rawDesc
|
||||
file_omni_management_management_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_management_management_proto_rawDescGZIP() []byte {
|
||||
file_omni_management_management_proto_rawDescOnce.Do(func() {
|
||||
file_omni_management_management_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_management_management_proto_rawDescData)
|
||||
file_omni_management_management_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_management_management_proto_rawDesc), len(file_omni_management_management_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_management_management_proto_rawDescData
|
||||
}
|
||||
@ -1960,7 +1961,7 @@ func file_omni_management_management_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_management_management_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_management_management_proto_rawDesc), len(file_omni_management_management_proto_rawDesc)),
|
||||
NumEnums: 2,
|
||||
NumMessages: 27,
|
||||
NumExtensions: 0,
|
||||
@ -1972,7 +1973,6 @@ func file_omni_management_management_proto_init() {
|
||||
MessageInfos: file_omni_management_management_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_management_management_proto = out.File
|
||||
file_omni_management_management_proto_rawDesc = nil
|
||||
file_omni_management_management_proto_goTypes = nil
|
||||
file_omni_management_management_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/oidc/oidc.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package oidc
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -123,7 +124,7 @@ func (x *AuthenticateResponse) GetAuthCode() string {
|
||||
|
||||
var File_omni_oidc_oidc_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_oidc_oidc_proto_rawDesc = []byte{
|
||||
var file_omni_oidc_oidc_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x14, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x6f, 0x69, 0x64, 0x63, 0x2f, 0x6f, 0x69, 0x64, 0x63,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6f, 0x69, 0x64, 0x63, 0x1a, 0x1b, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d,
|
||||
@ -147,16 +148,16 @@ var file_omni_oidc_oidc_proto_rawDesc = []byte{
|
||||
0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x6f, 0x69, 0x64, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_oidc_oidc_proto_rawDescOnce sync.Once
|
||||
file_omni_oidc_oidc_proto_rawDescData = file_omni_oidc_oidc_proto_rawDesc
|
||||
file_omni_oidc_oidc_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_oidc_oidc_proto_rawDescGZIP() []byte {
|
||||
file_omni_oidc_oidc_proto_rawDescOnce.Do(func() {
|
||||
file_omni_oidc_oidc_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_oidc_oidc_proto_rawDescData)
|
||||
file_omni_oidc_oidc_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_oidc_oidc_proto_rawDesc), len(file_omni_oidc_oidc_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_oidc_oidc_proto_rawDescData
|
||||
}
|
||||
@ -185,7 +186,7 @@ func file_omni_oidc_oidc_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_oidc_oidc_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_oidc_oidc_proto_rawDesc), len(file_omni_oidc_oidc_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
@ -196,7 +197,6 @@ func file_omni_oidc_oidc_proto_init() {
|
||||
MessageInfos: file_omni_oidc_oidc_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_oidc_oidc_proto = out.File
|
||||
file_omni_oidc_oidc_proto_rawDesc = nil
|
||||
file_omni_oidc_oidc_proto_goTypes = nil
|
||||
file_omni_oidc_oidc_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/resources/resources.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package resources
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
v1alpha1 "github.com/cosi-project/runtime/api/v1alpha1"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -885,7 +886,7 @@ func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
||||
|
||||
var File_omni_resources_resources_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_resources_resources_proto_rawDesc = []byte{
|
||||
var file_omni_resources_resources_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x1e, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x0e, 0x6f, 0x6d, 0x6e, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
@ -1018,16 +1019,16 @@ var file_omni_resources_resources_proto_rawDesc = []byte{
|
||||
0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_resources_resources_proto_rawDescOnce sync.Once
|
||||
file_omni_resources_resources_proto_rawDescData = file_omni_resources_resources_proto_rawDesc
|
||||
file_omni_resources_resources_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_resources_resources_proto_rawDescGZIP() []byte {
|
||||
file_omni_resources_resources_proto_rawDescOnce.Do(func() {
|
||||
file_omni_resources_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_resources_resources_proto_rawDescData)
|
||||
file_omni_resources_resources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_resources_resources_proto_rawDesc), len(file_omni_resources_resources_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_resources_resources_proto_rawDescData
|
||||
}
|
||||
@ -1088,7 +1089,7 @@ func file_omni_resources_resources_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_resources_resources_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_resources_resources_proto_rawDesc), len(file_omni_resources_resources_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
@ -1100,7 +1101,6 @@ func file_omni_resources_resources_proto_init() {
|
||||
MessageInfos: file_omni_resources_resources_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_resources_resources_proto = out.File
|
||||
file_omni_resources_resources_proto_rawDesc = nil
|
||||
file_omni_resources_resources_proto_goTypes = nil
|
||||
file_omni_resources_resources_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/auth.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
_ "github.com/siderolabs/talos/pkg/machinery/api/machine"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -1370,7 +1371,7 @@ func (x *AccessPolicyTest_Expected_Kubernetes_Impersonate) GetGroups() []string
|
||||
|
||||
var File_omni_specs_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_auth_proto_rawDesc = []byte{
|
||||
var file_omni_specs_auth_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x15, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x61, 0x75, 0x74,
|
||||
0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a, 0x1b,
|
||||
0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61,
|
||||
@ -1563,16 +1564,16 @@ var file_omni_specs_auth_proto_rawDesc = []byte{
|
||||
0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d,
|
||||
0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d,
|
||||
0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_auth_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_auth_proto_rawDescData = file_omni_specs_auth_proto_rawDesc
|
||||
file_omni_specs_auth_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_auth_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_auth_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_auth_proto_rawDescData)
|
||||
file_omni_specs_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_auth_proto_rawDesc), len(file_omni_specs_auth_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_auth_proto_rawDescData
|
||||
}
|
||||
@ -1648,7 +1649,7 @@ func file_omni_specs_auth_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_auth_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_auth_proto_rawDesc), len(file_omni_specs_auth_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 28,
|
||||
NumExtensions: 0,
|
||||
@ -1659,7 +1660,6 @@ func file_omni_specs_auth_proto_init() {
|
||||
MessageInfos: file_omni_specs_auth_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_auth_proto = out.File
|
||||
file_omni_specs_auth_proto_rawDesc = nil
|
||||
file_omni_specs_auth_proto_goTypes = nil
|
||||
file_omni_specs_auth_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/ephemeral.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -92,7 +93,7 @@ func (x *MachineStatusLinkSpec) GetTearingDown() bool {
|
||||
|
||||
var File_omni_specs_ephemeral_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_ephemeral_proto_rawDesc = []byte{
|
||||
var file_omni_specs_ephemeral_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x1a, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x65, 0x70, 0x68,
|
||||
0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70,
|
||||
0x65, 0x63, 0x73, 0x1a, 0x15, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f,
|
||||
@ -118,16 +119,16 @@ var file_omni_specs_ephemeral_proto_rawDesc = []byte{
|
||||
0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73,
|
||||
0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_ephemeral_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_ephemeral_proto_rawDescData = file_omni_specs_ephemeral_proto_rawDesc
|
||||
file_omni_specs_ephemeral_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_ephemeral_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_ephemeral_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_ephemeral_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_ephemeral_proto_rawDescData)
|
||||
file_omni_specs_ephemeral_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_ephemeral_proto_rawDesc), len(file_omni_specs_ephemeral_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_ephemeral_proto_rawDescData
|
||||
}
|
||||
@ -159,7 +160,7 @@ func file_omni_specs_ephemeral_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_ephemeral_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_ephemeral_proto_rawDesc), len(file_omni_specs_ephemeral_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
@ -170,7 +171,6 @@ func file_omni_specs_ephemeral_proto_init() {
|
||||
MessageInfos: file_omni_specs_ephemeral_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_ephemeral_proto = out.File
|
||||
file_omni_specs_ephemeral_proto_rawDesc = nil
|
||||
file_omni_specs_ephemeral_proto_goTypes = nil
|
||||
file_omni_specs_ephemeral_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/infra.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -753,7 +754,7 @@ func (x *BMCConfigSpec) GetConfig() *InfraMachineBMCConfigSpec {
|
||||
|
||||
var File_omni_specs_infra_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_infra_proto_rawDesc = []byte{
|
||||
var file_omni_specs_infra_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x16, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x69, 0x6e, 0x66,
|
||||
0x72, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a,
|
||||
0x15, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69,
|
||||
@ -885,16 +886,16 @@ var file_omni_specs_infra_proto_rawDesc = []byte{
|
||||
0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e,
|
||||
0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e,
|
||||
0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_infra_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_infra_proto_rawDescData = file_omni_specs_infra_proto_rawDesc
|
||||
file_omni_specs_infra_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_infra_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_infra_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_infra_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_infra_proto_rawDescData)
|
||||
file_omni_specs_infra_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_infra_proto_rawDesc), len(file_omni_specs_infra_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_infra_proto_rawDescData
|
||||
}
|
||||
@ -948,7 +949,7 @@ func file_omni_specs_infra_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_infra_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_infra_proto_rawDesc), len(file_omni_specs_infra_proto_rawDesc)),
|
||||
NumEnums: 3,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
@ -960,7 +961,6 @@ func file_omni_specs_infra_proto_init() {
|
||||
MessageInfos: file_omni_specs_infra_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_infra_proto = out.File
|
||||
file_omni_specs_infra_proto_rawDesc = nil
|
||||
file_omni_specs_infra_proto_goTypes = nil
|
||||
file_omni_specs_infra_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/oidc.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -79,7 +80,7 @@ func (x *JWTPublicKeySpec) GetExpiration() *timestamppb.Timestamp {
|
||||
|
||||
var File_omni_specs_oidc_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_oidc_proto_rawDesc = []byte{
|
||||
var file_omni_specs_oidc_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x15, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x6f, 0x69, 0x64,
|
||||
0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a, 0x1f,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
||||
@ -95,16 +96,16 @@ var file_omni_specs_oidc_proto_rawDesc = []byte{
|
||||
0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65,
|
||||
0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_oidc_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_oidc_proto_rawDescData = file_omni_specs_oidc_proto_rawDesc
|
||||
file_omni_specs_oidc_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_oidc_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_oidc_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_oidc_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_oidc_proto_rawDescData)
|
||||
file_omni_specs_oidc_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_oidc_proto_rawDesc), len(file_omni_specs_oidc_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_oidc_proto_rawDescData
|
||||
}
|
||||
@ -132,7 +133,7 @@ func file_omni_specs_oidc_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_oidc_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_oidc_proto_rawDesc), len(file_omni_specs_oidc_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
@ -143,7 +144,6 @@ func file_omni_specs_oidc_proto_init() {
|
||||
MessageInfos: file_omni_specs_oidc_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_oidc_proto = out.File
|
||||
file_omni_specs_oidc_proto_rawDesc = nil
|
||||
file_omni_specs_oidc_proto_goTypes = nil
|
||||
file_omni_specs_oidc_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -84,6 +84,8 @@ message MachineStatusSpec {
|
||||
bool system_disk = 11;
|
||||
// Readonly disk.
|
||||
bool readonly = 12;
|
||||
// Transport is the disk transport.
|
||||
string transport = 13;
|
||||
}
|
||||
|
||||
// CPU information.
|
||||
|
||||
@ -153,6 +153,7 @@ func (m *MachineStatusSpec_HardwareStatus_BlockDevice) CloneVT() *MachineStatusS
|
||||
r.BusPath = m.BusPath
|
||||
r.SystemDisk = m.SystemDisk
|
||||
r.Readonly = m.Readonly
|
||||
r.Transport = m.Transport
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
@ -2647,6 +2648,9 @@ func (this *MachineStatusSpec_HardwareStatus_BlockDevice) EqualVT(that *MachineS
|
||||
if this.Readonly != that.Readonly {
|
||||
return false
|
||||
}
|
||||
if this.Transport != that.Transport {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
@ -6132,6 +6136,13 @@ func (m *MachineStatusSpec_HardwareStatus_BlockDevice) MarshalToSizedBufferVT(dA
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.Transport) > 0 {
|
||||
i -= len(m.Transport)
|
||||
copy(dAtA[i:], m.Transport)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Transport)))
|
||||
i--
|
||||
dAtA[i] = 0x6a
|
||||
}
|
||||
if m.Readonly {
|
||||
i--
|
||||
if m.Readonly {
|
||||
@ -12507,6 +12518,10 @@ func (m *MachineStatusSpec_HardwareStatus_BlockDevice) SizeVT() (n int) {
|
||||
if m.Readonly {
|
||||
n += 2
|
||||
}
|
||||
l = len(m.Transport)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
@ -15928,6 +15943,38 @@ func (m *MachineStatusSpec_HardwareStatus_BlockDevice) UnmarshalVT(dAtA []byte)
|
||||
}
|
||||
}
|
||||
m.Readonly = bool(v != 0)
|
||||
case 13:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Transport = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/siderolink.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -500,7 +501,7 @@ func (x *PendingMachineStatusSpec) GetTalosInstalled() bool {
|
||||
|
||||
var File_omni_specs_siderolink_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_siderolink_proto_rawDesc = []byte{
|
||||
var file_omni_specs_siderolink_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x1b, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x73, 0x69, 0x64,
|
||||
0x65, 0x72, 0x6f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73,
|
||||
0x70, 0x65, 0x63, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
@ -587,16 +588,16 @@ var file_omni_specs_siderolink_proto_rawDesc = []byte{
|
||||
0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_siderolink_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_siderolink_proto_rawDescData = file_omni_specs_siderolink_proto_rawDesc
|
||||
file_omni_specs_siderolink_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_siderolink_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_siderolink_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_siderolink_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_siderolink_proto_rawDescData)
|
||||
file_omni_specs_siderolink_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_siderolink_proto_rawDesc), len(file_omni_specs_siderolink_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_siderolink_proto_rawDescData
|
||||
}
|
||||
@ -629,7 +630,7 @@ func file_omni_specs_siderolink_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_siderolink_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_siderolink_proto_rawDesc), len(file_omni_specs_siderolink_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
@ -640,7 +641,6 @@ func file_omni_specs_siderolink_proto_init() {
|
||||
MessageInfos: file_omni_specs_siderolink_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_siderolink_proto = out.File
|
||||
file_omni_specs_siderolink_proto_rawDesc = nil
|
||||
file_omni_specs_siderolink_proto_goTypes = nil
|
||||
file_omni_specs_siderolink_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/system.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -166,7 +167,7 @@ func (*CertRefreshTickSpec) Descriptor() ([]byte, []int) {
|
||||
|
||||
var File_omni_specs_system_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_system_proto_rawDesc = []byte{
|
||||
var file_omni_specs_system_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x17, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73,
|
||||
0x22, 0x29, 0x0a, 0x0d, 0x44, 0x42, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65,
|
||||
@ -186,16 +187,16 @@ var file_omni_specs_system_proto_rawDesc = []byte{
|
||||
0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e,
|
||||
0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e,
|
||||
0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_system_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_system_proto_rawDescData = file_omni_specs_system_proto_rawDesc
|
||||
file_omni_specs_system_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_system_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_system_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_system_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_system_proto_rawDescData)
|
||||
file_omni_specs_system_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_system_proto_rawDesc), len(file_omni_specs_system_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_system_proto_rawDescData
|
||||
}
|
||||
@ -223,7 +224,7 @@ func file_omni_specs_system_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_system_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_system_proto_rawDesc), len(file_omni_specs_system_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
@ -234,7 +235,6 @@ func file_omni_specs_system_proto_init() {
|
||||
MessageInfos: file_omni_specs_system_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_system_proto = out.File
|
||||
file_omni_specs_system_proto_rawDesc = nil
|
||||
file_omni_specs_system_proto_goTypes = nil
|
||||
file_omni_specs_system_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.2
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc v4.24.4
|
||||
// source: omni/specs/virtual.proto
|
||||
|
||||
@ -9,6 +9,7 @@ package specs
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@ -463,7 +464,7 @@ func (x *LabelsCompletionSpec_Values) GetItems() []string {
|
||||
|
||||
var File_omni_specs_virtual_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_omni_specs_virtual_proto_rawDesc = []byte{
|
||||
var file_omni_specs_virtual_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x18, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x76, 0x69, 0x72,
|
||||
0x74, 0x75, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x70, 0x65, 0x63,
|
||||
0x73, 0x22, 0x47, 0x0a, 0x0f, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
@ -572,16 +573,16 @@ var file_omni_specs_virtual_proto_rawDesc = []byte{
|
||||
0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69,
|
||||
0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69,
|
||||
0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
})
|
||||
|
||||
var (
|
||||
file_omni_specs_virtual_proto_rawDescOnce sync.Once
|
||||
file_omni_specs_virtual_proto_rawDescData = file_omni_specs_virtual_proto_rawDesc
|
||||
file_omni_specs_virtual_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_omni_specs_virtual_proto_rawDescGZIP() []byte {
|
||||
file_omni_specs_virtual_proto_rawDescOnce.Do(func() {
|
||||
file_omni_specs_virtual_proto_rawDescData = protoimpl.X.CompressGZIP(file_omni_specs_virtual_proto_rawDescData)
|
||||
file_omni_specs_virtual_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_omni_specs_virtual_proto_rawDesc), len(file_omni_specs_virtual_proto_rawDesc)))
|
||||
})
|
||||
return file_omni_specs_virtual_proto_rawDescData
|
||||
}
|
||||
@ -615,7 +616,7 @@ func file_omni_specs_virtual_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_omni_specs_virtual_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_omni_specs_virtual_proto_rawDesc), len(file_omni_specs_virtual_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
@ -626,7 +627,6 @@ func file_omni_specs_virtual_proto_init() {
|
||||
MessageInfos: file_omni_specs_virtual_proto_msgTypes,
|
||||
}.Build()
|
||||
File_omni_specs_virtual_proto = out.File
|
||||
file_omni_specs_virtual_proto_rawDesc = nil
|
||||
file_omni_specs_virtual_proto_goTypes = nil
|
||||
file_omni_specs_virtual_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ require (
|
||||
github.com/siderolabs/go-pointer v1.0.0
|
||||
github.com/siderolabs/image-factory v0.6.5
|
||||
github.com/siderolabs/proto-codec v0.1.2
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1
|
||||
github.com/spf13/cobra v1.8.1
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/xlab/treeprint v1.2.0
|
||||
@ -87,7 +87,7 @@ require (
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.3.5 // indirect
|
||||
github.com/siderolabs/crypto v0.5.1 // indirect
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11 // indirect
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13 // indirect
|
||||
github.com/siderolabs/net v0.4.0 // indirect
|
||||
github.com/siderolabs/protoenc v0.2.2 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
|
||||
@ -170,8 +170,8 @@ github.com/siderolabs/gen v0.8.0 h1:Pj93+hexkk5hQ7izjJ6YXnEWc8vlzOmDwFz13/VzS7o=
|
||||
github.com/siderolabs/gen v0.8.0/go.mod h1:an3a2Y53O7kUjnnK8Bfu3gewtvnIOu5RTU6HalFtXQQ=
|
||||
github.com/siderolabs/go-api-signature v0.3.6 h1:wDIsXbpl7Oa/FXvxB6uz4VL9INA9fmr3EbmjEZYFJrU=
|
||||
github.com/siderolabs/go-api-signature v0.3.6/go.mod h1:hoH13AfunHflxbXfh+NoploqV13ZTDfQ1mQJWNVSW9U=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11 h1:r7mbbXMn8OZmJA2fJJdomjlZKexRi66ELVZGXJUaNU8=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13 h1:N94eK+EFwnD+2kdNT38910Qlu+5+Z0WDODKbX7NXvPs=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
|
||||
github.com/siderolabs/go-kubeconfig v0.1.0 h1:t/2oMWkLSdWHXglKPMz8ySXnx6ZjHckeGY79NaDcBTo=
|
||||
github.com/siderolabs/go-kubeconfig v0.1.0/go.mod h1:eM3mO02Td6wYDvdi9zTbMrj1Q4WqEFN8XQ6pNjCUWkI=
|
||||
github.com/siderolabs/go-pointer v1.0.0 h1:6TshPKep2doDQJAAtHUuHWXbca8ZfyRySjSBT/4GsMU=
|
||||
@ -186,8 +186,8 @@ github.com/siderolabs/proto-codec v0.1.2 h1:KYrRiCk5wdA2ilZZoW4bWtICCF4y3r28Fhmu
|
||||
github.com/siderolabs/proto-codec v0.1.2/go.mod h1:TCsjpw732TWuOx4Vd4gYhivPOttEhdPvczLfMQ6Y9Dc=
|
||||
github.com/siderolabs/protoenc v0.2.2 h1:vVQDrTjV+QSOiroWTca6h2Sn5XWYk7VSUPav5J0Qp54=
|
||||
github.com/siderolabs/protoenc v0.2.2/go.mod h1:gtkHkjSCFEceXUHUzKDpnuvXu1mab9D3pVxTnQN+z+o=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0 h1:ik7cXQu7YqkV/Ryd8yU+xlckn0csmpQwV1KZEeCINdw=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0/go.mod h1:gFqGUE60R9EdIkNCzxcJ55Y6bv2d4i5+KLbou3rzpQ0=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1 h1:zDLiVMpRTw4C45HqUveKHtk2TO/CEJu7qO2EaXMbkJg=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1/go.mod h1:LT4w1oTtz4nZkmvFjSJVm3ouSP76sI4Pvjtes9snpvo=
|
||||
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
|
||||
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
|
||||
@ -221,6 +221,7 @@ export type MachineStatusSpecHardwareStatusBlockDevice = {
|
||||
bus_path?: string
|
||||
system_disk?: boolean
|
||||
readonly?: boolean
|
||||
transport?: string
|
||||
}
|
||||
|
||||
export type MachineStatusSpecHardwareStatus = {
|
||||
|
||||
4
go.mod
4
go.mod
@ -80,7 +80,7 @@ require (
|
||||
github.com/siderolabs/omni/client v0.45.0
|
||||
github.com/siderolabs/proto-codec v0.1.2
|
||||
github.com/siderolabs/siderolink v0.3.13
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.8.1
|
||||
github.com/stretchr/testify v1.10.0
|
||||
@ -215,7 +215,7 @@ require (
|
||||
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.3.5 // indirect
|
||||
github.com/sergi/go-diff v1.3.1 // indirect
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11 // indirect
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13 // indirect
|
||||
github.com/siderolabs/go-kubeconfig v0.1.0 // indirect
|
||||
github.com/siderolabs/net v0.4.0 // indirect
|
||||
github.com/siderolabs/protoenc v0.2.2 // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@ -411,8 +411,8 @@ github.com/siderolabs/gen v0.8.0 h1:Pj93+hexkk5hQ7izjJ6YXnEWc8vlzOmDwFz13/VzS7o=
|
||||
github.com/siderolabs/gen v0.8.0/go.mod h1:an3a2Y53O7kUjnnK8Bfu3gewtvnIOu5RTU6HalFtXQQ=
|
||||
github.com/siderolabs/go-api-signature v0.3.6 h1:wDIsXbpl7Oa/FXvxB6uz4VL9INA9fmr3EbmjEZYFJrU=
|
||||
github.com/siderolabs/go-api-signature v0.3.6/go.mod h1:hoH13AfunHflxbXfh+NoploqV13ZTDfQ1mQJWNVSW9U=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11 h1:r7mbbXMn8OZmJA2fJJdomjlZKexRi66ELVZGXJUaNU8=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.11/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13 h1:N94eK+EFwnD+2kdNT38910Qlu+5+Z0WDODKbX7NXvPs=
|
||||
github.com/siderolabs/go-blockdevice/v2 v2.0.13/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
|
||||
github.com/siderolabs/go-circular v0.2.2 h1:Q+bA7Ogboh2zDS2zapBirLGIlEcVcqimsQ0DdjxmsAw=
|
||||
github.com/siderolabs/go-circular v0.2.2/go.mod h1:NFcac49cEhUQnuU3lf4HbT0NLS0iaIx4veWfGaA2FDs=
|
||||
github.com/siderolabs/go-debug v0.5.0 h1:AQwFtvyFkSYTA1of4/UyDvVu8dVLoQP5sUYgmcp/u+4=
|
||||
@ -447,8 +447,8 @@ github.com/siderolabs/protoenc v0.2.2 h1:vVQDrTjV+QSOiroWTca6h2Sn5XWYk7VSUPav5J0
|
||||
github.com/siderolabs/protoenc v0.2.2/go.mod h1:gtkHkjSCFEceXUHUzKDpnuvXu1mab9D3pVxTnQN+z+o=
|
||||
github.com/siderolabs/siderolink v0.3.13 h1:v5tDcEEc7Fr8DpKuzNkAfnCW203iMcM52Mf0bhFSwyw=
|
||||
github.com/siderolabs/siderolink v0.3.13/go.mod h1:g/QSKmgzJcea/PZ1TKFZZAE0JmQgBHDA1j0itQSmiM8=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0 h1:ik7cXQu7YqkV/Ryd8yU+xlckn0csmpQwV1KZEeCINdw=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0/go.mod h1:gFqGUE60R9EdIkNCzxcJ55Y6bv2d4i5+KLbou3rzpQ0=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1 h1:zDLiVMpRTw4C45HqUveKHtk2TO/CEJu7qO2EaXMbkJg=
|
||||
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.1/go.mod h1:LT4w1oTtz4nZkmvFjSJVm3ouSP76sI4Pvjtes9snpvo=
|
||||
github.com/siderolabs/tcpproxy v0.1.0 h1:IbkS9vRhjMOscc1US3M5P1RnsGKFgB6U5IzUk+4WkKA=
|
||||
github.com/siderolabs/tcpproxy v0.1.0/go.mod h1:onn6CPPj/w1UNqQ0U97oRPF0CqbrgEApYCw4P9IiCW8=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
|
||||
@ -18,7 +18,10 @@ import (
|
||||
"github.com/cosi-project/runtime/pkg/state"
|
||||
"github.com/siderolabs/gen/channel"
|
||||
"github.com/siderolabs/gen/maps"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/siderolabs/talos/pkg/machinery/client"
|
||||
"github.com/siderolabs/talos/pkg/machinery/imager/quirks"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/block"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/hardware"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/network"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/runtime"
|
||||
@ -152,11 +155,12 @@ func (spec CollectTaskSpec) sendInfo(ctx context.Context, info Info, notifyCh In
|
||||
//
|
||||
// It subscribes to resource updates and polls for resources that can't be watched.
|
||||
//
|
||||
//nolint:gocyclo,cyclop,gocognit
|
||||
//nolint:gocyclo,cyclop,gocognit,maintidx
|
||||
func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, notifyCh InfoChan) error {
|
||||
var (
|
||||
c *client.Client
|
||||
err error
|
||||
c *client.Client
|
||||
err error
|
||||
diskTickerChan <-chan time.Time
|
||||
)
|
||||
|
||||
opts := talos.GetSocketOptions(spec.Endpoint)
|
||||
@ -191,9 +195,6 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
minPolInterval = time.Second
|
||||
)
|
||||
|
||||
disksTicker := time.NewTicker(disksPollInterval)
|
||||
defer disksTicker.Stop()
|
||||
|
||||
pollTicker := time.NewTicker(minPolInterval)
|
||||
defer pollTicker.Stop()
|
||||
|
||||
@ -248,6 +249,9 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
runtime.DiagnosticType: {
|
||||
namespace: runtime.NamespaceName,
|
||||
},
|
||||
block.DiskType: {
|
||||
namespace: block.NamespaceName,
|
||||
},
|
||||
}
|
||||
|
||||
for resourceType, watcher := range watchers {
|
||||
@ -266,11 +270,37 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
}
|
||||
}
|
||||
|
||||
info := Info{}
|
||||
|
||||
if err = pollVersion(ctx, c, &info); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
skipPollers := map[string]struct{}{}
|
||||
|
||||
if quirks.New(pointer.SafeDeref(info.TalosVersion)).SkipDataPartitions() {
|
||||
skipPollers["disks"] = struct{}{}
|
||||
} else {
|
||||
// initialize poller for get disks call
|
||||
disksTicker := time.NewTicker(disksPollInterval)
|
||||
defer disksTicker.Stop()
|
||||
|
||||
diskTickerChan = disksTicker.C
|
||||
}
|
||||
|
||||
dirtyPollers := map[string]struct{}{}
|
||||
|
||||
markPollerDirty := func(name string) {
|
||||
if _, skip := skipPollers[name]; skip {
|
||||
return
|
||||
}
|
||||
|
||||
dirtyPollers[name] = struct{}{}
|
||||
}
|
||||
|
||||
// mark everything as dirty on start
|
||||
for k := range machinePollers {
|
||||
dirtyPollers[k] = struct{}{}
|
||||
markPollerDirty(k)
|
||||
}
|
||||
|
||||
for k := range resourcePollers {
|
||||
@ -278,7 +308,7 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
continue
|
||||
}
|
||||
|
||||
dirtyPollers[k] = struct{}{}
|
||||
markPollerDirty(k)
|
||||
}
|
||||
|
||||
for {
|
||||
@ -301,9 +331,9 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-disksTicker.C:
|
||||
case <-diskTickerChan:
|
||||
// poll disks as we have no way to watch for changes
|
||||
dirtyPollers["disks"] = struct{}{}
|
||||
markPollerDirty("disks")
|
||||
case <-pollTicker.C:
|
||||
break waitLoop
|
||||
case event := <-watchCh:
|
||||
@ -315,7 +345,7 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
case state.Created, state.Updated, state.Destroyed:
|
||||
// poll machine version on each machine status update
|
||||
if event.Resource.Metadata().Type() == runtime.MachineStatusType {
|
||||
dirtyPollers["version"] = struct{}{}
|
||||
markPollerDirty("version")
|
||||
|
||||
break waitLoop
|
||||
}
|
||||
@ -327,7 +357,7 @@ func (spec CollectTaskSpec) RunTask(ctx context.Context, logger *zap.Logger, not
|
||||
}
|
||||
|
||||
if markAsDirty {
|
||||
dirtyPollers[event.Resource.Metadata().Type()] = struct{}{}
|
||||
markPollerDirty(event.Resource.Metadata().Type())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/resource/meta"
|
||||
@ -24,6 +25,7 @@ import (
|
||||
"github.com/siderolabs/talos/pkg/machinery/client"
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/block"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/hardware"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/k8s"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/network"
|
||||
@ -50,11 +52,12 @@ var resourcePollers = map[string]machinePollFunction{
|
||||
runtime.MetaKeyType: pollMeta,
|
||||
runtime.ExtensionStatusType: pollExtensions,
|
||||
runtime.DiagnosticType: pollDiagnostics,
|
||||
block.DiskType: pollDisks,
|
||||
}
|
||||
|
||||
var machinePollers = map[string]machinePollFunction{
|
||||
"version": pollVersion,
|
||||
"disks": pollDisks,
|
||||
"disks": pollDisksLegacy,
|
||||
|
||||
// we do not use a resource poller for the secure boot status, as we want to mark
|
||||
// secure boot explicitly to disabled (contrary to leaving it nil) if the feature is not available (i.e., older Talos versions).
|
||||
@ -314,6 +317,63 @@ func pollSecureBootStatus(ctx context.Context, c *client.Client, info *Info) err
|
||||
func pollDisks(ctx context.Context, c *client.Client, info *Info) error {
|
||||
info.Blockdevices = nil
|
||||
|
||||
systemDisk, err := safe.StateGetByID[*block.SystemDisk](ctx, c.COSI, block.SystemDiskID)
|
||||
if err != nil && !state.IsNotFoundError(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
return forEachResource(
|
||||
ctx,
|
||||
c,
|
||||
block.NamespaceName,
|
||||
block.DiskType,
|
||||
func(disk *block.Disk) error {
|
||||
if strings.HasPrefix(disk.TypedSpec().DevPath, "/dev/loop") {
|
||||
return nil
|
||||
}
|
||||
|
||||
spec := disk.TypedSpec()
|
||||
|
||||
var diskType storage.Disk_DiskType
|
||||
|
||||
switch {
|
||||
case spec.CDROM:
|
||||
diskType = storage.Disk_CD
|
||||
case spec.Transport == "nvme":
|
||||
diskType = storage.Disk_NVME
|
||||
case spec.Transport == "mmc":
|
||||
diskType = storage.Disk_SD
|
||||
case spec.Rotational:
|
||||
diskType = storage.Disk_HDD
|
||||
case spec.Transport != "":
|
||||
diskType = storage.Disk_SSD
|
||||
}
|
||||
|
||||
if diskType == storage.Disk_UNKNOWN && spec.Modalias == "" && spec.SubSystem != "/sys/class/block" {
|
||||
return nil
|
||||
}
|
||||
|
||||
info.Blockdevices = append(info.Blockdevices, &specs.MachineStatusSpec_HardwareStatus_BlockDevice{
|
||||
Size: spec.Size,
|
||||
Model: spec.Model,
|
||||
LinuxName: filepath.Join("/dev", disk.Metadata().ID()),
|
||||
Serial: spec.Serial,
|
||||
Uuid: spec.UUID,
|
||||
Wwid: spec.WWID,
|
||||
Type: diskType.String(),
|
||||
BusPath: spec.BusPath,
|
||||
SystemDisk: systemDisk != nil && disk.Metadata().ID() == systemDisk.TypedSpec().DiskID,
|
||||
Readonly: spec.Readonly,
|
||||
Transport: spec.Transport,
|
||||
})
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func pollDisksLegacy(ctx context.Context, c *client.Client, info *Info) error {
|
||||
info.Blockdevices = nil
|
||||
|
||||
disksResp, err := c.Disks(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@ -7,11 +7,13 @@ package omni
|
||||
|
||||
import (
|
||||
"context"
|
||||
"slices"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/controller"
|
||||
"github.com/cosi-project/runtime/pkg/controller/generic/qtransform"
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
"github.com/cosi-project/runtime/pkg/state"
|
||||
"github.com/siderolabs/gen/xslices"
|
||||
"github.com/siderolabs/talos/pkg/machinery/api/storage"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -69,7 +71,11 @@ func GenInstallConfig(machineStatus *omni.MachineStatus, clusterMachineTalosVers
|
||||
genOptions.TypedSpec().Value.InstallImage.TalosVersion = clusterMachineTalosVersion.TypedSpec().Value.TalosVersion
|
||||
genOptions.TypedSpec().Value.InstallImage.SchematicId = clusterMachineTalosVersion.TypedSpec().Value.SchematicId
|
||||
genOptions.TypedSpec().Value.InstallImage.SchematicInitialized = machineStatus.TypedSpec().Value.Schematic != nil
|
||||
genOptions.TypedSpec().Value.InstallImage.SchematicInvalid = machineStatus.TypedSpec().Value.GetSchematic().GetInvalid()
|
||||
|
||||
if genOptions.TypedSpec().Value.InstallImage.SchematicInitialized {
|
||||
genOptions.TypedSpec().Value.InstallImage.SchematicInvalid = machineStatus.TypedSpec().Value.GetSchematic().GetInvalid()
|
||||
}
|
||||
|
||||
genOptions.TypedSpec().Value.InstallImage.SecureBootStatus = machineStatus.TypedSpec().Value.SecureBootStatus
|
||||
}
|
||||
|
||||
@ -79,19 +85,33 @@ func GenInstallConfig(machineStatus *omni.MachineStatus, clusterMachineTalosVers
|
||||
|
||||
installDisk := omni.GetMachineStatusSystemDisk(machineStatus)
|
||||
|
||||
diskSize := ^uint64(0)
|
||||
|
||||
if installDisk == "" {
|
||||
for _, disk := range machineStatus.TypedSpec().Value.Hardware.Blockdevices {
|
||||
if disk.Readonly || disk.Type == storage.Disk_CD.String() {
|
||||
continue
|
||||
const transportUSB = "usb"
|
||||
|
||||
candidates := machineStatus.TypedSpec().Value.Hardware.Blockdevices
|
||||
|
||||
candidates = xslices.Filter(candidates, func(disk *specs.MachineStatusSpec_HardwareStatus_BlockDevice) bool {
|
||||
return !disk.Readonly && disk.Type != storage.Disk_CD.String() && disk.Size > installDiskMinSize
|
||||
})
|
||||
|
||||
sortFunc := func(a, b *specs.MachineStatusSpec_HardwareStatus_BlockDevice) int {
|
||||
if a.Transport == transportUSB && b.Transport != transportUSB {
|
||||
return 1
|
||||
} else if b.Transport == transportUSB && a.Transport != transportUSB {
|
||||
return -1
|
||||
}
|
||||
|
||||
if disk.Size >= installDiskMinSize && disk.Size < diskSize {
|
||||
installDisk = disk.LinuxName
|
||||
|
||||
diskSize = disk.Size
|
||||
if a.Size < b.Size {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
slices.SortFunc(candidates, sortFunc)
|
||||
|
||||
if len(candidates) > 0 {
|
||||
installDisk = candidates[0].LinuxName
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
// Copyright (c) 2025 Sidero Labs, Inc.
|
||||
//
|
||||
// Use of this software is governed by the Business Source License
|
||||
// included in the LICENSE file.
|
||||
|
||||
package omni_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/api/storage"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/siderolabs/omni/client/api/omni/specs"
|
||||
"github.com/siderolabs/omni/client/pkg/omni/resources"
|
||||
"github.com/siderolabs/omni/client/pkg/omni/resources/omni"
|
||||
omnictrl "github.com/siderolabs/omni/internal/backend/runtime/omni/controllers/omni"
|
||||
)
|
||||
|
||||
func TestGenInstallConfig(t *testing.T) {
|
||||
for _, tt := range []struct {
|
||||
name string
|
||||
talosVersion string
|
||||
machineStatusSpec *specs.MachineStatusSpec
|
||||
expectedInstallDisk string
|
||||
}{
|
||||
{
|
||||
name: "empty",
|
||||
},
|
||||
{
|
||||
name: "nohw",
|
||||
machineStatusSpec: &specs.MachineStatusSpec{},
|
||||
},
|
||||
{
|
||||
name: "single disk",
|
||||
machineStatusSpec: &specs.MachineStatusSpec{
|
||||
Hardware: &specs.MachineStatusSpec_HardwareStatus{
|
||||
Blockdevices: []*specs.MachineStatusSpec_HardwareStatus_BlockDevice{
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 8e9,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedInstallDisk: "/dev/sda",
|
||||
},
|
||||
{
|
||||
name: "not matched",
|
||||
machineStatusSpec: &specs.MachineStatusSpec{
|
||||
Hardware: &specs.MachineStatusSpec_HardwareStatus{
|
||||
Blockdevices: []*specs.MachineStatusSpec_HardwareStatus_BlockDevice{
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 4e9,
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 8e9,
|
||||
Type: storage.Disk_CD.String(),
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 4e9,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "matched not usb",
|
||||
machineStatusSpec: &specs.MachineStatusSpec{
|
||||
Hardware: &specs.MachineStatusSpec_HardwareStatus{
|
||||
Blockdevices: []*specs.MachineStatusSpec_HardwareStatus_BlockDevice{
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 8e9,
|
||||
Transport: "usb",
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sdb",
|
||||
Size: 10e9,
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sdc",
|
||||
Size: 14e9,
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sdf",
|
||||
Size: 7e9,
|
||||
Transport: "usb",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedInstallDisk: "/dev/sdb",
|
||||
},
|
||||
{
|
||||
name: "system disk",
|
||||
machineStatusSpec: &specs.MachineStatusSpec{
|
||||
Hardware: &specs.MachineStatusSpec_HardwareStatus{
|
||||
Blockdevices: []*specs.MachineStatusSpec_HardwareStatus_BlockDevice{
|
||||
{
|
||||
LinuxName: "/dev/sda",
|
||||
Size: 8e9,
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sdb",
|
||||
Size: 10e9,
|
||||
SystemDisk: true,
|
||||
},
|
||||
{
|
||||
LinuxName: "/dev/sdc",
|
||||
Size: 14e9,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedInstallDisk: "/dev/sdb",
|
||||
},
|
||||
} {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
ms := omni.NewMachineStatus(resources.DefaultNamespace, "id")
|
||||
|
||||
if tt.machineStatusSpec != nil {
|
||||
ms.TypedSpec().Value = tt.machineStatusSpec
|
||||
}
|
||||
|
||||
talosVersion := omni.NewClusterMachineTalosVersion(resources.DefaultNamespace, "id")
|
||||
talosVersion.TypedSpec().Value.TalosVersion = tt.talosVersion
|
||||
|
||||
genOptions := omni.NewMachineConfigGenOptions(resources.DefaultNamespace, "id")
|
||||
|
||||
omnictrl.GenInstallConfig(ms, talosVersion, genOptions)
|
||||
|
||||
assert.Equal(t, tt.expectedInstallDisk, genOptions.TypedSpec().Value.InstallDisk)
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user