refactor: use COSI runtime with new controller runtime DB

See https://github.com/cosi-project/runtime/pull/336

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2023-10-09 15:02:00 +04:00
parent c1ee24465a
commit c3e4182000
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
81 changed files with 247 additions and 256 deletions

View File

@ -347,14 +347,14 @@ WORKDIR /src/internal/app/machined
ARG GO_BUILDFLAGS
ARG GO_LDFLAGS
ARG GOAMD64
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=amd64 GOAMD64=${GOAMD64} go build ${GO_BUILDFLAGS} -tags tcell_minimal -ldflags "${GO_LDFLAGS}" -o /machined
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=amd64 GOAMD64=${GOAMD64} go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /machined
RUN chmod +x /machined
FROM base AS machined-build-arm64
WORKDIR /src/internal/app/machined
ARG GO_BUILDFLAGS
ARG GO_LDFLAGS
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=arm64 go build ${GO_BUILDFLAGS} -tags tcell_minimal -ldflags "${GO_LDFLAGS}" -o /machined
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=arm64 go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /machined
RUN chmod +x /machined
FROM machined-build-${TARGETARCH} AS machined-build

View File

@ -78,6 +78,7 @@ IMAGER_ARGS ?=
CGO_ENABLED ?= 0
GO_BUILDFLAGS ?=
GO_BUILDTAGS ?= tcell_minimal
GO_LDFLAGS ?=
GOAMD64 ?= v2
@ -92,11 +93,13 @@ INSTALLER_ARCH = targetarch
endif
ifneq (, $(filter $(WITH_DEBUG), t true TRUE y yes 1))
GO_BUILDFLAGS += -tags sidero.debug
GO_BUILDTAGS := $(GO_BUILDTAGS),sidero.debug
else
GO_LDFLAGS += -s -w
endif
GO_BUILDFLAGS += -tags "$(GO_BUILDTAGS)"
, := ,
space := $(subst ,, )
BUILD := docker buildx build

5
go.mod
View File

