mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-05 12:26:21 +02:00
refactor: make event log streaming fully reactive
I ended up completely rewriting the controller, simplifying the flow (somewhat) so that there's just a single control flow in the controller, while reading from v1alpha1 events is converted to reading from a channel. Fixes #7227 Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
aef2192a65
commit
e7be6ee7c3
@ -12,6 +12,11 @@ message DevicesStatusSpec {
|
||||
bool ready = 1;
|
||||
}
|
||||
|
||||
// EventSinkConfigSpec describes configuration of Talos event log streaming.
|
||||
message EventSinkConfigSpec {
|
||||
string endpoint = 1;
|
||||
}
|
||||
|
||||
// KernelModuleSpecSpec describes Linux kernel module to load.
|
||||
message KernelModuleSpecSpec {
|
||||
string name = 1;
|
||||
@ -31,7 +36,7 @@ message KernelParamStatusSpec {
|
||||
bool unsupported = 3;
|
||||
}
|
||||
|
||||
// KmsgLogConfigSpec describes status of the defined sysctls.
|
||||
// KmsgLogConfigSpec describes configuration for kmsg log streaming.
|
||||
message KmsgLogConfigSpec {
|
||||
repeated common.URL destinations = 1;
|
||||
}
|
||||
|
||||
@ -7,35 +7,32 @@ package runtime
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/controller"
|
||||
"github.com/cosi-project/runtime/pkg/resource"
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
"github.com/cosi-project/runtime/pkg/state"
|
||||
"github.com/rs/xid"
|
||||
"github.com/siderolabs/gen/channel"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/siderolabs/siderolink/api/events"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
|
||||
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
networkutils "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/network/utils"
|
||||
machinedruntime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/network"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/runtime"
|
||||
)
|
||||
|
||||
// EventsSinkController watches events and forwards them to the events sink server
|
||||
// if it's configured.
|
||||
type EventsSinkController struct {
|
||||
V1Alpha1Events runtime.Watcher
|
||||
Cmdline *procfs.Cmdline
|
||||
Drainer *runtime.Drainer
|
||||
V1Alpha1Events machinedruntime.Watcher
|
||||
Drainer *machinedruntime.Drainer
|
||||
|
||||
drainSub *runtime.DrainSubscription
|
||||
drain bool
|
||||
backlog atomic.Int32
|
||||
drainSub *machinedruntime.DrainSubscription
|
||||
eventID xid.ID
|
||||
}
|
||||
|
||||
@ -46,14 +43,7 @@ func (ctrl *EventsSinkController) Name() string {
|
||||
|
||||
// Inputs implements controller.Controller interface.
|
||||
func (ctrl *EventsSinkController) Inputs() []controller.Input {
|
||||
return []controller.Input{
|
||||
{
|
||||
Namespace: network.NamespaceName,
|
||||
Type: network.StatusType,
|
||||
ID: pointer.To(network.StatusID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Outputs implements controller.Controller interface.
|
||||
@ -63,131 +53,151 @@ func (ctrl *EventsSinkController) Outputs() []controller.Output {
|
||||
|
||||
// Run implements controller.Controller interface.
|
||||
//
|
||||
//nolint:gocyclo
|
||||
func (ctrl *EventsSinkController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) (err error) {
|
||||
if ctrl.Cmdline == nil || ctrl.Cmdline.Get(constants.KernelParamEventsSink).First() == nil {
|
||||
return nil
|
||||
}
|
||||
//nolint:gocyclo,cyclop
|
||||
func (ctrl *EventsSinkController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error {
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
if ctrl.drainSub == nil {
|
||||
ctrl.backlog.Store(-1)
|
||||
ctrl.drainSub = ctrl.Drainer.Subscribe()
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if ctrl.backlog.Load() == 0 {
|
||||
if ctrl.drainSub != nil {
|
||||
ctrl.drainSub.Cancel()
|
||||
}
|
||||
}()
|
||||
|
||||
if err := networkutils.WaitForNetworkReady(ctx, r,
|
||||
func(status *network.StatusSpec) bool {
|
||||
return status.AddressReady
|
||||
},
|
||||
[]controller.Input{
|
||||
{
|
||||
Namespace: runtime.NamespaceName,
|
||||
Type: runtime.EventSinkConfigType,
|
||||
ID: pointer.To(runtime.EventSinkConfigID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
},
|
||||
); err != nil {
|
||||
return fmt.Errorf("error waiting for network: %w", err)
|
||||
}
|
||||
|
||||
var (
|
||||
conn *grpc.ClientConn
|
||||
client events.EventSinkServiceClient
|
||||
watchCh, consumeWatchCh chan machinedruntime.EventInfo
|
||||
backlog int
|
||||
draining bool
|
||||
)
|
||||
|
||||
defer func() {
|
||||
if conn != nil {
|
||||
conn.Close() //nolint:errcheck
|
||||
}
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-r.EventCh():
|
||||
}
|
||||
|
||||
var netStatus resource.Resource
|
||||
|
||||
netStatus, err = r.Get(ctx, resource.NewMetadata(network.NamespaceName, network.StatusType, network.StatusID, resource.VersionUndefined))
|
||||
if err != nil {
|
||||
if state.IsNotFoundError(err) {
|
||||
// no network state yet
|
||||
continue
|
||||
}
|
||||
|
||||
return fmt.Errorf("error reading network status: %w", err)
|
||||
}
|
||||
|
||||
if !netStatus.(*network.Status).TypedSpec().AddressReady {
|
||||
// wait for address
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
errCh := make(chan error)
|
||||
|
||||
sink := ctrl.Cmdline.Get(constants.KernelParamEventsSink).First()
|
||||
|
||||
conn, err := grpc.DialContext(ctx, *sink, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer conn.Close() //nolint:errcheck
|
||||
|
||||
client := events.NewEventSinkServiceClient(conn)
|
||||
|
||||
opts := []runtime.WatchOptionFunc{}
|
||||
if ctrl.eventID.IsNil() {
|
||||
opts = append(opts, runtime.WithTailEvents(-1))
|
||||
} else {
|
||||
opts = append(opts, runtime.WithTailID(ctrl.eventID))
|
||||
}
|
||||
|
||||
if err = ctrl.V1Alpha1Events.Watch(func(eventCh <-chan runtime.EventInfo) {
|
||||
errCh <- ctrl.handleEvents(ctx, eventCh, client)
|
||||
}, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = <-errCh
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
//nolint:gocyclo
|
||||
func (ctrl *EventsSinkController) handleEvents(ctx context.Context, eventCh <-chan runtime.EventInfo, client events.EventSinkServiceClient) error {
|
||||
for {
|
||||
var (
|
||||
event runtime.EventInfo
|
||||
ok bool
|
||||
data *anypb.Any
|
||||
err error
|
||||
)
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case event, ok = <-eventCh:
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
case <-ctrl.drainSub.EventCh():
|
||||
backlog := ctrl.backlog.Load()
|
||||
// drain started, return immediately if there's no backlog
|
||||
draining = true
|
||||
|
||||
if backlog == 0 {
|
||||
return nil
|
||||
}
|
||||
case event := <-consumeWatchCh:
|
||||
// if consumeWatchCh is not nil, client connection was established
|
||||
backlog = event.Backlog
|
||||
|
||||
ctrl.drain = true
|
||||
data, err := anypb.New(event.Payload)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
req := &events.EventRequest{
|
||||
Id: event.ID.String(),
|
||||
Data: data,
|
||||
}
|
||||
|
||||
ctrl.backlog.Store(int32(event.Backlog))
|
||||
_, err = client.Publish(ctx, req)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error publishing event: %w", err)
|
||||
}
|
||||
|
||||
data, err = anypb.New(event.Payload)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// adjust last consumed event
|
||||
ctrl.eventID = event.ID
|
||||
|
||||
req := &events.EventRequest{
|
||||
Id: event.ID.String(),
|
||||
Data: data,
|
||||
}
|
||||
// if draining and backlog is 0, return immediately
|
||||
if draining && backlog == 0 {
|
||||
return nil
|
||||
}
|
||||
case <-r.EventCh():
|
||||
// configuration changed, re-establish connection
|
||||
cfg, err := safe.ReaderGetByID[*runtime.EventSinkConfig](ctx, r, runtime.EventSinkConfigID)
|
||||
if err != nil && !state.IsNotFoundError(err) {
|
||||
return fmt.Errorf("error getting event sink config: %w", err)
|
||||
}
|
||||
|
||||
_, err = client.Publish(ctx, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if conn != nil {
|
||||
logger.Debug("closing connection to event sink")
|
||||
|
||||
ctrl.eventID = event.ID
|
||||
conn.Close() //nolint:errcheck
|
||||
conn = nil
|
||||
client = nil
|
||||
consumeWatchCh = nil // stop consuming events
|
||||
backlog = 0
|
||||
}
|
||||
|
||||
if ctrl.drain && event.Backlog == 0 {
|
||||
return nil
|
||||
if cfg == nil {
|
||||
// no config, no event streaming
|
||||
continue
|
||||
}
|
||||
|
||||
// establish connection
|
||||
logger.Debug("establishing connection to event sink", zap.String("endpoint", cfg.TypedSpec().Endpoint))
|
||||
|
||||
conn, err = grpc.DialContext(ctx, cfg.TypedSpec().Endpoint, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error establishing connection to event sink: %w", err)
|
||||
}
|
||||
|
||||
client = events.NewEventSinkServiceClient(conn)
|
||||
|
||||
// start watching events if we haven't already done so
|
||||
//
|
||||
// watch is only established with the first live connection to make sure we don't miss any events
|
||||
if watchCh == nil {
|
||||
watchCh = make(chan machinedruntime.EventInfo)
|
||||
|
||||
opts := []machinedruntime.WatchOptionFunc{}
|
||||
if ctrl.eventID.IsNil() {
|
||||
opts = append(opts, machinedruntime.WithTailEvents(-1))
|
||||
} else {
|
||||
opts = append(opts, machinedruntime.WithTailID(ctrl.eventID))
|
||||
}
|
||||
|
||||
// Watch returns immediately, setting up a goroutine which will copy events to `watchCh`
|
||||
if err = ctrl.V1Alpha1Events.Watch(func(eventCh <-chan machinedruntime.EventInfo) {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case event := <-eventCh:
|
||||
if !channel.SendWithContext(ctx, watchCh, event) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
consumeWatchCh = watchCh
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,81 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/controller"
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
"github.com/cosi-project/runtime/pkg/state"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/runtime"
|
||||
)
|
||||
|
||||
// EventsSinkConfigController generates configuration for kmsg log delivery.
|
||||
type EventsSinkConfigController struct {
|
||||
Cmdline *procfs.Cmdline
|
||||
}
|
||||
|
||||
// Name implements controller.Controller interface.
|
||||
func (ctrl *EventsSinkConfigController) Name() string {
|
||||
return "runtime.EventsSinkConfigController"
|
||||
}
|
||||
|
||||
// Inputs implements controller.Controller interface.
|
||||
func (ctrl *EventsSinkConfigController) Inputs() []controller.Input {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Outputs implements controller.Controller interface.
|
||||
func (ctrl *EventsSinkConfigController) Outputs() []controller.Output {
|
||||
return []controller.Output{
|
||||
{
|
||||
Type: runtime.EventSinkConfigType,
|
||||
Kind: controller.OutputExclusive,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Run implements controller.Controller interface.
|
||||
//
|
||||
//nolint:gocyclo,cyclop
|
||||
func (ctrl *EventsSinkConfigController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) (err error) {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-r.EventCh():
|
||||
}
|
||||
|
||||
var endpoint string
|
||||
|
||||
if ctrl.Cmdline != nil {
|
||||
if val := ctrl.Cmdline.Get(constants.KernelParamEventsSink).First(); val != nil {
|
||||
endpoint = *val
|
||||
}
|
||||
}
|
||||
|
||||
if endpoint == "" {
|
||||
if err := r.Destroy(ctx, runtime.NewEventSinkConfig().Metadata()); err != nil && !state.IsNotFoundError(err) {
|
||||
return fmt.Errorf("error destroying event sink config: %w", err)
|
||||
}
|
||||
} else {
|
||||
if err := safe.WriterModify(ctx, r, runtime.NewEventSinkConfig(), func(cfg *runtime.EventSinkConfig) error {
|
||||
cfg.TypedSpec().Endpoint = endpoint
|
||||
|
||||
return nil
|
||||
}); err != nil {
|
||||
return fmt.Errorf("error updating kmsg log config: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
r.ResetRestartBackoff()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package runtime_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/resource"
|
||||
"github.com/cosi-project/runtime/pkg/resource/rtestutils"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/siderolabs/talos/internal/app/machined/pkg/controllers/ctest"
|
||||
runtimectrls "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/runtime"
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/runtime"
|
||||
)
|
||||
|
||||
type EventsSinkConfigSuite struct {
|
||||
ctest.DefaultSuite
|
||||
}
|
||||
|
||||
func TestEventsSinkConfigSuite(t *testing.T) {
|
||||
suite.Run(t, new(EventsSinkConfigSuite))
|
||||
}
|
||||
|
||||
func (suite *EventsSinkConfigSuite) TestEventSinkConfigNone() {
|
||||
suite.Require().NoError(suite.Runtime().RegisterController(&runtimectrls.EventsSinkConfigController{}))
|
||||
|
||||
rtestutils.AssertNoResource[*runtime.EventSinkConfig](suite.Ctx(), suite.T(), suite.State(), runtime.EventSinkConfigID)
|
||||
}
|
||||
|
||||
func (suite *EventsSinkConfigSuite) TestEventSinkConfigCmdline() {
|
||||
cmdline := procfs.NewCmdline("")
|
||||
cmdline.Append(constants.KernelParamEventsSink, "10.0.0.1:3333")
|
||||
|
||||
suite.Require().NoError(suite.Runtime().RegisterController(&runtimectrls.EventsSinkConfigController{
|
||||
Cmdline: cmdline,
|
||||
}))
|
||||
|
||||
rtestutils.AssertResources[*runtime.EventSinkConfig](suite.Ctx(), suite.T(), suite.State(), []resource.ID{runtime.EventSinkConfigID},
|
||||
func(cfg *runtime.EventSinkConfig, asrt *assert.Assertions) {
|
||||
asrt.Equal(
|
||||
"10.0.0.1:3333",
|
||||
cfg.TypedSpec().Endpoint,
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -6,33 +6,31 @@ package runtime_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/controller/runtime"
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
"github.com/cosi-project/runtime/pkg/state"
|
||||
"github.com/cosi-project/runtime/pkg/state/impl/inmem"
|
||||
"github.com/cosi-project/runtime/pkg/state/impl/namespaced"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
eventsapi "github.com/siderolabs/siderolink/api/events"
|
||||
"github.com/siderolabs/siderolink/pkg/events"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.uber.org/zap/zaptest"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
controllerruntime "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/runtime"
|
||||
talosruntime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
|
||||
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime/v1alpha1"
|
||||
"github.com/siderolabs/talos/pkg/logging"
|
||||
"github.com/siderolabs/talos/pkg/machinery/api/machine"
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/proto"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/network"
|
||||
runtimeres "github.com/siderolabs/talos/pkg/machinery/resources/runtime"
|
||||
)
|
||||
|
||||
type handler struct {
|
||||
@ -56,7 +54,6 @@ type EventsSinkSuite struct {
|
||||
events *v1alpha1.Events
|
||||
state state.State
|
||||
handler *handler
|
||||
cmdline *procfs.Cmdline
|
||||
server *grpc.Server
|
||||
sink *events.Sink
|
||||
|
||||
@ -78,23 +75,26 @@ func (suite *EventsSinkSuite) SetupTest() {
|
||||
|
||||
var err error
|
||||
|
||||
suite.runtime, err = runtime.NewRuntime(suite.state, logging.Wrap(log.Writer()))
|
||||
suite.runtime, err = runtime.NewRuntime(suite.state, zaptest.NewLogger(suite.T()))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
suite.handler = &handler{}
|
||||
suite.cmdline = procfs.NewCmdline(fmt.Sprintf("%s=%s", constants.KernelParamEventsSink, "localhost"))
|
||||
suite.drainer = talosruntime.NewDrainer()
|
||||
|
||||
suite.Require().NoError(
|
||||
suite.runtime.RegisterController(
|
||||
&controllerruntime.EventsSinkController{
|
||||
V1Alpha1Events: suite.events,
|
||||
Cmdline: suite.cmdline,
|
||||
Drainer: suite.drainer,
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
status := network.NewStatus(network.NamespaceName, network.StatusID)
|
||||
status.TypedSpec().AddressReady = true
|
||||
|
||||
suite.Require().NoError(suite.state.Create(suite.ctx, status))
|
||||
|
||||
suite.startRuntime()
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ func (suite *EventsSinkSuite) startRuntime() {
|
||||
}()
|
||||
}
|
||||
|
||||
func (suite *EventsSinkSuite) startServer(ctx context.Context) {
|
||||
func (suite *EventsSinkSuite) startServer(ctx context.Context) string {
|
||||
suite.sink = events.NewSink(
|
||||
suite.handler,
|
||||
[]proto.Message{
|
||||
@ -116,18 +116,9 @@ func (suite *EventsSinkSuite) startServer(ctx context.Context) {
|
||||
&machine.PhaseEvent{},
|
||||
})
|
||||
|
||||
status := network.NewStatus(network.NamespaceName, network.StatusID)
|
||||
status.TypedSpec().AddressReady = true
|
||||
|
||||
suite.Require().NoError(suite.state.Create(ctx, status))
|
||||
|
||||
lis, err := net.Listen("tcp", "localhost:0")
|
||||
suite.Require().NoError(err)
|
||||
|
||||
param := procfs.NewParameter(constants.KernelParamEventsSink)
|
||||
param.Append(lis.Addr().String())
|
||||
|
||||
suite.cmdline.Set(constants.KernelParamEventsSink, param)
|
||||
suite.server = grpc.NewServer()
|
||||
eventsapi.RegisterEventSinkServiceServer(suite.server, suite.sink)
|
||||
|
||||
@ -146,6 +137,8 @@ func (suite *EventsSinkSuite) startServer(ctx context.Context) {
|
||||
return suite.server.Serve(lis)
|
||||
},
|
||||
)
|
||||
|
||||
return lis.Addr().String()
|
||||
}
|
||||
|
||||
func (suite *EventsSinkSuite) TestPublish() {
|
||||
@ -169,21 +162,44 @@ func (suite *EventsSinkSuite) TestPublish() {
|
||||
|
||||
suite.Require().Equal(0, len(suite.handler.events))
|
||||
|
||||
suite.startServer(ctx)
|
||||
endpoint := suite.startServer(ctx)
|
||||
config := runtimeres.NewEventSinkConfig()
|
||||
config.TypedSpec().Endpoint = endpoint
|
||||
suite.Require().NoError(suite.state.Create(ctx, config))
|
||||
|
||||
err := retry.Constant(time.Second*5, retry.WithUnits(time.Millisecond*100)).Retry(
|
||||
suite.Require().NoError(retry.Constant(time.Second*5, retry.WithUnits(time.Millisecond*100)).Retry(
|
||||
func() error {
|
||||
suite.handler.eventsMu.Lock()
|
||||
defer suite.handler.eventsMu.Unlock()
|
||||
|
||||
if len(suite.handler.events) != 2 {
|
||||
return retry.ExpectedErrorf("expected 2 events")
|
||||
return retry.ExpectedErrorf("expected 2 events, got %d", len(suite.handler.events))
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
))
|
||||
|
||||
suite.events.Publish(
|
||||
ctx,
|
||||
&machine.PhaseEvent{
|
||||
Phase: "test",
|
||||
Action: machine.PhaseEvent_STOP,
|
||||
},
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
suite.Require().NoError(retry.Constant(time.Second*5, retry.WithUnits(time.Millisecond*100)).Retry(
|
||||
func() error {
|
||||
suite.handler.eventsMu.Lock()
|
||||
defer suite.handler.eventsMu.Unlock()
|
||||
|
||||
if len(suite.handler.events) != 3 {
|
||||
return retry.ExpectedErrorf("expected 3 events, got %d", len(suite.handler.events))
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
func (suite *EventsSinkSuite) TestDrain() {
|
||||
@ -209,30 +225,56 @@ func (suite *EventsSinkSuite) TestDrain() {
|
||||
|
||||
suite.Require().Equal(0, len(suite.handler.events))
|
||||
|
||||
// first, publish wrong endpoint
|
||||
badLis, err := net.Listen("tcp", "localhost:0")
|
||||
suite.Require().NoError(err)
|
||||
|
||||
badEndpoint := badLis.Addr().String()
|
||||
suite.Require().NoError(badLis.Close())
|
||||
|
||||
config := runtimeres.NewEventSinkConfig()
|
||||
config.TypedSpec().Endpoint = badEndpoint
|
||||
suite.Require().NoError(suite.state.Create(ctx, config))
|
||||
|
||||
suite.T().Logf("%s starting bad server at %s", time.Now().Format(time.RFC3339), badEndpoint)
|
||||
|
||||
time.Sleep(time.Second * 1)
|
||||
|
||||
c, abort := context.WithTimeout(context.Background(), time.Second*5)
|
||||
defer abort()
|
||||
drainCtx, drainCtxCancel := context.WithTimeout(ctx, time.Second*5)
|
||||
defer drainCtxCancel()
|
||||
|
||||
var eg errgroup.Group
|
||||
|
||||
eg.Go(
|
||||
func() error {
|
||||
return suite.drainer.Drain(c)
|
||||
suite.T().Logf("%s starting drain", time.Now().Format(time.RFC3339))
|
||||
|
||||
return suite.drainer.Drain(drainCtx)
|
||||
},
|
||||
)
|
||||
|
||||
eg.Go(
|
||||
func() error {
|
||||
time.Sleep(time.Millisecond * 300)
|
||||
// start real server with delay
|
||||
time.Sleep(300 * time.Millisecond)
|
||||
|
||||
suite.startServer(ctx)
|
||||
endpoint := suite.startServer(ctx)
|
||||
|
||||
return nil
|
||||
suite.T().Logf("%s starting real server at %s", time.Now().Format(time.RFC3339), endpoint)
|
||||
|
||||
_, updateErr := safe.StateUpdateWithConflicts(
|
||||
ctx, suite.state, runtimeres.NewEventSinkConfig().Metadata(),
|
||||
func(cfg *runtimeres.EventSinkConfig) error {
|
||||
cfg.TypedSpec().Endpoint = endpoint
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
return updateErr
|
||||
},
|
||||
)
|
||||
|
||||
err := retry.Constant(time.Second*5, retry.WithUnits(time.Millisecond*100)).Retry(
|
||||
suite.Require().NoError(retry.Constant(time.Second*5, retry.WithUnits(time.Millisecond*100)).Retry(
|
||||
func() error {
|
||||
suite.handler.eventsMu.Lock()
|
||||
defer suite.handler.eventsMu.Unlock()
|
||||
@ -243,8 +285,7 @@ func (suite *EventsSinkSuite) TestDrain() {
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
))
|
||||
|
||||
suite.Require().NoError(eg.Wait())
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ import (
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
networkutils "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/network/utils"
|
||||
"github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
"github.com/siderolabs/talos/pkg/machinery/resources/config"
|
||||
@ -110,62 +111,29 @@ func parseAPIEndpoint(sideroLinkParam string) (apiEndpoint, error) {
|
||||
//nolint:gocyclo,cyclop
|
||||
func (ctrl *ManagerController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error {
|
||||
// initially, wait for the network address status to be ready
|
||||
if err := r.UpdateInputs([]controller.Input{
|
||||
{
|
||||
Namespace: network.NamespaceName,
|
||||
Type: network.StatusType,
|
||||
ID: pointer.To(network.StatusID),
|
||||
Kind: controller.InputWeak,
|
||||
if err := networkutils.WaitForNetworkReady(ctx, r,
|
||||
func(status *network.StatusSpec) bool {
|
||||
return status.AddressReady
|
||||
},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-r.EventCh():
|
||||
}
|
||||
|
||||
netStatus, err := safe.ReaderGet[*network.Status](ctx, r, network.NewStatus(network.NamespaceName, network.StatusID).Metadata())
|
||||
if err != nil {
|
||||
if state.IsNotFoundError(err) {
|
||||
// no network state yet
|
||||
continue
|
||||
}
|
||||
|
||||
return fmt.Errorf("error reading network status: %w", err)
|
||||
}
|
||||
|
||||
if !netStatus.TypedSpec().AddressReady {
|
||||
// wait for address
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
[]controller.Input{
|
||||
{
|
||||
Namespace: config.NamespaceName,
|
||||
Type: siderolink.ConfigType,
|
||||
ID: pointer.To(siderolink.ConfigID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
{
|
||||
Namespace: hardware.NamespaceName,
|
||||
Type: hardware.SystemInformationType,
|
||||
ID: pointer.To(hardware.SystemInformationID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
},
|
||||
); err != nil {
|
||||
return fmt.Errorf("error waiting for network: %w", err)
|
||||
}
|
||||
|
||||
// normal reconcile loop
|
||||
if err := r.UpdateInputs([]controller.Input{
|
||||
{
|
||||
Namespace: config.NamespaceName,
|
||||
Type: siderolink.ConfigType,
|
||||
ID: pointer.To(siderolink.ConfigID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
{
|
||||
Namespace: hardware.NamespaceName,
|
||||
Type: hardware.SystemInformationType,
|
||||
ID: pointer.To(hardware.SystemInformationID),
|
||||
Kind: controller.InputWeak,
|
||||
},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r.QueueReconcile()
|
||||
|
||||
wgClient, wgClientErr := wgctrl.New()
|
||||
if wgClientErr != nil {
|
||||
return wgClientErr
|
||||
|
||||
@ -217,9 +217,11 @@ func (ctrl *Controller) Run(ctx context.Context, drainer *runtime.Drainer) error
|
||||
&runtimecontrollers.DevicesStatusController{
|
||||
V1Alpha1Mode: ctrl.v1alpha1Runtime.State().Platform().Mode(),
|
||||
},
|
||||
&runtimecontrollers.EventsSinkConfigController{
|
||||
Cmdline: procfs.ProcCmdline(),
|
||||
},
|
||||
&runtimecontrollers.EventsSinkController{
|
||||
V1Alpha1Events: ctrl.v1alpha1Runtime.Events(),
|
||||
Cmdline: procfs.ProcCmdline(),
|
||||
Drainer: drainer,
|
||||
},
|
||||
&runtimecontrollers.ExtensionServiceController{
|
||||
|
||||
@ -165,6 +165,7 @@ func NewState() (*State, error) {
|
||||
&perf.CPU{},
|
||||
&perf.Memory{},
|
||||
&runtime.DevicesStatus{},
|
||||
&runtime.EventSinkConfig{},
|
||||
&runtime.ExtensionStatus{},
|
||||
&runtime.KernelModuleSpec{},
|
||||
&runtime.KernelParamSpec{},
|
||||
|
||||
@ -72,6 +72,54 @@ func (x *DevicesStatusSpec) GetReady() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// EventSinkConfigSpec describes configuration of Talos event log streaming.
|
||||
type EventSinkConfigSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EventSinkConfigSpec) Reset() {
|
||||
*x = EventSinkConfigSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EventSinkConfigSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EventSinkConfigSpec) ProtoMessage() {}
|
||||
|
||||
func (x *EventSinkConfigSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[1]
|
||||
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 EventSinkConfigSpec.ProtoReflect.Descriptor instead.
|
||||
func (*EventSinkConfigSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *EventSinkConfigSpec) GetEndpoint() string {
|
||||
if x != nil {
|
||||
return x.Endpoint
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// KernelModuleSpecSpec describes Linux kernel module to load.
|
||||
type KernelModuleSpecSpec struct {
|
||||
state protoimpl.MessageState
|
||||
@ -85,7 +133,7 @@ type KernelModuleSpecSpec struct {
|
||||
func (x *KernelModuleSpecSpec) Reset() {
|
||||
*x = KernelModuleSpecSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[1]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -98,7 +146,7 @@ func (x *KernelModuleSpecSpec) String() string {
|
||||
func (*KernelModuleSpecSpec) ProtoMessage() {}
|
||||
|
||||
func (x *KernelModuleSpecSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[1]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -111,7 +159,7 @@ func (x *KernelModuleSpecSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use KernelModuleSpecSpec.ProtoReflect.Descriptor instead.
|
||||
func (*KernelModuleSpecSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{1}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *KernelModuleSpecSpec) GetName() string {
|
||||
@ -141,7 +189,7 @@ type KernelParamSpecSpec struct {
|
||||
func (x *KernelParamSpecSpec) Reset() {
|
||||
*x = KernelParamSpecSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[2]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -154,7 +202,7 @@ func (x *KernelParamSpecSpec) String() string {
|
||||
func (*KernelParamSpecSpec) ProtoMessage() {}
|
||||
|
||||
func (x *KernelParamSpecSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[2]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -167,7 +215,7 @@ func (x *KernelParamSpecSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use KernelParamSpecSpec.ProtoReflect.Descriptor instead.
|
||||
func (*KernelParamSpecSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{2}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *KernelParamSpecSpec) GetValue() string {
|
||||
@ -198,7 +246,7 @@ type KernelParamStatusSpec struct {
|
||||
func (x *KernelParamStatusSpec) Reset() {
|
||||
*x = KernelParamStatusSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[3]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -211,7 +259,7 @@ func (x *KernelParamStatusSpec) String() string {
|
||||
func (*KernelParamStatusSpec) ProtoMessage() {}
|
||||
|
||||
func (x *KernelParamStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[3]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -224,7 +272,7 @@ func (x *KernelParamStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use KernelParamStatusSpec.ProtoReflect.Descriptor instead.
|
||||
func (*KernelParamStatusSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{3}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *KernelParamStatusSpec) GetCurrent() string {
|
||||
@ -248,7 +296,7 @@ func (x *KernelParamStatusSpec) GetUnsupported() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// KmsgLogConfigSpec describes status of the defined sysctls.
|
||||
// KmsgLogConfigSpec describes configuration for kmsg log streaming.
|
||||
type KmsgLogConfigSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -260,7 +308,7 @@ type KmsgLogConfigSpec struct {
|
||||
func (x *KmsgLogConfigSpec) Reset() {
|
||||
*x = KmsgLogConfigSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[4]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -273,7 +321,7 @@ func (x *KmsgLogConfigSpec) String() string {
|
||||
func (*KmsgLogConfigSpec) ProtoMessage() {}
|
||||
|
||||
func (x *KmsgLogConfigSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[4]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -286,7 +334,7 @@ func (x *KmsgLogConfigSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use KmsgLogConfigSpec.ProtoReflect.Descriptor instead.
|
||||
func (*KmsgLogConfigSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{4}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *KmsgLogConfigSpec) GetDestinations() []*common.URL {
|
||||
@ -309,7 +357,7 @@ type MachineStatusSpec struct {
|
||||
func (x *MachineStatusSpec) Reset() {
|
||||
*x = MachineStatusSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[5]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -322,7 +370,7 @@ func (x *MachineStatusSpec) String() string {
|
||||
func (*MachineStatusSpec) ProtoMessage() {}
|
||||
|
||||
func (x *MachineStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[5]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -335,7 +383,7 @@ func (x *MachineStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MachineStatusSpec.ProtoReflect.Descriptor instead.
|
||||
func (*MachineStatusSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{5}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *MachineStatusSpec) GetStage() enums.RuntimeMachineStage {
|
||||
@ -365,7 +413,7 @@ type MachineStatusStatus struct {
|
||||
func (x *MachineStatusStatus) Reset() {
|
||||
*x = MachineStatusStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[6]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -378,7 +426,7 @@ func (x *MachineStatusStatus) String() string {
|
||||
func (*MachineStatusStatus) ProtoMessage() {}
|
||||
|
||||
func (x *MachineStatusStatus) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[6]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -391,7 +439,7 @@ func (x *MachineStatusStatus) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MachineStatusStatus.ProtoReflect.Descriptor instead.
|
||||
func (*MachineStatusStatus) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{6}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MachineStatusStatus) GetReady() bool {
|
||||
@ -420,7 +468,7 @@ type MetaKeySpec struct {
|
||||
func (x *MetaKeySpec) Reset() {
|
||||
*x = MetaKeySpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[7]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -433,7 +481,7 @@ func (x *MetaKeySpec) String() string {
|
||||
func (*MetaKeySpec) ProtoMessage() {}
|
||||
|
||||
func (x *MetaKeySpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[7]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -446,7 +494,7 @@ func (x *MetaKeySpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MetaKeySpec.ProtoReflect.Descriptor instead.
|
||||
func (*MetaKeySpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{7}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *MetaKeySpec) GetValue() string {
|
||||
@ -471,7 +519,7 @@ type MountStatusSpec struct {
|
||||
func (x *MountStatusSpec) Reset() {
|
||||
*x = MountStatusSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[8]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -484,7 +532,7 @@ func (x *MountStatusSpec) String() string {
|
||||
func (*MountStatusSpec) ProtoMessage() {}
|
||||
|
||||
func (x *MountStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[8]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -497,7 +545,7 @@ func (x *MountStatusSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MountStatusSpec.ProtoReflect.Descriptor instead.
|
||||
func (*MountStatusSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{8}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *MountStatusSpec) GetSource() string {
|
||||
@ -547,7 +595,7 @@ type PlatformMetadataSpec struct {
|
||||
func (x *PlatformMetadataSpec) Reset() {
|
||||
*x = PlatformMetadataSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[9]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -560,7 +608,7 @@ func (x *PlatformMetadataSpec) String() string {
|
||||
func (*PlatformMetadataSpec) ProtoMessage() {}
|
||||
|
||||
func (x *PlatformMetadataSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[9]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -573,7 +621,7 @@ func (x *PlatformMetadataSpec) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PlatformMetadataSpec.ProtoReflect.Descriptor instead.
|
||||
func (*PlatformMetadataSpec) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{9}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *PlatformMetadataSpec) GetPlatform() string {
|
||||
@ -645,7 +693,7 @@ type UnmetCondition struct {
|
||||
func (x *UnmetCondition) Reset() {
|
||||
*x = UnmetCondition{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[10]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -658,7 +706,7 @@ func (x *UnmetCondition) String() string {
|
||||
func (*UnmetCondition) ProtoMessage() {}
|
||||
|
||||
func (x *UnmetCondition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[10]
|
||||
mi := &file_resource_definitions_runtime_runtime_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -671,7 +719,7 @@ func (x *UnmetCondition) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnmetCondition.ProtoReflect.Descriptor instead.
|
||||
func (*UnmetCondition) Descriptor() ([]byte, []int) {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{10}
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UnmetCondition) GetName() string {
|
||||
@ -702,84 +750,87 @@ var file_resource_definitions_runtime_runtime_proto_rawDesc = []byte{
|
||||
0x73, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a,
|
||||
0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70,
|
||||
0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x4a, 0x0a, 0x14, 0x4b, 0x65, 0x72, 0x6e,
|
||||
0x65, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x53, 0x70, 0x65, 0x63,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
|
||||
0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
|
||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x6d, 0x0a, 0x15, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66,
|
||||
0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0x44, 0x0a, 0x11, 0x4b, 0x6d, 0x73, 0x67, 0x4c, 0x6f, 0x67,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x0c, 0x64, 0x65,
|
||||
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0b, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x52, 0x4c, 0x52, 0x0c, 0x64,
|
||||
0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x11,
|
||||
0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70, 0x65,
|
||||
0x63, 0x12, 0x4b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x35, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x65, 0x6e,
|
||||
0x75, 0x6d, 0x73, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69,
|
||||
0x6e, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x4f,
|
||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37,
|
||||
0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
|
||||
0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x75, 0x6e, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
|
||||
0x8a, 0x01, 0x0a, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x5d, 0x0a,
|
||||
0x10, 0x75, 0x6e, 0x6d, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x55, 0x6e, 0x6d,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x75, 0x6e, 0x6d,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x23, 0x0a, 0x0b,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x22, 0x84, 0x01, 0x0a, 0x0f, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x14, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x70, 0x65,
|
||||
0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x73, 0x70, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x70, 0x6f, 0x74,
|
||||
0x22, 0x3c, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x4c,
|
||||
0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x64,
|
||||
0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2f, 0x70, 0x6b,
|
||||
0x67, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x31, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x53, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x14, 0x4b,
|
||||
0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x53,
|
||||
0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x4b, 0x65, 0x72, 0x6e, 0x65,
|
||||
0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x67, 0x6e,
|
||||
0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x6d, 0x0a, 0x15, 0x4b, 0x65, 0x72,
|
||||
0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70,
|
||||
0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64,
|
||||
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x73,
|
||||
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0x44, 0x0a, 0x11, 0x4b, 0x6d, 0x73, 0x67,
|
||||
0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a,
|
||||
0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x52, 0x4c,
|
||||
0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb1,
|
||||
0x01, 0x0a, 0x11, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x53, 0x70, 0x65, 0x63, 0x12, 0x4b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x61,
|
||||
0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67,
|
||||
0x65, 0x12, 0x4f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x37, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72,
|
||||
0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65,
|
||||
0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79,
|
||||
0x12, 0x5d, 0x0a, 0x10, 0x75, 0x6e, 0x6d, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x61, 0x6c,
|
||||
0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x64, 0x65, 0x66, 0x69,
|
||||
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x55, 0x6e, 0x6d, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f,
|
||||
0x75, 0x6e, 0x6d, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
|
||||
0x23, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x0f, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x14,
|
||||
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a,
|
||||
0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f,
|
||||
0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x73, 0x70, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73,
|
||||
0x70, 0x6f, 0x74, 0x22, 0x3c, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61,
|
||||
0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f,
|
||||
0x6e, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73,
|
||||
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x64, 0x65, 0x66, 0x69,
|
||||
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -794,27 +845,28 @@ func file_resource_definitions_runtime_runtime_proto_rawDescGZIP() []byte {
|
||||
return file_resource_definitions_runtime_runtime_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_resource_definitions_runtime_runtime_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_resource_definitions_runtime_runtime_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_resource_definitions_runtime_runtime_proto_goTypes = []interface{}{
|
||||
(*DevicesStatusSpec)(nil), // 0: talos.resource.definitions.runtime.DevicesStatusSpec
|
||||
(*KernelModuleSpecSpec)(nil), // 1: talos.resource.definitions.runtime.KernelModuleSpecSpec
|
||||
(*KernelParamSpecSpec)(nil), // 2: talos.resource.definitions.runtime.KernelParamSpecSpec
|
||||
(*KernelParamStatusSpec)(nil), // 3: talos.resource.definitions.runtime.KernelParamStatusSpec
|
||||
(*KmsgLogConfigSpec)(nil), // 4: talos.resource.definitions.runtime.KmsgLogConfigSpec
|
||||
(*MachineStatusSpec)(nil), // 5: talos.resource.definitions.runtime.MachineStatusSpec
|
||||
(*MachineStatusStatus)(nil), // 6: talos.resource.definitions.runtime.MachineStatusStatus
|
||||
(*MetaKeySpec)(nil), // 7: talos.resource.definitions.runtime.MetaKeySpec
|
||||
(*MountStatusSpec)(nil), // 8: talos.resource.definitions.runtime.MountStatusSpec
|
||||
(*PlatformMetadataSpec)(nil), // 9: talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
(*UnmetCondition)(nil), // 10: talos.resource.definitions.runtime.UnmetCondition
|
||||
(*common.URL)(nil), // 11: common.URL
|
||||
(enums.RuntimeMachineStage)(0), // 12: talos.resource.definitions.enums.RuntimeMachineStage
|
||||
(*EventSinkConfigSpec)(nil), // 1: talos.resource.definitions.runtime.EventSinkConfigSpec
|
||||
(*KernelModuleSpecSpec)(nil), // 2: talos.resource.definitions.runtime.KernelModuleSpecSpec
|
||||
(*KernelParamSpecSpec)(nil), // 3: talos.resource.definitions.runtime.KernelParamSpecSpec
|
||||
(*KernelParamStatusSpec)(nil), // 4: talos.resource.definitions.runtime.KernelParamStatusSpec
|
||||
(*KmsgLogConfigSpec)(nil), // 5: talos.resource.definitions.runtime.KmsgLogConfigSpec
|
||||
(*MachineStatusSpec)(nil), // 6: talos.resource.definitions.runtime.MachineStatusSpec
|
||||
(*MachineStatusStatus)(nil), // 7: talos.resource.definitions.runtime.MachineStatusStatus
|
||||
(*MetaKeySpec)(nil), // 8: talos.resource.definitions.runtime.MetaKeySpec
|
||||
(*MountStatusSpec)(nil), // 9: talos.resource.definitions.runtime.MountStatusSpec
|
||||
(*PlatformMetadataSpec)(nil), // 10: talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
(*UnmetCondition)(nil), // 11: talos.resource.definitions.runtime.UnmetCondition
|
||||
(*common.URL)(nil), // 12: common.URL
|
||||
(enums.RuntimeMachineStage)(0), // 13: talos.resource.definitions.enums.RuntimeMachineStage
|
||||
}
|
||||
var file_resource_definitions_runtime_runtime_proto_depIdxs = []int32{
|
||||
11, // 0: talos.resource.definitions.runtime.KmsgLogConfigSpec.destinations:type_name -> common.URL
|
||||
12, // 1: talos.resource.definitions.runtime.MachineStatusSpec.stage:type_name -> talos.resource.definitions.enums.RuntimeMachineStage
|
||||
6, // 2: talos.resource.definitions.runtime.MachineStatusSpec.status:type_name -> talos.resource.definitions.runtime.MachineStatusStatus
|
||||
10, // 3: talos.resource.definitions.runtime.MachineStatusStatus.unmet_conditions:type_name -> talos.resource.definitions.runtime.UnmetCondition
|
||||
12, // 0: talos.resource.definitions.runtime.KmsgLogConfigSpec.destinations:type_name -> common.URL
|
||||
13, // 1: talos.resource.definitions.runtime.MachineStatusSpec.stage:type_name -> talos.resource.definitions.enums.RuntimeMachineStage
|
||||
7, // 2: talos.resource.definitions.runtime.MachineStatusSpec.status:type_name -> talos.resource.definitions.runtime.MachineStatusStatus
|
||||
11, // 3: talos.resource.definitions.runtime.MachineStatusStatus.unmet_conditions:type_name -> talos.resource.definitions.runtime.UnmetCondition
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
@ -841,7 +893,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KernelModuleSpecSpec); i {
|
||||
switch v := v.(*EventSinkConfigSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -853,7 +905,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KernelParamSpecSpec); i {
|
||||
switch v := v.(*KernelModuleSpecSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -865,7 +917,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KernelParamStatusSpec); i {
|
||||
switch v := v.(*KernelParamSpecSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -877,7 +929,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KmsgLogConfigSpec); i {
|
||||
switch v := v.(*KernelParamStatusSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -889,7 +941,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MachineStatusSpec); i {
|
||||
switch v := v.(*KmsgLogConfigSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -901,7 +953,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MachineStatusStatus); i {
|
||||
switch v := v.(*MachineStatusSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -913,7 +965,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MetaKeySpec); i {
|
||||
switch v := v.(*MachineStatusStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -925,7 +977,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MountStatusSpec); i {
|
||||
switch v := v.(*MetaKeySpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -937,7 +989,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PlatformMetadataSpec); i {
|
||||
switch v := v.(*MountStatusSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -949,6 +1001,18 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PlatformMetadataSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_resource_definitions_runtime_runtime_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnmetCondition); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -967,7 +1031,7 @@ func file_resource_definitions_runtime_runtime_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_resource_definitions_runtime_runtime_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
@ -66,6 +66,46 @@ func (m *DevicesStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *EventSinkConfigSpec) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
size := m.SizeVT()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *EventSinkConfigSpec) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *EventSinkConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
if m == nil {
|
||||
return 0, nil
|
||||
}
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.unknownFields != nil {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.Endpoint) > 0 {
|
||||
i -= len(m.Endpoint)
|
||||
copy(dAtA[i:], m.Endpoint)
|
||||
i = encodeVarint(dAtA, i, uint64(len(m.Endpoint)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *KernelModuleSpecSpec) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
@ -648,6 +688,20 @@ func (m *DevicesStatusSpec) SizeVT() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *EventSinkConfigSpec) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Endpoint)
|
||||
if l > 0 {
|
||||
n += 1 + l + sov(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *KernelModuleSpecSpec) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@ -942,6 +996,89 @@ func (m *DevicesStatusSpec) UnmarshalVT(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *EventSinkConfigSpec) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: EventSinkConfigSpec: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: EventSinkConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 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 ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Endpoint = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *KernelModuleSpecSpec) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Code generated by "deep-copy -type DevicesStatusSpec -type KernelModuleSpecSpec -type KernelParamSpecSpec -type KernelParamStatusSpec -type KmsgLogConfigSpec -type MachineStatusSpec -type MetaKeySpec -type MountStatusSpec -type PlatformMetadataSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
// Code generated by "deep-copy -type DevicesStatusSpec -type EventSinkConfigSpec -type KernelModuleSpecSpec -type KernelParamSpecSpec -type KernelParamStatusSpec -type KmsgLogConfigSpec -type MachineStatusSpec -type MetaKeySpec -type MountStatusSpec -type PlatformMetadataSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
|
||||
package runtime
|
||||
|
||||
@ -16,6 +16,12 @@ func (o DevicesStatusSpec) DeepCopy() DevicesStatusSpec {
|
||||
return cp
|
||||
}
|
||||
|
||||
// DeepCopy generates a deep copy of EventSinkConfigSpec.
|
||||
func (o EventSinkConfigSpec) DeepCopy() EventSinkConfigSpec {
|
||||
var cp EventSinkConfigSpec = o
|
||||
return cp
|
||||
}
|
||||
|
||||
// DeepCopy generates a deep copy of KernelModuleSpecSpec.
|
||||
func (o KernelModuleSpecSpec) DeepCopy() KernelModuleSpecSpec {
|
||||
var cp KernelModuleSpecSpec = o
|
||||
|
||||
59
pkg/machinery/resources/runtime/event_sink_config.go
Normal file
59
pkg/machinery/resources/runtime/event_sink_config.go
Normal file
@ -0,0 +1,59 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"github.com/cosi-project/runtime/pkg/resource"
|
||||
"github.com/cosi-project/runtime/pkg/resource/meta"
|
||||
"github.com/cosi-project/runtime/pkg/resource/protobuf"
|
||||
"github.com/cosi-project/runtime/pkg/resource/typed"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/proto"
|
||||
)
|
||||
|
||||
// EventSinkConfigType is type of EventSinkConfig resource.
|
||||
const EventSinkConfigType = resource.Type("EventSinkConfigs.runtime.talos.dev")
|
||||
|
||||
// EventSinkConfig resource holds configuration for Talos event log streaming.
|
||||
type EventSinkConfig = typed.Resource[EventSinkConfigSpec, EventSinkConfigExtension]
|
||||
|
||||
// EventSinkConfigID is a resource ID for EventSinkConfig.
|
||||
const EventSinkConfigID resource.ID = "event-sink"
|
||||
|
||||
// EventSinkConfigSpec describes configuration of Talos event log streaming.
|
||||
//
|
||||
//gotagsrewrite:gen
|
||||
type EventSinkConfigSpec struct {
|
||||
Endpoint string `yaml:"endpoint" protobuf:"1"`
|
||||
}
|
||||
|
||||
// NewEventSinkConfig initializes a EventSinkConfig resource.
|
||||
func NewEventSinkConfig() *EventSinkConfig {
|
||||
return typed.NewResource[EventSinkConfigSpec, EventSinkConfigExtension](
|
||||
resource.NewMetadata(NamespaceName, EventSinkConfigType, EventSinkConfigID, resource.VersionUndefined),
|
||||
EventSinkConfigSpec{},
|
||||
)
|
||||
}
|
||||
|
||||
// EventSinkConfigExtension is auxiliary resource data for EventSinkConfig.
|
||||
type EventSinkConfigExtension struct{}
|
||||
|
||||
// ResourceDefinition implements meta.ResourceDefinitionProvider interface.
|
||||
func (EventSinkConfigExtension) ResourceDefinition() meta.ResourceDefinitionSpec {
|
||||
return meta.ResourceDefinitionSpec{
|
||||
Type: EventSinkConfigType,
|
||||
Aliases: []resource.Type{},
|
||||
DefaultNamespace: NamespaceName,
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterDefaultTypes()
|
||||
|
||||
err := protobuf.RegisterDynamic[EventSinkConfigSpec](EventSinkConfigType, &EventSinkConfig{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@ -15,7 +15,7 @@ import (
|
||||
"github.com/siderolabs/talos/pkg/machinery/proto"
|
||||
)
|
||||
|
||||
// KmsgLogConfigType is type of KernelParam resource.
|
||||
// KmsgLogConfigType is type of KmsgLogConfig resource.
|
||||
const KmsgLogConfigType = resource.Type("KmsgLogConfigs.runtime.talos.dev")
|
||||
|
||||
// KmsgLogConfig resource holds configuration for kernel message log streaming.
|
||||
@ -24,7 +24,7 @@ type KmsgLogConfig = typed.Resource[KmsgLogConfigSpec, KmsgLogConfigExtension]
|
||||
// KmsgLogConfigID is a resource ID for KmsgLogConfig.
|
||||
const KmsgLogConfigID resource.ID = "kmsg-log"
|
||||
|
||||
// KmsgLogConfigSpec describes status of the defined sysctls.
|
||||
// KmsgLogConfigSpec describes configuration for kmsg log streaming.
|
||||
//
|
||||
//gotagsrewrite:gen
|
||||
type KmsgLogConfigSpec struct {
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
package runtime
|
||||
|
||||
//nolint:lll
|
||||
//go:generate deep-copy -type DevicesStatusSpec -type KernelModuleSpecSpec -type KernelParamSpecSpec -type KernelParamStatusSpec -type KmsgLogConfigSpec -type MachineStatusSpec -type MetaKeySpec -type MountStatusSpec -type PlatformMetadataSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
//go:generate deep-copy -type DevicesStatusSpec -type EventSinkConfigSpec -type KernelModuleSpecSpec -type KernelParamSpecSpec -type KernelParamStatusSpec -type KmsgLogConfigSpec -type MachineStatusSpec -type MetaKeySpec -type MountStatusSpec -type PlatformMetadataSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
|
||||
@ -26,6 +26,7 @@ func TestRegisterResource(t *testing.T) {
|
||||
|
||||
for _, resource := range []resource.Resource{
|
||||
&runtime.DevicesStatus{},
|
||||
&runtime.EventSinkConfig{},
|
||||
&runtime.ExtensionStatus{},
|
||||
&runtime.KernelModuleSpec{},
|
||||
&runtime.KernelParamSpec{},
|
||||
|
||||
@ -179,6 +179,7 @@ description: Talos gRPC API reference.
|
||||
|
||||
- [resource/definitions/runtime/runtime.proto](#resource/definitions/runtime/runtime.proto)
|
||||
- [DevicesStatusSpec](#talos.resource.definitions.runtime.DevicesStatusSpec)
|
||||
- [EventSinkConfigSpec](#talos.resource.definitions.runtime.EventSinkConfigSpec)
|
||||
- [KernelModuleSpecSpec](#talos.resource.definitions.runtime.KernelModuleSpecSpec)
|
||||
- [KernelParamSpecSpec](#talos.resource.definitions.runtime.KernelParamSpecSpec)
|
||||
- [KernelParamStatusSpec](#talos.resource.definitions.runtime.KernelParamStatusSpec)
|
||||
@ -3274,6 +3275,21 @@ DevicesStatusSpec is the spec for devices status.
|
||||
|
||||
|
||||
|
||||
<a name="talos.resource.definitions.runtime.EventSinkConfigSpec"></a>
|
||||
|
||||
### EventSinkConfigSpec
|
||||
EventSinkConfigSpec describes configuration of Talos event log streaming.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| endpoint | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="talos.resource.definitions.runtime.KernelModuleSpecSpec"></a>
|
||||
|
||||
### KernelModuleSpecSpec
|
||||
@ -3326,7 +3342,7 @@ KernelParamStatusSpec describes status of the defined sysctls.
|
||||
<a name="talos.resource.definitions.runtime.KmsgLogConfigSpec"></a>
|
||||
|
||||
### KmsgLogConfigSpec
|
||||
KmsgLogConfigSpec describes status of the defined sysctls.
|
||||
KmsgLogConfigSpec describes configuration for kmsg log streaming.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user