diff --git a/.golangci.yml b/.golangci.yml index 10c20c609..652b6ef8e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -150,9 +150,14 @@ linters: - paralleltest - thelper - wrapcheck + - ireturn + - tagliatelle + - varnamelen + - gomoddirectives # abandoned linters for which golangci shows the warning that the repo is archived by the owner - interfacer - maligned + - scopelint disable-all: false fast: false diff --git a/Dockerfile b/Dockerfile index ce89edbae..2707836d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ ENV GOMODCACHE /.cache/mod RUN --mount=type=cache,target=/.cache go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 RUN --mount=type=cache,target=/.cache go install k8s.io/code-generator/cmd/conversion-gen@v0.21.3 RUN --mount=type=cache,target=/.cache go install mvdan.cc/gofumpt/gofumports@v0.1.1 -RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b /toolchain/bin v1.38.0 +RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b /toolchain/bin v1.43.0 WORKDIR /src COPY ./go.mod ./ COPY ./go.sum ./ @@ -136,6 +136,14 @@ ARG GO_LDFLAGS RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=${TARGETARCH} go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X main.TalosRelease=${TALOS_RELEASE}" -o /manager ./app/sidero-controller-manager RUN chmod +x /manager +FROM base AS build-siderolink-manager +ARG TALOS_RELEASE +ARG TARGETARCH +ARG GO_BUILDFLAGS +ARG GO_LDFLAGS +RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=${TARGETARCH} go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X main.TalosRelease=${TALOS_RELEASE}" -o /siderolink-manager ./app/sidero-controller-manager/cmd/siderolink-manager +RUN chmod +x /siderolink-manager + FROM base AS agent-build-amd64 ARG GO_BUILDFLAGS ARG GO_LDFLAGS @@ -185,6 +193,7 @@ COPY --from=initramfs-archive-arm64 /initramfs.xz /var/lib/sidero/env/agent-arm6 COPY --from=pkg-kernel-amd64 /boot/vmlinuz /var/lib/sidero/env/agent-amd64/vmlinuz COPY --from=pkg-kernel-arm64 /boot/vmlinuz /var/lib/sidero/env/agent-arm64/vmlinuz COPY --from=build-sidero-controller-manager /manager /manager +COPY --from=build-siderolink-manager /siderolink-manager /siderolink-manager FROM sidero-controller-manager-image AS sidero-controller-manager LABEL org.opencontainers.image.source https://github.com/talos-systems/sidero diff --git a/app/caps-controller-manager/api/v1alpha3/serverbinding_types.go b/app/caps-controller-manager/api/v1alpha3/serverbinding_types.go index 4a848f7c6..57d881551 100644 --- a/app/caps-controller-manager/api/v1alpha3/serverbinding_types.go +++ b/app/caps-controller-manager/api/v1alpha3/serverbinding_types.go @@ -16,6 +16,18 @@ const ServerBindingMetalMachineRefField = "spec.metalMachineRef.name" type ServerBindingSpec struct { ServerClassRef *corev1.ObjectReference `json:"serverClassRef,omitempty"` MetalMachineRef corev1.ObjectReference `json:"metalMachineRef"` + + // SideroLink describes state of the SideroLink tunnel. + // +optional + SideroLink SideroLinkSpec `json:"siderolink,omitempty"` +} + +// SideroLinkSpec defines the state of SideroLink connection. +type SideroLinkSpec struct { + // NodeAddress is the tunnel address of the node. + NodeAddress string `json:"address"` + // NodePublicKey is the Wireguard public key of the node. + NodePublicKey string `json:"publicKey"` } // ServerBindingState defines the observed state of ServerBinding. diff --git a/app/caps-controller-manager/api/v1alpha3/zz_generated.deepcopy.go b/app/caps-controller-manager/api/v1alpha3/zz_generated.deepcopy.go index 474bd53f5..f5d4bed7d 100644 --- a/app/caps-controller-manager/api/v1alpha3/zz_generated.deepcopy.go +++ b/app/caps-controller-manager/api/v1alpha3/zz_generated.deepcopy.go @@ -393,6 +393,7 @@ func (in *ServerBindingSpec) DeepCopyInto(out *ServerBindingSpec) { **out = **in } out.MetalMachineRef = in.MetalMachineRef + out.SideroLink = in.SideroLink } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerBindingSpec. @@ -419,3 +420,18 @@ func (in *ServerBindingState) DeepCopy() *ServerBindingState { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SideroLinkSpec) DeepCopyInto(out *SideroLinkSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SideroLinkSpec. +func (in *SideroLinkSpec) DeepCopy() *SideroLinkSpec { + if in == nil { + return nil + } + out := new(SideroLinkSpec) + in.DeepCopyInto(out) + return out +} diff --git a/app/caps-controller-manager/config/crd/bases/infrastructure.cluster.x-k8s.io_serverbindings.yaml b/app/caps-controller-manager/config/crd/bases/infrastructure.cluster.x-k8s.io_serverbindings.yaml index 303b11d78..e8e9c5a53 100644 --- a/app/caps-controller-manager/config/crd/bases/infrastructure.cluster.x-k8s.io_serverbindings.yaml +++ b/app/caps-controller-manager/config/crd/bases/infrastructure.cluster.x-k8s.io_serverbindings.yaml @@ -182,6 +182,20 @@ spec: description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string type: object + siderolink: + description: SideroLink describes state of the SideroLink tunnel. + properties: + address: + description: NodeAddress is the tunnel address of the node. + type: string + publicKey: + description: NodePublicKey is the Wireguard public key of the + node. + type: string + required: + - address + - publicKey + type: object required: - metalMachineRef type: object diff --git a/app/caps-controller-manager/controllers/serverbinding_controller.go b/app/caps-controller-manager/controllers/serverbinding_controller.go index cec89bc34..0917bf6c2 100644 --- a/app/caps-controller-manager/controllers/serverbinding_controller.go +++ b/app/caps-controller-manager/controllers/serverbinding_controller.go @@ -51,7 +51,7 @@ func (r *ServerBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reques err = r.Get(ctx, req.NamespacedName, serverBinding) if apierrors.IsNotFound(err) { - return r.reconcileTransition(logger, req) + return r.reconcileTransition(ctx, logger, req) } if err != nil { @@ -138,9 +138,7 @@ func (r *ServerBindingReconciler) SetupWithManager(ctx context.Context, mgr ctrl Complete(r) } -func (r *ServerBindingReconciler) reconcileTransition(logger logr.Logger, req ctrl.Request) (_ ctrl.Result, err error) { - ctx := context.Background() - +func (r *ServerBindingReconciler) reconcileTransition(ctx context.Context, logger logr.Logger, req ctrl.Request) (_ ctrl.Result, err error) { logger.Info("reconciling missing serverbinding") var metalMachineList infrav1.MetalMachineList diff --git a/app/sidero-controller-manager/cmd/siderolink-manager/kubernetes.go b/app/sidero-controller-manager/cmd/siderolink-manager/kubernetes.go new file mode 100644 index 000000000..31f94852d --- /dev/null +++ b/app/sidero-controller-manager/cmd/siderolink-manager/kubernetes.go @@ -0,0 +1,33 @@ +// 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 main + +import ( + "k8s.io/apimachinery/pkg/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + ctrl "sigs.k8s.io/controller-runtime" + runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" + + sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" +) + +func getMetalClient() (runtimeclient.Client, *rest.Config, error) { + kubeconfig := ctrl.GetConfigOrDie() + + scheme := runtime.NewScheme() + + if err := clientgoscheme.AddToScheme(scheme); err != nil { + return nil, nil, err + } + + if err := sidero.AddToScheme(scheme); err != nil { + return nil, nil, err + } + + client, err := runtimeclient.New(kubeconfig, runtimeclient.Options{Scheme: scheme}) + + return client, kubeconfig, err +} diff --git a/app/sidero-controller-manager/cmd/siderolink-manager/main.go b/app/sidero-controller-manager/cmd/siderolink-manager/main.go new file mode 100644 index 000000000..3ae78a916 --- /dev/null +++ b/app/sidero-controller-manager/cmd/siderolink-manager/main.go @@ -0,0 +1,168 @@ +// 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 main + +import ( + "context" + "errors" + "flag" + "fmt" + "log" + "net" + "os" + "os/signal" + "syscall" + + grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" + grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" + grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" + grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" + "go.uber.org/zap" + "golang.org/x/sync/errgroup" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "inet.af/netaddr" + + pb "github.com/talos-systems/siderolink/api/siderolink" + "github.com/talos-systems/siderolink/pkg/wireguard" + + "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink" + "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" +) + +var ( + wireguardEndpoint string + wireguardPort int +) + +func main() { + flag.StringVar(&wireguardEndpoint, "wireguard-endpoint", "", "The endpoint (IP address) SideroLink can be reached at from the servers.") + flag.IntVar(&wireguardPort, "wireguard-port", 51821, "The TCP port SideroLink can be reached at from the servers.") + + flag.Parse() + + if wireguardEndpoint == "-" { + wireguardEndpoint = "" + } + + if wireguardEndpoint == "" { + if endpoint, ok := os.LookupEnv("API_ENDPOINT"); ok { + wireguardEndpoint = endpoint + } else { + log.Fatal("no Wireguard endpoint found") + } + } + + if err := run(); err != nil { + fmt.Fprintf(os.Stderr, "error: %s", err) + os.Exit(1) + } +} + +func recoveryHandler(logger *zap.Logger) grpc_recovery.RecoveryHandlerFunc { + return func(p interface{}) error { + if logger != nil { + logger.Error("grpc panic", zap.Any("panic", p), zap.Stack("stack")) + } + + return status.Errorf(codes.Internal, "%v", p) + } +} + +func run() error { + logger, err := zap.NewProduction() + if err != nil { + return fmt.Errorf("failed to initialize logger: %w", err) + } + + zap.ReplaceGlobals(logger) + zap.RedirectStdLog(logger) + + metalclient, kubeconfig, err := getMetalClient() + if err != nil { + return fmt.Errorf("error building runtime client: %w", err) + } + + ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) + defer cancel() + + eg, ctx := errgroup.WithContext(ctx) + + lis, err := net.Listen("tcp", constants.SideroLinkInternalAPIEndpoint) + if err != nil { + return fmt.Errorf("error listening for gRPC API: %w", err) + } + + cfg := siderolink.Config{ + WireguardEndpoint: fmt.Sprintf("%s:%d", wireguardEndpoint, wireguardPort), + } + + if err = cfg.LoadOrCreate(ctx, metalclient); err != nil { + return err + } + + wireguardEndpoint, err := netaddr.ParseIPPort(cfg.WireguardEndpoint) + if err != nil { + return fmt.Errorf("invalid Wireguard endpoint: %w", err) + } + + wgDevice, err := wireguard.NewDevice(cfg.ServerAddress, cfg.PrivateKey, wireguardEndpoint.Port()) + if err != nil { + return fmt.Errorf("error initializing wgDevice: %w", err) + } + + defer wgDevice.Close() //nolint:errcheck + + grpc_zap.ReplaceGrpcLoggerV2(logger) + + recoveryOpt := grpc_recovery.WithRecoveryHandler(recoveryHandler(logger)) + + serverOptions := []grpc.ServerOption{ + grpc_middleware.WithUnaryServerChain( + grpc_ctxtags.UnaryServerInterceptor(), + grpc_zap.UnaryServerInterceptor(logger), + grpc_recovery.UnaryServerInterceptor(recoveryOpt), + ), + grpc_middleware.WithStreamServerChain( + grpc_ctxtags.StreamServerInterceptor(), + grpc_zap.StreamServerInterceptor(logger), + grpc_recovery.StreamServerInterceptor(recoveryOpt), + ), + } + + srv := siderolink.NewServer(&cfg, metalclient) + + peers := siderolink.NewPeerState(kubeconfig, logger) + + s := grpc.NewServer(serverOptions...) + pb.RegisterProvisionServiceServer(s, srv) + + eg.Go(func() error { + return wgDevice.Run(ctx, logger, peers) + }) + + eg.Go(func() error { + return peers.Run(ctx) + }) + + eg.Go(func() error { + return s.Serve(lis) + }) + + eg.Go(func() error { + <-ctx.Done() + + s.Stop() + + return nil + }) + + if err := eg.Wait(); err != nil && !errors.Is(err, grpc.ErrServerStopped) && errors.Is(err, context.Canceled) { + return err + } + + return nil +} diff --git a/app/sidero-controller-manager/config/manager/manager.yaml b/app/sidero-controller-manager/config/manager/manager.yaml index 6ec9575ef..319d7b1fd 100644 --- a/app/sidero-controller-manager/config/manager/manager.yaml +++ b/app/sidero-controller-manager/config/manager/manager.yaml @@ -13,6 +13,19 @@ spec: --- apiVersion: v1 kind: Service +metadata: + name: siderolink + namespace: system +spec: + ports: + - port: ${SIDERO_CONTROLLER_MANAGER_SIDEROLINK_PORT:=51821} + targetPort: siderolink + protocol: UDP + selector: + control-plane: sidero-controller-manager +--- +apiVersion: v1 +kind: Service metadata: name: http namespace: system @@ -90,4 +103,41 @@ spec: path: /healthz port: http initialDelaySeconds: 15 + - command: + - /siderolink-manager + args: + - --wireguard-endpoint=${SIDERO_CONTROLLER_MANAGER_SIDEROLINK_ENDPOINT:=-} + - --wireguard-port=${SIDERO_CONTROLLER_MANAGER_SIDEROLINK_PORT:=51821} + image: controller:latest + imagePullPolicy: Always + name: siderolink + env: + - name: API_ENDPOINT + valueFrom: + fieldRef: + fieldPath: status.hostIP + ports: + - name: siderolink + containerPort: ${SIDERO_CONTROLLER_MANAGER_SIDEROLINK_PORT:=51821} + protocol: UDP + resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 50m + memory: 128Mi + securityContext: + capabilities: + add: + - NET_ADMIN + privileged: false + volumeMounts: + - mountPath: /dev/net/tun + name: dev-tun + volumes: + - hostPath: + path: /dev/net/tun + type: CharDevice + name: dev-tun terminationGracePeriodSeconds: 10 diff --git a/app/sidero-controller-manager/internal/ipxe/ipxe_server.go b/app/sidero-controller-manager/internal/ipxe/ipxe_server.go index ec63d0a2e..890918d19 100644 --- a/app/sidero-controller-manager/internal/ipxe/ipxe_server.go +++ b/app/sidero-controller-manager/internal/ipxe/ipxe_server.go @@ -365,7 +365,7 @@ func newDefaultEnvironment() (env *metalv1alpha1.Environment, err error) { return nil, err } - appendTalosConfigArgument(env) + appendTalosArguments(env) return env, nil } @@ -377,7 +377,7 @@ func newEnvironmentFromServer(server *metalv1alpha1.Server) (env *metalv1alpha1. return nil, err } - appendTalosConfigArgument(env) + appendTalosArguments(env) return env, nil } @@ -399,27 +399,41 @@ func newEnvironmentFromServerClass(serverBinding *infrav1.ServerBinding) (env *m return nil, err } - appendTalosConfigArgument(env) + appendTalosArguments(env) return env, nil } -func appendTalosConfigArgument(env *metalv1alpha1.Environment) { +func appendTalosArguments(env *metalv1alpha1.Environment) { args := env.Spec.Kernel.Args talosConfigPrefix := talosconstants.KernelParamConfig + "=" + sideroLinkPrefix := talosconstants.KernelParamSideroLink + "=" + + for _, prefix := range []string{ + talosConfigPrefix, + sideroLinkPrefix, + } { + for _, arg := range args { + if strings.HasPrefix(arg, prefix) { + // Environment already has variable, skip it + return + } + } - for _, arg := range args { - if strings.HasPrefix(arg, talosConfigPrefix) { - // Environment already has talos.config - return + switch prefix { + case talosConfigPrefix: + // patch environment with the link to the metadata server + env.Spec.Kernel.Args = append(env.Spec.Kernel.Args, + fmt.Sprintf("%s=http://%s:%d/configdata?uuid=", talosconstants.KernelParamConfig, apiEndpoint, apiPort), + ) + case sideroLinkPrefix: + // patch environment with the SideroLink API + env.Spec.Kernel.Args = append(env.Spec.Kernel.Args, + fmt.Sprintf("%s=%s:%d", talosconstants.KernelParamSideroLink, apiEndpoint, apiPort), + ) } } - - // patch environment with the link to the metadata server - env.Spec.Kernel.Args = append(env.Spec.Kernel.Args, - fmt.Sprintf("%s=http://%s:%d/configdata?uuid=", talosconstants.KernelParamConfig, apiEndpoint, apiPort), - ) } func markAsPXEBooted(server *metalv1alpha1.Server) error { diff --git a/app/sidero-controller-manager/internal/server/proxy.go b/app/sidero-controller-manager/internal/server/proxy.go new file mode 100644 index 000000000..18e82b64e --- /dev/null +++ b/app/sidero-controller-manager/internal/server/proxy.go @@ -0,0 +1,77 @@ +// 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 server + +import ( + "context" + "strings" + "sync" + + "github.com/talos-systems/grpc-proxy/proxy" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + + "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" +) + +// director proxy passes gRPC APIs to sub-components based on API method name. +func director(ctx context.Context, fullMethodName string) (proxy.Mode, []proxy.Backend, error) { + switch { + case strings.HasPrefix(fullMethodName, "/sidero.link."): + return proxy.One2One, []proxy.Backend{sideroLinkAPI}, nil + default: + return proxy.One2One, nil, status.Errorf(codes.Unimplemented, "Unknown method") + } +} + +// backend performs proxying to another Sidero component. +type backend struct { + target string + + mu sync.Mutex + conn *grpc.ClientConn +} + +func (b *backend) String() string { + return b.target +} + +// GetConnection returns a grpc connection to the backend. +func (b *backend) GetConnection(ctx context.Context) (context.Context, *grpc.ClientConn, error) { + md, _ := metadata.FromIncomingContext(ctx) + + outCtx := metadata.NewOutgoingContext(ctx, md) + + b.mu.Lock() + defer b.mu.Unlock() + + if b.conn != nil { + return outCtx, b.conn, nil + } + + var err error + b.conn, err = grpc.DialContext( + ctx, + b.target, + grpc.WithInsecure(), + grpc.WithCodec(proxy.Codec()), //nolint:staticcheck + ) + + return outCtx, b.conn, err +} + +// AppendInfo is called to enhance response from the backend with additional data. +func (b *backend) AppendInfo(streaming bool, resp []byte) ([]byte, error) { + return resp, nil +} + +// BuildError is called to convert error from upstream into response field. +func (b *backend) BuildError(streaming bool, err error) ([]byte, error) { + return nil, err +} + +var sideroLinkAPI = &backend{target: constants.SideroLinkInternalAPIEndpoint} diff --git a/app/sidero-controller-manager/internal/server/server.go b/app/sidero-controller-manager/internal/server/server.go index dc763b3f2..3475049a6 100644 --- a/app/sidero-controller-manager/internal/server/server.go +++ b/app/sidero-controller-manager/internal/server/server.go @@ -10,6 +10,7 @@ import ( "reflect" "time" + "github.com/talos-systems/grpc-proxy/proxy" "google.golang.org/grpc" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -374,7 +375,14 @@ func (s *server) UpdateBMCInfo(ctx context.Context, in *api.UpdateBMCInfoRequest } func CreateServer(c controllerclient.Client, recorder record.EventRecorder, scheme *runtime.Scheme, autoAccept, insecureWipe, autoBMC bool, rebootTimeout time.Duration) *grpc.Server { - s := grpc.NewServer() + s := grpc.NewServer( + // proxy pass unknown requests to sub-components + grpc.CustomCodec(proxy.Codec()), //nolint:staticcheck + grpc.UnknownServiceHandler( + proxy.TransparentHandler( + director, + )), + ) api.RegisterAgentServer(s, &server{ autoAccept: autoAccept, diff --git a/app/sidero-controller-manager/internal/siderolink/config.go b/app/sidero-controller-manager/internal/siderolink/config.go new file mode 100644 index 000000000..c097fe4a7 --- /dev/null +++ b/app/sidero-controller-manager/internal/siderolink/config.go @@ -0,0 +1,130 @@ +// 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 siderolink + +import ( + "context" + "fmt" + + "golang.zx2c4.com/wireguard/wgctrl/wgtypes" + "inet.af/netaddr" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/talos-systems/siderolink/pkg/wireguard" +) + +// Config is the internal SideroLink configuration. +type Config struct { + InstallationID string + PrivateKey wgtypes.Key + PublicKey wgtypes.Key + WireguardEndpoint string + Subnet netaddr.IPPrefix + ServerAddress netaddr.IPPrefix +} + +const ( + secretInstallationID = "installation-id" + secretPrivateKey = "private-key" +) + +func (cfg *Config) LoadOrCreate(ctx context.Context, metalClient runtimeclient.Client) error { + var secret corev1.Secret + +retry: + err := metalClient.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceDefault, Name: SecretName}, &secret) + + if err == nil { + if err = cfg.loadFrom(&secret); err != nil { + return fmt.Errorf("error loading from secret") + } + + return nil + } + + if !apierrors.IsNotFound(err) { + return fmt.Errorf("error fetching secret: %w", err) + } + + if err = cfg.generate(); err != nil { + return fmt.Errorf("error generating config: %w", err) + } + + if err = cfg.save(ctx, metalClient); err != nil { + if apierrors.IsAlreadyExists(err) { + // config was already saved by another process, retry loading + goto retry + } + + return fmt.Errorf("error saving config: %w", err) + } + + return nil +} + +func (cfg *Config) loadFrom(secret *corev1.Secret) error { + if b, ok := secret.Data[secretInstallationID]; !ok { + return fmt.Errorf("missing %q key", secretInstallationID) + } else { + cfg.InstallationID = string(b) + } + + if b, ok := secret.Data[secretPrivateKey]; !ok { + return fmt.Errorf("missing %q key", secretPrivateKey) + } else { + var err error + + cfg.PrivateKey, err = wgtypes.ParseKey(string(b)) + if err != nil { + return fmt.Errorf("error parsing key: %w", err) + } + } + + cfg.fill() + + return nil +} + +func (cfg *Config) save(ctx context.Context, metalClient runtimeclient.Client) error { + return metalClient.Create(ctx, &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: corev1.NamespaceDefault, + Name: SecretName, + }, + Data: map[string][]byte{ + secretInstallationID: []byte(cfg.InstallationID), + secretPrivateKey: []byte(cfg.PrivateKey.String()), + }, + }) +} + +func (cfg *Config) generate() error { + installID, err := wgtypes.GeneratePrivateKey() // use private wireguard key as the installation ID, as it's random bytes + if err != nil { + return err + } + + cfg.InstallationID = installID.String() + + cfg.PrivateKey, err = wgtypes.GeneratePrivateKey() + if err != nil { + return err + } + + cfg.fill() + + return nil +} + +func (cfg *Config) fill() { + cfg.PublicKey = cfg.PrivateKey.PublicKey() + + cfg.Subnet = wireguard.NetworkPrefix(cfg.InstallationID) + cfg.ServerAddress = netaddr.IPPrefixFrom(cfg.Subnet.IP().Next(), cfg.Subnet.Bits()) +} diff --git a/app/sidero-controller-manager/internal/siderolink/peers.go b/app/sidero-controller-manager/internal/siderolink/peers.go new file mode 100644 index 000000000..dbce1d218 --- /dev/null +++ b/app/sidero-controller-manager/internal/siderolink/peers.go @@ -0,0 +1,139 @@ +// 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 siderolink + +import ( + "context" + "time" + + "go.uber.org/zap" + "golang.zx2c4.com/wireguard/wgctrl/wgtypes" + "inet.af/netaddr" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/dynamic/dynamicinformer" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" + + sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" + "github.com/talos-systems/siderolink/pkg/wireguard" +) + +// PeerState syncs data from Kubernetes ServerBinding as peer state. +type PeerState struct { + kubeconfig *rest.Config + logger *zap.Logger + + eventCh chan wireguard.PeerEvent +} + +// NewPeerState initializes PeerState. +func NewPeerState(kubeconfig *rest.Config, logger *zap.Logger) *PeerState { + return &PeerState{ + kubeconfig: kubeconfig, + logger: logger, + eventCh: make(chan wireguard.PeerEvent, 16), + } +} + +// Run the watch loop reporting peer state changes. +func (peers *PeerState) Run(ctx context.Context) error { + dc, err := dynamic.NewForConfig(peers.kubeconfig) + if err != nil { + return err + } + + // Create a factory object that can generate informers for resource types + factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(dc, 10*time.Minute, "", nil) + + informerFactory := factory.ForResource(sidero.GroupVersion.WithResource("serverbindings")) + informer := informerFactory.Informer() + + informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(new interface{}) { peers.notify(nil, new) }, + UpdateFunc: peers.notify, + DeleteFunc: func(old interface{}) { peers.notify(old, nil) }, + }) + + informer.Run(ctx.Done()) + + return nil +} + +func (peers *PeerState) notify(old, new interface{}) { + var oldServerBinding, newServerBinding *sidero.ServerBinding + + if old != nil { + oldServerBinding = &sidero.ServerBinding{} + + err := runtime.DefaultUnstructuredConverter. + FromUnstructured(old.(*unstructured.Unstructured).UnstructuredContent(), oldServerBinding) + if err != nil { + peers.logger.Error("failed converting old event object", zap.Error(err)) + + return + } + } + + if new != nil { + newServerBinding = &sidero.ServerBinding{} + + err := runtime.DefaultUnstructuredConverter. + FromUnstructured(new.(*unstructured.Unstructured).UnstructuredContent(), newServerBinding) + if err != nil { + peers.logger.Error("failed converting new event object", zap.Error(err)) + + return + } + } + + if oldServerBinding != nil && newServerBinding != nil { + if oldServerBinding.Spec.SideroLink == newServerBinding.Spec.SideroLink { + // no change to SideroLink, skip it + return + } + } + + if oldServerBinding != nil { + peers.buildEvent(oldServerBinding, true) + } + + if newServerBinding != nil { + peers.buildEvent(newServerBinding, false) + } +} + +func (peers *PeerState) buildEvent(serverBinding *sidero.ServerBinding, deleted bool) { + if serverBinding.Spec.SideroLink.NodePublicKey == "" || serverBinding.Spec.SideroLink.NodeAddress == "" { + // no SideroLink information + return + } + + address, err := netaddr.ParseIPPrefix(serverBinding.Spec.SideroLink.NodeAddress) + if err != nil { + peers.logger.Error("error parsing node address", zap.Error(err), zap.String("uuid", serverBinding.Name)) + + return + } + + pubKey, err := wgtypes.ParseKey(serverBinding.Spec.SideroLink.NodePublicKey) + if err != nil { + peers.logger.Error("error parsing public key", zap.Error(err), zap.String("uuid", serverBinding.Name)) + + return + } + + peers.eventCh <- wireguard.PeerEvent{ + PubKey: pubKey, + Remove: deleted, + Address: address.IP(), + } +} + +// EventCh implements the wireguard.PeerSource interface. +func (peers *PeerState) EventCh() <-chan wireguard.PeerEvent { + return peers.eventCh +} diff --git a/app/sidero-controller-manager/internal/siderolink/server.go b/app/sidero-controller-manager/internal/siderolink/server.go new file mode 100644 index 000000000..ae328f273 --- /dev/null +++ b/app/sidero-controller-manager/internal/siderolink/server.go @@ -0,0 +1,102 @@ +// 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 siderolink + +import ( + "context" + "crypto/rand" + "fmt" + "io" + + "golang.zx2c4.com/wireguard/wgctrl/wgtypes" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "inet.af/netaddr" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/cluster-api/util/patch" + runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" + + pb "github.com/talos-systems/siderolink/api/siderolink" + + sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" +) + +// Server implements gRPC API. +type Server struct { + pb.UnimplementedProvisionServiceServer + + cfg *Config + metalClient runtimeclient.Client +} + +// NewServer initializes new server. +func NewServer(cfg *Config, metalClient runtimeclient.Client) *Server { + return &Server{ + cfg: cfg, + metalClient: metalClient, + } +} + +// Provision the SideroLink for the server by UUID. +func (srv *Server) Provision(ctx context.Context, req *pb.ProvisionRequest) (*pb.ProvisionResponse, error) { + var serverbinding sidero.ServerBinding + + if err := srv.metalClient.Get(ctx, types.NamespacedName{Name: req.NodeUuid}, &serverbinding); err != nil { + if apierrors.IsNotFound(err) { + return nil, status.Error(codes.NotFound, fmt.Sprintf("server binding %q not found", req.NodeUuid)) + } + + return nil, err + } + + patchHelper, err := patch.NewHelper(&serverbinding, srv.metalClient) + if err != nil { + return nil, err + } + + var nodeAddress netaddr.IPPrefix + + if serverbinding.Spec.SideroLink.NodeAddress != "" { + // find already provisioned address + nodeAddress, err = netaddr.ParseIPPrefix(serverbinding.Spec.SideroLink.NodeAddress) + if err != nil { + return nil, err + } + } else { + // generate random address for the node + raw := srv.cfg.Subnet.IP().As16() + salt := make([]byte, 8) + + _, err := io.ReadFull(rand.Reader, salt) + if err != nil { + return nil, err + } + + copy(raw[8:], salt) + + nodeAddress = netaddr.IPPrefixFrom(netaddr.IPFrom16(raw), srv.cfg.Subnet.Bits()) + + serverbinding.Spec.SideroLink.NodeAddress = nodeAddress.String() + } + + pubKey, err := wgtypes.ParseKey(req.NodePublicKey) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("error parsing Wireguard key: %s", err)) + } + + serverbinding.Spec.SideroLink.NodePublicKey = pubKey.String() + + if err = patchHelper.Patch(ctx, &serverbinding); err != nil { + return nil, err + } + + return &pb.ProvisionResponse{ + ServerEndpoint: srv.cfg.WireguardEndpoint, + ServerPublicKey: srv.cfg.PublicKey.String(), + ServerAddress: srv.cfg.ServerAddress.IP().String(), + NodeAddressPrefix: nodeAddress.String(), + }, nil +} diff --git a/app/sidero-controller-manager/internal/siderolink/siderolink.go b/app/sidero-controller-manager/internal/siderolink/siderolink.go new file mode 100644 index 000000000..d134b3ca1 --- /dev/null +++ b/app/sidero-controller-manager/internal/siderolink/siderolink.go @@ -0,0 +1,11 @@ +// 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 siderolink provides server-side implementation of the SideroLink API. +package siderolink + +// SecretName is the name of the Secret Sidero stores information about siderolink installation. +// +// Secret holds private Sidero Wireguard key and installation ID. +const SecretName = "siderolink" diff --git a/app/sidero-controller-manager/pkg/constants/constants.go b/app/sidero-controller-manager/pkg/constants/constants.go index 10e637e8c..6bc0fb4a7 100644 --- a/app/sidero-controller-manager/pkg/constants/constants.go +++ b/app/sidero-controller-manager/pkg/constants/constants.go @@ -18,4 +18,6 @@ const ( DefaultServerRebootTimeout = time.Minute * 20 DefaultBMCPort = uint32(623) + + SideroLinkInternalAPIEndpoint = "localhost:4000" ) diff --git a/go.mod b/go.mod index 5f56c6251..0c6fc006a 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,10 @@ go 1.17 replace github.com/pensando/goipmi v0.0.0-20200303170213-e858ec1cf0b5 => github.com/talos-systems/goipmi v0.0.0-20211117190708-9fec3531c1bc require ( - github.com/evanphx/json-patch v4.11.0+incompatible + github.com/evanphx/json-patch v4.12.0+incompatible github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v0.4.0 + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/hashicorp/go-multierror v1.1.1 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.17.0 @@ -23,13 +24,18 @@ require ( github.com/talos-systems/go-procfs v0.0.0-20210108152626-8cbc42d3dc24 github.com/talos-systems/go-retry v0.3.1 github.com/talos-systems/go-smbios v0.0.0-20210422124317-d3a32bea731a - github.com/talos-systems/net v0.3.0 - github.com/talos-systems/talos/pkg/machinery v0.13.2 - golang.org/x/net v0.0.0-20210716203947-853a461950ff + github.com/talos-systems/grpc-proxy v0.2.0 + github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8 + github.com/talos-systems/siderolink v0.0.0-20211125180240-f7cadbcdfbb8 + github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81 + go.uber.org/zap v1.19.0 + golang.org/x/net v0.0.0-20211108170745-6635138e15ea golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 + golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 + golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211109202428-0073765f69ba google.golang.org/grpc v1.42.0 google.golang.org/protobuf v1.27.1 + inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6 k8s.io/api v0.22.2 k8s.io/apiextensions-apiserver v0.22.2 k8s.io/apimachinery v0.22.2 @@ -41,17 +47,20 @@ require ( require ( cloud.google.com/go v0.93.3 // indirect - github.com/AlekSi/pointer v1.1.0 // indirect + github.com/AlekSi/pointer v1.2.0 // indirect + github.com/BurntSushi/toml v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/containerd/go-cni v1.1.0 // indirect github.com/containernetworking/cni v1.0.1 // indirect + github.com/cosi-project/runtime v0.0.0-20210906201716-5cb7f5002d77 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/gertd/go-pluralize v0.1.7 // indirect github.com/go-logr/zapr v0.4.0 // indirect github.com/gobuffalo/flect v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -64,13 +73,13 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect - github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8 // indirect + github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 // indirect github.com/json-iterator/go v1.1.11 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 // indirect + github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60 // indirect github.com/mdlayher/genetlink v1.0.0 // indirect github.com/mdlayher/netlink v1.4.1 // indirect - github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 // indirect + github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect github.com/nxadm/tail v1.4.8 // indirect @@ -86,18 +95,27 @@ require ( github.com/talos-systems/crypto v0.3.4 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.19.0 // indirect + go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect + go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37 // indirect + golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect + golang.org/x/mod v0.5.1 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.6 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/tools v0.1.7 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.zx2c4.com/go118/netip v0.0.0-20211106132939-9d41d90554dd // indirect + golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect + golang.zx2c4.com/wireguard v0.0.0-20211109020618-685490f568cf // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 // indirect + google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + honnef.co/go/tools v0.2.1 // indirect k8s.io/component-base v0.22.2 // indirect k8s.io/klog/v2 v2.9.0 // indirect k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect diff --git a/go.sum b/go.sum index d41fc45c9..fb3a1a403 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,9 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= +github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= +github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -59,6 +60,8 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -112,8 +115,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.1/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -150,6 +153,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosi-project/runtime v0.0.0-20210707150857-25f235cd0682/go.mod h1:fWDa1vgmSfHFypuffoq04I++IGMHQcduRKffG51jPfY= +github.com/cosi-project/runtime v0.0.0-20210906201716-5cb7f5002d77 h1:epmZGalngJg+68I3C6lIj9x1Jn7DWSvDT/ZZbojfYic= github.com/cosi-project/runtime v0.0.0-20210906201716-5cb7f5002d77/go.mod h1:fWDa1vgmSfHFypuffoq04I++IGMHQcduRKffG51jPfY= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -172,6 +176,7 @@ github.com/drone/envsubst/v2 v2.0.0-20210615175204-7bf45dbf5372/go.mod h1:esf2rs github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -187,8 +192,9 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -203,6 +209,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/gertd/go-pluralize v0.1.7 h1:RgvJTJ5W7olOoAks97BOwOlekBFsLEyh00W48Z6ZEZY= github.com/gertd/go-pluralize v0.1.7/go.mod h1:O4eNeeIf91MHh1GJ2I47DNtaesm66NYvjYgAahcqSDQ= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -378,6 +385,7 @@ github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -432,8 +440,8 @@ github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXp github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U= github.com/jsimonetti/rtnetlink v0.0.0-20210525051524-4cc836578190/go.mod h1:NmKSdU4VGSiv1bMsdqNALI4RSvvjtz65tTMCnD05qLo= github.com/jsimonetti/rtnetlink v0.0.0-20210614053835-9c52e516c709/go.mod h1:fFCkJo4WE8jNpSKSiynKun1YCdcZP6n4JwrjTIAR2g8= -github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8 h1:URWZhDC6GjaHuI7uYYBaDeT52G0rR3HFqxnzvS0e4OU= -github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8/go.mod h1:qdKhcKUxYn3/QvneOvPWXXMPqktEBHnCW98wUTA3rmA= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 h1:N527AHMa793TP5z5GNAn/VLPzlc0ewzWdeP/25gDfgQ= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786/go.mod h1:v4hqbTdfQngbVSZJVWUhGE/lbTFf9jb+ygmNUDQMuOs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -483,8 +491,9 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 h1:WgyLFv10Ov49JAQI/ZLUkCZ7VJS3r74hwFIGXJsgZlY= github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60 h1:tHdB+hQRHU10CfcK0furo6rSNgZ38JT8uPh70c/pFD8= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60/go.mod h1:aYbhishWc4Ai3I2U4Gaa2n3kHWSwzme6EsG/46HRQbE= github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= @@ -498,9 +507,13 @@ github.com/mdlayher/netlink v1.3.0/go.mod h1:xK/BssKuwcRXHrtN04UBkwQ6dY9VviGGuri github.com/mdlayher/netlink v1.4.0/go.mod h1:dRJi5IABcZpBD2A3D0Mv/AiX8I9uDEu5oGkAVrekmf8= github.com/mdlayher/netlink v1.4.1 h1:I154BCU+mKlIf7BgcAJB2r7QjveNPty6uNY1g9ChVfI= github.com/mdlayher/netlink v1.4.1/go.mod h1:e4/KuJ+s8UhfUpO9z00/fDZZmhSrs+oxyqAS9cNgn6Q= -github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 h1:qEtkL8n1DAHpi5/AOgAckwGQUlMe4+jhL/GMt+GKIks= github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00/go.mod h1:GAFlyu4/XV68LkQKYzKhIo/WW7j3Zi0YRAz/BOoanUc= +github.com/mdlayher/socket v0.0.0-20211007213009-516dcbdf0267/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb h1:2dC7L10LmTqlyMVzFJ00qM25lqESg9Z4u3GuEXN5iHY= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721 h1:RlZweED6sbSArvlE924+mUcZuXKLBHA35U7LN621Bws= +github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -685,11 +698,17 @@ github.com/talos-systems/go-smbios v0.0.0-20210422124317-d3a32bea731a h1:uUAH6oF github.com/talos-systems/go-smbios v0.0.0-20210422124317-d3a32bea731a/go.mod h1:HxhrzAoTZ7ed5Z5VvtCvnCIrOxyXDS7V2B5hCetAMW8= github.com/talos-systems/goipmi v0.0.0-20211117190708-9fec3531c1bc h1:LerxMYi6JGe5ilm+lohwXOaaeNwyefS/zGaiyrZcMDc= github.com/talos-systems/goipmi v0.0.0-20211117190708-9fec3531c1bc/go.mod h1:Vr1Oadtcem03hG2RUT/dpSQS5md9d6rJ9nA0lUBC91Q= -github.com/talos-systems/net v0.3.0 h1:TG6PoiNdg9NmSeSjyecSgguUXzoJ8wp5a8RYlIdkq3Y= +github.com/talos-systems/grpc-proxy v0.2.0 h1:DN75bLfaW4xfhq0r0mwFRnfGhSB+HPhK1LNzuMEs9Pw= +github.com/talos-systems/grpc-proxy v0.2.0/go.mod h1:sm97Vc/z2cok3pu6ruNeszQej4KDxFrDgfWs4C1mtC4= github.com/talos-systems/net v0.3.0/go.mod h1:VreSAyRmxMtqussAHSKMKkJQa1YwBTSVfkmE4Jydam4= +github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8 h1:oT2MASZ8V3DuZbhaJWJ8oZ373zfmgXpvw2xLHM5cOYk= +github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8/go.mod h1:zhcGixNJz9dgwFiUwc7gkkAqdVqXagU1SNNoIVXYKGo= +github.com/talos-systems/siderolink v0.0.0-20211125180240-f7cadbcdfbb8 h1:QrY0VwgAhXkk3qT/Dc7lIIlNbNR25IhJ1lL3iGV4j14= +github.com/talos-systems/siderolink v0.0.0-20211125180240-f7cadbcdfbb8/go.mod h1:bEGwDYl9QgC3oZ4kdnJTuR2HX/XlUhxZjx/QAakKuBc= github.com/talos-systems/talos/pkg/machinery v0.12.3/go.mod h1:qX77JMZawrDTQaJucqecdlFsHy+dbnZ9YL8Kw4qL7d4= -github.com/talos-systems/talos/pkg/machinery v0.13.2 h1:ZwR6CW7l0IOCnH8Dqp4gMFnynHUbCj/tFpLrY883DdQ= -github.com/talos-systems/talos/pkg/machinery v0.13.2/go.mod h1:fQx1FlvFLSexSOYL1DSl0EjtazujlzNmVDCt2yRoLJ4= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211118180932-1ffa8e048008/go.mod h1:D8NT4Aj+X2OpA6yK6RAtpw1wcgkDS7oD23vqOQWRiP8= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81 h1:/J0yS/k+yfzQpF0Cs2jQfstchDH2Nxnce2XuCxueLGM= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81/go.mod h1:D8NT4Aj+X2OpA6yK6RAtpw1wcgkDS7oD23vqOQWRiP8= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -705,6 +724,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -755,6 +775,10 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29 h1:UXLjNohABv4S58tHmeuIZDO6e3mHpW2Dx33gaNt03LE= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37 h1:Tx9kY6yUkLge/pFG7IEMwDZy6CS2ajFc9TvQdPCW0uA= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -769,6 +793,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -806,6 +833,8 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -863,8 +892,13 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210716203947-853a461950ff h1:j2EK/QoxYNBsXI4R7fQkkRUk8y6wnOBI+6hgPdP/6Ds= golang.org/x/net v0.0.0-20210716203947-853a461950ff/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea h1:FosBMXtOc8Tp9Hbo4ltl1WJSrTVewZU8MPnTPY2HdH8= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -976,9 +1010,15 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 h1:T6tyxxvHMj2L1R2kZg0uNMpS8ZhB9lRa9XRGTCSA65w= +golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1063,13 +1103,22 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.zx2c4.com/go118/netip v0.0.0-20211106132939-9d41d90554dd h1:gUHae7sCd+tFJLcCximWeBFD2b6Jg3O7UaNaPvjIJHc= +golang.zx2c4.com/go118/netip v0.0.0-20211106132939-9d41d90554dd/go.mod h1:5yyfuiqVIJ7t+3MqrpTQ+QqRkMWiESiyDvPNvKYCecg= +golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY= +golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= +golang.zx2c4.com/wireguard v0.0.0-20211109020618-685490f568cf h1:hUS17IUQ6zm9ZeuDxKavKFhnioXkAO7YrJZgvlA/nyg= +golang.zx2c4.com/wireguard v0.0.0-20211109020618-685490f568cf/go.mod h1:M4ViMFJSFA3E7DEM9lS9NsCbDhurQdVjipAqa06Jy2Q= +golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211109202428-0073765f69ba h1:YUZtxQfFidpvaaVWGk22eGEvVdtTY5SRDLuL996sr5k= +golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211109202428-0073765f69ba/go.mod h1:fhr0mQ0d0pUv+gK1R0HBTPPh7a86/48ugXX6q0jSru8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1161,8 +1210,8 @@ google.golang.org/genproto v0.0.0-20210722135532-667f2b7c528f/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd h1:8jqRgiTTWyKMDOM2AvhjA5dZLBSKXg1yFupPRBV/4fQ= +google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1189,7 +1238,6 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1250,6 +1298,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.2.1 h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY= +honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= +inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6 h1:acCzuUSQ79tGsM/O50VRFySfMm19IoMKL+sZztZkCxw= +inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6/go.mod h1:y3MGhcFMlh0KZPMuXXow8mpjxxAk3yoDNsp4cQz54i8= k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk= k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/api v0.22.2 h1:M8ZzAD0V6725Fjg53fKeTJxGsJvRbk4TEm/fexHMtfw= diff --git a/sfyra/README.md b/sfyra/README.md index d90a8baa9..789c825ee 100644 --- a/sfyra/README.md +++ b/sfyra/README.md @@ -77,7 +77,7 @@ In this case Sidero iPXE server will force VM to boot from disk via iPXE if the > Note: due to the dependency on new `talosctl`, this feature will be available once Talos in Sfyra is updated to version >= 0.11. -## Running with Talos HEAD +## Running with Talos HEAD as a bootstrap cluster Build the artifacts in Talos: @@ -93,6 +93,29 @@ sudo -E _out/sfyra test integration --skip-teardown --bootstrap-initramfs=../tal This command doesn't tear down the cluster after the test run, so it can be re-run any time for quick another round of testing. +## Running with Talos HEAD as workload clusters + +Build the artifacts in Talos: + +```sh +make initramfs kernel +``` + +Make sure that the `initramfs` has a matching installer image pushed to the registry. + +Start _some_ webserver in Talos directory, e.g. + +```sh +$ python -m http.server +Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... +``` + +From Sidero directory run: + +```sh +sudo -E _out/sfyra test integration --skip-teardown --talos-initrd-url http://172.24.0.1:8000/_out/initramfs-amd64.xz --talos-kernel-url http://172.24.0.1:8000/_out/vmlinuz-amd64 +``` + ## Cleaning up To destroy Sfyra environment use `talosctl`: diff --git a/sfyra/go.mod b/sfyra/go.mod index b352584b0..c9aa6a44c 100644 --- a/sfyra/go.mod +++ b/sfyra/go.mod @@ -19,10 +19,10 @@ require ( github.com/talos-systems/go-loadbalancer v0.1.1 github.com/talos-systems/go-procfs v0.1.0 github.com/talos-systems/go-retry v0.3.1 - github.com/talos-systems/net v0.3.0 + github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8 github.com/talos-systems/sidero v0.0.0-00010101000000-000000000000 github.com/talos-systems/talos v0.13.2 - github.com/talos-systems/talos/pkg/machinery v0.13.2 + github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81 google.golang.org/grpc v1.42.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b k8s.io/api v0.22.3 @@ -36,7 +36,8 @@ require ( require ( cloud.google.com/go v0.93.3 // indirect cloud.google.com/go/storage v1.10.0 // indirect - github.com/AlekSi/pointer v1.1.0 // indirect + github.com/AlekSi/pointer v1.2.0 // indirect + github.com/BurntSushi/toml v0.4.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect @@ -54,7 +55,7 @@ require ( github.com/docker/distribution v2.7.1+incompatible // indirect github.com/drone/envsubst/v2 v2.0.0-20210615175204-7bf45dbf5372 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -82,17 +83,17 @@ require ( github.com/insomniacslk/dhcp v0.0.0-20210827173440-b95caade3eac // indirect github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 // indirect github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect - github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8 // indirect + github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 // indirect github.com/json-iterator/go v1.1.11 // indirect github.com/klauspost/compress v1.11.13 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mattn/go-colorable v0.1.9 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 // indirect + github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60 // indirect github.com/mdlayher/genetlink v1.0.0 // indirect github.com/mdlayher/netlink v1.4.1 // indirect - github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 // indirect + github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect @@ -122,22 +123,26 @@ require ( github.com/ulikunitz/xz v0.5.8 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 // indirect - golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e // indirect - golang.org/x/net v0.0.0-20210924151903-3ad01bbaa167 // indirect + golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect + golang.org/x/mod v0.5.1 // indirect + golang.org/x/net v0.0.0-20211108170745-6635138e15ea // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect + golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 // indirect golang.org/x/term v0.0.0-20210916214954-140adaaadfaf // indirect golang.org/x/text v0.3.6 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/tools v0.1.7 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.54.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 // indirect + google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + honnef.co/go/tools v0.2.1 // indirect inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252 // indirect k8s.io/apiserver v0.22.3 // indirect k8s.io/cluster-bootstrap v0.21.4 // indirect diff --git a/sfyra/go.sum b/sfyra/go.sum index e1f100738..ad5d8863f 100644 --- a/sfyra/go.sum +++ b/sfyra/go.sum @@ -45,8 +45,9 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= +github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= +github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -66,6 +67,7 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw= github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= @@ -169,8 +171,9 @@ github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.1/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -362,8 +365,9 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= @@ -663,8 +667,9 @@ github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXp github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U= github.com/jsimonetti/rtnetlink v0.0.0-20210525051524-4cc836578190/go.mod h1:NmKSdU4VGSiv1bMsdqNALI4RSvvjtz65tTMCnD05qLo= github.com/jsimonetti/rtnetlink v0.0.0-20210614053835-9c52e516c709/go.mod h1:fFCkJo4WE8jNpSKSiynKun1YCdcZP6n4JwrjTIAR2g8= -github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8 h1:URWZhDC6GjaHuI7uYYBaDeT52G0rR3HFqxnzvS0e4OU= github.com/jsimonetti/rtnetlink v0.0.0-20210922080037-435639c8e6a8/go.mod h1:qdKhcKUxYn3/QvneOvPWXXMPqktEBHnCW98wUTA3rmA= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 h1:N527AHMa793TP5z5GNAn/VLPzlc0ewzWdeP/25gDfgQ= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786/go.mod h1:v4hqbTdfQngbVSZJVWUhGE/lbTFf9jb+ygmNUDQMuOs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -740,8 +745,9 @@ github.com/mdlayher/arp v0.0.0-20191213142603-f72070a231fc/go.mod h1:eOj1DDj3NAZ github.com/mdlayher/ethernet v0.0.0-20190313224307-5b5fc417d966/go.mod h1:5s5p/sMJ6sNsFl6uCh85lkFGV8kLuIYJCRJLavVJwvg= github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 h1:lez6TS6aAau+8wXUP3G9I3TGlmPFEq2CTxBaRqY6AGE= github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= -github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 h1:WgyLFv10Ov49JAQI/ZLUkCZ7VJS3r74hwFIGXJsgZlY= github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60 h1:tHdB+hQRHU10CfcK0furo6rSNgZ38JT8uPh70c/pFD8= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60/go.mod h1:aYbhishWc4Ai3I2U4Gaa2n3kHWSwzme6EsG/46HRQbE= github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= @@ -761,8 +767,10 @@ github.com/mdlayher/raw v0.0.0-20190313224157-43dbcdd7739d/go.mod h1:r1fbeITl2xL github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 h1:aFkJ6lx4FPip+S+Uw4aTegFMct9shDvP+79PsSxpm3w= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= -github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 h1:qEtkL8n1DAHpi5/AOgAckwGQUlMe4+jhL/GMt+GKIks= github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00/go.mod h1:GAFlyu4/XV68LkQKYzKhIo/WW7j3Zi0YRAz/BOoanUc= +github.com/mdlayher/socket v0.0.0-20211007213009-516dcbdf0267/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb h1:2dC7L10LmTqlyMVzFJ00qM25lqESg9Z4u3GuEXN5iHY= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= @@ -1050,14 +1058,17 @@ github.com/talos-systems/go-retry v0.3.1/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lI github.com/talos-systems/go-smbios v0.0.0-20210422124317-d3a32bea731a/go.mod h1:HxhrzAoTZ7ed5Z5VvtCvnCIrOxyXDS7V2B5hCetAMW8= github.com/talos-systems/go-smbios v0.1.0/go.mod h1:HxhrzAoTZ7ed5Z5VvtCvnCIrOxyXDS7V2B5hCetAMW8= github.com/talos-systems/grpc-proxy v0.2.0/go.mod h1:sm97Vc/z2cok3pu6ruNeszQej4KDxFrDgfWs4C1mtC4= -github.com/talos-systems/net v0.3.0 h1:TG6PoiNdg9NmSeSjyecSgguUXzoJ8wp5a8RYlIdkq3Y= github.com/talos-systems/net v0.3.0/go.mod h1:VreSAyRmxMtqussAHSKMKkJQa1YwBTSVfkmE4Jydam4= +github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8 h1:oT2MASZ8V3DuZbhaJWJ8oZ373zfmgXpvw2xLHM5cOYk= +github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8/go.mod h1:zhcGixNJz9dgwFiUwc7gkkAqdVqXagU1SNNoIVXYKGo= +github.com/talos-systems/siderolink v0.0.0-20211125180240-f7cadbcdfbb8/go.mod h1:bEGwDYl9QgC3oZ4kdnJTuR2HX/XlUhxZjx/QAakKuBc= github.com/talos-systems/talos v0.13.2 h1:XfVA0rO4MxwXsfrTvWkKgxRHRUuMWaYVeU4ORpz7Jqc= github.com/talos-systems/talos v0.13.2/go.mod h1:238xIFxpQ5fBRWrA1+hlsz0kCQ1N7tHx/SlKYocumeI= github.com/talos-systems/talos/pkg/machinery v0.12.3/go.mod h1:qX77JMZawrDTQaJucqecdlFsHy+dbnZ9YL8Kw4qL7d4= github.com/talos-systems/talos/pkg/machinery v0.13.1/go.mod h1:fQx1FlvFLSexSOYL1DSl0EjtazujlzNmVDCt2yRoLJ4= -github.com/talos-systems/talos/pkg/machinery v0.13.2 h1:ZwR6CW7l0IOCnH8Dqp4gMFnynHUbCj/tFpLrY883DdQ= -github.com/talos-systems/talos/pkg/machinery v0.13.2/go.mod h1:fQx1FlvFLSexSOYL1DSl0EjtazujlzNmVDCt2yRoLJ4= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211118180932-1ffa8e048008/go.mod h1:D8NT4Aj+X2OpA6yK6RAtpw1wcgkDS7oD23vqOQWRiP8= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81 h1:/J0yS/k+yfzQpF0Cs2jQfstchDH2Nxnce2XuCxueLGM= +github.com/talos-systems/talos/pkg/machinery v0.14.0-alpha.1.0.20211123134516-852bf4a7de81/go.mod h1:D8NT4Aj+X2OpA6yK6RAtpw1wcgkDS7oD23vqOQWRiP8= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1101,6 +1112,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= @@ -1160,8 +1172,10 @@ go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go4.org/intern v0.0.0-20210108033219-3eb7198706b2/go.mod h1:vLqJ+12kCw61iCWsPto0EOHhBS+o4rO5VIucbc9g2Cc= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/unsafe/assume-no-moving-gc v0.0.0-20201222175341-b30ae309168e/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= go4.org/unsafe/assume-no-moving-gc v0.0.0-20201222180813-1025295fd063/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1182,8 +1196,10 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e h1:8foAy0aoO5GkqCvAEJ4VC4P3zksTg4X4aJCDpZzmgQI= golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1220,6 +1236,8 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1286,8 +1304,13 @@ golang.org/x/net v0.0.0-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210716203947-853a461950ff/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210924151903-3ad01bbaa167 h1:eDd+TJqbgfXruGQ5sJRU7tEtp/58OAx4+Ayjxg4SM+4= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210924151903-3ad01bbaa167/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea h1:FosBMXtOc8Tp9Hbo4ltl1WJSrTVewZU8MPnTPY2HdH8= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1433,8 +1456,13 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 h1:T6tyxxvHMj2L1R2kZg0uNMpS8ZhB9lRa9XRGTCSA65w= +golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1523,13 +1551,19 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.zx2c4.com/go118/netip v0.0.0-20211106132939-9d41d90554dd/go.mod h1:5yyfuiqVIJ7t+3MqrpTQ+QqRkMWiESiyDvPNvKYCecg= +golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= golang.zx2c4.com/wireguard v0.0.0-20210427022245-097af6e1351b/go.mod h1:a057zjmoc00UN7gVkaJt2sXVK523kMJcogDTEvPIasg= +golang.zx2c4.com/wireguard v0.0.0-20211109020618-685490f568cf/go.mod h1:M4ViMFJSFA3E7DEM9lS9NsCbDhurQdVjipAqa06Jy2Q= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210927125730-0a2f4901cba6/go.mod h1:+1XihzyZUBJcSc5WO9SwNA7v26puQwOEDwanaxfNXPQ= +golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211109202428-0073765f69ba/go.mod h1:fhr0mQ0d0pUv+gK1R0HBTPPh7a86/48ugXX6q0jSru8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -1626,8 +1660,9 @@ google.golang.org/genproto v0.0.0-20210722135532-667f2b7c528f/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd h1:8jqRgiTTWyKMDOM2AvhjA5dZLBSKXg1yFupPRBV/4fQ= +google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1728,7 +1763,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.2.1 h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY= +honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= inet.af/netaddr v0.0.0-20210903134321-85fa6c94624e/go.mod h1:z0nx+Dh+7N7CC8V5ayHtHGpZpxLQZZxkIaaz6HN65Ls= +inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6/go.mod h1:y3MGhcFMlh0KZPMuXXow8mpjxxAk3yoDNsp4cQz54i8= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= diff --git a/sfyra/pkg/tests/cluster_utils.go b/sfyra/pkg/tests/cluster_utils.go index 602f5c9f8..675d9f709 100644 --- a/sfyra/pkg/tests/cluster_utils.go +++ b/sfyra/pkg/tests/cluster_utils.go @@ -7,7 +7,6 @@ package tests import ( "context" "fmt" - "os" "strconv" "testing" "time" @@ -47,12 +46,12 @@ func deployCluster(ctx context.Context, t *testing.T, metalClient client.Client, loadbalancer, err := loadbalancer.NewControlPlane(metalClient, vmSet.BridgeIP(), loadbalancerPort, "default", clusterName, false) require.NoError(t, err) - os.Setenv("CONTROL_PLANE_ENDPOINT", vmSet.BridgeIP().String()) - os.Setenv("CONTROL_PLANE_PORT", strconv.Itoa(loadbalancerPort)) - os.Setenv("CONTROL_PLANE_SERVERCLASS", serverClassName) - os.Setenv("WORKER_SERVERCLASS", serverClassName) - os.Setenv("KUBERNETES_VERSION", kubernetesVersion) - os.Setenv("TALOS_VERSION", talosVersion) + t.Setenv("CONTROL_PLANE_ENDPOINT", vmSet.BridgeIP().String()) + t.Setenv("CONTROL_PLANE_PORT", strconv.Itoa(loadbalancerPort)) + t.Setenv("CONTROL_PLANE_SERVERCLASS", serverClassName) + t.Setenv("WORKER_SERVERCLASS", serverClassName) + t.Setenv("KUBERNETES_VERSION", kubernetesVersion) + t.Setenv("TALOS_VERSION", talosVersion) templateOptions := capiclient.GetClusterTemplateOptions{ Kubeconfig: kubeconfig, diff --git a/sfyra/pkg/tests/management_cluster.go b/sfyra/pkg/tests/management_cluster.go index 230a38ead..99ad0d6dc 100644 --- a/sfyra/pkg/tests/management_cluster.go +++ b/sfyra/pkg/tests/management_cluster.go @@ -23,6 +23,6 @@ const ( // TestManagementCluster deploys the management cluster via CAPI. func TestManagementCluster(ctx context.Context, metalClient client.Client, cluster talos.Cluster, vmSet *vm.Set, capiManager *capi.Manager, talosRelease, kubernetesVersion string) TestFunc { return func(t *testing.T) { - deployCluster(ctx, t, metalClient, cluster, vmSet, capiManager, managementClusterName, defaultServerClassName, managementClusterLBPort, 1, 1, talosRelease, kubernetesVersion) + deployCluster(ctx, t, metalClient, cluster, vmSet, capiManager, managementClusterName, serverClassName, managementClusterLBPort, 1, 1, talosRelease, kubernetesVersion) } } diff --git a/sfyra/pkg/tests/server_class.go b/sfyra/pkg/tests/server_class.go index fcf6374fa..404fdcdf2 100644 --- a/sfyra/pkg/tests/server_class.go +++ b/sfyra/pkg/tests/server_class.go @@ -9,7 +9,6 @@ import ( "fmt" "io/ioutil" "net/http" - "os" "sort" "testing" "time" @@ -19,6 +18,7 @@ import ( "github.com/talos-systems/go-retry/retry" "github.com/talos-systems/talos/pkg/machinery/config/configloader" talosconfig "github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1" + v1 "k8s.io/api/core/v1" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -39,8 +39,8 @@ import ( ) const ( - defaultServerClassName = "default" - workloadServerClassName = "workload" + defaultServerClassName = "default" + serverClassName = "sfyra" ) // TestServerClassAny verifies server class "any". @@ -90,6 +90,9 @@ func TestServerClassCreate(ctx context.Context, metalClient client.Client, vmSet }, }, }, + EnvironmentRef: &v1.ObjectReference{ + Name: environmentName, + }, } serverClass, err := createServerClass(ctx, metalClient, defaultServerClassName, classSpec) @@ -119,14 +122,14 @@ func TestServerClassCreate(ctx context.Context, metalClient client.Client, vmSet expectedUUIDs[i] = nodes[i].UUID.String() } - actualUUIDs := append(serverClass.Status.ServersAvailable, serverClass.Status.ServersInUse...) + actualUUIDs := append(append([]string(nil), serverClass.Status.ServersAvailable...), serverClass.Status.ServersInUse...) sort.Strings(expectedUUIDs) sort.Strings(actualUUIDs) assert.Equal(t, expectedUUIDs, actualUUIDs) - _, err = createServerClass(ctx, metalClient, workloadServerClassName, classSpec) + _, err = createServerClass(ctx, metalClient, serverClassName, classSpec) require.NoError(t, err) } } @@ -191,12 +194,12 @@ func TestServerClassPatch(ctx context.Context, metalClient client.Client, cluste nodeCountCP := int64(1) nodeCountWorker := int64(0) - os.Setenv("CONTROL_PLANE_ENDPOINT", "localhost") - os.Setenv("CONTROL_PLANE_PORT", "11111") - os.Setenv("CONTROL_PLANE_SERVERCLASS", "dummyservers") - os.Setenv("WORKER_SERVERCLASS", "dummyservers") - os.Setenv("KUBERNETES_VERSION", "v1.20.4") // dummy cluster, actual value doesn't matter - os.Setenv("TALOS_VERSION", "v0.9") // dummy cluster, actual value doesn't matter + t.Setenv("CONTROL_PLANE_ENDPOINT", "localhost") + t.Setenv("CONTROL_PLANE_PORT", "11111") + t.Setenv("CONTROL_PLANE_SERVERCLASS", "dummyservers") + t.Setenv("WORKER_SERVERCLASS", "dummyservers") + t.Setenv("KUBERNETES_VERSION", "v1.20.4") // dummy cluster, actual value doesn't matter + t.Setenv("TALOS_VERSION", "v0.9") // dummy cluster, actual value doesn't matter templateOptions := capiclient.GetClusterTemplateOptions{ Kubeconfig: kubeconfig, diff --git a/sfyra/pkg/tests/workload_cluster.go b/sfyra/pkg/tests/workload_cluster.go index 1a01e274b..53c1a1374 100644 --- a/sfyra/pkg/tests/workload_cluster.go +++ b/sfyra/pkg/tests/workload_cluster.go @@ -23,7 +23,7 @@ const ( // TestWorkloadCluster deploys and destroys the workload cluster via CAPI. func TestWorkloadCluster(ctx context.Context, metalClient client.Client, cluster talos.Cluster, vmSet *vm.Set, capiManager *capi.Manager, talosRelease, kubernetesVersion string) TestFunc { return func(t *testing.T) { - loadbalancer, _ := deployCluster(ctx, t, metalClient, cluster, vmSet, capiManager, workloadClusterName, workloadServerClassName, workloadClusterLBPort, 1, 0, talosRelease, kubernetesVersion) + loadbalancer, _ := deployCluster(ctx, t, metalClient, cluster, vmSet, capiManager, workloadClusterName, serverClassName, workloadClusterLBPort, 1, 0, talosRelease, kubernetesVersion) defer loadbalancer.Close() deleteCluster(ctx, t, metalClient, workloadClusterName)