@ -41,7 +41,7 @@ require (
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.3.0
github.com/coreos/go-iptables v0.7.0
github.com/cosi-project/runtime v0.3.11
github.com/cosi-project/runtime v0.3.13
github.com/docker/distribution v2.8.2+incompatible
github.com/docker/docker v24.0.6+incompatible
github.com/docker/go-connections v0.4.0
@ -217,11 +217,8 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-envparse v0.1.0
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-memdb v1.3.4 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/imdario/mergo v0.3.13 // indirect

14
go.sum
View File

@ -164,8 +164,8 @@ github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03V
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cosi-project/runtime v0.3.11 h1:Kz4Wk/HwqWkLA3opFJWnJ0bF0LHLr4sWoPDcONrU26M=
github.com/cosi-project/runtime v0.3.11/go.mod h1:kLIIwnTlUnVPhZZN82esCuyvD23eNJkOcnjWE7i+qBk=
github.com/cosi-project/runtime v0.3.13 h1:879ECFAi0tTD0BiLv39iKqipKxU9tspKb411UhktdTg=
github.com/cosi-project/runtime v0.3.13/go.mod h1:O3/3pjghhExoXuRlbZskjVCuvkFqqswf3hE1kP0rvZQ=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@ -386,24 +386,14 @@ github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdm
github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc=
github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ=
github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M=
github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c=
github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hetznercloud/hcloud-go/v2 v2.2.0 h1:UzuqXXoy9+mMS2GKV9ZKF5BqvFkOJwW0XiSwEqGNxn0=

View File

@ -19,8 +19,8 @@ import (
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/discovery-api/api/v1alpha1/client/pb"
discoveryclient "github.com/siderolabs/discovery-client/pkg/client"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/config/machine"
@ -52,13 +52,13 @@ func (ctrl *DiscoveryServiceController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: cluster.ConfigType,
ID: pointer.To(cluster.ConfigID),
ID: optional.Some(cluster.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: cluster.NamespaceName,
Type: cluster.IdentityType,
ID: pointer.To(cluster.LocalIdentity),
ID: optional.Some(cluster.LocalIdentity),
Kind: controller.InputWeak,
},
{
@ -69,7 +69,7 @@ func (ctrl *DiscoveryServiceController) Inputs() []controller.Input {
{
Namespace: runtime.NamespaceName,
Type: runtime.MachineStatusType,
ID: pointer.To(runtime.MachineStatusID),
ID: optional.Some(runtime.MachineStatusID),
Kind: controller.InputWeak,
},
}
@ -192,7 +192,7 @@ func (ctrl *DiscoveryServiceController) Run(ctx context.Context, r controller.Ru
controller.Input{
Namespace: cluster.NamespaceName,
Type: cluster.AffiliateType,
ID: pointer.To(ctrl.localAffiliateID),
ID: optional.Some(ctrl.localAffiliateID),
Kind: controller.InputWeak,
},
)); err != nil {

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/internal/pkg/discovery/registry"
@ -38,13 +38,13 @@ func (ctrl *KubernetesPullController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: cluster.ConfigType,
ID: pointer.To(cluster.ConfigID),
ID: optional.Some(cluster.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/internal/pkg/discovery/registry"
@ -40,13 +40,13 @@ func (ctrl *KubernetesPushController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: cluster.ConfigType,
ID: pointer.To(cluster.ConfigID),
ID: optional.Some(cluster.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: cluster.NamespaceName,
Type: cluster.IdentityType,
ID: pointer.To(cluster.LocalIdentity),
ID: optional.Some(cluster.LocalIdentity),
Kind: controller.InputWeak,
},
}
@ -109,7 +109,7 @@ func (ctrl *KubernetesPushController) Run(ctx context.Context, r controller.Runt
controller.Input{
Namespace: cluster.NamespaceName,
Type: cluster.AffiliateType,
ID: pointer.To(ctrl.localAffiliateID),
ID: optional.Some(ctrl.localAffiliateID),
Kind: controller.InputWeak,
},
)); err != nil {

View File

@ -14,8 +14,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/net"
"go.uber.org/zap"
@ -42,25 +42,25 @@ func (ctrl *LocalAffiliateController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: cluster.ConfigType,
ID: pointer.To(cluster.ConfigID),
ID: optional.Some(cluster.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: cluster.NamespaceName,
Type: cluster.IdentityType,
ID: pointer.To(cluster.LocalIdentity),
ID: optional.Some(cluster.LocalIdentity),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
{
@ -71,19 +71,19 @@ func (ctrl *LocalAffiliateController) Inputs() []controller.Input {
{
Namespace: kubespan.NamespaceName,
Type: kubespan.IdentityType,
ID: pointer.To(kubespan.LocalIdentity),
ID: optional.Some(kubespan.LocalIdentity),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: kubespan.ConfigType,
ID: pointer.To(kubespan.ConfigID),
ID: optional.Some(kubespan.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
{
@ -94,7 +94,7 @@ func (ctrl *LocalAffiliateController) Inputs() []controller.Input {
{
Namespace: k8s.ControlPlaneNamespaceName,
Type: k8s.APIServerConfigType,
ID: pointer.To(k8s.APIServerConfigID),
ID: optional.Some(k8s.APIServerConfigID),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
clusteradapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/cluster"
@ -44,7 +44,7 @@ func (ctrl *NodeIdentityController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: runtimeres.MountStatusType,
ID: pointer.To(constants.StatePartitionLabel),
ID: optional.Some(constants.StatePartitionLabel),
Kind: controller.InputWeak,
},
}

View File

@ -17,7 +17,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
talosruntime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -77,7 +77,7 @@ func (ctrl *AcquireController) Inputs() []controller.Input {
{
Namespace: configresource.NamespaceName,
Type: configresource.MachineConfigType,
ID: pointer.To(configresource.MaintenanceID),
ID: optional.Some(configresource.MaintenanceID),
Kind: controller.InputWeak,
},
{

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/config/machine"
@ -33,7 +33,7 @@ func (ctrl *MachineTypeController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -32,7 +32,7 @@ func (ctrl *SeccompProfileController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -18,7 +18,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
runtimetalos "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -57,7 +57,7 @@ func (ctrl *SeccompProfileFileController) Run(ctx context.Context, r controller.
{
Namespace: runtimeres.NamespaceName,
Type: runtimeres.MountStatusType,
ID: pointer.To(constants.EphemeralPartitionLabel),
ID: optional.Some(constants.EphemeralPartitionLabel),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -15,8 +15,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.etcd.io/etcd/api/v3/etcdserverpb"
"go.uber.org/zap"
@ -41,19 +41,19 @@ func (ctrl *AdvertisedPeerController) Inputs() []controller.Input {
{
Namespace: etcd.NamespaceName,
Type: etcd.SpecType,
ID: pointer.To(etcd.SpecID),
ID: optional.Some(etcd.SpecID),
Kind: controller.InputWeak,
},
{
Namespace: etcd.NamespaceName,
Type: etcd.PKIStatusType,
ID: pointer.To(etcd.PKIID),
ID: optional.Some(etcd.PKIID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To("etcd"),
ID: optional.Some("etcd"),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
pkgetcd "github.com/siderolabs/talos/internal/pkg/etcd"
@ -38,7 +38,7 @@ func (ctrl *MemberController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To(etcdServiceID),
ID: optional.Some(etcdServiceID),
Kind: controller.InputStrong,
},
}

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/filetree"
@ -37,13 +37,13 @@ func (ctrl *PKIController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.EtcdRootType,
ID: pointer.To(secrets.EtcdRootID),
ID: optional.Some(secrets.EtcdRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.EtcdType,
ID: pointer.To(secrets.EtcdID),
ID: optional.Some(secrets.EtcdID),
Kind: controller.InputWeak,
},
}

View File

@ -13,8 +13,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/net"
"go.uber.org/zap"
@ -37,19 +37,19 @@ func (ctrl *SpecController) Inputs() []controller.Input {
{
Namespace: etcd.NamespaceName,
Type: etcd.ConfigType,
ID: pointer.To(etcd.ConfigID),
ID: optional.Some(etcd.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.FilteredNodeAddressID(network.NodeAddressRoutedID, k8s.NodeAddressFilterNoK8s)),
ID: optional.Some(network.FilteredNodeAddressID(network.NodeAddressRoutedID, k8s.NodeAddressFilterNoK8s)),
Kind: controller.InputWeak,
},
}

View File

@ -16,8 +16,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"golang.org/x/sys/unix"
@ -43,7 +43,7 @@ func (ctrl *CRIRegistryConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -36,7 +36,7 @@ func (ctrl *AddressFilterController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -16,6 +16,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/maps"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
@ -63,19 +64,19 @@ func (ctrl *ControlPlaneStaticPodController) Inputs() []controller.Input {
{
Namespace: k8s.ControlPlaneNamespaceName,
Type: k8s.SecretsStatusType,
ID: pointer.To(k8s.StaticPodSecretsStaticPodID),
ID: optional.Some(k8s.StaticPodSecretsStaticPodID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.ControlPlaneNamespaceName,
Type: k8s.ConfigStatusType,
ID: pointer.To(k8s.ConfigStatusStaticPodID),
ID: optional.Some(k8s.ConfigStatusStaticPodID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To("etcd"),
ID: optional.Some("etcd"),
Kind: controller.InputWeak,
},
}

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -66,7 +66,7 @@ func (ctrl *EndpointController) Run(ctx context.Context, r controller.Runtime, l
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
}); err != nil {
@ -148,13 +148,13 @@ func (ctrl *EndpointController) watchEndpointsOnControlPlane(ctx context.Context
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesType,
ID: pointer.To(secrets.KubernetesID),
ID: optional.Some(secrets.KubernetesID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -17,7 +17,7 @@ import (
"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/go-getter/v2"
"github.com/hashicorp/go-multierror"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
k8sadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/k8s"
@ -45,7 +45,7 @@ func (ctrl *ExtraManifestController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
}

View File

@ -16,7 +16,6 @@ import (
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xerrors"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -86,7 +85,7 @@ func NewKubeletConfigController() *KubeletConfigController {
controller.Input{
Namespace: k8s.NamespaceName,
Type: k8s.StaticPodServerStatusType,
ID: pointer.To(k8s.StaticPodServerStatusResourceID),
ID: optional.Some(k8s.StaticPodServerStatusResourceID),
Kind: controller.InputWeak,
},
),

View File

@ -23,7 +23,6 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer/json"
@ -78,13 +77,13 @@ func (ctrl *KubeletServiceController) Run(ctx context.Context, r controller.Runt
{
Namespace: files.NamespaceName,
Type: files.EtcFileStatusType,
ID: pointer.To("machine-id"),
ID: optional.Some("machine-id"),
Kind: controller.InputWeak,
},
{
Namespace: runtimeres.NamespaceName,
Type: runtimeres.MountStatusType,
ID: pointer.To(constants.EphemeralPartitionLabel),
ID: optional.Some(constants.EphemeralPartitionLabel),
Kind: controller.InputWeak,
},
}); err != nil {
@ -128,13 +127,13 @@ func (ctrl *KubeletServiceController) Run(ctx context.Context, r controller.Runt
{
Namespace: k8s.NamespaceName,
Type: k8s.KubeletSpecType,
ID: pointer.To(k8s.KubeletID),
ID: optional.Some(k8s.KubeletID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubeletType,
ID: pointer.To(secrets.KubeletID),
ID: optional.Some(secrets.KubeletID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -15,6 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/hashicorp/go-multierror"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-kubernetes/kubernetes/compatibility"
"github.com/siderolabs/go-pointer"
@ -46,19 +47,19 @@ func (ctrl *KubeletSpecController) Inputs() []controller.Input {
{
Namespace: k8s.NamespaceName,
Type: k8s.KubeletConfigType,
ID: pointer.To(k8s.KubeletID),
ID: optional.Some(k8s.KubeletID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodeIPType,
ID: pointer.To(k8s.KubeletID),
ID: optional.Some(k8s.KubeletID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
k8sadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/k8s"
@ -37,25 +37,25 @@ func (ctrl *KubeletStaticPodController) Inputs() []controller.Input {
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To("kubelet"),
ID: optional.Some("kubelet"),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesDynamicCertsType,
ID: pointer.To(secrets.KubernetesDynamicCertsID),
ID: optional.Some(secrets.KubernetesDynamicCertsID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
}

View File

@ -14,10 +14,10 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-loadbalancer/controlplane"
"github.com/siderolabs/go-loadbalancer/upstream"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -45,7 +45,7 @@ func (ctrl *KubePrismController) Inputs() []controller.Input {
{
Namespace: k8s.NamespaceName,
Type: k8s.KubePrismConfigType,
ID: pointer.To(k8s.KubePrismConfigID),
ID: optional.Some(k8s.KubePrismConfigID),
Kind: controller.InputWeak,
},
}

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
k8sadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/k8s"
@ -43,7 +43,7 @@ func (ctrl *ManifestController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
}

View File

@ -13,8 +13,8 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/hashicorp/go-multierror"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
corev1 "k8s.io/api/core/v1"
@ -54,7 +54,7 @@ func (ctrl *ManifestApplyController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesType,
ID: pointer.To(secrets.KubernetesID),
ID: optional.Some(secrets.KubernetesID),
Kind: controller.InputWeak,
},
{
@ -65,7 +65,7 @@ func (ctrl *ManifestApplyController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To("etcd"),
ID: optional.Some("etcd"),
Kind: controller.InputWeak,
},
}

View File

@ -16,8 +16,8 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/maps"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/go-retry/retry"
"go.uber.org/zap"
v1 "k8s.io/api/core/v1"
@ -67,19 +67,19 @@ func (ctrl *NodeApplyController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/k8s"
@ -32,7 +32,7 @@ func (ctrl *NodeCordonedSpecController) Inputs() []controller.Input {
{
Namespace: runtime.NamespaceName,
Type: runtime.MachineStatusType,
ID: pointer.To(runtime.MachineStatusID),
ID: optional.Some(runtime.MachineStatusID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -33,7 +33,7 @@ func (ctrl *NodeLabelSpecController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@ -38,7 +38,7 @@ func (ctrl *NodeStatusController) Inputs() []controller.Input {
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
v1 "k8s.io/api/core/v1"
@ -34,7 +34,7 @@ func (ctrl *NodeTaintSpecController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -13,8 +13,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/net"
"go.uber.org/zap"
@ -36,13 +36,13 @@ func (ctrl *NodeIPController) Inputs() []controller.Input {
{
Namespace: k8s.NamespaceName,
Type: k8s.NodeIPConfigType,
ID: pointer.To(k8s.KubeletID),
ID: optional.Some(k8s.KubeletID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.FilteredNodeAddressID(network.NodeAddressRoutedID, k8s.NodeAddressFilterNoK8s)),
ID: optional.Some(network.FilteredNodeAddressID(network.NodeAddressRoutedID, k8s.NodeAddressFilterNoK8s)),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/internal/app/machined/pkg/controllers/k8s/internal/nodename"
@ -34,13 +34,13 @@ func (ctrl *NodenameController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
}

View File

@ -17,7 +17,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -39,31 +39,31 @@ func (ctrl *RenderSecretsStaticPodController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.EtcdRootType,
ID: pointer.To(secrets.EtcdRootID),
ID: optional.Some(secrets.EtcdRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesType,
ID: pointer.To(secrets.KubernetesID),
ID: optional.Some(secrets.KubernetesID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesDynamicCertsType,
ID: pointer.To(secrets.KubernetesDynamicCertsID),
ID: optional.Some(secrets.KubernetesDynamicCertsID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.EtcdType,
ID: pointer.To(secrets.EtcdID),
ID: optional.Some(secrets.EtcdID),
Kind: controller.InputWeak,
},
}

View File

@ -13,8 +13,8 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -35,7 +35,7 @@ func (ctrl *StaticEndpointController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@ -35,7 +35,7 @@ func (ctrl *StaticPodConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@ -44,13 +44,13 @@ func (ctrl *EndpointController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: kubeaccess.ConfigType,
ID: pointer.To(kubeaccess.ConfigID),
ID: optional.Some(kubeaccess.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesType,
ID: pointer.To(secrets.KubernetesID),
ID: optional.Some(secrets.KubernetesID),
Kind: controller.InputWeak,
},
{

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
@ -42,19 +42,19 @@ func (ctrl *CRDController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: kubeaccess.ConfigType,
ID: pointer.To(kubeaccess.ConfigID),
ID: optional.Some(kubeaccess.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesType,
ID: pointer.To(secrets.KubernetesID),
ID: optional.Some(secrets.KubernetesID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.OSRootType,
ID: pointer.To(secrets.OSRootID),
ID: optional.Some(secrets.OSRootID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
kubespanadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/kubespan"
@ -42,19 +42,19 @@ func (ctrl *IdentityController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: kubespan.ConfigType,
ID: pointer.To(kubespan.ConfigID),
ID: optional.Some(kubespan.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HardwareAddrType,
ID: pointer.To(network.FirstHardwareAddr),
ID: optional.Some(network.FirstHardwareAddr),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: runtimeres.MountStatusType,
ID: pointer.To(constants.StatePartitionLabel),
ID: optional.Some(constants.StatePartitionLabel),
Kind: controller.InputWeak,
},
}

View File

@ -16,8 +16,8 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/value"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"go4.org/netipx"
"golang.zx2c4.com/wireguard/wgctrl"
@ -70,7 +70,7 @@ func (ctrl *ManagerController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: kubespan.ConfigType,
ID: pointer.To(kubespan.ConfigID),
ID: optional.Some(kubespan.ConfigID),
Kind: controller.InputWeak,
},
{
@ -81,7 +81,7 @@ func (ctrl *ManagerController) Inputs() []controller.Input {
{
Namespace: kubespan.NamespaceName,
Type: kubespan.IdentityType,
ID: pointer.To(kubespan.LocalIdentity),
ID: optional.Some(kubespan.LocalIdentity),
Kind: controller.InputWeak,
},
}

View File

@ -13,8 +13,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"go4.org/netipx"
@ -37,7 +37,7 @@ func (ctrl *PeerSpecController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: kubespan.ConfigType,
ID: pointer.To(kubespan.ConfigID),
ID: optional.Some(kubespan.ConfigID),
Kind: controller.InputWeak,
},
{
@ -48,7 +48,7 @@ func (ctrl *PeerSpecController) Inputs() []controller.Input {
{
Namespace: cluster.NamespaceName,
Type: cluster.IdentityType,
ID: pointer.To(cluster.LocalIdentity),
ID: optional.Some(cluster.LocalIdentity),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -38,7 +38,7 @@ func (ctrl *AddressEventController) Inputs() []controller.Input {
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
Kind: controller.InputWeak,
ID: pointer.To(network.FilteredNodeAddressID(
ID: optional.Some(network.FilteredNodeAddressID(
network.NodeAddressCurrentID,
k8s.NodeAddressFilterNoK8s)),
},
@ -46,7 +46,7 @@ func (ctrl *AddressEventController) Inputs() []controller.Input {
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
Kind: controller.InputWeak,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
},
}
}

View File

@ -12,8 +12,8 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
glob "github.com/ryanuber/go-glob"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
talosconfig "github.com/siderolabs/talos/pkg/machinery/config/config"
@ -46,7 +46,7 @@ func (ctrl *DeviceConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
{

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
talosconfig "github.com/siderolabs/talos/pkg/machinery/config"
@ -38,25 +38,25 @@ func (ctrl *EtcFileController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.ResolverStatusType,
ID: pointer.To(network.ResolverID),
ID: optional.Some(network.ResolverID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.NodeAddressDefaultID),
ID: optional.Some(network.NodeAddressDefaultID),
Kind: controller.InputWeak,
},
}

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/martinlindhe/base36"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -41,19 +41,19 @@ func (ctrl *HostnameConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.NodeAddressDefaultID),
ID: optional.Some(network.NodeAddressDefaultID),
Kind: controller.InputWeak,
},
{
Namespace: cluster.NamespaceName,
Type: cluster.IdentityType,
ID: pointer.To(cluster.LocalIdentity),
ID: optional.Some(cluster.LocalIdentity),
Kind: controller.InputWeak,
},
}

View File

@ -18,7 +18,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"gopkg.in/yaml.v3"
@ -51,7 +51,7 @@ func (ctrl *PlatformConfigController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: runtimeres.MountStatusType,
ID: pointer.To(constants.StatePartitionLabel),
ID: optional.Some(constants.StatePartitionLabel),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -39,7 +39,7 @@ func (ctrl *ResolverConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -12,8 +12,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/value"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/files"
@ -34,7 +34,7 @@ func (ctrl *StatusController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.NodeAddressCurrentID),
ID: optional.Some(network.NodeAddressCurrentID),
Kind: controller.InputWeak,
},
{

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -39,7 +39,7 @@ func (ctrl *TimeServerConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/talos/pkg/machinery/resources/network"
)
@ -25,7 +25,7 @@ func WaitForNetworkReady(ctx context.Context, r controller.Runtime, condition fu
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -19,8 +19,8 @@ import (
"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/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -58,19 +58,19 @@ func (ctrl *CRIImageGCController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To("cri"),
ID: optional.Some("cri"),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.KubeletSpecType,
ID: pointer.To(k8s.KubeletID),
ID: optional.Some(k8s.KubeletID),
Kind: controller.InputWeak,
},
{
Namespace: etcd.NamespaceName,
Type: etcd.SpecType,
ID: pointer.To(etcd.SpecID),
ID: optional.Some(etcd.SpecID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
machineruntime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -40,7 +40,7 @@ func (ctrl *DropUpgradeFallbackController) Inputs() []controller.Input {
{
Namespace: runtime.NamespaceName,
Type: runtime.MachineStatusType,
ID: pointer.To(runtime.MachineStatusID),
ID: optional.Some(runtime.MachineStatusID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/state"
"github.com/rs/xid"
"github.com/siderolabs/gen/channel"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/siderolink/api/events"
"go.uber.org/zap"
"google.golang.org/grpc"
@ -76,7 +76,7 @@ func (ctrl *EventsSinkController) Run(ctx context.Context, r controller.Runtime,
{
Namespace: runtime.NamespaceName,
Type: runtime.EventSinkConfigType,
ID: pointer.To(runtime.EventSinkConfigID),
ID: optional.Some(runtime.EventSinkConfigID),
Kind: controller.InputWeak,
},
},

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -36,7 +36,7 @@ func (ctrl *EventsSinkConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -32,7 +32,7 @@ func (ctrl *KernelModuleConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
},
}
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/kernel"
@ -35,7 +35,7 @@ func (ctrl *KernelParamConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
},
}
}

View File

@ -14,9 +14,9 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-kmsg"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
@ -67,7 +67,7 @@ func (ctrl *KmsgLogDeliveryController) Run(ctx context.Context, r controller.Run
{
Namespace: runtime.NamespaceName,
Type: runtime.KmsgLogConfigType,
ID: pointer.To(runtime.KmsgLogConfigID),
ID: optional.Some(runtime.KmsgLogConfigID),
Kind: controller.InputWeak,
},
},

View File

@ -13,8 +13,8 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -39,7 +39,7 @@ func (ctrl *KmsgLogConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
v1 "k8s.io/api/core/v1"
@ -54,13 +54,13 @@ func (ctrl *MachineStatusController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: time.StatusType,
ID: pointer.To(time.StatusID),
ID: optional.Some(time.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
{
@ -76,13 +76,13 @@ func (ctrl *MachineStatusController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
{
Namespace: k8s.NamespaceName,
Type: k8s.NodenameType,
ID: pointer.To(k8s.NodenameID),
ID: optional.Some(k8s.NodenameID),
Kind: controller.InputWeak,
},
{

View File

@ -11,8 +11,8 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
v1alpha1runtime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -36,7 +36,7 @@ func (ctrl *MachineStatusPublisherController) Inputs() []controller.Input {
{
Namespace: runtime.NamespaceName,
Type: runtime.MachineStatusType,
ID: pointer.To(runtime.MachineStatusID),
ID: optional.Some(runtime.MachineStatusID),
Kind: controller.InputWeak,
},
}

View File

@ -12,8 +12,8 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -38,12 +38,12 @@ func (ctrl *MaintenanceConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: siderolink.ConfigType,
ID: pointer.To(siderolink.ConfigID),
ID: optional.Some(siderolink.ConfigID),
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.NodeAddressCurrentID),
ID: optional.Some(network.NodeAddressCurrentID),
},
}
}

View File

@ -18,9 +18,9 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/gen/xslices"
"github.com/siderolabs/go-debug"
"github.com/siderolabs/go-pointer"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
@ -48,19 +48,19 @@ func (ctrl *MaintenanceServiceController) Inputs() []controller.Input {
{
Namespace: runtime.NamespaceName,
Type: runtime.MaintenanceServiceRequestType,
ID: pointer.To(runtime.MaintenanceServiceRequestID),
ID: optional.Some(runtime.MaintenanceServiceRequestID),
Kind: controller.InputStrong,
},
{
Namespace: runtime.NamespaceName,
Type: runtime.MaintenanceServiceConfigType,
ID: pointer.To(runtime.MaintenanceServiceConfigID),
ID: optional.Some(runtime.MaintenanceServiceConfigID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.MaintenanceServiceCertsType,
ID: pointer.To(secrets.MaintenanceServiceCertsID),
ID: optional.Some(secrets.MaintenanceServiceCertsID),
Kind: controller.InputWeak,
},
}

View File

@ -10,7 +10,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/talos/pkg/machinery/resources/runtime"
)
@ -24,7 +24,7 @@ func WaitForDevicesReady(ctx context.Context, r controller.Runtime, nextInputs [
{
Namespace: runtime.NamespaceName,
Type: runtime.DevicesStatusType,
ID: pointer.To(runtime.DevicesID),
ID: optional.Some(runtime.DevicesID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/grpc/gen"
@ -43,13 +43,13 @@ func (ctrl *APIController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
}
@ -137,19 +137,19 @@ func (ctrl *APIController) reconcile(ctx context.Context, r controller.Runtime,
{
Namespace: secrets.NamespaceName,
Type: secrets.OSRootType,
ID: pointer.To(secrets.OSRootID),
ID: optional.Some(secrets.OSRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.CertSANType,
ID: pointer.To(secrets.CertSANAPIID),
ID: optional.Some(secrets.CertSANAPIID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
// time status isn't fetched, but the fact that it is in dependencies means
@ -157,7 +157,7 @@ func (ctrl *APIController) reconcile(ctx context.Context, r controller.Runtime,
{
Namespace: v1alpha1.NamespaceName,
Type: timeresource.StatusType,
ID: pointer.To(timeresource.StatusID),
ID: optional.Some(timeresource.StatusID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/k8s"
@ -35,19 +35,19 @@ func (ctrl *APICertSANsController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.OSRootType,
ID: pointer.To(secrets.OSRootID),
ID: optional.Some(secrets.OSRootID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
ID: optional.Some(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
Kind: controller.InputWeak,
},
}

View File

@ -12,7 +12,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/internal/pkg/etcd"
@ -37,31 +37,31 @@ func (ctrl *EtcdController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.EtcdRootType,
ID: pointer.To(secrets.EtcdRootID),
ID: optional.Some(secrets.EtcdRootID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: time.StatusType,
ID: pointer.To(time.StatusID),
ID: optional.Some(time.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
ID: optional.Some(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
Kind: controller.InputWeak,
},
}

View File

@ -16,7 +16,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/kubeconfig"
@ -46,13 +46,13 @@ func (ctrl *KubernetesController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: timeresource.StatusType,
ID: pointer.To(timeresource.StatusID),
ID: optional.Some(timeresource.StatusID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/k8s"
@ -35,19 +35,19 @@ func (ctrl *KubernetesCertSANsController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
ID: optional.Some(network.FilteredNodeAddressID(network.NodeAddressAccumulativeID, k8s.NodeAddressFilterNoK8s)),
Kind: controller.InputWeak,
},
}

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -57,7 +57,7 @@ func (ctrl *KubernetesDynamicCertsController) Run(ctx context.Context, r control
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
}); err != nil {
@ -90,19 +90,19 @@ func (ctrl *KubernetesDynamicCertsController) Run(ctx context.Context, r control
{
Namespace: secrets.NamespaceName,
Type: secrets.KubernetesRootType,
ID: pointer.To(secrets.KubernetesRootID),
ID: optional.Some(secrets.KubernetesRootID),
Kind: controller.InputWeak,
},
{
Namespace: v1alpha1.NamespaceName,
Type: timeresource.StatusType,
ID: pointer.To(timeresource.StatusID),
ID: optional.Some(timeresource.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.CertSANType,
ID: pointer.To(secrets.CertSANKubernetesID),
ID: optional.Some(secrets.CertSANKubernetesID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/secrets"
@ -36,13 +36,13 @@ func (ctrl *MaintenanceController) Inputs() []controller.Input {
{
Namespace: secrets.NamespaceName,
Type: secrets.MaintenanceRootType,
ID: pointer.To(secrets.MaintenanceRootID),
ID: optional.Some(secrets.MaintenanceRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.CertSANType,
ID: pointer.To(secrets.CertSANMaintenanceID),
ID: optional.Some(secrets.CertSANMaintenanceID),
Kind: controller.InputWeak,
},
// time status isn't fetched, but the fact that it is in dependencies means
@ -50,7 +50,7 @@ func (ctrl *MaintenanceController) Inputs() []controller.Input {
{
Namespace: v1alpha1.NamespaceName,
Type: timeresource.StatusType,
ID: pointer.To(timeresource.StatusID),
ID: optional.Some(timeresource.StatusID),
Kind: controller.InputWeak,
},
}

View File

@ -13,7 +13,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/constants"
@ -35,13 +35,13 @@ func (ctrl *MaintenanceCertSANsController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.HostnameStatusType,
ID: pointer.To(network.HostnameID),
ID: optional.Some(network.HostnameID),
Kind: controller.InputWeak,
},
{
Namespace: network.NamespaceName,
Type: network.NodeAddressType,
ID: pointer.To(network.NodeAddressAccumulativeID),
ID: optional.Some(network.NodeAddressAccumulativeID),
Kind: controller.InputWeak,
},
}

View File

@ -15,7 +15,7 @@ import (
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/crypto/x509"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
"github.com/siderolabs/talos/pkg/machinery/resources/config"
@ -40,13 +40,13 @@ func (ctrl *TrustdController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.StatusType,
ID: pointer.To(network.StatusID),
ID: optional.Some(network.StatusID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
}
@ -125,19 +125,19 @@ func (ctrl *TrustdController) reconcile(ctx context.Context, r controller.Runtim
{
Namespace: secrets.NamespaceName,
Type: secrets.OSRootType,
ID: pointer.To(secrets.OSRootID),
ID: optional.Some(secrets.OSRootID),
Kind: controller.InputWeak,
},
{
Namespace: secrets.NamespaceName,
Type: secrets.CertSANType,
ID: pointer.To(secrets.CertSANAPIID),
ID: optional.Some(secrets.CertSANAPIID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineTypeType,
ID: pointer.To(config.MachineTypeID),
ID: optional.Some(config.MachineTypeID),
Kind: controller.InputWeak,
},
// time status isn't fetched, but the fact that it is in dependencies means
@ -145,7 +145,7 @@ func (ctrl *TrustdController) reconcile(ctx context.Context, r controller.Runtim
{
Namespace: v1alpha1.NamespaceName,
Type: timeresource.StatusType,
ID: pointer.To(timeresource.StatusID),
ID: optional.Some(timeresource.StatusID),
Kind: controller.InputWeak,
},
}

View File

@ -11,7 +11,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/go-procfs/procfs"
"go.uber.org/zap"
@ -36,7 +36,7 @@ func (ctrl *ConfigController) Inputs() []controller.Input {
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
Kind: controller.InputWeak,
},
}

View File

@ -18,6 +18,7 @@ import (
"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/optional"
"github.com/siderolabs/go-pointer"
pb "github.com/siderolabs/siderolink/api/siderolink"
"github.com/siderolabs/siderolink/pkg/wireguard"
@ -80,13 +81,13 @@ func (ctrl *ManagerController) Run(ctx context.Context, r controller.Runtime, lo
{
Namespace: config.NamespaceName,
Type: siderolink.ConfigType,
ID: pointer.To(siderolink.ConfigID),
ID: optional.Some(siderolink.ConfigID),
Kind: controller.InputWeak,
},
{
Namespace: hardware.NamespaceName,
Type: hardware.SystemInformationType,
ID: pointer.To(hardware.SystemInformationID),
ID: optional.Some(hardware.SystemInformationID),
Kind: controller.InputWeak,
},
},

View File

@ -14,7 +14,7 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"go.uber.org/zap"
v1alpha1runtime "github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
@ -43,13 +43,13 @@ func (ctrl *SyncController) Inputs() []controller.Input {
{
Namespace: network.NamespaceName,
Type: network.TimeServerStatusType,
ID: pointer.To(network.TimeServerID),
ID: optional.Some(network.TimeServerID),
Kind: controller.InputWeak,
},
{
Namespace: config.NamespaceName,
Type: config.MachineConfigType,
ID: pointer.To(config.V1Alpha1ID),
ID: optional.Some(config.V1Alpha1ID),
},
}
}

View File

@ -10,7 +10,7 @@ import (
"github.com/cosi-project/runtime/pkg/controller"
"github.com/cosi-project/runtime/pkg/safe"
"github.com/cosi-project/runtime/pkg/state"
"github.com/siderolabs/go-pointer"
"github.com/siderolabs/gen/optional"
"github.com/siderolabs/talos/pkg/machinery/resources/v1alpha1"
)
@ -24,7 +24,7 @@ func WaitForServiceHealthy(ctx context.Context, r controller.Runtime, serviceID
{
Namespace: v1alpha1.NamespaceName,
Type: v1alpha1.ServiceType,
ID: pointer.To(serviceID),
ID: optional.Some(serviceID),
Kind: controller.InputWeak,
},
}); err != nil {

View File

@ -9,7 +9,7 @@ replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b
require (
github.com/blang/semver/v4 v4.0.0
github.com/containerd/go-cni v1.1.9
github.com/cosi-project/runtime v0.3.11
github.com/cosi-project/runtime v0.3.13
github.com/dustin/go-humanize v1.0.1
github.com/evanphx/json-patch v5.7.0+incompatible
github.com/ghodss/yaml v1.0.0

View File

@ -22,8 +22,8 @@ github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9
github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM=
github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ=
github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw=
github.com/cosi-project/runtime v0.3.11 h1:Kz4Wk/HwqWkLA3opFJWnJ0bF0LHLr4sWoPDcONrU26M=
github.com/cosi-project/runtime v0.3.11/go.mod h1:kLIIwnTlUnVPhZZN82esCuyvD23eNJkOcnjWE7i+qBk=
github.com/cosi-project/runtime v0.3.13 h1:879ECFAi0tTD0BiLv39iKqipKxU9tspKb411UhktdTg=
github.com/cosi-project/runtime v0.3.13/go.mod h1:O3/3pjghhExoXuRlbZskjVCuvkFqqswf3hE1kP0rvZQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=