diff --git a/api/resource/definitions/block/block.proto b/api/resource/definitions/block/block.proto
index 7c380ee228..4f1f317a33 100755
--- a/api/resource/definitions/block/block.proto
+++ b/api/resource/definitions/block/block.proto
@@ -111,10 +111,29 @@ message LocatorSpec {
google.api.expr.v1alpha1.CheckedExpr match = 1;
}
+// MountRequestSpec is the spec for MountRequest.
+message MountRequestSpec {
+ string volume_id = 1;
+ string parent_mount_id = 2;
+ repeated string requesters = 3;
+ repeated string requester_i_ds = 4;
+ bool read_only = 5;
+}
+
// MountSpec is the spec for volume mount.
message MountSpec {
string target_path = 1;
string selinux_label = 2;
+ repeated string options = 3;
+}
+
+// MountStatusSpec is the spec for MountStatus.
+message MountStatusSpec {
+ MountRequestSpec spec = 1;
+ string target = 2;
+ string source = 3;
+ talos.resource.definitions.enums.BlockFilesystemType filesystem = 4;
+ bool read_only = 5;
}
// PartitionSpec is the spec for volume partitioning.
@@ -160,6 +179,21 @@ message VolumeConfigSpec {
EncryptionSpec encryption = 6;
}
+// VolumeMountRequestSpec is the spec for VolumeMountRequest.
+message VolumeMountRequestSpec {
+ string volume_id = 1;
+ string requester = 2;
+ bool read_only = 3;
+}
+
+// VolumeMountStatusSpec is the spec for VolumeMountStatus.
+message VolumeMountStatusSpec {
+ string volume_id = 1;
+ string requester = 2;
+ string target = 3;
+ bool read_only = 4;
+}
+
// VolumeStatusSpec is the spec for VolumeStatus resource.
message VolumeStatusSpec {
talos.resource.definitions.enums.BlockVolumePhase phase = 1;
@@ -176,5 +210,6 @@ message VolumeStatusSpec {
talos.resource.definitions.enums.BlockEncryptionProviderType encryption_provider = 12;
string pretty_size = 13;
repeated string encryption_failed_syncs = 14;
+ MountSpec mount_spec = 15;
}
diff --git a/internal/app/machined/pkg/controllers/block/internal/volumes/locate.go b/internal/app/machined/pkg/controllers/block/internal/volumes/locate.go
index c8a02bfbbe..2c096ff7d6 100644
--- a/internal/app/machined/pkg/controllers/block/internal/volumes/locate.go
+++ b/internal/app/machined/pkg/controllers/block/internal/volumes/locate.go
@@ -24,6 +24,7 @@ import (
//
//nolint:gocyclo,cyclop
func LocateAndProvision(ctx context.Context, logger *zap.Logger, volumeContext ManagerContext) error {
+ volumeContext.Status.MountSpec = volumeContext.Cfg.TypedSpec().Mount
volumeType := volumeContext.Cfg.TypedSpec().Type
if volumeType == block.VolumeTypeTmpfs {
diff --git a/internal/app/machined/pkg/controllers/block/mount.go b/internal/app/machined/pkg/controllers/block/mount.go
new file mode 100644
index 0000000000..ebca640eb5
--- /dev/null
+++ b/internal/app/machined/pkg/controllers/block/mount.go
@@ -0,0 +1,295 @@
+// 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 block
+
+import (
+ "context"
+ "fmt"
+
+ "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/siderolabs/gen/xslices"
+ "go.uber.org/zap"
+
+ "github.com/siderolabs/talos/internal/pkg/mount/v2"
+ "github.com/siderolabs/talos/pkg/machinery/resources/block"
+)
+
+type mountContext struct {
+ point *mount.Point
+ readOnly bool
+ unmounter func() error
+}
+
+// MountController performs actual mount/unmount operations based on the MountRequests.
+type MountController struct {
+ activeMounts map[string]mountContext
+}
+
+// Name implements controller.Controller interface.
+func (ctrl *MountController) Name() string {
+ return "block.MountController"
+}
+
+// Inputs implements controller.Controller interface.
+func (ctrl *MountController) Inputs() []controller.Input {
+ return []controller.Input{
+ {
+ Namespace: block.NamespaceName,
+ Type: block.MountRequestType,
+ Kind: controller.InputStrong,
+ },
+ {
+ Namespace: block.NamespaceName,
+ Type: block.VolumeStatusType,
+ Kind: controller.InputStrong,
+ },
+ {
+ Namespace: block.NamespaceName,
+ Type: block.MountStatusType,
+ Kind: controller.InputDestroyReady,
+ },
+ }
+}
+
+// Outputs implements controller.Controller interface.
+func (ctrl *MountController) Outputs() []controller.Output {
+ return []controller.Output{
+ {
+ Type: block.MountStatusType,
+ Kind: controller.OutputExclusive,
+ },
+ }
+}
+
+// Run implements controller.Controller interface.
+//
+//nolint:gocyclo,cyclop
+func (ctrl *MountController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error {
+ if ctrl.activeMounts == nil {
+ ctrl.activeMounts = map[string]mountContext{}
+ }
+
+ for {
+ select {
+ case <-r.EventCh():
+ case <-ctx.Done():
+ return nil
+ }
+
+ volumeStatuses, err := safe.ReaderListAll[*block.VolumeStatus](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read volume statuses: %w", err)
+ }
+
+ volumeStatusMap := xslices.ToMap(
+ safe.ToSlice(
+ volumeStatuses,
+ identity,
+ ),
+ func(v *block.VolumeStatus) (string, *block.VolumeStatus) {
+ return v.Metadata().ID(), v
+ },
+ )
+
+ mountStatuses, err := safe.ReaderListAll[*block.MountStatus](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read mount statuses: %w", err)
+ }
+
+ mountStatusMap := xslices.ToMap(
+ safe.ToSlice(
+ mountStatuses,
+ identity,
+ ),
+ func(v *block.MountStatus) (string, *block.MountStatus) {
+ return v.Metadata().ID(), v
+ },
+ )
+
+ mountRequests, err := safe.ReaderListAll[*block.MountRequest](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read mount requests: %w", err)
+ }
+
+ for mountRequest := range mountRequests.All() {
+ volumeStatus := volumeStatusMap[mountRequest.TypedSpec().VolumeID]
+ volumeNotReady := volumeStatus == nil || volumeStatus.TypedSpec().Phase != block.VolumePhaseReady || volumeStatus.Metadata().Phase() != resource.PhaseRunning
+
+ mountRequestTearingDown := mountRequest.Metadata().Phase() == resource.PhaseTearingDown
+
+ mountStatus := mountStatusMap[mountRequest.Metadata().ID()]
+ mountStatusTearingDown := mountStatus != nil && mountStatus.Metadata().Phase() == resource.PhaseTearingDown
+
+ if volumeNotReady || mountRequestTearingDown || mountStatusTearingDown {
+ // we should tear down the mount in the following sequence:
+ // 1. tear down & destroy MountStatus
+ // 2. perform actual unmount
+ // 3. remove finalizer from VolumeStatus
+ // 4. remove finalizer from MountRequest
+ mountStatusTornDown, err := ctrl.tearDownMountStatus(ctx, r, logger, mountRequest)
+ if err != nil {
+ return fmt.Errorf("error tearing down mount status %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ if !mountStatusTornDown {
+ continue
+ }
+
+ if mountCtx, ok := ctrl.activeMounts[mountRequest.Metadata().ID()]; ok {
+ if err = mountCtx.unmounter(); err != nil {
+ return fmt.Errorf("failed to unmount %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ delete(ctrl.activeMounts, mountRequest.Metadata().ID())
+
+ logger.Info("volume unmount",
+ zap.String("volume", mountRequest.Metadata().ID()),
+ zap.String("source", mountCtx.point.Source()),
+ zap.String("target", mountCtx.point.Target()),
+ zap.String("filesystem", mountCtx.point.FSType()),
+ )
+ }
+
+ if volumeStatus != nil && volumeStatus.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.RemoveFinalizer(ctx, volumeStatus.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to remove finalizer from volume status %q: %w", volumeStatus.Metadata().ID(), err)
+ }
+ }
+
+ if mountRequest.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.RemoveFinalizer(ctx, mountRequest.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to remove finalizer from mount request %q: %w", mountRequest.Metadata().ID(), err)
+ }
+ }
+ }
+
+ if !(volumeNotReady || mountRequestTearingDown) {
+ // we should perform mount operation in the following sequence:
+ // 1. add finalizer on MountRequest
+ // 2. add finalizer on VolumeStatus
+ // 3. perform actual mount
+ // 4. create MountStatus
+ if !mountRequest.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.AddFinalizer(ctx, mountRequest.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to add finalizer to mount request %q: %w", mountRequest.Metadata().ID(), err)
+ }
+ }
+
+ if !volumeStatus.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.AddFinalizer(ctx, volumeStatus.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to add finalizer to volume status %q: %w", volumeStatus.Metadata().ID(), err)
+ }
+ }
+
+ mountSource := volumeStatus.TypedSpec().MountLocation
+ mountTarget := volumeStatus.TypedSpec().MountSpec.TargetPath
+ mountFilesystem := volumeStatus.TypedSpec().Filesystem
+
+ mountCtx, ok := ctrl.activeMounts[mountRequest.Metadata().ID()]
+
+ // mount hasn't been done yet
+ if !ok {
+ var opts []mount.NewPointOption
+
+ // [TODO]: need to support more mount options:
+ // * proj quota (static)
+
+ opts = append(opts, mount.WithSelinuxLabel(volumeStatus.TypedSpec().MountSpec.SelinuxLabel))
+
+ if mountRequest.TypedSpec().ReadOnly {
+ opts = append(opts, mount.WithReadonly())
+ }
+
+ mountpoint := mount.NewPoint(
+ mountSource,
+ mountTarget,
+ mountFilesystem.String(),
+ opts...,
+ )
+
+ unmounter, err := mountpoint.Mount(mount.WithMountPrinter(logger.Sugar().Infof))
+ if err != nil {
+ return fmt.Errorf("failed to mount %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ logger.Info("volume mount",
+ zap.String("volume", volumeStatus.Metadata().ID()),
+ zap.String("source", mountSource),
+ zap.String("target", mountTarget),
+ zap.Stringer("filesystem", mountFilesystem),
+ )
+
+ ctrl.activeMounts[mountRequest.Metadata().ID()] = mountContext{
+ point: mountpoint,
+ readOnly: mountRequest.TypedSpec().ReadOnly,
+ unmounter: unmounter,
+ }
+ } else if mountCtx.readOnly != mountRequest.TypedSpec().ReadOnly { // remount if needed
+ switch mountRequest.TypedSpec().ReadOnly {
+ case true:
+ err = mountCtx.point.RemountReadOnly()
+ case false:
+ err = mountCtx.point.RemountReadWrite()
+ }
+
+ if err != nil {
+ return fmt.Errorf("failed to remount %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ mountCtx.readOnly = mountRequest.TypedSpec().ReadOnly
+ }
+
+ if err = safe.WriterModify(
+ ctx, r, block.NewMountStatus(block.NamespaceName, mountRequest.Metadata().ID()),
+ func(mountStatus *block.MountStatus) error {
+ mountStatus.TypedSpec().Spec = *mountRequest.TypedSpec()
+ mountStatus.TypedSpec().Source = mountSource
+ mountStatus.TypedSpec().Target = mountTarget
+ mountStatus.TypedSpec().Filesystem = mountFilesystem
+ mountStatus.TypedSpec().ReadOnly = mountRequest.TypedSpec().ReadOnly
+
+ return nil
+ },
+ ); err != nil {
+ return fmt.Errorf("failed to create mount status %q: %w", mountRequest.Metadata().ID(), err)
+ }
+ }
+ }
+
+ r.ResetRestartBackoff()
+ }
+}
+
+func (ctrl *MountController) tearDownMountStatus(ctx context.Context, r controller.Runtime, logger *zap.Logger, mountRequest *block.MountRequest) (bool, error) {
+ logger = logger.With(zap.String("mount_request", mountRequest.Metadata().ID()))
+
+ okToDestroy, err := r.Teardown(ctx, block.NewMountStatus(block.NamespaceName, mountRequest.Metadata().ID()).Metadata())
+ if err != nil {
+ if state.IsNotFoundError(err) {
+ // no mount status, we are done
+ return true, nil
+ }
+
+ return false, fmt.Errorf("failed to teardown mount status %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ if !okToDestroy {
+ logger.Debug("waiting for mount status to be torn down")
+
+ return false, nil
+ }
+
+ err = r.Destroy(ctx, block.NewMountStatus(block.NamespaceName, mountRequest.Metadata().ID()).Metadata())
+ if err != nil {
+ return false, fmt.Errorf("failed to destroy mount status %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ logger.Info("mount status destroyed")
+
+ return true, nil
+}
diff --git a/internal/app/machined/pkg/controllers/block/mount_request.go b/internal/app/machined/pkg/controllers/block/mount_request.go
new file mode 100644
index 0000000000..6ad86b4820
--- /dev/null
+++ b/internal/app/machined/pkg/controllers/block/mount_request.go
@@ -0,0 +1,161 @@
+// 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 block
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/cosi-project/runtime/pkg/controller"
+ "github.com/cosi-project/runtime/pkg/resource"
+ "github.com/cosi-project/runtime/pkg/safe"
+ "github.com/siderolabs/gen/xslices"
+ "go.uber.org/zap"
+
+ "github.com/siderolabs/talos/pkg/machinery/resources/block"
+)
+
+// MountRequestController provides mount requests based on VolumeMountRequests and VolumeStatuses.
+type MountRequestController struct{}
+
+// Name implements controller.Controller interface.
+func (ctrl *MountRequestController) Name() string {
+ return "block.MountRequestController"
+}
+
+// Inputs implements controller.Controller interface.
+func (ctrl *MountRequestController) Inputs() []controller.Input {
+ return []controller.Input{
+ {
+ Namespace: block.NamespaceName,
+ Type: block.VolumeMountRequestType,
+ Kind: controller.InputStrong,
+ },
+ {
+ Namespace: block.NamespaceName,
+ Type: block.VolumeStatusType,
+ Kind: controller.InputWeak,
+ },
+ {
+ Namespace: block.NamespaceName,
+ Type: block.MountRequestType,
+ Kind: controller.InputDestroyReady,
+ },
+ }
+}
+
+// Outputs implements controller.Controller interface.
+func (ctrl *MountRequestController) Outputs() []controller.Output {
+ return []controller.Output{
+ {
+ Type: block.MountRequestType,
+ Kind: controller.OutputExclusive,
+ },
+ }
+}
+
+func identity[T any](v T) T {
+ return v
+}
+
+// Run implements controller.Controller interface.
+//
+//nolint:gocyclo,cyclop
+func (ctrl *MountRequestController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error {
+ for {
+ select {
+ case <-r.EventCh():
+ case <-ctx.Done():
+ return nil
+ }
+
+ volumeStatuses, err := safe.ReaderListAll[*block.VolumeStatus](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read volume statuses: %w", err)
+ }
+
+ volumeStatusMap := xslices.ToMap(
+ safe.ToSlice(
+ volumeStatuses,
+ identity,
+ ),
+ func(v *block.VolumeStatus) (string, *block.VolumeStatus) {
+ return v.Metadata().ID(), v
+ },
+ )
+
+ volumeMountRequests, err := safe.ReaderListAll[*block.VolumeMountRequest](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read volume mount requests: %w", err)
+ }
+
+ desiredMountRequests := map[string]*block.MountRequestSpec{}
+
+ for volumeMountRequest := range volumeMountRequests.All() {
+ volumeID := volumeMountRequest.TypedSpec().VolumeID
+
+ volumeStatus, ok := volumeStatusMap[volumeID]
+ if !ok || volumeStatus.TypedSpec().Phase != block.VolumePhaseReady || volumeStatus.Metadata().Phase() != resource.PhaseRunning {
+ continue
+ }
+
+ if _, exists := desiredMountRequests[volumeID]; !exists {
+ desiredMountRequests[volumeID] = &block.MountRequestSpec{
+ VolumeID: volumeID,
+ ReadOnly: volumeMountRequest.TypedSpec().ReadOnly,
+ }
+ }
+
+ desiredMountRequest := desiredMountRequests[volumeID]
+ desiredMountRequest.Requesters = append(desiredMountRequest.Requesters, volumeMountRequest.TypedSpec().Requester)
+ desiredMountRequest.RequesterIDs = append(desiredMountRequest.RequesterIDs, volumeMountRequest.Metadata().ID())
+ desiredMountRequest.ReadOnly = desiredMountRequest.ReadOnly && volumeMountRequest.TypedSpec().ReadOnly // read-only if all requesters are read-only
+ }
+
+ // list and figure out what to do with existing mount requests
+ mountRequests, err := safe.ReaderListAll[*block.MountRequest](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read mount requests: %w", err)
+ }
+
+ // perform cleanup of mount requests which should be cleaned up
+ for mountRequest := range mountRequests.All() {
+ tearingDown := mountRequest.Metadata().Phase() == resource.PhaseTearingDown
+ shouldBeDestroyed := desiredMountRequests[mountRequest.Metadata().ID()] == nil
+
+ if tearingDown || shouldBeDestroyed {
+ okToDestroy, err := r.Teardown(ctx, mountRequest.Metadata())
+ if err != nil {
+ return fmt.Errorf("failed to teardown mount request %q: %w", mountRequest.Metadata().ID(), err)
+ }
+
+ if okToDestroy {
+ if err = r.Destroy(ctx, mountRequest.Metadata()); err != nil {
+ return fmt.Errorf("failed to destroy mount request %q: %w", mountRequest.Metadata().ID(), err)
+ }
+ } else if !shouldBeDestroyed {
+ // previous mount request version is still being torn down
+ delete(desiredMountRequests, mountRequest.Metadata().ID())
+ }
+ }
+ }
+
+ // create/update mount requests
+ for id, desiredMountRequest := range desiredMountRequests {
+ if err = safe.WriterModify(
+ ctx, r, block.NewMountRequest(block.NamespaceName, id),
+ func(mr *block.MountRequest) error {
+ *mr.TypedSpec() = *desiredMountRequest
+
+ return nil
+ },
+ ); err != nil {
+ return fmt.Errorf("failed to create/update mount request %q: %w", id, err)
+ }
+ }
+
+ r.ResetRestartBackoff()
+ }
+}
diff --git a/internal/app/machined/pkg/controllers/block/mount_request_test.go b/internal/app/machined/pkg/controllers/block/mount_request_test.go
new file mode 100644
index 0000000000..5904bd363c
--- /dev/null
+++ b/internal/app/machined/pkg/controllers/block/mount_request_test.go
@@ -0,0 +1,106 @@
+// 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 block_test
+
+import (
+ "testing"
+ "time"
+
+ "github.com/cosi-project/runtime/pkg/resource"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/suite"
+
+ blockctrls "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/block"
+ "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/ctest"
+ "github.com/siderolabs/talos/pkg/machinery/resources/block"
+)
+
+type MountRequestSuite struct {
+ ctest.DefaultSuite
+}
+
+func TestMountRequestSuite(t *testing.T) {
+ t.Parallel()
+
+ suite.Run(t, &MountRequestSuite{
+ DefaultSuite: ctest.DefaultSuite{
+ Timeout: 3 * time.Second,
+ AfterSetup: func(suite *ctest.DefaultSuite) {
+ suite.Require().NoError(suite.Runtime().RegisterController(&blockctrls.MountRequestController{}))
+ },
+ },
+ })
+}
+
+func (suite *MountRequestSuite) TestReconcile() {
+ mountRequest1 := block.NewVolumeMountRequest(block.NamespaceName, "mountRequest1")
+ mountRequest1.TypedSpec().Requester = "requester1"
+ mountRequest1.TypedSpec().VolumeID = "volume1"
+ mountRequest1.TypedSpec().ReadOnly = true
+ suite.Create(mountRequest1)
+
+ // mount request is not created as the volume is not ready
+ ctest.AssertNoResource[*block.MountRequest](suite, "volume1")
+
+ volumeStatus1 := block.NewVolumeStatus(block.NamespaceName, "volume1")
+ volumeStatus1.TypedSpec().Phase = block.VolumePhaseWaiting
+ suite.Create(volumeStatus1)
+
+ // mount request is not created as the volume status is not ready
+ ctest.AssertNoResource[*block.MountRequest](suite, "volume1")
+
+ volumeStatus1.TypedSpec().Phase = block.VolumePhaseReady
+ suite.Update(volumeStatus1)
+
+ ctest.AssertResource(suite, "volume1", func(mr *block.MountRequest, asrt *assert.Assertions) {
+ asrt.Equal("volume1", mr.TypedSpec().VolumeID)
+ asrt.True(mr.TypedSpec().ReadOnly)
+ asrt.ElementsMatch([]string{"requester1"}, mr.TypedSpec().Requesters)
+ asrt.ElementsMatch([]string{"mountRequest1"}, mr.TypedSpec().RequesterIDs)
+ })
+
+ // add another mount request for the same volume
+ mountRequest2 := block.NewVolumeMountRequest(block.NamespaceName, "mountRequest2")
+ mountRequest2.TypedSpec().Requester = "requester2"
+ mountRequest2.TypedSpec().VolumeID = "volume1"
+ mountRequest2.TypedSpec().ReadOnly = false
+ suite.Create(mountRequest2)
+
+ ctest.AssertResource(suite, "volume1", func(mr *block.MountRequest, asrt *assert.Assertions) {
+ asrt.Equal("volume1", mr.TypedSpec().VolumeID)
+ asrt.False(mr.TypedSpec().ReadOnly)
+ asrt.ElementsMatch([]string{"requester1", "requester2"}, mr.TypedSpec().Requesters)
+ asrt.ElementsMatch([]string{"mountRequest1", "mountRequest2"}, mr.TypedSpec().RequesterIDs)
+ })
+
+ // if the mount request is fulfilled, a finalizer should be added
+ suite.AddFinalizer(block.NewMountRequest(block.NamespaceName, "volume1").Metadata(), "mounted")
+
+ // try to remove one mount requests now
+ suite.Destroy(mountRequest2)
+
+ ctest.AssertResource(suite, "volume1", func(mr *block.MountRequest, asrt *assert.Assertions) {
+ asrt.Equal("volume1", mr.TypedSpec().VolumeID)
+ asrt.True(mr.TypedSpec().ReadOnly)
+ asrt.ElementsMatch([]string{"requester1"}, mr.TypedSpec().Requesters)
+ asrt.ElementsMatch([]string{"mountRequest1"}, mr.TypedSpec().RequesterIDs)
+ })
+
+ // try to remove another mount request now
+ suite.Destroy(mountRequest1)
+
+ ctest.AssertResource(suite, "volume1", func(mr *block.MountRequest, asrt *assert.Assertions) {
+ asrt.Equal("volume1", mr.TypedSpec().VolumeID)
+ asrt.True(mr.TypedSpec().ReadOnly)
+ asrt.Equal([]string{"requester1"}, mr.TypedSpec().Requesters)
+ asrt.ElementsMatch([]string{"mountRequest1"}, mr.TypedSpec().RequesterIDs)
+ asrt.Equal(resource.PhaseTearingDown, mr.Metadata().Phase())
+ })
+
+ // remove the finalizer, allowing the mount request to be destroyed
+ suite.RemoveFinalizer(block.NewMountRequest(block.NamespaceName, "volume1").Metadata(), "mounted")
+
+ ctest.AssertNoResource[*block.MountRequest](suite, "volume1")
+}
diff --git a/internal/app/machined/pkg/controllers/block/mount_status.go b/internal/app/machined/pkg/controllers/block/mount_status.go
new file mode 100644
index 0000000000..5b69592f1b
--- /dev/null
+++ b/internal/app/machined/pkg/controllers/block/mount_status.go
@@ -0,0 +1,136 @@
+// 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 block
+
+import (
+ "context"
+ "fmt"
+
+ "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"
+ "go.uber.org/zap"
+
+ "github.com/siderolabs/talos/pkg/machinery/resources/block"
+)
+
+// MountStatusController provides mount requests based on VolumeMountRequests and VolumeStatuses.
+type MountStatusController struct{}
+
+// Name implements controller.Controller interface.
+func (ctrl *MountStatusController) Name() string {
+ return "block.MountStatusController"
+}
+
+// Inputs implements controller.Controller interface.
+func (ctrl *MountStatusController) Inputs() []controller.Input {
+ return []controller.Input{
+ {
+ Namespace: block.NamespaceName,
+ Type: block.MountStatusType,
+ Kind: controller.InputStrong,
+ },
+ {
+ Namespace: block.NamespaceName,
+ Type: block.VolumeMountStatusType,
+ Kind: controller.InputDestroyReady,
+ },
+ }
+}
+
+// Outputs implements controller.Controller interface.
+func (ctrl *MountStatusController) Outputs() []controller.Output {
+ return []controller.Output{
+ {
+ Type: block.VolumeMountStatusType,
+ Kind: controller.OutputExclusive,
+ },
+ }
+}
+
+// Run implements controller.Controller interface.
+//
+//nolint:gocyclo
+func (ctrl *MountStatusController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error {
+ for {
+ select {
+ case <-r.EventCh():
+ case <-ctx.Done():
+ return nil
+ }
+
+ mountStatuses, err := safe.ReaderListAll[*block.MountStatus](ctx, r)
+ if err != nil {
+ return fmt.Errorf("failed to read volume mount requests: %w", err)
+ }
+
+ for mountStatus := range mountStatuses.All() {
+ switch mountStatus.Metadata().Phase() {
+ case resource.PhaseRunning:
+ // always put our own finalizer
+ if !mountStatus.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.AddFinalizer(ctx, mountStatus.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to add finalizer to mount status %q: %w", mountStatus.Metadata().ID(), err)
+ }
+ }
+
+ // now "explode" the mount status into volume mount statuses per requester
+ for i, requester := range mountStatus.TypedSpec().Spec.Requesters {
+ requestID := mountStatus.TypedSpec().Spec.RequesterIDs[i]
+
+ if err = safe.WriterModify(
+ ctx, r, block.NewVolumeMountStatus(block.NamespaceName, requestID),
+ func(vms *block.VolumeMountStatus) error {
+ vms.Metadata().Labels().Set("mount-status-id", mountStatus.Metadata().ID())
+ vms.TypedSpec().Requester = requester
+ vms.TypedSpec().Target = mountStatus.TypedSpec().Target
+ vms.TypedSpec().VolumeID = mountStatus.TypedSpec().Spec.VolumeID
+ vms.TypedSpec().ReadOnly = mountStatus.TypedSpec().Spec.ReadOnly
+
+ return nil
+ },
+ ); err != nil {
+ return fmt.Errorf("failed to create volume mount status %q: %w", requestID, err)
+ }
+ }
+ case resource.PhaseTearingDown:
+ // we need to ensure that all volume mount statuses are torn down and destroyed
+ volumeMountStatus, err := safe.ReaderListAll[*block.VolumeMountStatus](ctx, r, state.WithLabelQuery(resource.LabelEqual("mount-status-id", mountStatus.Metadata().ID())))
+ if err != nil {
+ return fmt.Errorf("failed to read volume mount statuses for mount status %q: %w", mountStatus.Metadata().ID(), err)
+ }
+
+ allDestroyed := true
+
+ for volumeMountStatus := range volumeMountStatus.All() {
+ okToDestroy, err := r.Teardown(ctx, volumeMountStatus.Metadata())
+ if err != nil {
+ return fmt.Errorf("failed to teardown volume mount status %q: %w", volumeMountStatus.Metadata().ID(), err)
+ }
+
+ if okToDestroy {
+ if err = r.Destroy(ctx, volumeMountStatus.Metadata()); err != nil {
+ return fmt.Errorf("failed to destroy volume mount status %q: %w", volumeMountStatus.Metadata().ID(), err)
+ }
+ } else {
+ allDestroyed = false
+ }
+ }
+
+ if allDestroyed {
+ // remove our finalizer now
+ if mountStatus.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.RemoveFinalizer(ctx, mountStatus.Metadata(), ctrl.Name()); err != nil {
+ return fmt.Errorf("failed to remove finalizer from mount status %q: %w", mountStatus.Metadata().ID(), err)
+ }
+ }
+ }
+ }
+ }
+
+ r.ResetRestartBackoff()
+ }
+}
diff --git a/internal/app/machined/pkg/controllers/cri/image_cache_config.go b/internal/app/machined/pkg/controllers/cri/image_cache_config.go
index 3e49104f01..a1195bdda8 100644
--- a/internal/app/machined/pkg/controllers/cri/image_cache_config.go
+++ b/internal/app/machined/pkg/controllers/cri/image_cache_config.go
@@ -13,6 +13,7 @@ import (
"path/filepath"
"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/dustin/go-humanize"
@@ -24,7 +25,6 @@ import (
"github.com/siderolabs/talos/internal/app/machined/pkg/system"
"github.com/siderolabs/talos/internal/app/machined/pkg/system/services"
- mountv2 "github.com/siderolabs/talos/internal/pkg/mount/v2"
"github.com/siderolabs/talos/internal/pkg/partition"
"github.com/siderolabs/talos/pkg/machinery/cel"
"github.com/siderolabs/talos/pkg/machinery/cel/celenv"
@@ -46,7 +46,6 @@ type ServiceManager interface {
// ImageCacheConfigController manages configures Image Cache.
type ImageCacheConfigController struct {
V1Alpha1ServiceManager ServiceManager
- VolumeMounter func(label string, opts ...mountv2.NewPointOption) error
DisableCacheCopy bool // used for testing
@@ -78,6 +77,11 @@ func (ctrl *ImageCacheConfigController) Inputs() []controller.Input {
ID: optional.Some(RegistrydServiceID),
Kind: controller.InputWeak,
},
+ {
+ Namespace: block.NamespaceName,
+ Type: block.VolumeMountStatusType,
+ Kind: controller.InputStrong,
+ },
}
}
@@ -92,6 +96,10 @@ func (ctrl *ImageCacheConfigController) Outputs() []controller.Output {
Type: block.VolumeConfigType,
Kind: controller.OutputShared,
},
+ {
+ Type: block.VolumeMountRequestType,
+ Kind: controller.OutputShared,
+ },
}
}
@@ -310,7 +318,7 @@ type imageCacheVolumeStatus struct {
}
//nolint:gocyclo,cyclop
-func (ctrl *ImageCacheConfigController) analyzeImageCacheVolumes(ctx context.Context, logger *zap.Logger, r controller.Reader) (*imageCacheVolumeStatus, error) {
+func (ctrl *ImageCacheConfigController) analyzeImageCacheVolumes(ctx context.Context, logger *zap.Logger, r controller.ReaderWriter) (*imageCacheVolumeStatus, error) {
volumeIDs := []string{VolumeImageCacheDISK, VolumeImageCacheISO} // prefer disk cache over ISO cache
volumeStatuses := make([]*block.VolumeStatus, 0, len(volumeIDs))
@@ -348,6 +356,26 @@ func (ctrl *ImageCacheConfigController) analyzeImageCacheVolumes(ctx context.Con
isoPresent := isoStatus == block.VolumePhaseReady
diskMissing := diskStatus == block.VolumePhaseMissing
+ for _, volumeStatus := range volumeStatuses {
+ volumeID := volumeStatus.Metadata().ID()
+
+ // create a mount request for the volume, it doesn't matter if the volume is ready or not,
+ // but we want them to be mounted whenever they are ready
+ mountID := ctrl.Name() + "-" + volumeID
+
+ if err := safe.WriterModify(ctx, r, block.NewVolumeMountRequest(block.NamespaceName, mountID),
+ func(mountRequest *block.VolumeMountRequest) error {
+ mountRequest.TypedSpec().Requester = ctrl.Name()
+ mountRequest.TypedSpec().VolumeID = volumeID
+ mountRequest.TypedSpec().ReadOnly = !(volumeStatus.Metadata().ID() == VolumeImageCacheDISK && isoPresent)
+
+ return nil
+ },
+ ); err != nil {
+ return nil, fmt.Errorf("error creating volume mount request: %w", err)
+ }
+ }
+
roots := make([]string, 0, len(volumeIDs))
var (
@@ -360,7 +388,7 @@ func (ctrl *ImageCacheConfigController) analyzeImageCacheVolumes(ctx context.Con
// analyze volume statuses, and build the roots
for _, volumeStatus := range volumeStatuses {
// mount as rw only disk cache if the ISO cache is present
- root, ready, err := ctrl.getImageCacheRoot(ctx, r, volumeStatus, !(volumeStatus.Metadata().ID() == VolumeImageCacheDISK && isoPresent))
+ root, ready, err := ctrl.getImageCacheRoot(ctx, r, volumeStatus)
if err != nil {
return nil, fmt.Errorf("error getting image cache root: %w", err)
}
@@ -418,7 +446,9 @@ func (ctrl *ImageCacheConfigController) analyzeImageCacheVolumes(ctx context.Con
}, nil
}
-func (ctrl *ImageCacheConfigController) getImageCacheRoot(ctx context.Context, r controller.Reader, volumeStatus *block.VolumeStatus, mountReadyOnly bool) (optional.Optional[string], bool, error) {
+func (ctrl *ImageCacheConfigController) getImageCacheRoot(
+ ctx context.Context, r controller.ReaderWriter, volumeStatus *block.VolumeStatus,
+) (optional.Optional[string], bool, error) {
switch volumeStatus.TypedSpec().Phase { //nolint:exhaustive
case block.VolumePhaseMissing, block.VolumePhaseFailed, block.VolumePhaseWaiting:
// image cache is missing
@@ -432,22 +462,34 @@ func (ctrl *ImageCacheConfigController) getImageCacheRoot(ctx context.Context, r
volumeID := volumeStatus.Metadata().ID()
- volumeConfig, err := safe.ReaderGetByID[*block.VolumeConfig](ctx, r, volumeID)
+ mountID := ctrl.Name() + "-" + volumeID
+
+ mountStatus, err := safe.ReaderGetByID[*block.VolumeMountStatus](ctx, r, mountID)
if err != nil {
- return optional.None[string](), false, fmt.Errorf("error getting volume config: %w", err)
+ if state.IsNotFoundError(err) {
+ return optional.None[string](), false, nil
+ }
+
+ return optional.None[string](), false, fmt.Errorf("error fetching volume mount status: %w", err)
}
- var mountOpts []mountv2.NewPointOption
+ if mountStatus.Metadata().Phase() == resource.PhaseTearingDown {
+ // the mount status is being torn down, so we should stop using it
+ if err = r.RemoveFinalizer(ctx, mountStatus.Metadata(), ctrl.Name()); err != nil {
+ return optional.None[string](), false, fmt.Errorf("error removing finalizer: %w", err)
+ }
- if mountReadyOnly {
- mountOpts = append(mountOpts, mountv2.WithReadonly())
+ return optional.None[string](), true, nil
}
- if err = ctrl.VolumeMounter(volumeID, mountOpts...); err != nil {
- return optional.None[string](), false, fmt.Errorf("error mounting volume: %w", err)
+ // put a finalizer on the mount status, meaning that we are using it
+ if !mountStatus.Metadata().Finalizers().Has(ctrl.Name()) {
+ if err = r.AddFinalizer(ctx, mountStatus.Metadata(), ctrl.Name()); err != nil {
+ return optional.None[string](), false, fmt.Errorf("error adding finalizer: %w", err)
+ }
}
- targetPath := volumeConfig.TypedSpec().Mount.TargetPath
+ targetPath := mountStatus.TypedSpec().Target
if volumeID == VolumeImageCacheISO {
// the ISO volume has a subdirectory with the actual image cache
diff --git a/internal/app/machined/pkg/controllers/cri/image_cache_config_test.go b/internal/app/machined/pkg/controllers/cri/image_cache_config_test.go
index 50c33a94db..e276134d9f 100644
--- a/internal/app/machined/pkg/controllers/cri/image_cache_config_test.go
+++ b/internal/app/machined/pkg/controllers/cri/image_cache_config_test.go
@@ -6,8 +6,6 @@ package cri_test
import (
"path/filepath"
- "slices"
- "sync"
"testing"
"time"
@@ -18,7 +16,6 @@ import (
crictrl "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/cri"
"github.com/siderolabs/talos/internal/app/machined/pkg/controllers/ctest"
"github.com/siderolabs/talos/internal/app/machined/pkg/system"
- mountv2 "github.com/siderolabs/talos/internal/pkg/mount/v2"
"github.com/siderolabs/talos/pkg/machinery/config/container"
blockcfg "github.com/siderolabs/talos/pkg/machinery/config/types/block"
"github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1"
@@ -50,6 +47,8 @@ func (suite *ImageCacheConfigSuite) TestReconcileFeatureNotEnabled() {
}
func (suite *ImageCacheConfigSuite) TestReconcileFeatureEnabled() {
+ ctrlName := (&crictrl.ImageCacheConfigController{}).Name()
+
cfg := config.NewMachineConfig(container.NewV1Alpha1(&v1alpha1.Config{
MachineConfig: &v1alpha1.MachineConfig{
MachineFeatures: &v1alpha1.FeaturesConfig{
@@ -74,8 +73,6 @@ func (suite *ImageCacheConfigSuite) TestReconcileFeatureEnabled() {
asrt.Equal(cri.ImageCacheCopyStatusUnknown, r.TypedSpec().CopyStatus)
})
- suite.Assert().Empty(suite.getMountedVolumes())
-
// create volume statuses to simulate the volume being ready
vs1 := block.NewVolumeStatus(block.NamespaceName, crictrl.VolumeImageCacheISO)
vs1.TypedSpec().Phase = block.VolumePhaseReady
@@ -85,6 +82,23 @@ func (suite *ImageCacheConfigSuite) TestReconcileFeatureEnabled() {
vs2.TypedSpec().Phase = block.VolumePhaseWaiting
suite.Require().NoError(suite.State().Create(suite.Ctx(), vs2))
+ // controller should create mount requests
+ ctest.AssertResources(suite,
+ []string{
+ ctrlName + "-" + crictrl.VolumeImageCacheISO,
+ ctrlName + "-" + crictrl.VolumeImageCacheDISK,
+ },
+ func(vmr *block.VolumeMountRequest, asrt *assert.Assertions) {
+ asrt.Equal(vmr.TypedSpec().VolumeID == crictrl.VolumeImageCacheISO, vmr.TypedSpec().ReadOnly)
+ },
+ )
+
+ // simulate ISO being mounted
+ vms1 := block.NewVolumeMountStatus(block.NamespaceName, ctrlName+"-"+crictrl.VolumeImageCacheISO)
+ vms1.TypedSpec().ReadOnly = true
+ vms1.TypedSpec().Target = constants.ImageCacheISOMountPoint
+ suite.Require().NoError(suite.State().Create(suite.Ctx(), vms1))
+
// one volume is ready, but second one is not (yet)
ctest.AssertResource(suite, cri.ImageCacheConfigID, func(r *cri.ImageCacheConfig, asrt *assert.Assertions) {
asrt.Equal(cri.ImageCacheStatusPreparing, r.TypedSpec().Status)
@@ -92,20 +106,22 @@ func (suite *ImageCacheConfigSuite) TestReconcileFeatureEnabled() {
asrt.Equal([]string{filepath.Join(constants.ImageCacheISOMountPoint, "imagecache")}, r.TypedSpec().Roots)
})
- suite.Assert().Equal([]string{crictrl.VolumeImageCacheISO}, suite.getMountedVolumes())
-
// mark second as ready
vs2.TypedSpec().Phase = block.VolumePhaseReady
suite.Require().NoError(suite.State().Update(suite.Ctx(), vs2))
+ // simulate disk being mounted
+ vms2 := block.NewVolumeMountStatus(block.NamespaceName, ctrlName+"-"+crictrl.VolumeImageCacheDISK)
+ vms2.TypedSpec().ReadOnly = false
+ vms2.TypedSpec().Target = constants.ImageCacheDiskMountPoint
+ suite.Require().NoError(suite.State().Create(suite.Ctx(), vms2))
+
// now both volumes are ready, but service hasn't started yet
ctest.AssertResource(suite, cri.ImageCacheConfigID, func(r *cri.ImageCacheConfig, asrt *assert.Assertions) {
asrt.Equal(cri.ImageCacheStatusPreparing, r.TypedSpec().Status)
asrt.Equal([]string{constants.ImageCacheDiskMountPoint, filepath.Join(constants.ImageCacheISOMountPoint, "imagecache")}, r.TypedSpec().Roots)
})
- suite.Assert().Equal([]string{crictrl.VolumeImageCacheISO, crictrl.VolumeImageCacheDISK}, suite.getMountedVolumes())
-
// simulate registryd being ready
service := v1alpha1res.NewService(crictrl.RegistrydServiceID)
service.TypedSpec().Healthy = true
@@ -156,6 +172,8 @@ func (suite *ImageCacheConfigSuite) TestReconcileJustDiskVolume() {
}
func (suite *ImageCacheConfigSuite) TestReconcileWithImageCacheVolume() {
+ ctrlName := (&crictrl.ImageCacheConfigController{}).Name()
+
v1alpha1Cfg := &v1alpha1.Config{
MachineConfig: &v1alpha1.MachineConfig{
MachineFeatures: &v1alpha1.FeaturesConfig{
@@ -199,6 +217,12 @@ func (suite *ImageCacheConfigSuite) TestReconcileWithImageCacheVolume() {
vs2.TypedSpec().Phase = block.VolumePhaseReady
suite.Require().NoError(suite.State().Create(suite.Ctx(), vs2))
+ // simulate disk being mounted
+ vms := block.NewVolumeMountStatus(block.NamespaceName, ctrlName+"-"+crictrl.VolumeImageCacheDISK)
+ vms.TypedSpec().ReadOnly = false
+ vms.TypedSpec().Target = constants.ImageCacheDiskMountPoint
+ suite.Require().NoError(suite.State().Create(suite.Ctx(), vms))
+
// simulate registryd being ready
service := v1alpha1res.NewService(crictrl.RegistrydServiceID)
service.TypedSpec().Healthy = true
@@ -213,19 +237,6 @@ func (suite *ImageCacheConfigSuite) TestReconcileWithImageCacheVolume() {
})
}
-func (suite *ImageCacheConfigSuite) SetupTest() {
- suite.mountedVolumes = nil
-
- suite.DefaultSuite.SetupTest()
-}
-
-func (suite *ImageCacheConfigSuite) getMountedVolumes() []string {
- suite.mountedVolumesMutex.Lock()
- defer suite.mountedVolumesMutex.Unlock()
-
- return suite.mountedVolumes
-}
-
func TestImageCacheConfigSuite(t *testing.T) {
s := &ImageCacheConfigSuite{
DefaultSuite: ctest.DefaultSuite{
@@ -235,18 +246,6 @@ func TestImageCacheConfigSuite(t *testing.T) {
s.AfterSetup = func(suite *ctest.DefaultSuite) {
suite.Require().NoError(suite.Runtime().RegisterController(&crictrl.ImageCacheConfigController{
- VolumeMounter: func(label string, opts ...mountv2.NewPointOption) error {
- s.mountedVolumesMutex.Lock()
- defer s.mountedVolumesMutex.Unlock()
-
- if slices.Index(s.mountedVolumes, label) >= 0 {
- return nil
- }
-
- s.mountedVolumes = append(s.mountedVolumes, label)
-
- return nil
- },
V1Alpha1ServiceManager: &mockServiceRunner{},
DisableCacheCopy: true,
}))
@@ -257,9 +256,6 @@ func TestImageCacheConfigSuite(t *testing.T) {
type ImageCacheConfigSuite struct {
ctest.DefaultSuite
-
- mountedVolumesMutex sync.Mutex
- mountedVolumes []string
}
type mockServiceRunner struct{}
diff --git a/internal/app/machined/pkg/controllers/ctest/ctest.go b/internal/app/machined/pkg/controllers/ctest/ctest.go
index 059dc5d750..d20752fc9b 100644
--- a/internal/app/machined/pkg/controllers/ctest/ctest.go
+++ b/internal/app/machined/pkg/controllers/ctest/ctest.go
@@ -113,6 +113,26 @@ func (suite *DefaultSuite) Create(res resource.Resource, opts ...state.CreateOpt
suite.Require().NoError(suite.State().Create(suite.Ctx(), res, opts...))
}
+// Update updates a resource in the state of the suite.
+func (suite *DefaultSuite) Update(res resource.Resource, opts ...state.UpdateOption) {
+ suite.Require().NoError(suite.State().Update(suite.Ctx(), res, opts...))
+}
+
+// AddFinalizer adds a finalizer to a resource in the state of the suite.
+func (suite *DefaultSuite) AddFinalizer(resourcePointer resource.Pointer, finalizer string) {
+ suite.Require().NoError(suite.State().AddFinalizer(suite.Ctx(), resourcePointer, finalizer))
+}
+
+// RemoveFinalizer removes a finalizer from a resource in the state of the suite.
+func (suite *DefaultSuite) RemoveFinalizer(resourcePointer resource.Pointer, finalizer string) {
+ suite.Require().NoError(suite.State().RemoveFinalizer(suite.Ctx(), resourcePointer, finalizer))
+}
+
+// Destroy destroys a resource in the state of the suite.
+func (suite *DefaultSuite) Destroy(res resource.Resource, opts ...state.DestroyOption) {
+ suite.Require().NoError(suite.State().Destroy(suite.Ctx(), res.Metadata(), opts...))
+}
+
// Suite is a type which describes the suite type.
type Suite interface {
T() *testing.T
diff --git a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
index c1ada9dfc1..8019a3c4ff 100644
--- a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
+++ b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
@@ -40,7 +40,6 @@ import (
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
runtimelogging "github.com/siderolabs/talos/internal/app/machined/pkg/runtime/logging"
"github.com/siderolabs/talos/internal/app/machined/pkg/system"
- "github.com/siderolabs/talos/internal/pkg/mount"
"github.com/siderolabs/talos/pkg/logging"
talosconfig "github.com/siderolabs/talos/pkg/machinery/config/config"
"github.com/siderolabs/talos/pkg/machinery/constants"
@@ -97,6 +96,9 @@ func (ctrl *Controller) Run(ctx context.Context, drainer *runtime.Drainer) error
&block.LVMActivationController{
V1Alpha1Mode: ctrl.v1alpha1Runtime.State().Platform().Mode(),
},
+ &block.MountController{},
+ &block.MountRequestController{},
+ &block.MountStatusController{},
&block.SymlinksController{},
&block.SystemDiskController{},
&block.UserDiskConfigController{},
@@ -134,7 +136,6 @@ func (ctrl *Controller) Run(ctx context.Context, drainer *runtime.Drainer) error
&config.MachineTypeController{},
&cri.ImageCacheConfigController{
V1Alpha1ServiceManager: system.Services(ctrl.v1alpha1Runtime),
- VolumeMounter: mount.IdempotentSystemPartitionMounter(ctrl.v1alpha1Runtime),
},
&cri.SeccompProfileController{},
&cri.SeccompProfileFileController{
diff --git a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go
index fd26f33627..51603bcfde 100644
--- a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go
+++ b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go
@@ -100,11 +100,15 @@ func NewState() (*State, error) {
&block.DiscoveryRefreshRequest{},
&block.DiscoveryRefreshStatus{},
&block.Disk{},
+ &block.MountRequest{},
+ &block.MountStatus{},
&block.Symlink{},
&block.SystemDisk{},
&block.UserDiskConfigStatus{},
&block.VolumeConfig{},
&block.VolumeLifecycle{},
+ &block.VolumeMountRequest{},
+ &block.VolumeMountStatus{},
&block.VolumeStatus{},
&cluster.Affiliate{},
&cluster.Config{},
diff --git a/internal/pkg/mount/system.go b/internal/pkg/mount/system.go
index 3d39f5fd0f..7197c14da6 100644
--- a/internal/pkg/mount/system.go
+++ b/internal/pkg/mount/system.go
@@ -26,27 +26,6 @@ var (
mountpointsMutex sync.RWMutex
)
-// IdempotentSystemPartitionMounter is a temporary workaround for not having proper volume mount controller.
-func IdempotentSystemPartitionMounter(r runtime.Runtime) func(label string, opts ...mountv2.NewPointOption) error {
- return func(label string, opts ...mountv2.NewPointOption) error {
- if IsSystemPartitionMounted(label) {
- return nil
- }
-
- return SystemPartitionMount(context.Background(), r, log.Default(), label, false, opts...)
- }
-}
-
-// IsSystemPartitionMounted checks if a system partition is mounted by the label.
-func IsSystemPartitionMounted(label string) bool {
- mountpointsMutex.RLock()
- defer mountpointsMutex.RUnlock()
-
- _, ok := unmounters[label]
-
- return ok
-}
-
// SystemPartitionMount mounts a system partition by the label.
func SystemPartitionMount(ctx context.Context, r runtime.Runtime, logger *log.Logger, label string, silent bool, opts ...mountv2.NewPointOption) (err error) {
volumeStatus, err := safe.StateGetByID[*block.VolumeStatus](ctx, r.State().V1Alpha2().Resources(), label)
diff --git a/internal/pkg/mount/v2/mount.go b/internal/pkg/mount/v2/mount.go
index 2d6e1fe2cc..e5b39a070c 100644
--- a/internal/pkg/mount/v2/mount.go
+++ b/internal/pkg/mount/v2/mount.go
@@ -196,6 +196,21 @@ func WithUnmountPrinter(printer func(string, ...any)) UnmountOption {
}
}
+// Source returns the mount source.
+func (p *Point) Source() string {
+ return p.source
+}
+
+// Target returns the mount target.
+func (p *Point) Target() string {
+ return p.target
+}
+
+// FSType returns the mount filesystem type.
+func (p *Point) FSType() string {
+ return p.fstype
+}
+
// IsMounted checks if the mount point is mounted by checking the mount on the target.
func (p *Point) IsMounted() (bool, error) {
f, err := os.Open("/proc/mounts")
@@ -298,6 +313,20 @@ func (p *Point) Move(newTarget string) error {
return unix.Mount(p.target, newTarget, "", unix.MS_MOVE, "")
}
+// RemountReadOnly remounts the mount point as read-only.
+func (p *Point) RemountReadOnly() error {
+ p.flags |= unix.MS_RDONLY
+
+ return p.remount()
+}
+
+// RemountReadWrite remounts the mount point as read-write.
+func (p *Point) RemountReadWrite() error {
+ p.flags &^= unix.MS_RDONLY
+
+ return p.remount()
+}
+
func (p *Point) mount() error {
if err := unix.Mount(p.source, p.target, p.fstype, p.flags, p.data); err != nil {
return err
@@ -314,6 +343,10 @@ func (p *Point) share() error {
return unix.Mount("", p.target, "", unix.MS_SHARED|unix.MS_REC, "")
}
+func (p *Point) remount() error {
+ return unix.Mount("", p.target, "", unix.MS_REMOUNT|p.flags, "")
+}
+
//nolint:gocyclo
func (p *Point) retry(f func() error, isUnmount bool, printerOptions PrinterOptions) error {
return retry.Constant(5*time.Second, retry.WithUnits(50*time.Millisecond)).Retry(func() error {
diff --git a/pkg/machinery/api/resource/definitions/block/block.pb.go b/pkg/machinery/api/resource/definitions/block/block.pb.go
index 71180bfde1..0cf19fd409 100644
--- a/pkg/machinery/api/resource/definitions/block/block.pb.go
+++ b/pkg/machinery/api/resource/definitions/block/block.pb.go
@@ -898,18 +898,96 @@ func (x *LocatorSpec) GetMatch() *v1alpha1.CheckedExpr {
return nil
}
+// MountRequestSpec is the spec for MountRequest.
+type MountRequestSpec struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
+ ParentMountId string `protobuf:"bytes,2,opt,name=parent_mount_id,json=parentMountId,proto3" json:"parent_mount_id,omitempty"`
+ Requesters []string `protobuf:"bytes,3,rep,name=requesters,proto3" json:"requesters,omitempty"`
+ RequesterIDs []string `protobuf:"bytes,4,rep,name=requester_i_ds,json=requesterIDs,proto3" json:"requester_i_ds,omitempty"`
+ ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MountRequestSpec) Reset() {
+ *x = MountRequestSpec{}
+ mi := &file_resource_definitions_block_block_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MountRequestSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MountRequestSpec) ProtoMessage() {}
+
+func (x *MountRequestSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_resource_definitions_block_block_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MountRequestSpec.ProtoReflect.Descriptor instead.
+func (*MountRequestSpec) Descriptor() ([]byte, []int) {
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *MountRequestSpec) GetVolumeId() string {
+ if x != nil {
+ return x.VolumeId
+ }
+ return ""
+}
+
+func (x *MountRequestSpec) GetParentMountId() string {
+ if x != nil {
+ return x.ParentMountId
+ }
+ return ""
+}
+
+func (x *MountRequestSpec) GetRequesters() []string {
+ if x != nil {
+ return x.Requesters
+ }
+ return nil
+}
+
+func (x *MountRequestSpec) GetRequesterIDs() []string {
+ if x != nil {
+ return x.RequesterIDs
+ }
+ return nil
+}
+
+func (x *MountRequestSpec) GetReadOnly() bool {
+ if x != nil {
+ return x.ReadOnly
+ }
+ return false
+}
+
// MountSpec is the spec for volume mount.
type MountSpec struct {
state protoimpl.MessageState `protogen:"open.v1"`
TargetPath string `protobuf:"bytes,1,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"`
SelinuxLabel string `protobuf:"bytes,2,opt,name=selinux_label,json=selinuxLabel,proto3" json:"selinux_label,omitempty"`
+ Options []string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MountSpec) Reset() {
*x = MountSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[10]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -921,7 +999,7 @@ func (x *MountSpec) String() string {
func (*MountSpec) ProtoMessage() {}
func (x *MountSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[10]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -934,7 +1012,7 @@ func (x *MountSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use MountSpec.ProtoReflect.Descriptor instead.
func (*MountSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{10}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{11}
}
func (x *MountSpec) GetTargetPath() string {
@@ -951,6 +1029,90 @@ func (x *MountSpec) GetSelinuxLabel() string {
return ""
}
+func (x *MountSpec) GetOptions() []string {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+// MountStatusSpec is the spec for MountStatus.
+type MountStatusSpec struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Spec *MountRequestSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
+ Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
+ Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
+ Filesystem enums.BlockFilesystemType `protobuf:"varint,4,opt,name=filesystem,proto3,enum=talos.resource.definitions.enums.BlockFilesystemType" json:"filesystem,omitempty"`
+ ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MountStatusSpec) Reset() {
+ *x = MountStatusSpec{}
+ mi := &file_resource_definitions_block_block_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MountStatusSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MountStatusSpec) ProtoMessage() {}
+
+func (x *MountStatusSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_resource_definitions_block_block_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MountStatusSpec.ProtoReflect.Descriptor instead.
+func (*MountStatusSpec) Descriptor() ([]byte, []int) {
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *MountStatusSpec) GetSpec() *MountRequestSpec {
+ if x != nil {
+ return x.Spec
+ }
+ return nil
+}
+
+func (x *MountStatusSpec) GetTarget() string {
+ if x != nil {
+ return x.Target
+ }
+ return ""
+}
+
+func (x *MountStatusSpec) GetSource() string {
+ if x != nil {
+ return x.Source
+ }
+ return ""
+}
+
+func (x *MountStatusSpec) GetFilesystem() enums.BlockFilesystemType {
+ if x != nil {
+ return x.Filesystem
+ }
+ return enums.BlockFilesystemType(0)
+}
+
+func (x *MountStatusSpec) GetReadOnly() bool {
+ if x != nil {
+ return x.ReadOnly
+ }
+ return false
+}
+
// PartitionSpec is the spec for volume partitioning.
type PartitionSpec struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -965,7 +1127,7 @@ type PartitionSpec struct {
func (x *PartitionSpec) Reset() {
*x = PartitionSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[11]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -977,7 +1139,7 @@ func (x *PartitionSpec) String() string {
func (*PartitionSpec) ProtoMessage() {}
func (x *PartitionSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[11]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -990,7 +1152,7 @@ func (x *PartitionSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use PartitionSpec.ProtoReflect.Descriptor instead.
func (*PartitionSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{11}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{13}
}
func (x *PartitionSpec) GetMinSize() uint64 {
@@ -1041,7 +1203,7 @@ type ProvisioningSpec struct {
func (x *ProvisioningSpec) Reset() {
*x = ProvisioningSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[12]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1053,7 +1215,7 @@ func (x *ProvisioningSpec) String() string {
func (*ProvisioningSpec) ProtoMessage() {}
func (x *ProvisioningSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[12]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1066,7 +1228,7 @@ func (x *ProvisioningSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use ProvisioningSpec.ProtoReflect.Descriptor instead.
func (*ProvisioningSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{12}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{14}
}
func (x *ProvisioningSpec) GetDiskSelector() *DiskSelector {
@@ -1107,7 +1269,7 @@ type SymlinkSpec struct {
func (x *SymlinkSpec) Reset() {
*x = SymlinkSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[13]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1119,7 +1281,7 @@ func (x *SymlinkSpec) String() string {
func (*SymlinkSpec) ProtoMessage() {}
func (x *SymlinkSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[13]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1132,7 +1294,7 @@ func (x *SymlinkSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use SymlinkSpec.ProtoReflect.Descriptor instead.
func (*SymlinkSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{13}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{15}
}
func (x *SymlinkSpec) GetPaths() []string {
@@ -1153,7 +1315,7 @@ type SystemDiskSpec struct {
func (x *SystemDiskSpec) Reset() {
*x = SystemDiskSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[14]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1165,7 +1327,7 @@ func (x *SystemDiskSpec) String() string {
func (*SystemDiskSpec) ProtoMessage() {}
func (x *SystemDiskSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[14]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1178,7 +1340,7 @@ func (x *SystemDiskSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use SystemDiskSpec.ProtoReflect.Descriptor instead.
func (*SystemDiskSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{14}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{16}
}
func (x *SystemDiskSpec) GetDiskId() string {
@@ -1205,7 +1367,7 @@ type UserDiskConfigStatusSpec struct {
func (x *UserDiskConfigStatusSpec) Reset() {
*x = UserDiskConfigStatusSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[15]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1217,7 +1379,7 @@ func (x *UserDiskConfigStatusSpec) String() string {
func (*UserDiskConfigStatusSpec) ProtoMessage() {}
func (x *UserDiskConfigStatusSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[15]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1230,7 +1392,7 @@ func (x *UserDiskConfigStatusSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserDiskConfigStatusSpec.ProtoReflect.Descriptor instead.
func (*UserDiskConfigStatusSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{15}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{17}
}
func (x *UserDiskConfigStatusSpec) GetReady() bool {
@@ -1255,7 +1417,7 @@ type VolumeConfigSpec struct {
func (x *VolumeConfigSpec) Reset() {
*x = VolumeConfigSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[16]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1267,7 +1429,7 @@ func (x *VolumeConfigSpec) String() string {
func (*VolumeConfigSpec) ProtoMessage() {}
func (x *VolumeConfigSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[16]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1280,7 +1442,7 @@ func (x *VolumeConfigSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use VolumeConfigSpec.ProtoReflect.Descriptor instead.
func (*VolumeConfigSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{16}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{18}
}
func (x *VolumeConfigSpec) GetParentId() string {
@@ -1325,6 +1487,136 @@ func (x *VolumeConfigSpec) GetEncryption() *EncryptionSpec {
return nil
}
+// VolumeMountRequestSpec is the spec for VolumeMountRequest.
+type VolumeMountRequestSpec struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
+ Requester string `protobuf:"bytes,2,opt,name=requester,proto3" json:"requester,omitempty"`
+ ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *VolumeMountRequestSpec) Reset() {
+ *x = VolumeMountRequestSpec{}
+ mi := &file_resource_definitions_block_block_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *VolumeMountRequestSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VolumeMountRequestSpec) ProtoMessage() {}
+
+func (x *VolumeMountRequestSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_resource_definitions_block_block_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VolumeMountRequestSpec.ProtoReflect.Descriptor instead.
+func (*VolumeMountRequestSpec) Descriptor() ([]byte, []int) {
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *VolumeMountRequestSpec) GetVolumeId() string {
+ if x != nil {
+ return x.VolumeId
+ }
+ return ""
+}
+
+func (x *VolumeMountRequestSpec) GetRequester() string {
+ if x != nil {
+ return x.Requester
+ }
+ return ""
+}
+
+func (x *VolumeMountRequestSpec) GetReadOnly() bool {
+ if x != nil {
+ return x.ReadOnly
+ }
+ return false
+}
+
+// VolumeMountStatusSpec is the spec for VolumeMountStatus.
+type VolumeMountStatusSpec struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
+ Requester string `protobuf:"bytes,2,opt,name=requester,proto3" json:"requester,omitempty"`
+ Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
+ ReadOnly bool `protobuf:"varint,4,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *VolumeMountStatusSpec) Reset() {
+ *x = VolumeMountStatusSpec{}
+ mi := &file_resource_definitions_block_block_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *VolumeMountStatusSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VolumeMountStatusSpec) ProtoMessage() {}
+
+func (x *VolumeMountStatusSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_resource_definitions_block_block_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VolumeMountStatusSpec.ProtoReflect.Descriptor instead.
+func (*VolumeMountStatusSpec) Descriptor() ([]byte, []int) {
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *VolumeMountStatusSpec) GetVolumeId() string {
+ if x != nil {
+ return x.VolumeId
+ }
+ return ""
+}
+
+func (x *VolumeMountStatusSpec) GetRequester() string {
+ if x != nil {
+ return x.Requester
+ }
+ return ""
+}
+
+func (x *VolumeMountStatusSpec) GetTarget() string {
+ if x != nil {
+ return x.Target
+ }
+ return ""
+}
+
+func (x *VolumeMountStatusSpec) GetReadOnly() bool {
+ if x != nil {
+ return x.ReadOnly
+ }
+ return false
+}
+
// VolumeStatusSpec is the spec for VolumeStatus resource.
type VolumeStatusSpec struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1342,13 +1634,14 @@ type VolumeStatusSpec struct {
EncryptionProvider enums.BlockEncryptionProviderType `protobuf:"varint,12,opt,name=encryption_provider,json=encryptionProvider,proto3,enum=talos.resource.definitions.enums.BlockEncryptionProviderType" json:"encryption_provider,omitempty"`
PrettySize string `protobuf:"bytes,13,opt,name=pretty_size,json=prettySize,proto3" json:"pretty_size,omitempty"`
EncryptionFailedSyncs []string `protobuf:"bytes,14,rep,name=encryption_failed_syncs,json=encryptionFailedSyncs,proto3" json:"encryption_failed_syncs,omitempty"`
+ MountSpec *MountSpec `protobuf:"bytes,15,opt,name=mount_spec,json=mountSpec,proto3" json:"mount_spec,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *VolumeStatusSpec) Reset() {
*x = VolumeStatusSpec{}
- mi := &file_resource_definitions_block_block_proto_msgTypes[17]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1360,7 +1653,7 @@ func (x *VolumeStatusSpec) String() string {
func (*VolumeStatusSpec) ProtoMessage() {}
func (x *VolumeStatusSpec) ProtoReflect() protoreflect.Message {
- mi := &file_resource_definitions_block_block_proto_msgTypes[17]
+ mi := &file_resource_definitions_block_block_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1373,7 +1666,7 @@ func (x *VolumeStatusSpec) ProtoReflect() protoreflect.Message {
// Deprecated: Use VolumeStatusSpec.ProtoReflect.Descriptor instead.
func (*VolumeStatusSpec) Descriptor() ([]byte, []int) {
- return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{17}
+ return file_resource_definitions_block_block_proto_rawDescGZIP(), []int{21}
}
func (x *VolumeStatusSpec) GetPhase() enums.BlockVolumePhase {
@@ -1474,6 +1767,13 @@ func (x *VolumeStatusSpec) GetEncryptionFailedSyncs() []string {
return nil
}
+func (x *VolumeStatusSpec) GetMountSpec() *MountSpec {
+ if x != nil {
+ return x.MountSpec
+ }
+ return nil
+}
+
var File_resource_definitions_block_block_proto protoreflect.FileDescriptor
var file_resource_definitions_block_block_proto_rawDesc = []byte{
@@ -1634,131 +1934,180 @@ var file_resource_definitions_block_block_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x05, 0x6d, 0x61, 0x74,
- 0x63, 0x68, 0x22, 0x51, 0x0a, 0x09, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12,
- 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68,
- 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x5f, 0x6c, 0x61, 0x62, 0x65,
- 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x75, 0x78,
- 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x8c, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, 0x73,
- 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x53, 0x69,
- 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a,
- 0x04, 0x67, 0x72, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x67, 0x72, 0x6f,
- 0x77, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f,
- 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65,
- 0x55, 0x75, 0x69, 0x64, 0x22, 0xae, 0x02, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
- 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x53, 0x0a, 0x0d, 0x64, 0x69, 0x73,
- 0x6b, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x2e, 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, 0x62, 0x6c,
- 0x6f, 0x63, 0x6b, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x52, 0x0c, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x56,
- 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, 0x76, 0x65, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x61, 0x76, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x66, 0x69,
- 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65,
- 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65,
- 0x6d, 0x53, 0x70, 0x65, 0x63, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b,
- 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x44, 0x0a, 0x0e, 0x53, 0x79,
- 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x17, 0x0a, 0x07,
- 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
- 0x69, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x5f, 0x70, 0x61, 0x74,
- 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x76, 0x50, 0x61, 0x74, 0x68,
- 0x22, 0x30, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 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, 0xac, 0x03, 0x0a, 0x10, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x31, 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, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x70,
- 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 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, 0x62,
- 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
- 0x67, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
- 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x53,
- 0x70, 0x65, 0x63, 0x52, 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x05,
- 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x61,
+ 0x63, 0x68, 0x22, 0xba, 0x01, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75,
+ 0x6d, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0e,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x5f, 0x64, 0x73, 0x18, 0x04,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49,
+ 0x44, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22,
+ 0x6b, 0x0a, 0x09, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a,
+ 0x0d, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x4c, 0x61, 0x62,
+ 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfd, 0x01, 0x0a,
+ 0x0f, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70, 0x65, 0x63,
+ 0x12, 0x46, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 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, 0x62, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x70,
+ 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 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, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 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,
+ 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12,
+ 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x8c, 0x01, 0x0a,
+ 0x0d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x19,
+ 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78,
+ 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x72, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x04, 0x67, 0x72, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b,
+ 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x75, 0x69, 0x64, 0x22, 0xae, 0x02, 0x0a, 0x10,
+ 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63,
+ 0x12, 0x53, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53,
+ 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x6c,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0d,
+ 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a,
+ 0x04, 0x77, 0x61, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x61, 0x76,
+ 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f,
+ 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x46, 0x69,
+ 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x66, 0x69,
+ 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x22, 0x23, 0x0a, 0x0b,
+ 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x70,
+ 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68,
+ 0x73, 0x22, 0x44, 0x0a, 0x0e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x53,
+ 0x70, 0x65, 0x63, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08,
+ 0x64, 0x65, 0x76, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x64, 0x65, 0x76, 0x50, 0x61, 0x74, 0x68, 0x22, 0x30, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x44,
+ 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0xac, 0x03, 0x0a, 0x10, 0x56, 0x6f,
+ 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1b,
+ 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 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, 0x42, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
+ 0x70, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69,
+ 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0c, 0x70, 0x72,
+ 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x07, 0x6c, 0x6f,
+ 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d,
- 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12,
- 0x50, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x22, 0xdf, 0x05, 0x0a, 0x10, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x48, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0e, 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, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f,
- 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65,
- 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d,
- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70,
- 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x75, 0x69, 0x64, 0x12, 0x58, 0x0a, 0x0e,
- 0x70, 0x72, 0x65, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x0e, 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, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f, 0x6c,
- 0x75, 0x6d, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x46, 0x61, 0x69,
- 0x6c, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65,
- 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x55, 0x0a, 0x0a,
- 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0a, 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, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
- 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
- 0x74, 0x65, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x75,
- 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a, 0x13, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e,
+ 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4c,
+ 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x07, 0x6c, 0x6f, 0x63, 0x61,
+ 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2b, 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,
+ 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52,
+ 0x05, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x45, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x65, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x16, 0x56, 0x6f, 0x6c, 0x75,
+ 0x6d, 0x65, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x70,
+ 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12,
+ 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a,
+ 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x87, 0x01, 0x0a, 0x15, 0x56,
+ 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x53, 0x70, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49,
+ 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12,
+ 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f,
+ 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64,
+ 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xab, 0x06, 0x0a, 0x10, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x48, 0x0a, 0x05, 0x70, 0x68, 0x61,
+ 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 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, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68,
+ 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74,
+ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x75, 0x69, 0x64, 0x12,
+ 0x58, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x68, 0x61, 0x73,
+ 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 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, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
- 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72,
- 0x65, 0x74, 0x74, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0a, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
- 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x79,
- 0x6e, 0x63, 0x73, 0x42, 0x74, 0x0a, 0x28, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x64, 0x65,
- 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5a,
- 0x48, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x65,
+ 0x46, 0x61, 0x69, 0x6c, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x61, 0x72,
+ 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12,
+ 0x55, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0a, 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, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x65,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
+ 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a,
+ 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 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, 0x42, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0d, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36,
+ 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69,
+ 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65,
+ 0x64, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
+ 0x73, 0x70, 0x65, 0x63, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4d, 0x6f,
+ 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70,
+ 0x65, 0x63, 0x42, 0x74, 0x0a, 0x28, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x64, 0x65, 0x66,
+ 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5a, 0x48,
+ 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1773,7 +2122,7 @@ func file_resource_definitions_block_block_proto_rawDescGZIP() []byte {
return file_resource_definitions_block_block_proto_rawDescData
}
-var file_resource_definitions_block_block_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_resource_definitions_block_block_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_resource_definitions_block_block_proto_goTypes = []any{
(*DeviceSpec)(nil), // 0: talos.resource.definitions.block.DeviceSpec
(*DiscoveredVolumeSpec)(nil), // 1: talos.resource.definitions.block.DiscoveredVolumeSpec
@@ -1785,45 +2134,52 @@ var file_resource_definitions_block_block_proto_goTypes = []any{
(*EncryptionSpec)(nil), // 7: talos.resource.definitions.block.EncryptionSpec
(*FilesystemSpec)(nil), // 8: talos.resource.definitions.block.FilesystemSpec
(*LocatorSpec)(nil), // 9: talos.resource.definitions.block.LocatorSpec
- (*MountSpec)(nil), // 10: talos.resource.definitions.block.MountSpec
- (*PartitionSpec)(nil), // 11: talos.resource.definitions.block.PartitionSpec
- (*ProvisioningSpec)(nil), // 12: talos.resource.definitions.block.ProvisioningSpec
- (*SymlinkSpec)(nil), // 13: talos.resource.definitions.block.SymlinkSpec
- (*SystemDiskSpec)(nil), // 14: talos.resource.definitions.block.SystemDiskSpec
- (*UserDiskConfigStatusSpec)(nil), // 15: talos.resource.definitions.block.UserDiskConfigStatusSpec
- (*VolumeConfigSpec)(nil), // 16: talos.resource.definitions.block.VolumeConfigSpec
- (*VolumeStatusSpec)(nil), // 17: talos.resource.definitions.block.VolumeStatusSpec
- (*v1alpha1.CheckedExpr)(nil), // 18: google.api.expr.v1alpha1.CheckedExpr
- (enums.BlockEncryptionKeyType)(0), // 19: talos.resource.definitions.enums.BlockEncryptionKeyType
- (enums.BlockEncryptionProviderType)(0), // 20: talos.resource.definitions.enums.BlockEncryptionProviderType
- (enums.BlockFilesystemType)(0), // 21: talos.resource.definitions.enums.BlockFilesystemType
- (enums.BlockVolumeType)(0), // 22: talos.resource.definitions.enums.BlockVolumeType
- (enums.BlockVolumePhase)(0), // 23: talos.resource.definitions.enums.BlockVolumePhase
+ (*MountRequestSpec)(nil), // 10: talos.resource.definitions.block.MountRequestSpec
+ (*MountSpec)(nil), // 11: talos.resource.definitions.block.MountSpec
+ (*MountStatusSpec)(nil), // 12: talos.resource.definitions.block.MountStatusSpec
+ (*PartitionSpec)(nil), // 13: talos.resource.definitions.block.PartitionSpec
+ (*ProvisioningSpec)(nil), // 14: talos.resource.definitions.block.ProvisioningSpec
+ (*SymlinkSpec)(nil), // 15: talos.resource.definitions.block.SymlinkSpec
+ (*SystemDiskSpec)(nil), // 16: talos.resource.definitions.block.SystemDiskSpec
+ (*UserDiskConfigStatusSpec)(nil), // 17: talos.resource.definitions.block.UserDiskConfigStatusSpec
+ (*VolumeConfigSpec)(nil), // 18: talos.resource.definitions.block.VolumeConfigSpec
+ (*VolumeMountRequestSpec)(nil), // 19: talos.resource.definitions.block.VolumeMountRequestSpec
+ (*VolumeMountStatusSpec)(nil), // 20: talos.resource.definitions.block.VolumeMountStatusSpec
+ (*VolumeStatusSpec)(nil), // 21: talos.resource.definitions.block.VolumeStatusSpec
+ (*v1alpha1.CheckedExpr)(nil), // 22: google.api.expr.v1alpha1.CheckedExpr
+ (enums.BlockEncryptionKeyType)(0), // 23: talos.resource.definitions.enums.BlockEncryptionKeyType
+ (enums.BlockEncryptionProviderType)(0), // 24: talos.resource.definitions.enums.BlockEncryptionProviderType
+ (enums.BlockFilesystemType)(0), // 25: talos.resource.definitions.enums.BlockFilesystemType
+ (enums.BlockVolumeType)(0), // 26: talos.resource.definitions.enums.BlockVolumeType
+ (enums.BlockVolumePhase)(0), // 27: talos.resource.definitions.enums.BlockVolumePhase
}
var file_resource_definitions_block_block_proto_depIdxs = []int32{
- 18, // 0: talos.resource.definitions.block.DiskSelector.match:type_name -> google.api.expr.v1alpha1.CheckedExpr
- 19, // 1: talos.resource.definitions.block.EncryptionKey.type:type_name -> talos.resource.definitions.enums.BlockEncryptionKeyType
- 20, // 2: talos.resource.definitions.block.EncryptionSpec.provider:type_name -> talos.resource.definitions.enums.BlockEncryptionProviderType
+ 22, // 0: talos.resource.definitions.block.DiskSelector.match:type_name -> google.api.expr.v1alpha1.CheckedExpr
+ 23, // 1: talos.resource.definitions.block.EncryptionKey.type:type_name -> talos.resource.definitions.enums.BlockEncryptionKeyType
+ 24, // 2: talos.resource.definitions.block.EncryptionSpec.provider:type_name -> talos.resource.definitions.enums.BlockEncryptionProviderType
6, // 3: talos.resource.definitions.block.EncryptionSpec.keys:type_name -> talos.resource.definitions.block.EncryptionKey
- 21, // 4: talos.resource.definitions.block.FilesystemSpec.type:type_name -> talos.resource.definitions.enums.BlockFilesystemType
- 18, // 5: talos.resource.definitions.block.LocatorSpec.match:type_name -> google.api.expr.v1alpha1.CheckedExpr
- 4, // 6: talos.resource.definitions.block.ProvisioningSpec.disk_selector:type_name -> talos.resource.definitions.block.DiskSelector
- 11, // 7: talos.resource.definitions.block.ProvisioningSpec.partition_spec:type_name -> talos.resource.definitions.block.PartitionSpec
- 8, // 8: talos.resource.definitions.block.ProvisioningSpec.filesystem_spec:type_name -> talos.resource.definitions.block.FilesystemSpec
- 22, // 9: talos.resource.definitions.block.VolumeConfigSpec.type:type_name -> talos.resource.definitions.enums.BlockVolumeType
- 12, // 10: talos.resource.definitions.block.VolumeConfigSpec.provisioning:type_name -> talos.resource.definitions.block.ProvisioningSpec
- 9, // 11: talos.resource.definitions.block.VolumeConfigSpec.locator:type_name -> talos.resource.definitions.block.LocatorSpec
- 10, // 12: talos.resource.definitions.block.VolumeConfigSpec.mount:type_name -> talos.resource.definitions.block.MountSpec
- 7, // 13: talos.resource.definitions.block.VolumeConfigSpec.encryption:type_name -> talos.resource.definitions.block.EncryptionSpec
- 23, // 14: talos.resource.definitions.block.VolumeStatusSpec.phase:type_name -> talos.resource.definitions.enums.BlockVolumePhase
- 23, // 15: talos.resource.definitions.block.VolumeStatusSpec.pre_fail_phase:type_name -> talos.resource.definitions.enums.BlockVolumePhase
- 21, // 16: talos.resource.definitions.block.VolumeStatusSpec.filesystem:type_name -> talos.resource.definitions.enums.BlockFilesystemType
- 20, // 17: talos.resource.definitions.block.VolumeStatusSpec.encryption_provider:type_name -> talos.resource.definitions.enums.BlockEncryptionProviderType
- 18, // [18:18] is the sub-list for method output_type
- 18, // [18:18] is the sub-list for method input_type
- 18, // [18:18] is the sub-list for extension type_name
- 18, // [18:18] is the sub-list for extension extendee
- 0, // [0:18] is the sub-list for field type_name
+ 25, // 4: talos.resource.definitions.block.FilesystemSpec.type:type_name -> talos.resource.definitions.enums.BlockFilesystemType
+ 22, // 5: talos.resource.definitions.block.LocatorSpec.match:type_name -> google.api.expr.v1alpha1.CheckedExpr
+ 10, // 6: talos.resource.definitions.block.MountStatusSpec.spec:type_name -> talos.resource.definitions.block.MountRequestSpec
+ 25, // 7: talos.resource.definitions.block.MountStatusSpec.filesystem:type_name -> talos.resource.definitions.enums.BlockFilesystemType
+ 4, // 8: talos.resource.definitions.block.ProvisioningSpec.disk_selector:type_name -> talos.resource.definitions.block.DiskSelector
+ 13, // 9: talos.resource.definitions.block.ProvisioningSpec.partition_spec:type_name -> talos.resource.definitions.block.PartitionSpec
+ 8, // 10: talos.resource.definitions.block.ProvisioningSpec.filesystem_spec:type_name -> talos.resource.definitions.block.FilesystemSpec
+ 26, // 11: talos.resource.definitions.block.VolumeConfigSpec.type:type_name -> talos.resource.definitions.enums.BlockVolumeType
+ 14, // 12: talos.resource.definitions.block.VolumeConfigSpec.provisioning:type_name -> talos.resource.definitions.block.ProvisioningSpec
+ 9, // 13: talos.resource.definitions.block.VolumeConfigSpec.locator:type_name -> talos.resource.definitions.block.LocatorSpec
+ 11, // 14: talos.resource.definitions.block.VolumeConfigSpec.mount:type_name -> talos.resource.definitions.block.MountSpec
+ 7, // 15: talos.resource.definitions.block.VolumeConfigSpec.encryption:type_name -> talos.resource.definitions.block.EncryptionSpec
+ 27, // 16: talos.resource.definitions.block.VolumeStatusSpec.phase:type_name -> talos.resource.definitions.enums.BlockVolumePhase
+ 27, // 17: talos.resource.definitions.block.VolumeStatusSpec.pre_fail_phase:type_name -> talos.resource.definitions.enums.BlockVolumePhase
+ 25, // 18: talos.resource.definitions.block.VolumeStatusSpec.filesystem:type_name -> talos.resource.definitions.enums.BlockFilesystemType
+ 24, // 19: talos.resource.definitions.block.VolumeStatusSpec.encryption_provider:type_name -> talos.resource.definitions.enums.BlockEncryptionProviderType
+ 11, // 20: talos.resource.definitions.block.VolumeStatusSpec.mount_spec:type_name -> talos.resource.definitions.block.MountSpec
+ 21, // [21:21] is the sub-list for method output_type
+ 21, // [21:21] is the sub-list for method input_type
+ 21, // [21:21] is the sub-list for extension type_name
+ 21, // [21:21] is the sub-list for extension extendee
+ 0, // [0:21] is the sub-list for field type_name
}
func init() { file_resource_definitions_block_block_proto_init() }
@@ -1837,7 +2193,7 @@ func file_resource_definitions_block_block_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_resource_definitions_block_block_proto_rawDesc,
NumEnums: 0,
- NumMessages: 18,
+ NumMessages: 22,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pkg/machinery/api/resource/definitions/block/block_vtproto.pb.go b/pkg/machinery/api/resource/definitions/block/block_vtproto.pb.go
index 20880292f2..f5733d158d 100644
--- a/pkg/machinery/api/resource/definitions/block/block_vtproto.pb.go
+++ b/pkg/machinery/api/resource/definitions/block/block_vtproto.pb.go
@@ -819,6 +819,81 @@ func (m *LocatorSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *MountRequestSpec) 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 *MountRequestSpec) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *MountRequestSpec) 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 m.ReadOnly {
+ i--
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ if len(m.RequesterIDs) > 0 {
+ for iNdEx := len(m.RequesterIDs) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.RequesterIDs[iNdEx])
+ copy(dAtA[i:], m.RequesterIDs[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequesterIDs[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Requesters) > 0 {
+ for iNdEx := len(m.Requesters) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Requesters[iNdEx])
+ copy(dAtA[i:], m.Requesters[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Requesters[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.ParentMountId) > 0 {
+ i -= len(m.ParentMountId)
+ copy(dAtA[i:], m.ParentMountId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentMountId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.VolumeId) > 0 {
+ i -= len(m.VolumeId)
+ copy(dAtA[i:], m.VolumeId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VolumeId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func (m *MountSpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
@@ -849,6 +924,15 @@ func (m *MountSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
+ if len(m.Options) > 0 {
+ for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Options[iNdEx])
+ copy(dAtA[i:], m.Options[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Options[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
if len(m.SelinuxLabel) > 0 {
i -= len(m.SelinuxLabel)
copy(dAtA[i:], m.SelinuxLabel)
@@ -866,6 +950,78 @@ func (m *MountSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *MountStatusSpec) 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 *MountStatusSpec) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *MountStatusSpec) 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 m.ReadOnly {
+ i--
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ if m.Filesystem != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Filesystem))
+ i--
+ dAtA[i] = 0x20
+ }
+ if len(m.Source) > 0 {
+ i -= len(m.Source)
+ copy(dAtA[i:], m.Source)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Source)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Target) > 0 {
+ i -= len(m.Target)
+ copy(dAtA[i:], m.Target)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Target)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Spec != nil {
+ size, err := m.Spec.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func (m *PartitionSpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
@@ -1218,6 +1374,127 @@ func (m *VolumeConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *VolumeMountRequestSpec) 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 *VolumeMountRequestSpec) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *VolumeMountRequestSpec) 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 m.ReadOnly {
+ i--
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Requester) > 0 {
+ i -= len(m.Requester)
+ copy(dAtA[i:], m.Requester)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Requester)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.VolumeId) > 0 {
+ i -= len(m.VolumeId)
+ copy(dAtA[i:], m.VolumeId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VolumeId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *VolumeMountStatusSpec) 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 *VolumeMountStatusSpec) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *VolumeMountStatusSpec) 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 m.ReadOnly {
+ i--
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if len(m.Target) > 0 {
+ i -= len(m.Target)
+ copy(dAtA[i:], m.Target)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Target)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Requester) > 0 {
+ i -= len(m.Requester)
+ copy(dAtA[i:], m.Requester)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Requester)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.VolumeId) > 0 {
+ i -= len(m.VolumeId)
+ copy(dAtA[i:], m.VolumeId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VolumeId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func (m *VolumeStatusSpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
@@ -1248,6 +1525,16 @@ func (m *VolumeStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
+ if m.MountSpec != nil {
+ size, err := m.MountSpec.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ }
if len(m.EncryptionFailedSyncs) > 0 {
for iNdEx := len(m.EncryptionFailedSyncs) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.EncryptionFailedSyncs[iNdEx])
@@ -1687,75 +1974,142 @@ func (m *LocatorSpec) SizeVT() (n int) {
return n
}
-func (m *MountSpec) SizeVT() (n int) {
+func (m *MountRequestSpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- l = len(m.TargetPath)
+ l = len(m.VolumeId)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
- l = len(m.SelinuxLabel)
+ l = len(m.ParentMountId)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
+ if len(m.Requesters) > 0 {
+ for _, s := range m.Requesters {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.RequesterIDs) > 0 {
+ for _, s := range m.RequesterIDs {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadOnly {
+ n += 2
+ }
n += len(m.unknownFields)
return n
}
-func (m *PartitionSpec) SizeVT() (n int) {
+func (m *MountSpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- if m.MinSize != 0 {
- n += 1 + protohelpers.SizeOfVarint(uint64(m.MinSize))
- }
- if m.MaxSize != 0 {
- n += 1 + protohelpers.SizeOfVarint(uint64(m.MaxSize))
- }
- if m.Grow {
- n += 2
- }
- l = len(m.Label)
+ l = len(m.TargetPath)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
- l = len(m.TypeUuid)
+ l = len(m.SelinuxLabel)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
+ if len(m.Options) > 0 {
+ for _, s := range m.Options {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
n += len(m.unknownFields)
return n
}
-func (m *ProvisioningSpec) SizeVT() (n int) {
+func (m *MountStatusSpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- if m.DiskSelector != nil {
- l = m.DiskSelector.SizeVT()
+ if m.Spec != nil {
+ l = m.Spec.SizeVT()
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
- if m.PartitionSpec != nil {
- l = m.PartitionSpec.SizeVT()
+ l = len(m.Target)
+ if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
- if m.Wave != 0 {
- n += 1 + protohelpers.SizeOfVarint(uint64(m.Wave))
- }
- if m.FilesystemSpec != nil {
- l = m.FilesystemSpec.SizeVT()
+ l = len(m.Source)
+ if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
- n += len(m.unknownFields)
- return n
-}
+ if m.Filesystem != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Filesystem))
+ }
+ if m.ReadOnly {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PartitionSpec) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.MinSize != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.MinSize))
+ }
+ if m.MaxSize != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.MaxSize))
+ }
+ if m.Grow {
+ n += 2
+ }
+ l = len(m.Label)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.TypeUuid)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ProvisioningSpec) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DiskSelector != nil {
+ l = m.DiskSelector.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PartitionSpec != nil {
+ l = m.PartitionSpec.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Wave != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Wave))
+ }
+ if m.FilesystemSpec != nil {
+ l = m.FilesystemSpec.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
func (m *SymlinkSpec) SizeVT() (n int) {
if m == nil {
@@ -1837,6 +2191,52 @@ func (m *VolumeConfigSpec) SizeVT() (n int) {
return n
}
+func (m *VolumeMountRequestSpec) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.VolumeId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Requester)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ReadOnly {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *VolumeMountStatusSpec) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.VolumeId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Requester)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Target)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ReadOnly {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
func (m *VolumeStatusSpec) SizeVT() (n int) {
if m == nil {
return 0
@@ -1895,6 +2295,10 @@ func (m *VolumeStatusSpec) SizeVT() (n int) {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
}
+ if m.MountSpec != nil {
+ l = m.MountSpec.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
n += len(m.unknownFields)
return n
}
@@ -4119,7 +4523,7 @@ func (m *LocatorSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
+func (m *MountRequestSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4142,15 +4546,15 @@ func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MountSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: MountRequestSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MountSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MountRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetPath", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4178,11 +4582,11 @@ func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.TargetPath = string(dAtA[iNdEx:postIndex])
+ m.VolumeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SelinuxLabel", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentMountId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4210,8 +4614,92 @@ func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.SelinuxLabel = string(dAtA[iNdEx:postIndex])
+ m.ParentMountId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requesters", 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.Requesters = append(m.Requesters, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequesterIDs", 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.RequesterIDs = append(m.RequesterIDs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
@@ -4234,7 +4722,7 @@ func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
+func (m *MountSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4257,17 +4745,17 @@ func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: PartitionSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: MountSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: PartitionSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MountSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MinSize", wireType)
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPath", wireType)
}
- m.MinSize = 0
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4277,53 +4765,27 @@ func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.MinSize |= uint64(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field MaxSize", wireType)
- }
- m.MaxSize = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return protohelpers.ErrIntOverflow
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.MaxSize |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
}
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Grow", wireType)
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
}
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return protohelpers.ErrIntOverflow
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
}
- m.Grow = bool(v != 0)
- case 4:
+ m.TargetPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field SelinuxLabel", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4351,11 +4813,11 @@ func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Label = string(dAtA[iNdEx:postIndex])
+ m.SelinuxLabel = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 5:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TypeUuid", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4383,7 +4845,7 @@ func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.TypeUuid = string(dAtA[iNdEx:postIndex])
+ m.Options = append(m.Options, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -4407,7 +4869,7 @@ func (m *PartitionSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
+func (m *MountStatusSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4430,15 +4892,15 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ProvisioningSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: MountStatusSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ProvisioningSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MountStatusSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DiskSelector", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -4465,18 +4927,18 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.DiskSelector == nil {
- m.DiskSelector = &DiskSelector{}
+ if m.Spec == nil {
+ m.Spec = &MountRequestSpec{}
}
- if err := m.DiskSelector.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.Spec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PartitionSpec", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4486,33 +4948,189 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.PartitionSpec == nil {
- m.PartitionSpec = &PartitionSpec{}
+ m.Target = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
}
- if err := m.PartitionSpec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
+ 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.Source = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filesystem", wireType)
+ }
+ m.Filesystem = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Filesystem |= enums.BlockFilesystemType(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.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 *PartitionSpec) 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 protohelpers.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: PartitionSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PartitionSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinSize", wireType)
+ }
+ m.MinSize = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinSize |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxSize", wireType)
+ }
+ m.MaxSize = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MaxSize |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
case 3:
if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Wave", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Grow", wireType)
}
- m.Wave = 0
+ var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4522,16 +5140,17 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Wave |= int64(b&0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
+ m.Grow = bool(v != 0)
case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FilesystemSpec", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4541,27 +5160,55 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.FilesystemSpec == nil {
- m.FilesystemSpec = &FilesystemSpec{}
+ m.Label = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TypeUuid", wireType)
}
- if err := m.FilesystemSpec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
+ 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.TypeUuid = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -4585,7 +5232,7 @@ func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *SymlinkSpec) UnmarshalVT(dAtA []byte) error {
+func (m *ProvisioningSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4598,27 +5245,633 @@ func (m *SymlinkSpec) UnmarshalVT(dAtA []byte) error {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
+ 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: ProvisioningSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ProvisioningSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiskSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DiskSelector == nil {
+ m.DiskSelector = &DiskSelector{}
+ }
+ if err := m.DiskSelector.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartitionSpec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartitionSpec == nil {
+ m.PartitionSpec = &PartitionSpec{}
+ }
+ if err := m.PartitionSpec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Wave", wireType)
+ }
+ m.Wave = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Wave |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FilesystemSpec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FilesystemSpec == nil {
+ m.FilesystemSpec = &FilesystemSpec{}
+ }
+ if err := m.FilesystemSpec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.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 *SymlinkSpec) 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 protohelpers.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: SymlinkSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SymlinkSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paths", 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.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.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 *SystemDiskSpec) 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 protohelpers.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: SystemDiskSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SystemDiskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiskId", 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.DiskId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DevPath", 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.DevPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.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 *UserDiskConfigStatusSpec) 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 protohelpers.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: UserDiskConfigStatusSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UserDiskConfigStatusSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ready", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ready = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.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 *VolumeConfigSpec) 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 protohelpers.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: VolumeConfigSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentId", 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.ParentId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ m.Type = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Type |= enums.BlockVolumeType(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Provisioning", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Provisioning == nil {
+ m.Provisioning = &ProvisioningSpec{}
+ }
+ if err := m.Provisioning.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Locator", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Locator == nil {
+ m.Locator = &LocatorSpec{}
+ }
+ if err := m.Locator.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Mount == nil {
+ m.Mount = &MountSpec{}
}
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SymlinkSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SymlinkSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
+ if err := m.Mount.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Encryption", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4628,23 +5881,27 @@ func (m *SymlinkSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return protohelpers.ErrInvalidLength
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex]))
+ if m.Encryption == nil {
+ m.Encryption = &EncryptionSpec{}
+ }
+ if err := m.Encryption.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -4668,7 +5925,7 @@ func (m *SymlinkSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *SystemDiskSpec) UnmarshalVT(dAtA []byte) error {
+func (m *VolumeMountRequestSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4691,15 +5948,15 @@ func (m *SystemDiskSpec) UnmarshalVT(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: SystemDiskSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: VolumeMountRequestSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: SystemDiskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: VolumeMountRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DiskId", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4727,11 +5984,11 @@ func (m *SystemDiskSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.DiskId = string(dAtA[iNdEx:postIndex])
+ m.VolumeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DevPath", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4759,62 +6016,11 @@ func (m *SystemDiskSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.DevPath = string(dAtA[iNdEx:postIndex])
+ m.Requester = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := protohelpers.Skip(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return protohelpers.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 *UserDiskConfigStatusSpec) 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 protohelpers.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: UserDiskConfigStatusSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UserDiskConfigStatusSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
+ case 3:
if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ready", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
@@ -4831,7 +6037,7 @@ func (m *UserDiskConfigStatusSpec) UnmarshalVT(dAtA []byte) error {
break
}
}
- m.Ready = bool(v != 0)
+ m.ReadOnly = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
@@ -4854,7 +6060,7 @@ func (m *UserDiskConfigStatusSpec) UnmarshalVT(dAtA []byte) error {
}
return nil
}
-func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
+func (m *VolumeMountStatusSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -4877,15 +6083,15 @@ func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: VolumeConfigSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: VolumeMountStatusSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: VolumeConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: VolumeMountStatusSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ParentId", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -4913,68 +6119,13 @@ func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ParentId = string(dAtA[iNdEx:postIndex])
+ m.VolumeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- m.Type = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return protohelpers.ErrIntOverflow
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Type |= enums.BlockVolumeType(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Provisioning", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return protohelpers.ErrIntOverflow
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return protohelpers.ErrInvalidLength
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return protohelpers.ErrInvalidLength
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Provisioning == nil {
- m.Provisioning = &ProvisioningSpec{}
- }
- if err := m.Provisioning.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
+ return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType)
}
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Locator", wireType)
- }
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -4984,33 +6135,29 @@ func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.Locator == nil {
- m.Locator = &LocatorSpec{}
- }
- if err := m.Locator.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.Requester = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 5:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Mount", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -5020,33 +6167,29 @@ func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.Mount == nil {
- m.Mount = &MountSpec{}
- }
- if err := m.Mount.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.Target = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Encryption", wireType)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
}
- var msglen int
+ var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
@@ -5056,28 +6199,12 @@ func (m *VolumeConfigSpec) UnmarshalVT(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
- return protohelpers.ErrInvalidLength
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return protohelpers.ErrInvalidLength
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Encryption == nil {
- m.Encryption = &EncryptionSpec{}
- }
- if err := m.Encryption.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
+ m.ReadOnly = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
@@ -5499,6 +6626,42 @@ func (m *VolumeStatusSpec) UnmarshalVT(dAtA []byte) error {
}
m.EncryptionFailedSyncs = append(m.EncryptionFailedSyncs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MountSpec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MountSpec == nil {
+ m.MountSpec = &MountSpec{}
+ }
+ if err := m.MountSpec.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
diff --git a/pkg/machinery/resources/block/block.go b/pkg/machinery/resources/block/block.go
index 6e7fe08b4b..7e324a0869 100644
--- a/pkg/machinery/resources/block/block.go
+++ b/pkg/machinery/resources/block/block.go
@@ -17,7 +17,7 @@ import (
"github.com/siderolabs/talos/pkg/machinery/resources/v1alpha1"
)
-//go:generate deep-copy -type DeviceSpec -type DiscoveredVolumeSpec -type DiscoveryRefreshRequestSpec -type DiscoveryRefreshStatusSpec -type DiskSpec -type SymlinkSpec -type SystemDiskSpec -type UserDiskConfigStatusSpec -type VolumeConfigSpec -type VolumeLifecycleSpec -type VolumeStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
+//go:generate deep-copy -type DeviceSpec -type DiscoveredVolumeSpec -type DiscoveryRefreshRequestSpec -type DiscoveryRefreshStatusSpec -type DiskSpec -type MountRequestSpec -type MountStatusSpec -type SymlinkSpec -type SystemDiskSpec -type UserDiskConfigStatusSpec -type VolumeConfigSpec -type VolumeLifecycleSpec -type VolumeMountRequestSpec -type VolumeMountStatusSpec -type VolumeStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
//go:generate enumer -type=VolumeType,VolumePhase,FilesystemType,EncryptionKeyType,EncryptionProviderType -linecomment -text
diff --git a/pkg/machinery/resources/block/block_test.go b/pkg/machinery/resources/block/block_test.go
index 8a2e57863a..9d9ecadd8e 100644
--- a/pkg/machinery/resources/block/block_test.go
+++ b/pkg/machinery/resources/block/block_test.go
@@ -30,11 +30,15 @@ func TestRegisterResource(t *testing.T) {
&block.DiscoveryRefreshStatus{},
&block.DiscoveredVolume{},
&block.Disk{},
+ &block.MountRequest{},
+ &block.MountStatus{},
&block.Symlink{},
&block.SystemDisk{},
&block.UserDiskConfigStatus{},
&block.VolumeConfig{},
&block.VolumeLifecycle{},
+ &block.VolumeMountRequest{},
+ &block.VolumeMountStatus{},
&block.VolumeStatus{},
} {
assert.NoError(t, resourceRegistry.Register(ctx, resource))
diff --git a/pkg/machinery/resources/block/deep_copy.generated.go b/pkg/machinery/resources/block/deep_copy.generated.go
index 7a508b93ee..23fa025623 100644
--- a/pkg/machinery/resources/block/deep_copy.generated.go
+++ b/pkg/machinery/resources/block/deep_copy.generated.go
@@ -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 DeviceSpec -type DiscoveredVolumeSpec -type DiscoveryRefreshRequestSpec -type DiscoveryRefreshStatusSpec -type DiskSpec -type SymlinkSpec -type SystemDiskSpec -type UserDiskConfigStatusSpec -type VolumeConfigSpec -type VolumeLifecycleSpec -type VolumeStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
+// Code generated by "deep-copy -type DeviceSpec -type DiscoveredVolumeSpec -type DiscoveryRefreshRequestSpec -type DiscoveryRefreshStatusSpec -type DiskSpec -type MountRequestSpec -type MountStatusSpec -type SymlinkSpec -type SystemDiskSpec -type UserDiskConfigStatusSpec -type VolumeConfigSpec -type VolumeLifecycleSpec -type VolumeMountRequestSpec -type VolumeMountStatusSpec -type VolumeStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
package block
@@ -48,6 +48,27 @@ func (o DiskSpec) DeepCopy() DiskSpec {
return cp
}
+// DeepCopy generates a deep copy of MountRequestSpec.
+func (o MountRequestSpec) DeepCopy() MountRequestSpec {
+ var cp MountRequestSpec = o
+ if o.Requesters != nil {
+ cp.Requesters = make([]string, len(o.Requesters))
+ copy(cp.Requesters, o.Requesters)
+ }
+ if o.RequesterIDs != nil {
+ cp.RequesterIDs = make([]string, len(o.RequesterIDs))
+ copy(cp.RequesterIDs, o.RequesterIDs)
+ }
+ return cp
+}
+
+// DeepCopy generates a deep copy of MountStatusSpec.
+func (o MountStatusSpec) DeepCopy() MountStatusSpec {
+ var cp MountStatusSpec = o
+ cp.Spec = o.Spec.DeepCopy()
+ return cp
+}
+
// DeepCopy generates a deep copy of SymlinkSpec.
func (o SymlinkSpec) DeepCopy() SymlinkSpec {
var cp SymlinkSpec = o
@@ -87,6 +108,10 @@ func (o VolumeConfigSpec) DeepCopy() VolumeConfigSpec {
cp.Encryption.PerfOptions = make([]string, len(o.Encryption.PerfOptions))
copy(cp.Encryption.PerfOptions, o.Encryption.PerfOptions)
}
+ if o.Mount.Options != nil {
+ cp.Mount.Options = make([]string, len(o.Mount.Options))
+ copy(cp.Mount.Options, o.Mount.Options)
+ }
return cp
}
@@ -96,6 +121,18 @@ func (o VolumeLifecycleSpec) DeepCopy() VolumeLifecycleSpec {
return cp
}
+// DeepCopy generates a deep copy of VolumeMountRequestSpec.
+func (o VolumeMountRequestSpec) DeepCopy() VolumeMountRequestSpec {
+ var cp VolumeMountRequestSpec = o
+ return cp
+}
+
+// DeepCopy generates a deep copy of VolumeMountStatusSpec.
+func (o VolumeMountStatusSpec) DeepCopy() VolumeMountStatusSpec {
+ var cp VolumeMountStatusSpec = o
+ return cp
+}
+
// DeepCopy generates a deep copy of VolumeStatusSpec.
func (o VolumeStatusSpec) DeepCopy() VolumeStatusSpec {
var cp VolumeStatusSpec = o
@@ -103,5 +140,9 @@ func (o VolumeStatusSpec) DeepCopy() VolumeStatusSpec {
cp.EncryptionFailedSyncs = make([]string, len(o.EncryptionFailedSyncs))
copy(cp.EncryptionFailedSyncs, o.EncryptionFailedSyncs)
}
+ if o.MountSpec.Options != nil {
+ cp.MountSpec.Options = make([]string, len(o.MountSpec.Options))
+ copy(cp.MountSpec.Options, o.MountSpec.Options)
+ }
return cp
}
diff --git a/pkg/machinery/resources/block/mount_request.go b/pkg/machinery/resources/block/mount_request.go
new file mode 100644
index 0000000000..441121c715
--- /dev/null
+++ b/pkg/machinery/resources/block/mount_request.go
@@ -0,0 +1,80 @@
+// 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 block
+
+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"
+)
+
+// MountRequestType is type of MountRequest resource.
+const MountRequestType = resource.Type("MountRequests.block.talos.dev")
+
+// MountRequest resource is a final mount request spec.
+type MountRequest = typed.Resource[MountRequestSpec, MountRequestExtension]
+
+// MountRequestSpec is the spec for MountRequest.
+//
+//gotagsrewrite:gen
+type MountRequestSpec struct {
+ VolumeID string `yaml:"volume_id" protobuf:"1"`
+
+ ParentMountID string `yaml:"parent_id" protobuf:"2"`
+ ReadOnly bool `yaml:"read_only" protobuf:"5"`
+
+ Requesters []string `yaml:"requesters" protobuf:"3"`
+ RequesterIDs []string `yaml:"requester_ids" protobuf:"4"`
+}
+
+// NewMountRequest initializes a MountRequest resource.
+func NewMountRequest(namespace resource.Namespace, id resource.ID) *MountRequest {
+ return typed.NewResource[MountRequestSpec, MountRequestExtension](
+ resource.NewMetadata(namespace, MountRequestType, id, resource.VersionUndefined),
+ MountRequestSpec{},
+ )
+}
+
+// MountRequestExtension is auxiliary resource data for BlockMountRequest.
+type MountRequestExtension struct{}
+
+// ResourceDefinition implements meta.ResourceDefinitionProvider interface.
+func (MountRequestExtension) ResourceDefinition() meta.ResourceDefinitionSpec {
+ return meta.ResourceDefinitionSpec{
+ Type: MountRequestType,
+ Aliases: []resource.Type{},
+ DefaultNamespace: NamespaceName,
+ PrintColumns: []meta.PrintColumn{
+ {
+ Name: "Source",
+ JSONPath: `{.source}`,
+ },
+ {
+ Name: "Target",
+ JSONPath: `{.target}`,
+ },
+ {
+ Name: "FSType",
+ JSONPath: `{.fs_type}`,
+ },
+ {
+ Name: "Parent",
+ JSONPath: `{.parent_id}`,
+ },
+ },
+ }
+}
+
+func init() {
+ proto.RegisterDefaultTypes()
+
+ err := protobuf.RegisterDynamic[MountRequestSpec](MountRequestType, &MountRequest{})
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/pkg/machinery/resources/block/mount_status.go b/pkg/machinery/resources/block/mount_status.go
new file mode 100644
index 0000000000..966edac0d9
--- /dev/null
+++ b/pkg/machinery/resources/block/mount_status.go
@@ -0,0 +1,79 @@
+// 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 block
+
+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"
+)
+
+// MountStatusType is type of MountStatus resource.
+const MountStatusType = resource.Type("MountStatuses.block.talos.dev")
+
+// MountStatus resource is a final mount request spec.
+type MountStatus = typed.Resource[MountStatusSpec, MountStatusExtension]
+
+// MountStatusSpec is the spec for MountStatus.
+//
+//gotagsrewrite:gen
+type MountStatusSpec struct {
+ Spec MountRequestSpec `yaml:"spec" protobuf:"1"`
+ Source string `yaml:"source" protobuf:"3"`
+ Target string `yaml:"target" protobuf:"2"`
+ Filesystem FilesystemType `yaml:"filesystem" protobuf:"4"`
+
+ ReadOnly bool `yaml:"read_only" protobuf:"5"`
+}
+
+// NewMountStatus initializes a MountStatus resource.
+func NewMountStatus(namespace resource.Namespace, id resource.ID) *MountStatus {
+ return typed.NewResource[MountStatusSpec, MountStatusExtension](
+ resource.NewMetadata(namespace, MountStatusType, id, resource.VersionUndefined),
+ MountStatusSpec{},
+ )
+}
+
+// MountStatusExtension is auxiliary resource data for BlockMountStatus.
+type MountStatusExtension struct{}
+
+// ResourceDefinition implements meta.ResourceDefinitionProvider interface.
+func (MountStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec {
+ return meta.ResourceDefinitionSpec{
+ Type: MountStatusType,
+ Aliases: []resource.Type{},
+ DefaultNamespace: NamespaceName,
+ PrintColumns: []meta.PrintColumn{
+ {
+ Name: "Source",
+ JSONPath: `{.source}`,
+ },
+ {
+ Name: "Target",
+ JSONPath: `{.target}`,
+ },
+ {
+ Name: "Filesystem",
+ JSONPath: `{.filesystem}`,
+ },
+ {
+ Name: "Parent",
+ JSONPath: `{.spec.mount_parent_id}`,
+ },
+ },
+ }
+}
+
+func init() {
+ proto.RegisterDefaultTypes()
+
+ err := protobuf.RegisterDynamic[MountStatusSpec](MountStatusType, &MountStatus{})
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/pkg/machinery/resources/block/volume_config.go b/pkg/machinery/resources/block/volume_config.go
index 6ca21c51d3..2dc7804128 100644
--- a/pkg/machinery/resources/block/volume_config.go
+++ b/pkg/machinery/resources/block/volume_config.go
@@ -150,6 +150,8 @@ type MountSpec struct {
TargetPath string `yaml:"targetPath" protobuf:"1"`
// SELinux label for the volume.
SelinuxLabel string `yaml:"selinuxLabel" protobuf:"2"`
+ // Mount options for the volume.
+ Options []string `yaml:"options,omitempty" protobuf:"3"`
}
// NewVolumeConfig initializes a BlockVolumeConfig resource.
diff --git a/pkg/machinery/resources/block/volume_mount_request.go b/pkg/machinery/resources/block/volume_mount_request.go
new file mode 100644
index 0000000000..db6769ffea
--- /dev/null
+++ b/pkg/machinery/resources/block/volume_mount_request.go
@@ -0,0 +1,70 @@
+// 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 block
+
+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"
+)
+
+// VolumeMountRequestType is type of VolumeMountRequest resource.
+const VolumeMountRequestType = resource.Type("VolumeMountRequests.block.talos.dev")
+
+// VolumeMountRequest resource holds a request of a subsystem to mount some volume.
+type VolumeMountRequest = typed.Resource[VolumeMountRequestSpec, VolumeMountRequestExtension]
+
+// VolumeMountRequestSpec is the spec for VolumeMountRequest.
+//
+//gotagsrewrite:gen
+type VolumeMountRequestSpec struct {
+ VolumeID string `yaml:"volume_id" protobuf:"1"`
+
+ ReadOnly bool `yaml:"read_only" protobuf:"3"`
+
+ Requester string `yaml:"requester" protobuf:"2"`
+}
+
+// NewVolumeMountRequest initializes a VolumeMountRequest resource.
+func NewVolumeMountRequest(namespace resource.Namespace, id resource.ID) *VolumeMountRequest {
+ return typed.NewResource[VolumeMountRequestSpec, VolumeMountRequestExtension](
+ resource.NewMetadata(namespace, VolumeMountRequestType, id, resource.VersionUndefined),
+ VolumeMountRequestSpec{},
+ )
+}
+
+// VolumeMountRequestExtension is auxiliary resource data for BlockVolumeMountRequest.
+type VolumeMountRequestExtension struct{}
+
+// ResourceDefinition implements meta.ResourceDefinitionProvider interface.
+func (VolumeMountRequestExtension) ResourceDefinition() meta.ResourceDefinitionSpec {
+ return meta.ResourceDefinitionSpec{
+ Type: VolumeMountRequestType,
+ Aliases: []resource.Type{},
+ DefaultNamespace: NamespaceName,
+ PrintColumns: []meta.PrintColumn{
+ {
+ Name: "Volume ID",
+ JSONPath: `{.volume_id}`,
+ },
+ {
+ Name: "Requester",
+ JSONPath: `{.requester}`,
+ },
+ },
+ }
+}
+
+func init() {
+ proto.RegisterDefaultTypes()
+
+ err := protobuf.RegisterDynamic[VolumeMountRequestSpec](VolumeMountRequestType, &VolumeMountRequest{})
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/pkg/machinery/resources/block/volume_mount_status.go b/pkg/machinery/resources/block/volume_mount_status.go
new file mode 100644
index 0000000000..213668ec13
--- /dev/null
+++ b/pkg/machinery/resources/block/volume_mount_status.go
@@ -0,0 +1,74 @@
+// 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 block
+
+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"
+)
+
+// VolumeMountStatusType is type of VolumeMountStatus resource.
+const VolumeMountStatusType = resource.Type("VolumeMountStatuses.block.talos.dev")
+
+// VolumeMountStatus resource holds a status of a subsystem to mount some volume.
+type VolumeMountStatus = typed.Resource[VolumeMountStatusSpec, VolumeMountStatusExtension]
+
+// VolumeMountStatusSpec is the spec for VolumeMountStatus.
+//
+//gotagsrewrite:gen
+type VolumeMountStatusSpec struct {
+ VolumeID string `yaml:"volume_id" protobuf:"1"`
+ Requester string `yaml:"requester" protobuf:"2"`
+
+ Target string `yaml:"target" protobuf:"3"`
+ ReadOnly bool `yaml:"read_only" protobuf:"4"`
+}
+
+// NewVolumeMountStatus initializes a VolumeMountStatus resource.
+func NewVolumeMountStatus(namespace resource.Namespace, id resource.ID) *VolumeMountStatus {
+ return typed.NewResource[VolumeMountStatusSpec, VolumeMountStatusExtension](
+ resource.NewMetadata(namespace, VolumeMountStatusType, id, resource.VersionUndefined),
+ VolumeMountStatusSpec{},
+ )
+}
+
+// VolumeMountStatusExtension is auxiliary resource data for BlockVolumeMountStatus.
+type VolumeMountStatusExtension struct{}
+
+// ResourceDefinition implements meta.ResourceDefinitionProvider interface.
+func (VolumeMountStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec {
+ return meta.ResourceDefinitionSpec{
+ Type: VolumeMountStatusType,
+ Aliases: []resource.Type{},
+ DefaultNamespace: NamespaceName,
+ PrintColumns: []meta.PrintColumn{
+ {
+ Name: "Volume ID",
+ JSONPath: `{.volume_id}`,
+ },
+ {
+ Name: "Requester",
+ JSONPath: `{.requester}`,
+ },
+ {
+ Name: "Target",
+ JSONPath: `{.target}`,
+ },
+ },
+ }
+}
+
+func init() {
+ proto.RegisterDefaultTypes()
+
+ err := protobuf.RegisterDynamic[VolumeMountStatusSpec](VolumeMountStatusType, &VolumeMountStatus{})
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/pkg/machinery/resources/block/volume_status.go b/pkg/machinery/resources/block/volume_status.go
index 04bff968db..b344a5a3b7 100644
--- a/pkg/machinery/resources/block/volume_status.go
+++ b/pkg/machinery/resources/block/volume_status.go
@@ -48,6 +48,9 @@ type VolumeStatusSpec struct {
EncryptionProvider EncryptionProviderType `yaml:"encryptionProvider,omitempty" protobuf:"12"`
EncryptionFailedSyncs []string `yaml:"encryptionFailedSyncs,omitempty" protobuf:"14"`
+ // MountSpec is the mount specification.
+ MountSpec MountSpec `yaml:"mountSpec,omitempty" protobuf:"15"`
+
ErrorMessage string `yaml:"errorMessage,omitempty" protobuf:"3"`
}
diff --git a/website/content/v1.10/reference/api.md b/website/content/v1.10/reference/api.md
index 41288a2881..5364d8da47 100644
--- a/website/content/v1.10/reference/api.md
+++ b/website/content/v1.10/reference/api.md
@@ -37,13 +37,17 @@ description: Talos gRPC API reference.
- [EncryptionSpec](#talos.resource.definitions.block.EncryptionSpec)
- [FilesystemSpec](#talos.resource.definitions.block.FilesystemSpec)
- [LocatorSpec](#talos.resource.definitions.block.LocatorSpec)
+ - [MountRequestSpec](#talos.resource.definitions.block.MountRequestSpec)
- [MountSpec](#talos.resource.definitions.block.MountSpec)
+ - [MountStatusSpec](#talos.resource.definitions.block.MountStatusSpec)
- [PartitionSpec](#talos.resource.definitions.block.PartitionSpec)
- [ProvisioningSpec](#talos.resource.definitions.block.ProvisioningSpec)
- [SymlinkSpec](#talos.resource.definitions.block.SymlinkSpec)
- [SystemDiskSpec](#talos.resource.definitions.block.SystemDiskSpec)
- [UserDiskConfigStatusSpec](#talos.resource.definitions.block.UserDiskConfigStatusSpec)
- [VolumeConfigSpec](#talos.resource.definitions.block.VolumeConfigSpec)
+ - [VolumeMountRequestSpec](#talos.resource.definitions.block.VolumeMountRequestSpec)
+ - [VolumeMountStatusSpec](#talos.resource.definitions.block.VolumeMountStatusSpec)
- [VolumeStatusSpec](#talos.resource.definitions.block.VolumeStatusSpec)
- [resource/definitions/cluster/cluster.proto](#resource/definitions/cluster/cluster.proto)
@@ -1020,6 +1024,25 @@ LocatorSpec is the spec for volume locator.
+
+
+### MountRequestSpec
+MountRequestSpec is the spec for MountRequest.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| volume_id | [string](#string) | | |
+| parent_mount_id | [string](#string) | | |
+| requesters | [string](#string) | repeated | |
+| requester_i_ds | [string](#string) | repeated | |
+| read_only | [bool](#bool) | | |
+
+
+
+
+
+
### MountSpec
@@ -1030,6 +1053,26 @@ MountSpec is the spec for volume mount.
| ----- | ---- | ----- | ----------- |
| target_path | [string](#string) | | |
| selinux_label | [string](#string) | | |
+| options | [string](#string) | repeated | |
+
+
+
+
+
+
+
+
+### MountStatusSpec
+MountStatusSpec is the spec for MountStatus.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| spec | [MountRequestSpec](#talos.resource.definitions.block.MountRequestSpec) | | |
+| target | [string](#string) | | |
+| source | [string](#string) | | |
+| filesystem | [talos.resource.definitions.enums.BlockFilesystemType](#talos.resource.definitions.enums.BlockFilesystemType) | | |
+| read_only | [bool](#bool) | | |
@@ -1139,6 +1182,41 @@ VolumeConfigSpec is the spec for VolumeConfig resource.
+
+
+### VolumeMountRequestSpec
+VolumeMountRequestSpec is the spec for VolumeMountRequest.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| volume_id | [string](#string) | | |
+| requester | [string](#string) | | |
+| read_only | [bool](#bool) | | |
+
+
+
+
+
+
+
+
+### VolumeMountStatusSpec
+VolumeMountStatusSpec is the spec for VolumeMountStatus.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| volume_id | [string](#string) | | |
+| requester | [string](#string) | | |
+| target | [string](#string) | | |
+| read_only | [bool](#bool) | | |
+
+
+
+
+
+
### VolumeStatusSpec
@@ -1161,6 +1239,7 @@ VolumeStatusSpec is the spec for VolumeStatus resource.
| encryption_provider | [talos.resource.definitions.enums.BlockEncryptionProviderType](#talos.resource.definitions.enums.BlockEncryptionProviderType) | | |
| pretty_size | [string](#string) | | |
| encryption_failed_syncs | [string](#string) | repeated | |
+| mount_spec | [MountSpec](#talos.resource.definitions.block.MountSpec) | | |