From 876f8364302f7ab5fa9638fd297cd3fbfb3863ab Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 28 Apr 2026 10:17:46 +0200 Subject: [PATCH] feat: add support for HTTP Probes - Add HTTPProbeSpec to ProbeSpecSpec (URL + timeout) - Implement probeHTTP() to send GET requests, treat 2xx/3xx as success - Support machine proxy config via httpdefaults.PatchTransport - Add HTTPProbeConfig v1alpha1 document and controller integration - Add unit and integration tests for HTTP probe lifecycle Signed-off-by: Pranav Patil Co-authored-by: Pranav Patil Signed-off-by: Mateusz Urbanek --- .../definitions/network/network.proto | 12 +- hack/release.toml | 7 + .../network/internal/probe/probe.go | 42 +- .../network/internal/probe/probe_test.go | 85 ++ .../pkg/controllers/network/probe_config.go | 5 + .../controllers/network/probe_config_test.go | 57 +- internal/integration/api/probe-config.go | 76 +- .../definitions/network/network.pb.go | 821 ++++++++++-------- .../definitions/network/network_vtproto.pb.go | 270 ++++++ pkg/machinery/config/config/network.go | 8 + .../config/schemas/config.schema.json | 72 ++ .../types/network/deep_copy.generated.go | 17 +- .../config/types/network/http_probe.go | 165 ++++ .../config/types/network/http_probe_test.go | 256 ++++++ pkg/machinery/config/types/network/network.go | 4 +- .../config/types/network/network_doc.go | 52 ++ .../config/types/network/tcp_probe_test.go | 1 + .../network/testdata/httpprobeconfig.yaml | 7 + .../resources/network/deep_copy.generated.go | 9 + pkg/machinery/resources/network/probe_spec.go | 27 +- tools/docgen/main.go | 1 - website/content/v1.14/reference/api.md | 20 +- .../configuration/network/httpprobeconfig.md | 49 ++ .../content/v1.14/schemas/config.schema.json | 72 ++ 24 files changed, 1746 insertions(+), 389 deletions(-) create mode 100644 pkg/machinery/config/types/network/http_probe.go create mode 100644 pkg/machinery/config/types/network/http_probe_test.go create mode 100644 pkg/machinery/config/types/network/testdata/httpprobeconfig.yaml create mode 100644 website/content/v1.14/reference/configuration/network/httpprobeconfig.md diff --git a/api/resource/definitions/network/network.proto b/api/resource/definitions/network/network.proto index 61f87f68e..2b23b2c74 100755 --- a/api/resource/definitions/network/network.proto +++ b/api/resource/definitions/network/network.proto @@ -237,6 +237,14 @@ message EthernetStatusSpec { repeated talos.resource.definitions.enums.NethelpersWOLMode wake_on_lan = 10; } +// HTTPProbeSpec describes the HTTP Probe. +message HTTPProbeSpec { + // URL to probe: http:// or https:// URL. + common.URL url = 1; + // Timeout for the probe. + google.protobuf.Duration timeout = 2; +} + // HardwareAddrSpec describes spec for the link. message HardwareAddrSpec { // Name defines link name @@ -502,10 +510,12 @@ message ProbeSpecSpec { google.protobuf.Duration interval = 1; // FailureThreshold is the number of consecutive failures for the probe to be considered failed after having succeeded. int64 failure_threshold = 2; - // One of the probe types should be specified, for now it's only TCP. + // TCP is the TCP probe spec. One of TCP or HTTP must be specified. TCPProbeSpec tcp = 3; // Configuration layer. talos.resource.definitions.enums.NetworkConfigLayer config_layer = 4; + // HTTP is the HTTP probe spec. One of TCP or HTTP must be specified. + HTTPProbeSpec http = 5; } // ProbeStatusSpec describes the Probe. diff --git a/hack/release.toml b/hack/release.toml index e54e3bfd8..784e8193d 100644 --- a/hack/release.toml +++ b/hack/release.toml @@ -51,6 +51,13 @@ The default installer image has been updated to use the Image Factory. title = "Host DNS Configuration" description = """\ HostDNS configuration was moved from the v1alpha1 config `.machine.features.hostDNS` field to the new `hostDNS` in the `ResolverConfig` document. +""" + + [notes.httpProbe] + title = "HTTP Probe Support" + description = """\ +Talos now supports HTTP network probes, allowing for monitoring of HTTP endpoints. +HTTP responses with status 200-399 are considered successful, while connection and transport errors are treated as failures. """ [make_deps] diff --git a/internal/app/machined/pkg/controllers/network/internal/probe/probe.go b/internal/app/machined/pkg/controllers/network/internal/probe/probe.go index c4881e5c5..06b09f784 100644 --- a/internal/app/machined/pkg/controllers/network/internal/probe/probe.go +++ b/internal/app/machined/pkg/controllers/network/internal/probe/probe.go @@ -9,13 +9,16 @@ import ( "context" "errors" "net" + "net/http" "sync" "syscall" "time" + "github.com/hashicorp/go-cleanhttp" "github.com/siderolabs/gen/channel" "go.uber.org/zap" + "github.com/siderolabs/talos/pkg/httpdefaults" "github.com/siderolabs/talos/pkg/machinery/resources/network" ) @@ -121,11 +124,11 @@ func (runner *Runner) run(ctx context.Context, notifyCh chan<- Notification, log // probe runs a probe. func (runner *Runner) probe(ctx context.Context) error { - var zeroTCP network.TCPProbeSpec - switch { - case runner.Spec.TCP != zeroTCP: + case runner.Spec.TCP != (network.TCPProbeSpec{}): return runner.probeTCP(ctx) + case runner.Spec.HTTP != (network.HTTPProbeSpec{}): + return runner.probeHTTP(ctx) default: return errors.New("no probe type specified") } @@ -152,3 +155,36 @@ func (runner *Runner) probeTCP(ctx context.Context) error { return conn.Close() } + +// probeHTTP runs an HTTP probe. +// +// HTTP responses with status 200-399 are considered success. +// Status 400+ and connection/transport errors are treated as failures. +// The client honors the machine's proxy configuration via httpdefaults.PatchTransport. +func (runner *Runner) probeHTTP(ctx context.Context) error { + client := &http.Client{ + Transport: httpdefaults.PatchTransport(cleanhttp.DefaultTransport()), + CheckRedirect: func(*http.Request, []*http.Request) error { + return http.ErrUseLastResponse + }, + } + + ctx, cancel := context.WithTimeout(ctx, runner.Spec.HTTP.Timeout) + defer cancel() + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, runner.Spec.HTTP.URL.String(), nil) + if err != nil { + return err + } + + resp, err := client.Do(req) + if err != nil { + return err + } + + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest { + return errors.New("received non-success status code: " + resp.Status) + } + + return resp.Body.Close() +} diff --git a/internal/app/machined/pkg/controllers/network/internal/probe/probe_test.go b/internal/app/machined/pkg/controllers/network/internal/probe/probe_test.go index c12111a48..d18bf0047 100644 --- a/internal/app/machined/pkg/controllers/network/internal/probe/probe_test.go +++ b/internal/app/machined/pkg/controllers/network/internal/probe/probe_test.go @@ -9,6 +9,7 @@ import ( "net/http" "net/http/httptest" "net/url" + "sync/atomic" "testing" "testing/synctest" "time" @@ -21,6 +22,18 @@ import ( "github.com/siderolabs/talos/pkg/machinery/resources/network" ) +type swapHandler struct { + v atomic.Value // stores http.Handler +} + +func (h *swapHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.v.Load().(http.Handler).ServeHTTP(w, r) +} + +func (h *swapHandler) Swap(newHandler http.Handler) { + h.v.Store(newHandler) +} + func TestProbeHTTP(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) @@ -151,3 +164,75 @@ func TestProbeConsecutiveFailures(t *testing.T) { assert.False(t, notify.Status.Success) }) } + +func TestProbeHTTPProbe(t *testing.T) { + // Server returns 200 OK. + handler := &swapHandler{} + handler.Swap(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + })) + + server := httptest.NewServer(handler) + t.Cleanup(server.Close) + + probeURL, err := url.Parse(server.URL) + require.NoError(t, err) + + p := probe.Runner{ + ID: "http-test", + Spec: network.ProbeSpecSpec{ + Interval: 10 * time.Millisecond, + HTTP: network.HTTPProbeSpec{ + URL: probeURL, + Timeout: time.Second, + }, + }, + } + + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + t.Cleanup(cancel) + + notifyCh := make(chan probe.Notification) + + p.Start(ctx, notifyCh, zaptest.NewLogger(t)) + t.Cleanup(p.Stop) + + // probe should succeed — 2xx/3xx responses count as success + for range 3 { + assert.Equal(t, probe.Notification{ + ID: "http-test", + Status: network.ProbeStatusSpec{ + Success: true, + }, + }, <-notifyCh) + } + + // 4xx/5xx responses count as failure + handler.Swap(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusServiceUnavailable) + })) + + for range 3 { + notification := <-notifyCh + assert.Equal(t, "http-test", notification.ID) + assert.False(t, notification.Status.Success) + assert.NotEmpty(t, notification.Status.LastError) + } + + // stop the server — now the probe should fail + server.Close() + + for { + notification := <-notifyCh + + if notification.Status.Success { + continue + } + + assert.Equal(t, "http-test", notification.ID) + assert.False(t, notification.Status.Success) + assert.NotEmpty(t, notification.Status.LastError) + + break + } +} diff --git a/internal/app/machined/pkg/controllers/network/probe_config.go b/internal/app/machined/pkg/controllers/network/probe_config.go index 48500f861..c0d24cf99 100644 --- a/internal/app/machined/pkg/controllers/network/probe_config.go +++ b/internal/app/machined/pkg/controllers/network/probe_config.go @@ -131,6 +131,11 @@ func (ctrl *ProbeConfigController) parseMachineConfiguration(cfg *config.Machine Endpoint: probeConfig.Endpoint(), Timeout: probeConfig.Timeout(), } + case configconfig.NetworkHTTPProbeConfig: + spec.HTTP = network.HTTPProbeSpec{ + URL: probeConfig.URL().URL, + Timeout: probeConfig.Timeout(), + } default: panic(fmt.Sprintf("unsupported probe config type: %T", probeConfig)) } diff --git a/internal/app/machined/pkg/controllers/network/probe_config_test.go b/internal/app/machined/pkg/controllers/network/probe_config_test.go index 31eaf8c93..545bf678f 100644 --- a/internal/app/machined/pkg/controllers/network/probe_config_test.go +++ b/internal/app/machined/pkg/controllers/network/probe_config_test.go @@ -5,16 +5,19 @@ package network_test import ( + "net/url" "testing" "time" "github.com/cosi-project/runtime/pkg/resource/rtestutils" + "github.com/siderolabs/gen/ensure" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/ctest" netctrl "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/network" "github.com/siderolabs/talos/pkg/machinery/config/container" + "github.com/siderolabs/talos/pkg/machinery/config/types/meta" networkcfg "github.com/siderolabs/talos/pkg/machinery/config/types/network" "github.com/siderolabs/talos/pkg/machinery/resources/config" "github.com/siderolabs/talos/pkg/machinery/resources/network" @@ -29,7 +32,7 @@ func (suite *ProbeConfigSuite) TestNoConfig() { ctest.AssertNoResource[*network.ProbeSpec](suite, "tcp:proxy.example.com:3128", rtestutils.WithNamespace(network.NamespaceName)) } -func (suite *ProbeConfigSuite) TestSingleProbe() { +func (suite *ProbeConfigSuite) TestSingleProbe() { //nolint:dupl probeConfig := networkcfg.NewTCPProbeConfigV1Alpha1("proxy-check") probeConfig.ProbeInterval = time.Second probeConfig.ProbeFailureThreshold = 3 @@ -132,6 +135,58 @@ func (suite *ProbeConfigSuite) TestMultipleProbes() { ctest.AssertNoResource[*network.ProbeSpec](suite, "configuration/tcp:8.8.8.8:53", rtestutils.WithNamespace(network.ConfigNamespaceName)) } +func (suite *ProbeConfigSuite) TestHTTPProbe() { //nolint:dupl + probeConfig := networkcfg.NewHTTPProbeConfigV1Alpha1("http-check") + probeConfig.ProbeInterval = time.Second + probeConfig.ProbeFailureThreshold = 3 + probeConfig.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse("https://example.com"))} + probeConfig.HTTPTimeout = 10 * time.Second + + ctr, err := container.New(probeConfig) + suite.Require().NoError(err) + + cfg := config.NewMachineConfig(ctr) + suite.Create(cfg) + + ctest.AssertResources( + suite, + []string{ + "configuration/http:https://example.com", + }, func(r *network.ProbeSpec, asrt *assert.Assertions) { + asrt.Equal(time.Second, r.TypedSpec().Interval) + asrt.Equal(3, r.TypedSpec().FailureThreshold) + asrt.Equal("https://example.com", r.TypedSpec().HTTP.URL.String()) + asrt.Equal(10*time.Second, r.TypedSpec().HTTP.Timeout) + asrt.Equal(network.ConfigMachineConfiguration, r.TypedSpec().ConfigLayer) + }, + rtestutils.WithNamespace(network.ConfigNamespaceName), + ) + + // Update the probe config + ctest.UpdateWithConflicts(suite, cfg, func(r *config.MachineConfig) error { + docs := r.Container().Documents() + probeDoc := docs[0].(*networkcfg.HTTPProbeConfigV1Alpha1) + probeDoc.ProbeFailureThreshold = 5 + + return nil + }) + + ctest.AssertResources( + suite, + []string{ + "configuration/http:https://example.com", + }, func(r *network.ProbeSpec, asrt *assert.Assertions) { + asrt.Equal(5, r.TypedSpec().FailureThreshold) + }, + rtestutils.WithNamespace(network.ConfigNamespaceName), + ) + + // Remove the config + suite.Destroy(cfg) + + ctest.AssertNoResource[*network.ProbeSpec](suite, "configuration/http:https://example.com", rtestutils.WithNamespace(network.ConfigNamespaceName)) +} + func TestProbeConfigSuite(t *testing.T) { t.Parallel() diff --git a/internal/integration/api/probe-config.go b/internal/integration/api/probe-config.go index 65452efc4..1036ccfbe 100644 --- a/internal/integration/api/probe-config.go +++ b/internal/integration/api/probe-config.go @@ -8,14 +8,17 @@ package api import ( "context" + "net/url" "time" "github.com/cosi-project/runtime/pkg/resource/rtestutils" "github.com/cosi-project/runtime/pkg/safe" + "github.com/siderolabs/gen/ensure" "github.com/stretchr/testify/assert" "github.com/siderolabs/talos/internal/integration/base" "github.com/siderolabs/talos/pkg/machinery/client" + "github.com/siderolabs/talos/pkg/machinery/config/types/meta" "github.com/siderolabs/talos/pkg/machinery/config/types/network" networkres "github.com/siderolabs/talos/pkg/machinery/resources/network" ) @@ -51,7 +54,7 @@ func (suite *ProbeConfigSuite) TearDownTest() { } // TestProbeConfig tests that ProbeConfig documents create ProbeSpec resources. -func (suite *ProbeConfigSuite) TestProbeConfig() { +func (suite *ProbeConfigSuite) TestProbeConfig() { //nolint:dupl node := suite.RandomDiscoveredNodeInternalIP() nodeCtx := client.WithNode(suite.ctx, node) @@ -67,6 +70,7 @@ func (suite *ProbeConfigSuite) TestProbeConfig() { suite.PatchMachineConfig(nodeCtx, probeConfig) // Wait for ProbeSpec resource to be created + //nolint:dupl rtestutils.AssertResource(nodeCtx, suite.T(), suite.Client.COSI, "tcp:"+googleDNS, func(spec *networkres.ProbeSpec, asrt *assert.Assertions) { asrt.Equal(2*time.Second, spec.TypedSpec().Interval) @@ -195,6 +199,76 @@ func (suite *ProbeConfigSuite) TestProbeStatus() { rtestutils.AssertNoResource[*networkres.ProbeSpec](nodeCtx, suite.T(), suite.Client.COSI, "tcp:"+googleDNS) } +// TestHTTPProbeConfig tests that HTTPProbeConfig documents create ProbeSpec resources and run probes. +func (suite *ProbeConfigSuite) TestHTTPProbeConfig() { + if suite.Airgapped { + suite.T().Skip("skipping test in airgapped mode") + } + + node := suite.RandomDiscoveredNodeInternalIP() + nodeCtx := client.WithNode(suite.ctx, node) + + suite.T().Logf("testing HTTPProbeConfig on node %q", node) + + const probeURL = "https://example.com" + + probeConfig := network.NewHTTPProbeConfigV1Alpha1("http-test-probe") + probeConfig.ProbeInterval = 1 * time.Second + probeConfig.ProbeFailureThreshold = 3 + probeConfig.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(probeURL))} + probeConfig.HTTPTimeout = 5 * time.Second + + suite.PatchMachineConfig(nodeCtx, probeConfig) + + // Wait for ProbeSpec resource to be created + rtestutils.AssertResource(nodeCtx, suite.T(), suite.Client.COSI, "http:"+probeURL, + func(spec *networkres.ProbeSpec, asrt *assert.Assertions) { + asrt.Equal(1*time.Second, spec.TypedSpec().Interval) + asrt.Equal(3, spec.TypedSpec().FailureThreshold) + asrt.Equal(probeURL, spec.TypedSpec().HTTP.URL.String()) + asrt.Equal(5*time.Second, spec.TypedSpec().HTTP.Timeout) + asrt.Equal(networkres.ConfigMachineConfiguration, spec.TypedSpec().ConfigLayer) + }, + ) + + // Update the probe config + probeConfig.ProbeFailureThreshold = 5 + suite.PatchMachineConfig(nodeCtx, probeConfig) + + rtestutils.AssertResource(nodeCtx, suite.T(), suite.Client.COSI, "http:"+probeURL, + func(spec *networkres.ProbeSpec, asrt *assert.Assertions) { + asrt.Equal(5, spec.TypedSpec().FailureThreshold) + }, + ) + + // Give the probe controller time to run at least one probe + time.Sleep(3 * time.Second) + + // Verify ProbeStatus is created and has been updated + probeStatuses, err := safe.StateListAll[*networkres.ProbeStatus](nodeCtx, suite.Client.COSI) + suite.Require().NoError(err) + + var found bool + + for status := range probeStatuses.All() { + if status.Metadata().ID() == "http:"+probeURL { + found = true + + suite.T().Logf("HTTP ProbeStatus: success=%v, lastError=%s", status.TypedSpec().Success, status.TypedSpec().LastError) + suite.Assert().True(status.TypedSpec().Success || status.TypedSpec().LastError != "") + + break + } + } + + suite.Assert().True(found, "expected to find ProbeStatus for http:"+probeURL) + + // Remove the ProbeConfig + suite.RemoveMachineConfigDocuments(nodeCtx, network.HTTPProbeKind) + + rtestutils.AssertNoResource[*networkres.ProbeSpec](nodeCtx, suite.T(), suite.Client.COSI, "http:"+probeURL) +} + func init() { allSuites = append(allSuites, &ProbeConfigSuite{}) } diff --git a/pkg/machinery/api/resource/definitions/network/network.pb.go b/pkg/machinery/api/resource/definitions/network/network.pb.go index 5c53d3731..82c02a145 100644 --- a/pkg/machinery/api/resource/definitions/network/network.pb.go +++ b/pkg/machinery/api/resource/definitions/network/network.pb.go @@ -1653,6 +1653,61 @@ func (x *EthernetStatusSpec) GetWakeOnLan() []enums.NethelpersWOLMode { return nil } +// HTTPProbeSpec describes the HTTP Probe. +type HTTPProbeSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + // URL to probe: http:// or https:// URL. + Url *common.URL `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // Timeout for the probe. + Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HTTPProbeSpec) Reset() { + *x = HTTPProbeSpec{} + mi := &file_resource_definitions_network_network_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HTTPProbeSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPProbeSpec) ProtoMessage() {} + +func (x *HTTPProbeSpec) ProtoReflect() protoreflect.Message { + mi := &file_resource_definitions_network_network_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPProbeSpec.ProtoReflect.Descriptor instead. +func (*HTTPProbeSpec) Descriptor() ([]byte, []int) { + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{18} +} + +func (x *HTTPProbeSpec) GetUrl() *common.URL { + if x != nil { + return x.Url + } + return nil +} + +func (x *HTTPProbeSpec) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + // HardwareAddrSpec describes spec for the link. type HardwareAddrSpec struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1666,7 +1721,7 @@ type HardwareAddrSpec struct { func (x *HardwareAddrSpec) Reset() { *x = HardwareAddrSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[18] + mi := &file_resource_definitions_network_network_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1678,7 +1733,7 @@ func (x *HardwareAddrSpec) String() string { func (*HardwareAddrSpec) ProtoMessage() {} func (x *HardwareAddrSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[18] + mi := &file_resource_definitions_network_network_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1691,7 +1746,7 @@ func (x *HardwareAddrSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use HardwareAddrSpec.ProtoReflect.Descriptor instead. func (*HardwareAddrSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{18} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{19} } func (x *HardwareAddrSpec) GetName() string { @@ -1721,7 +1776,7 @@ type HostDNSConfigSpec struct { func (x *HostDNSConfigSpec) Reset() { *x = HostDNSConfigSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[19] + mi := &file_resource_definitions_network_network_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1733,7 +1788,7 @@ func (x *HostDNSConfigSpec) String() string { func (*HostDNSConfigSpec) ProtoMessage() {} func (x *HostDNSConfigSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[19] + mi := &file_resource_definitions_network_network_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1746,7 +1801,7 @@ func (x *HostDNSConfigSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use HostDNSConfigSpec.ProtoReflect.Descriptor instead. func (*HostDNSConfigSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{19} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{20} } func (x *HostDNSConfigSpec) GetEnabled() bool { @@ -1789,7 +1844,7 @@ type HostnameSpecSpec struct { func (x *HostnameSpecSpec) Reset() { *x = HostnameSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[20] + mi := &file_resource_definitions_network_network_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1801,7 +1856,7 @@ func (x *HostnameSpecSpec) String() string { func (*HostnameSpecSpec) ProtoMessage() {} func (x *HostnameSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[20] + mi := &file_resource_definitions_network_network_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1814,7 +1869,7 @@ func (x *HostnameSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use HostnameSpecSpec.ProtoReflect.Descriptor instead. func (*HostnameSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{20} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{21} } func (x *HostnameSpecSpec) GetHostname() string { @@ -1849,7 +1904,7 @@ type HostnameStatusSpec struct { func (x *HostnameStatusSpec) Reset() { *x = HostnameStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[21] + mi := &file_resource_definitions_network_network_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1861,7 +1916,7 @@ func (x *HostnameStatusSpec) String() string { func (*HostnameStatusSpec) ProtoMessage() {} func (x *HostnameStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[21] + mi := &file_resource_definitions_network_network_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1874,7 +1929,7 @@ func (x *HostnameStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use HostnameStatusSpec.ProtoReflect.Descriptor instead. func (*HostnameStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{21} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{22} } func (x *HostnameStatusSpec) GetHostname() string { @@ -1901,7 +1956,7 @@ type LinkAliasSpecSpec struct { func (x *LinkAliasSpecSpec) Reset() { *x = LinkAliasSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[22] + mi := &file_resource_definitions_network_network_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1913,7 +1968,7 @@ func (x *LinkAliasSpecSpec) String() string { func (*LinkAliasSpecSpec) ProtoMessage() {} func (x *LinkAliasSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[22] + mi := &file_resource_definitions_network_network_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1926,7 +1981,7 @@ func (x *LinkAliasSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkAliasSpecSpec.ProtoReflect.Descriptor instead. func (*LinkAliasSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{22} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{23} } func (x *LinkAliasSpecSpec) GetAlias() string { @@ -1946,7 +2001,7 @@ type LinkRefreshSpec struct { func (x *LinkRefreshSpec) Reset() { *x = LinkRefreshSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[23] + mi := &file_resource_definitions_network_network_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1958,7 +2013,7 @@ func (x *LinkRefreshSpec) String() string { func (*LinkRefreshSpec) ProtoMessage() {} func (x *LinkRefreshSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[23] + mi := &file_resource_definitions_network_network_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1971,7 +2026,7 @@ func (x *LinkRefreshSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkRefreshSpec.ProtoReflect.Descriptor instead. func (*LinkRefreshSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{23} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{24} } func (x *LinkRefreshSpec) GetGeneration() int64 { @@ -2023,7 +2078,7 @@ type LinkSpecSpec struct { func (x *LinkSpecSpec) Reset() { *x = LinkSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[24] + mi := &file_resource_definitions_network_network_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2035,7 +2090,7 @@ func (x *LinkSpecSpec) String() string { func (*LinkSpecSpec) ProtoMessage() {} func (x *LinkSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[24] + mi := &file_resource_definitions_network_network_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2048,7 +2103,7 @@ func (x *LinkSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkSpecSpec.ProtoReflect.Descriptor instead. func (*LinkSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{24} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{25} } func (x *LinkSpecSpec) GetName() string { @@ -2222,7 +2277,7 @@ type LinkStatusSpec struct { func (x *LinkStatusSpec) Reset() { *x = LinkStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[25] + mi := &file_resource_definitions_network_network_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2234,7 +2289,7 @@ func (x *LinkStatusSpec) String() string { func (*LinkStatusSpec) ProtoMessage() {} func (x *LinkStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[25] + mi := &file_resource_definitions_network_network_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2247,7 +2302,7 @@ func (x *LinkStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkStatusSpec.ProtoReflect.Descriptor instead. func (*LinkStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{25} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{26} } func (x *LinkStatusSpec) GetIndex() uint32 { @@ -2493,7 +2548,7 @@ type NfTablesAddressMatch struct { func (x *NfTablesAddressMatch) Reset() { *x = NfTablesAddressMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[26] + mi := &file_resource_definitions_network_network_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2505,7 +2560,7 @@ func (x *NfTablesAddressMatch) String() string { func (*NfTablesAddressMatch) ProtoMessage() {} func (x *NfTablesAddressMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[26] + mi := &file_resource_definitions_network_network_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2518,7 +2573,7 @@ func (x *NfTablesAddressMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesAddressMatch.ProtoReflect.Descriptor instead. func (*NfTablesAddressMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{26} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{27} } func (x *NfTablesAddressMatch) GetIncludeSubnets() []*common.NetIPPrefix { @@ -2556,7 +2611,7 @@ type NfTablesChainSpec struct { func (x *NfTablesChainSpec) Reset() { *x = NfTablesChainSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[27] + mi := &file_resource_definitions_network_network_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2568,7 +2623,7 @@ func (x *NfTablesChainSpec) String() string { func (*NfTablesChainSpec) ProtoMessage() {} func (x *NfTablesChainSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[27] + mi := &file_resource_definitions_network_network_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2581,7 +2636,7 @@ func (x *NfTablesChainSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesChainSpec.ProtoReflect.Descriptor instead. func (*NfTablesChainSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{27} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{28} } func (x *NfTablesChainSpec) GetType() string { @@ -2633,7 +2688,7 @@ type NfTablesClampMSS struct { func (x *NfTablesClampMSS) Reset() { *x = NfTablesClampMSS{} - mi := &file_resource_definitions_network_network_proto_msgTypes[28] + mi := &file_resource_definitions_network_network_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2645,7 +2700,7 @@ func (x *NfTablesClampMSS) String() string { func (*NfTablesClampMSS) ProtoMessage() {} func (x *NfTablesClampMSS) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[28] + mi := &file_resource_definitions_network_network_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2658,7 +2713,7 @@ func (x *NfTablesClampMSS) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesClampMSS.ProtoReflect.Descriptor instead. func (*NfTablesClampMSS) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{28} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{29} } func (x *NfTablesClampMSS) GetMtu() uint32 { @@ -2678,7 +2733,7 @@ type NfTablesConntrackStateMatch struct { func (x *NfTablesConntrackStateMatch) Reset() { *x = NfTablesConntrackStateMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[29] + mi := &file_resource_definitions_network_network_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2690,7 +2745,7 @@ func (x *NfTablesConntrackStateMatch) String() string { func (*NfTablesConntrackStateMatch) ProtoMessage() {} func (x *NfTablesConntrackStateMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[29] + mi := &file_resource_definitions_network_network_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2703,7 +2758,7 @@ func (x *NfTablesConntrackStateMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesConntrackStateMatch.ProtoReflect.Descriptor instead. func (*NfTablesConntrackStateMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{29} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{30} } func (x *NfTablesConntrackStateMatch) GetStates() []enums.NethelpersConntrackState { @@ -2723,7 +2778,7 @@ type NfTablesICMPTypeMatch struct { func (x *NfTablesICMPTypeMatch) Reset() { *x = NfTablesICMPTypeMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[30] + mi := &file_resource_definitions_network_network_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2735,7 +2790,7 @@ func (x *NfTablesICMPTypeMatch) String() string { func (*NfTablesICMPTypeMatch) ProtoMessage() {} func (x *NfTablesICMPTypeMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[30] + mi := &file_resource_definitions_network_network_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2748,7 +2803,7 @@ func (x *NfTablesICMPTypeMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesICMPTypeMatch.ProtoReflect.Descriptor instead. func (*NfTablesICMPTypeMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{30} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{31} } func (x *NfTablesICMPTypeMatch) GetTypes() []enums.NethelpersICMPType { @@ -2769,7 +2824,7 @@ type NfTablesIfNameMatch struct { func (x *NfTablesIfNameMatch) Reset() { *x = NfTablesIfNameMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[31] + mi := &file_resource_definitions_network_network_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2781,7 +2836,7 @@ func (x *NfTablesIfNameMatch) String() string { func (*NfTablesIfNameMatch) ProtoMessage() {} func (x *NfTablesIfNameMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[31] + mi := &file_resource_definitions_network_network_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2794,7 +2849,7 @@ func (x *NfTablesIfNameMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesIfNameMatch.ProtoReflect.Descriptor instead. func (*NfTablesIfNameMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{31} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{32} } func (x *NfTablesIfNameMatch) GetOperator() enums.NethelpersMatchOperator { @@ -2824,7 +2879,7 @@ type NfTablesLayer4Match struct { func (x *NfTablesLayer4Match) Reset() { *x = NfTablesLayer4Match{} - mi := &file_resource_definitions_network_network_proto_msgTypes[32] + mi := &file_resource_definitions_network_network_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2836,7 +2891,7 @@ func (x *NfTablesLayer4Match) String() string { func (*NfTablesLayer4Match) ProtoMessage() {} func (x *NfTablesLayer4Match) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[32] + mi := &file_resource_definitions_network_network_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2849,7 +2904,7 @@ func (x *NfTablesLayer4Match) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesLayer4Match.ProtoReflect.Descriptor instead. func (*NfTablesLayer4Match) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{32} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{33} } func (x *NfTablesLayer4Match) GetProtocol() enums.NethelpersProtocol { @@ -2890,7 +2945,7 @@ type NfTablesLimitMatch struct { func (x *NfTablesLimitMatch) Reset() { *x = NfTablesLimitMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[33] + mi := &file_resource_definitions_network_network_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2902,7 +2957,7 @@ func (x *NfTablesLimitMatch) String() string { func (*NfTablesLimitMatch) ProtoMessage() {} func (x *NfTablesLimitMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[33] + mi := &file_resource_definitions_network_network_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2915,7 +2970,7 @@ func (x *NfTablesLimitMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesLimitMatch.ProtoReflect.Descriptor instead. func (*NfTablesLimitMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{33} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{34} } func (x *NfTablesLimitMatch) GetPacketRatePerSecond() uint64 { @@ -2943,7 +2998,7 @@ type NfTablesMark struct { func (x *NfTablesMark) Reset() { *x = NfTablesMark{} - mi := &file_resource_definitions_network_network_proto_msgTypes[34] + mi := &file_resource_definitions_network_network_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2955,7 +3010,7 @@ func (x *NfTablesMark) String() string { func (*NfTablesMark) ProtoMessage() {} func (x *NfTablesMark) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[34] + mi := &file_resource_definitions_network_network_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2968,7 +3023,7 @@ func (x *NfTablesMark) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesMark.ProtoReflect.Descriptor instead. func (*NfTablesMark) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{34} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{35} } func (x *NfTablesMark) GetMask() uint32 { @@ -3002,7 +3057,7 @@ type NfTablesPortMatch struct { func (x *NfTablesPortMatch) Reset() { *x = NfTablesPortMatch{} - mi := &file_resource_definitions_network_network_proto_msgTypes[35] + mi := &file_resource_definitions_network_network_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3014,7 +3069,7 @@ func (x *NfTablesPortMatch) String() string { func (*NfTablesPortMatch) ProtoMessage() {} func (x *NfTablesPortMatch) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[35] + mi := &file_resource_definitions_network_network_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3027,7 +3082,7 @@ func (x *NfTablesPortMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesPortMatch.ProtoReflect.Descriptor instead. func (*NfTablesPortMatch) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{35} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{36} } func (x *NfTablesPortMatch) GetRanges() []*PortRange { @@ -3058,7 +3113,7 @@ type NfTablesRule struct { func (x *NfTablesRule) Reset() { *x = NfTablesRule{} - mi := &file_resource_definitions_network_network_proto_msgTypes[36] + mi := &file_resource_definitions_network_network_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3070,7 +3125,7 @@ func (x *NfTablesRule) String() string { func (*NfTablesRule) ProtoMessage() {} func (x *NfTablesRule) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[36] + mi := &file_resource_definitions_network_network_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3083,7 +3138,7 @@ func (x *NfTablesRule) ProtoReflect() protoreflect.Message { // Deprecated: Use NfTablesRule.ProtoReflect.Descriptor instead. func (*NfTablesRule) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{36} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{37} } func (x *NfTablesRule) GetMatchOIfName() *NfTablesIfNameMatch { @@ -3183,7 +3238,7 @@ type NodeAddressFilterSpec struct { func (x *NodeAddressFilterSpec) Reset() { *x = NodeAddressFilterSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[37] + mi := &file_resource_definitions_network_network_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3195,7 +3250,7 @@ func (x *NodeAddressFilterSpec) String() string { func (*NodeAddressFilterSpec) ProtoMessage() {} func (x *NodeAddressFilterSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[37] + mi := &file_resource_definitions_network_network_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3208,7 +3263,7 @@ func (x *NodeAddressFilterSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeAddressFilterSpec.ProtoReflect.Descriptor instead. func (*NodeAddressFilterSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{37} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{38} } func (x *NodeAddressFilterSpec) GetIncludeSubnets() []*common.NetIPPrefix { @@ -3235,7 +3290,7 @@ type NodeAddressSortAlgorithmSpec struct { func (x *NodeAddressSortAlgorithmSpec) Reset() { *x = NodeAddressSortAlgorithmSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[38] + mi := &file_resource_definitions_network_network_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3247,7 +3302,7 @@ func (x *NodeAddressSortAlgorithmSpec) String() string { func (*NodeAddressSortAlgorithmSpec) ProtoMessage() {} func (x *NodeAddressSortAlgorithmSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[38] + mi := &file_resource_definitions_network_network_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3260,7 +3315,7 @@ func (x *NodeAddressSortAlgorithmSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeAddressSortAlgorithmSpec.ProtoReflect.Descriptor instead. func (*NodeAddressSortAlgorithmSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{38} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{39} } func (x *NodeAddressSortAlgorithmSpec) GetAlgorithm() enums.NethelpersAddressSortAlgorithm { @@ -3281,7 +3336,7 @@ type NodeAddressSpec struct { func (x *NodeAddressSpec) Reset() { *x = NodeAddressSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[39] + mi := &file_resource_definitions_network_network_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3293,7 +3348,7 @@ func (x *NodeAddressSpec) String() string { func (*NodeAddressSpec) ProtoMessage() {} func (x *NodeAddressSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[39] + mi := &file_resource_definitions_network_network_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3306,7 +3361,7 @@ func (x *NodeAddressSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeAddressSpec.ProtoReflect.Descriptor instead. func (*NodeAddressSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{39} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{40} } func (x *NodeAddressSpec) GetAddresses() []*common.NetIPPrefix { @@ -3339,7 +3394,7 @@ type OperatorSpecSpec struct { func (x *OperatorSpecSpec) Reset() { *x = OperatorSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[40] + mi := &file_resource_definitions_network_network_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3351,7 +3406,7 @@ func (x *OperatorSpecSpec) String() string { func (*OperatorSpecSpec) ProtoMessage() {} func (x *OperatorSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[40] + mi := &file_resource_definitions_network_network_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3364,7 +3419,7 @@ func (x *OperatorSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use OperatorSpecSpec.ProtoReflect.Descriptor instead. func (*OperatorSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{40} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{41} } func (x *OperatorSpecSpec) GetOperator() enums.NetworkOperator { @@ -3438,7 +3493,7 @@ type PlatformConfigSpec struct { func (x *PlatformConfigSpec) Reset() { *x = PlatformConfigSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[41] + mi := &file_resource_definitions_network_network_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3450,7 +3505,7 @@ func (x *PlatformConfigSpec) String() string { func (*PlatformConfigSpec) ProtoMessage() {} func (x *PlatformConfigSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[41] + mi := &file_resource_definitions_network_network_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3463,7 +3518,7 @@ func (x *PlatformConfigSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use PlatformConfigSpec.ProtoReflect.Descriptor instead. func (*PlatformConfigSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{41} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{42} } func (x *PlatformConfigSpec) GetAddresses() []*AddressSpecSpec { @@ -3549,7 +3604,7 @@ type PortRange struct { func (x *PortRange) Reset() { *x = PortRange{} - mi := &file_resource_definitions_network_network_proto_msgTypes[42] + mi := &file_resource_definitions_network_network_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3561,7 +3616,7 @@ func (x *PortRange) String() string { func (*PortRange) ProtoMessage() {} func (x *PortRange) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[42] + mi := &file_resource_definitions_network_network_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3574,7 +3629,7 @@ func (x *PortRange) ProtoReflect() protoreflect.Message { // Deprecated: Use PortRange.ProtoReflect.Descriptor instead. func (*PortRange) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{42} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{43} } func (x *PortRange) GetLo() uint32 { @@ -3598,17 +3653,19 @@ type ProbeSpecSpec struct { Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` // FailureThreshold is the number of consecutive failures for the probe to be considered failed after having succeeded. FailureThreshold int64 `protobuf:"varint,2,opt,name=failure_threshold,json=failureThreshold,proto3" json:"failure_threshold,omitempty"` - // One of the probe types should be specified, for now it's only TCP. + // TCP is the TCP probe spec. One of TCP or HTTP must be specified. Tcp *TCPProbeSpec `protobuf:"bytes,3,opt,name=tcp,proto3" json:"tcp,omitempty"` // Configuration layer. - ConfigLayer enums.NetworkConfigLayer `protobuf:"varint,4,opt,name=config_layer,json=configLayer,proto3,enum=talos.resource.definitions.enums.NetworkConfigLayer" json:"config_layer,omitempty"` + ConfigLayer enums.NetworkConfigLayer `protobuf:"varint,4,opt,name=config_layer,json=configLayer,proto3,enum=talos.resource.definitions.enums.NetworkConfigLayer" json:"config_layer,omitempty"` + // HTTP is the HTTP probe spec. One of TCP or HTTP must be specified. + Http *HTTPProbeSpec `protobuf:"bytes,5,opt,name=http,proto3" json:"http,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ProbeSpecSpec) Reset() { *x = ProbeSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[43] + mi := &file_resource_definitions_network_network_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3620,7 +3677,7 @@ func (x *ProbeSpecSpec) String() string { func (*ProbeSpecSpec) ProtoMessage() {} func (x *ProbeSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[43] + mi := &file_resource_definitions_network_network_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3633,7 +3690,7 @@ func (x *ProbeSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ProbeSpecSpec.ProtoReflect.Descriptor instead. func (*ProbeSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{43} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{44} } func (x *ProbeSpecSpec) GetInterval() *durationpb.Duration { @@ -3664,6 +3721,13 @@ func (x *ProbeSpecSpec) GetConfigLayer() enums.NetworkConfigLayer { return enums.NetworkConfigLayer(0) } +func (x *ProbeSpecSpec) GetHttp() *HTTPProbeSpec { + if x != nil { + return x.Http + } + return nil +} + // ProbeStatusSpec describes the Probe. type ProbeStatusSpec struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3677,7 +3741,7 @@ type ProbeStatusSpec struct { func (x *ProbeStatusSpec) Reset() { *x = ProbeStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[44] + mi := &file_resource_definitions_network_network_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3689,7 +3753,7 @@ func (x *ProbeStatusSpec) String() string { func (*ProbeStatusSpec) ProtoMessage() {} func (x *ProbeStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[44] + mi := &file_resource_definitions_network_network_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3702,7 +3766,7 @@ func (x *ProbeStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ProbeStatusSpec.ProtoReflect.Descriptor instead. func (*ProbeStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{44} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{45} } func (x *ProbeStatusSpec) GetSuccess() bool { @@ -3731,7 +3795,7 @@ type ResolverSpecSpec struct { func (x *ResolverSpecSpec) Reset() { *x = ResolverSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[45] + mi := &file_resource_definitions_network_network_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3743,7 +3807,7 @@ func (x *ResolverSpecSpec) String() string { func (*ResolverSpecSpec) ProtoMessage() {} func (x *ResolverSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[45] + mi := &file_resource_definitions_network_network_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3756,7 +3820,7 @@ func (x *ResolverSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolverSpecSpec.ProtoReflect.Descriptor instead. func (*ResolverSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{45} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{46} } func (x *ResolverSpecSpec) GetDnsServers() []*common.NetIP { @@ -3791,7 +3855,7 @@ type ResolverStatusSpec struct { func (x *ResolverStatusSpec) Reset() { *x = ResolverStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[46] + mi := &file_resource_definitions_network_network_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3803,7 +3867,7 @@ func (x *ResolverStatusSpec) String() string { func (*ResolverStatusSpec) ProtoMessage() {} func (x *ResolverStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[46] + mi := &file_resource_definitions_network_network_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3816,7 +3880,7 @@ func (x *ResolverStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolverStatusSpec.ProtoReflect.Descriptor instead. func (*ResolverStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{46} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{47} } func (x *ResolverStatusSpec) GetDnsServers() []*common.NetIP { @@ -3855,7 +3919,7 @@ type RouteSpecSpec struct { func (x *RouteSpecSpec) Reset() { *x = RouteSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[47] + mi := &file_resource_definitions_network_network_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3867,7 +3931,7 @@ func (x *RouteSpecSpec) String() string { func (*RouteSpecSpec) ProtoMessage() {} func (x *RouteSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[47] + mi := &file_resource_definitions_network_network_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3880,7 +3944,7 @@ func (x *RouteSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteSpecSpec.ProtoReflect.Descriptor instead. func (*RouteSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{47} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{48} } func (x *RouteSpecSpec) GetFamily() enums.NethelpersFamily { @@ -3996,7 +4060,7 @@ type RouteStatusSpec struct { func (x *RouteStatusSpec) Reset() { *x = RouteStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[48] + mi := &file_resource_definitions_network_network_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4008,7 +4072,7 @@ func (x *RouteStatusSpec) String() string { func (*RouteStatusSpec) ProtoMessage() {} func (x *RouteStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[48] + mi := &file_resource_definitions_network_network_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4021,7 +4085,7 @@ func (x *RouteStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteStatusSpec.ProtoReflect.Descriptor instead. func (*RouteStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{48} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{49} } func (x *RouteStatusSpec) GetFamily() enums.NethelpersFamily { @@ -4135,7 +4199,7 @@ type RoutingRuleSpecSpec struct { func (x *RoutingRuleSpecSpec) Reset() { *x = RoutingRuleSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[49] + mi := &file_resource_definitions_network_network_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4147,7 +4211,7 @@ func (x *RoutingRuleSpecSpec) String() string { func (*RoutingRuleSpecSpec) ProtoMessage() {} func (x *RoutingRuleSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[49] + mi := &file_resource_definitions_network_network_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4160,7 +4224,7 @@ func (x *RoutingRuleSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use RoutingRuleSpecSpec.ProtoReflect.Descriptor instead. func (*RoutingRuleSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{49} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{50} } func (x *RoutingRuleSpecSpec) GetFamily() enums.NethelpersFamily { @@ -4259,7 +4323,7 @@ type RoutingRuleStatusSpec struct { func (x *RoutingRuleStatusSpec) Reset() { *x = RoutingRuleStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[50] + mi := &file_resource_definitions_network_network_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4271,7 +4335,7 @@ func (x *RoutingRuleStatusSpec) String() string { func (*RoutingRuleStatusSpec) ProtoMessage() {} func (x *RoutingRuleStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[50] + mi := &file_resource_definitions_network_network_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4284,7 +4348,7 @@ func (x *RoutingRuleStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use RoutingRuleStatusSpec.ProtoReflect.Descriptor instead. func (*RoutingRuleStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{50} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{51} } func (x *RoutingRuleStatusSpec) GetFamily() enums.NethelpersFamily { @@ -4367,7 +4431,7 @@ type STPSpec struct { func (x *STPSpec) Reset() { *x = STPSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[51] + mi := &file_resource_definitions_network_network_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4379,7 +4443,7 @@ func (x *STPSpec) String() string { func (*STPSpec) ProtoMessage() {} func (x *STPSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[51] + mi := &file_resource_definitions_network_network_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4392,7 +4456,7 @@ func (x *STPSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use STPSpec.ProtoReflect.Descriptor instead. func (*STPSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{51} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{52} } func (x *STPSpec) GetEnabled() bool { @@ -4415,7 +4479,7 @@ type StatusSpec struct { func (x *StatusSpec) Reset() { *x = StatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[52] + mi := &file_resource_definitions_network_network_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4427,7 +4491,7 @@ func (x *StatusSpec) String() string { func (*StatusSpec) ProtoMessage() {} func (x *StatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[52] + mi := &file_resource_definitions_network_network_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4440,7 +4504,7 @@ func (x *StatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusSpec.ProtoReflect.Descriptor instead. func (*StatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{52} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{53} } func (x *StatusSpec) GetAddressReady() bool { @@ -4484,7 +4548,7 @@ type TCPProbeSpec struct { func (x *TCPProbeSpec) Reset() { *x = TCPProbeSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[53] + mi := &file_resource_definitions_network_network_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4496,7 +4560,7 @@ func (x *TCPProbeSpec) String() string { func (*TCPProbeSpec) ProtoMessage() {} func (x *TCPProbeSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[53] + mi := &file_resource_definitions_network_network_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4509,7 +4573,7 @@ func (x *TCPProbeSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use TCPProbeSpec.ProtoReflect.Descriptor instead. func (*TCPProbeSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{53} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{54} } func (x *TCPProbeSpec) GetEndpoint() string { @@ -4538,7 +4602,7 @@ type TimeServerSpecSpec struct { func (x *TimeServerSpecSpec) Reset() { *x = TimeServerSpecSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[54] + mi := &file_resource_definitions_network_network_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4550,7 +4614,7 @@ func (x *TimeServerSpecSpec) String() string { func (*TimeServerSpecSpec) ProtoMessage() {} func (x *TimeServerSpecSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[54] + mi := &file_resource_definitions_network_network_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4563,7 +4627,7 @@ func (x *TimeServerSpecSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeServerSpecSpec.ProtoReflect.Descriptor instead. func (*TimeServerSpecSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{54} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{55} } func (x *TimeServerSpecSpec) GetNtpServers() []string { @@ -4598,7 +4662,7 @@ type TimeServerStatusSpec struct { func (x *TimeServerStatusSpec) Reset() { *x = TimeServerStatusSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[55] + mi := &file_resource_definitions_network_network_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4610,7 +4674,7 @@ func (x *TimeServerStatusSpec) String() string { func (*TimeServerStatusSpec) ProtoMessage() {} func (x *TimeServerStatusSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[55] + mi := &file_resource_definitions_network_network_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4623,7 +4687,7 @@ func (x *TimeServerStatusSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeServerStatusSpec.ProtoReflect.Descriptor instead. func (*TimeServerStatusSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{55} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{56} } func (x *TimeServerStatusSpec) GetNtpServers() []string { @@ -4652,7 +4716,7 @@ type VIPEquinixMetalSpec struct { func (x *VIPEquinixMetalSpec) Reset() { *x = VIPEquinixMetalSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[56] + mi := &file_resource_definitions_network_network_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4664,7 +4728,7 @@ func (x *VIPEquinixMetalSpec) String() string { func (*VIPEquinixMetalSpec) ProtoMessage() {} func (x *VIPEquinixMetalSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[56] + mi := &file_resource_definitions_network_network_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4677,7 +4741,7 @@ func (x *VIPEquinixMetalSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use VIPEquinixMetalSpec.ProtoReflect.Descriptor instead. func (*VIPEquinixMetalSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{56} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{57} } func (x *VIPEquinixMetalSpec) GetProjectId() string { @@ -4713,7 +4777,7 @@ type VIPHCloudSpec struct { func (x *VIPHCloudSpec) Reset() { *x = VIPHCloudSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[57] + mi := &file_resource_definitions_network_network_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4725,7 +4789,7 @@ func (x *VIPHCloudSpec) String() string { func (*VIPHCloudSpec) ProtoMessage() {} func (x *VIPHCloudSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[57] + mi := &file_resource_definitions_network_network_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4738,7 +4802,7 @@ func (x *VIPHCloudSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use VIPHCloudSpec.ProtoReflect.Descriptor instead. func (*VIPHCloudSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{57} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{58} } func (x *VIPHCloudSpec) GetDeviceId() int64 { @@ -4775,7 +4839,7 @@ type VIPOperatorSpec struct { func (x *VIPOperatorSpec) Reset() { *x = VIPOperatorSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[58] + mi := &file_resource_definitions_network_network_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4787,7 +4851,7 @@ func (x *VIPOperatorSpec) String() string { func (*VIPOperatorSpec) ProtoMessage() {} func (x *VIPOperatorSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[58] + mi := &file_resource_definitions_network_network_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4800,7 +4864,7 @@ func (x *VIPOperatorSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use VIPOperatorSpec.ProtoReflect.Descriptor instead. func (*VIPOperatorSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{58} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{59} } func (x *VIPOperatorSpec) GetIp() *common.NetIP { @@ -4844,7 +4908,7 @@ type VLANSpec struct { func (x *VLANSpec) Reset() { *x = VLANSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[59] + mi := &file_resource_definitions_network_network_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4856,7 +4920,7 @@ func (x *VLANSpec) String() string { func (*VLANSpec) ProtoMessage() {} func (x *VLANSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[59] + mi := &file_resource_definitions_network_network_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4869,7 +4933,7 @@ func (x *VLANSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use VLANSpec.ProtoReflect.Descriptor instead. func (*VLANSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{59} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{60} } func (x *VLANSpec) GetVid() uint32 { @@ -4896,7 +4960,7 @@ type VRFMasterSpec struct { func (x *VRFMasterSpec) Reset() { *x = VRFMasterSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[60] + mi := &file_resource_definitions_network_network_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4908,7 +4972,7 @@ func (x *VRFMasterSpec) String() string { func (*VRFMasterSpec) ProtoMessage() {} func (x *VRFMasterSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[60] + mi := &file_resource_definitions_network_network_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4921,7 +4985,7 @@ func (x *VRFMasterSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use VRFMasterSpec.ProtoReflect.Descriptor instead. func (*VRFMasterSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{60} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{61} } func (x *VRFMasterSpec) GetTable() enums.NethelpersRoutingTable { @@ -4941,7 +5005,7 @@ type VRFSlave struct { func (x *VRFSlave) Reset() { *x = VRFSlave{} - mi := &file_resource_definitions_network_network_proto_msgTypes[61] + mi := &file_resource_definitions_network_network_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4953,7 +5017,7 @@ func (x *VRFSlave) String() string { func (*VRFSlave) ProtoMessage() {} func (x *VRFSlave) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[61] + mi := &file_resource_definitions_network_network_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4966,7 +5030,7 @@ func (x *VRFSlave) ProtoReflect() protoreflect.Message { // Deprecated: Use VRFSlave.ProtoReflect.Descriptor instead. func (*VRFSlave) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{61} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{62} } func (x *VRFSlave) GetMasterName() string { @@ -4990,7 +5054,7 @@ type WireguardPeer struct { func (x *WireguardPeer) Reset() { *x = WireguardPeer{} - mi := &file_resource_definitions_network_network_proto_msgTypes[62] + mi := &file_resource_definitions_network_network_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5002,7 +5066,7 @@ func (x *WireguardPeer) String() string { func (*WireguardPeer) ProtoMessage() {} func (x *WireguardPeer) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[62] + mi := &file_resource_definitions_network_network_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5015,7 +5079,7 @@ func (x *WireguardPeer) ProtoReflect() protoreflect.Message { // Deprecated: Use WireguardPeer.ProtoReflect.Descriptor instead. func (*WireguardPeer) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{62} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{63} } func (x *WireguardPeer) GetPublicKey() string { @@ -5069,7 +5133,7 @@ type WireguardSpec struct { func (x *WireguardSpec) Reset() { *x = WireguardSpec{} - mi := &file_resource_definitions_network_network_proto_msgTypes[63] + mi := &file_resource_definitions_network_network_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5081,7 +5145,7 @@ func (x *WireguardSpec) String() string { func (*WireguardSpec) ProtoMessage() {} func (x *WireguardSpec) ProtoReflect() protoreflect.Message { - mi := &file_resource_definitions_network_network_proto_msgTypes[63] + mi := &file_resource_definitions_network_network_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5094,7 +5158,7 @@ func (x *WireguardSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use WireguardSpec.ProtoReflect.Descriptor instead. func (*WireguardSpec) Descriptor() ([]byte, []int) { - return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{63} + return file_resource_definitions_network_network_proto_rawDescGZIP(), []int{64} } func (x *WireguardSpec) GetPrivateKey() string { @@ -5293,7 +5357,10 @@ const file_resource_definitions_network_network_proto_rawDesc = "" + "\bfeatures\x18\b \x03(\v29.talos.resource.definitions.network.EthernetFeatureStatusR\bfeatures\x12V\n" + "\bchannels\x18\t \x01(\v2:.talos.resource.definitions.network.EthernetChannelsStatusR\bchannels\x12S\n" + "\vwake_on_lan\x18\n" + - " \x03(\x0e23.talos.resource.definitions.enums.NethelpersWOLModeR\twakeOnLan\"K\n" + + " \x03(\x0e23.talos.resource.definitions.enums.NethelpersWOLModeR\twakeOnLan\"c\n" + + "\rHTTPProbeSpec\x12\x1d\n" + + "\x03url\x18\x01 \x01(\v2\v.common.URLR\x03url\x123\n" + + "\atimeout\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\atimeout\"K\n" + "\x10HardwareAddrSpec\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12#\n" + "\rhardware_addr\x18\x02 \x01(\fR\fhardwareAddr\"\xe5\x01\n" + @@ -5464,12 +5531,13 @@ const file_resource_definitions_network_network_proto_rawDesc = "" + " \x01(\v28.talos.resource.definitions.runtime.PlatformMetadataSpecR\bmetadata\"+\n" + "\tPortRange\x12\x0e\n" + "\x02lo\x18\x01 \x01(\rR\x02lo\x12\x0e\n" + - "\x02hi\x18\x02 \x01(\rR\x02hi\"\x90\x02\n" + + "\x02hi\x18\x02 \x01(\rR\x02hi\"\xd7\x02\n" + "\rProbeSpecSpec\x125\n" + "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12+\n" + "\x11failure_threshold\x18\x02 \x01(\x03R\x10failureThreshold\x12B\n" + "\x03tcp\x18\x03 \x01(\v20.talos.resource.definitions.network.TCPProbeSpecR\x03tcp\x12W\n" + - "\fconfig_layer\x18\x04 \x01(\x0e24.talos.resource.definitions.enums.NetworkConfigLayerR\vconfigLayer\"J\n" + + "\fconfig_layer\x18\x04 \x01(\x0e24.talos.resource.definitions.enums.NetworkConfigLayerR\vconfigLayer\x12E\n" + + "\x04http\x18\x05 \x01(\v21.talos.resource.definitions.network.HTTPProbeSpecR\x04http\"J\n" + "\x0fProbeStatusSpec\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x1d\n" + "\n" + @@ -5612,7 +5680,7 @@ func file_resource_definitions_network_network_proto_rawDescGZIP() []byte { return file_resource_definitions_network_network_proto_rawDescData } -var file_resource_definitions_network_network_proto_msgTypes = make([]protoimpl.MessageInfo, 65) +var file_resource_definitions_network_network_proto_msgTypes = make([]protoimpl.MessageInfo, 66) var file_resource_definitions_network_network_proto_goTypes = []any{ (*AddressSpecSpec)(nil), // 0: talos.resource.definitions.network.AddressSpecSpec (*AddressStatusSpec)(nil), // 1: talos.resource.definitions.network.AddressStatusSpec @@ -5632,245 +5700,250 @@ var file_resource_definitions_network_network_proto_goTypes = []any{ (*EthernetRingsStatus)(nil), // 15: talos.resource.definitions.network.EthernetRingsStatus (*EthernetSpecSpec)(nil), // 16: talos.resource.definitions.network.EthernetSpecSpec (*EthernetStatusSpec)(nil), // 17: talos.resource.definitions.network.EthernetStatusSpec - (*HardwareAddrSpec)(nil), // 18: talos.resource.definitions.network.HardwareAddrSpec - (*HostDNSConfigSpec)(nil), // 19: talos.resource.definitions.network.HostDNSConfigSpec - (*HostnameSpecSpec)(nil), // 20: talos.resource.definitions.network.HostnameSpecSpec - (*HostnameStatusSpec)(nil), // 21: talos.resource.definitions.network.HostnameStatusSpec - (*LinkAliasSpecSpec)(nil), // 22: talos.resource.definitions.network.LinkAliasSpecSpec - (*LinkRefreshSpec)(nil), // 23: talos.resource.definitions.network.LinkRefreshSpec - (*LinkSpecSpec)(nil), // 24: talos.resource.definitions.network.LinkSpecSpec - (*LinkStatusSpec)(nil), // 25: talos.resource.definitions.network.LinkStatusSpec - (*NfTablesAddressMatch)(nil), // 26: talos.resource.definitions.network.NfTablesAddressMatch - (*NfTablesChainSpec)(nil), // 27: talos.resource.definitions.network.NfTablesChainSpec - (*NfTablesClampMSS)(nil), // 28: talos.resource.definitions.network.NfTablesClampMSS - (*NfTablesConntrackStateMatch)(nil), // 29: talos.resource.definitions.network.NfTablesConntrackStateMatch - (*NfTablesICMPTypeMatch)(nil), // 30: talos.resource.definitions.network.NfTablesICMPTypeMatch - (*NfTablesIfNameMatch)(nil), // 31: talos.resource.definitions.network.NfTablesIfNameMatch - (*NfTablesLayer4Match)(nil), // 32: talos.resource.definitions.network.NfTablesLayer4Match - (*NfTablesLimitMatch)(nil), // 33: talos.resource.definitions.network.NfTablesLimitMatch - (*NfTablesMark)(nil), // 34: talos.resource.definitions.network.NfTablesMark - (*NfTablesPortMatch)(nil), // 35: talos.resource.definitions.network.NfTablesPortMatch - (*NfTablesRule)(nil), // 36: talos.resource.definitions.network.NfTablesRule - (*NodeAddressFilterSpec)(nil), // 37: talos.resource.definitions.network.NodeAddressFilterSpec - (*NodeAddressSortAlgorithmSpec)(nil), // 38: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec - (*NodeAddressSpec)(nil), // 39: talos.resource.definitions.network.NodeAddressSpec - (*OperatorSpecSpec)(nil), // 40: talos.resource.definitions.network.OperatorSpecSpec - (*PlatformConfigSpec)(nil), // 41: talos.resource.definitions.network.PlatformConfigSpec - (*PortRange)(nil), // 42: talos.resource.definitions.network.PortRange - (*ProbeSpecSpec)(nil), // 43: talos.resource.definitions.network.ProbeSpecSpec - (*ProbeStatusSpec)(nil), // 44: talos.resource.definitions.network.ProbeStatusSpec - (*ResolverSpecSpec)(nil), // 45: talos.resource.definitions.network.ResolverSpecSpec - (*ResolverStatusSpec)(nil), // 46: talos.resource.definitions.network.ResolverStatusSpec - (*RouteSpecSpec)(nil), // 47: talos.resource.definitions.network.RouteSpecSpec - (*RouteStatusSpec)(nil), // 48: talos.resource.definitions.network.RouteStatusSpec - (*RoutingRuleSpecSpec)(nil), // 49: talos.resource.definitions.network.RoutingRuleSpecSpec - (*RoutingRuleStatusSpec)(nil), // 50: talos.resource.definitions.network.RoutingRuleStatusSpec - (*STPSpec)(nil), // 51: talos.resource.definitions.network.STPSpec - (*StatusSpec)(nil), // 52: talos.resource.definitions.network.StatusSpec - (*TCPProbeSpec)(nil), // 53: talos.resource.definitions.network.TCPProbeSpec - (*TimeServerSpecSpec)(nil), // 54: talos.resource.definitions.network.TimeServerSpecSpec - (*TimeServerStatusSpec)(nil), // 55: talos.resource.definitions.network.TimeServerStatusSpec - (*VIPEquinixMetalSpec)(nil), // 56: talos.resource.definitions.network.VIPEquinixMetalSpec - (*VIPHCloudSpec)(nil), // 57: talos.resource.definitions.network.VIPHCloudSpec - (*VIPOperatorSpec)(nil), // 58: talos.resource.definitions.network.VIPOperatorSpec - (*VLANSpec)(nil), // 59: talos.resource.definitions.network.VLANSpec - (*VRFMasterSpec)(nil), // 60: talos.resource.definitions.network.VRFMasterSpec - (*VRFSlave)(nil), // 61: talos.resource.definitions.network.VRFSlave - (*WireguardPeer)(nil), // 62: talos.resource.definitions.network.WireguardPeer - (*WireguardSpec)(nil), // 63: talos.resource.definitions.network.WireguardSpec - nil, // 64: talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry - (*common.NetIPPrefix)(nil), // 65: common.NetIPPrefix - (enums.NethelpersFamily)(0), // 66: talos.resource.definitions.enums.NethelpersFamily - (enums.NethelpersScope)(0), // 67: talos.resource.definitions.enums.NethelpersScope - (enums.NetworkConfigLayer)(0), // 68: talos.resource.definitions.enums.NetworkConfigLayer - (*common.NetIP)(nil), // 69: common.NetIP - (enums.NethelpersBondMode)(0), // 70: talos.resource.definitions.enums.NethelpersBondMode - (enums.NethelpersBondXmitHashPolicy)(0), // 71: talos.resource.definitions.enums.NethelpersBondXmitHashPolicy - (enums.NethelpersLACPRate)(0), // 72: talos.resource.definitions.enums.NethelpersLACPRate - (enums.NethelpersARPValidate)(0), // 73: talos.resource.definitions.enums.NethelpersARPValidate - (enums.NethelpersARPAllTargets)(0), // 74: talos.resource.definitions.enums.NethelpersARPAllTargets - (enums.NethelpersPrimaryReselect)(0), // 75: talos.resource.definitions.enums.NethelpersPrimaryReselect - (enums.NethelpersFailOverMAC)(0), // 76: talos.resource.definitions.enums.NethelpersFailOverMAC - (enums.NethelpersADSelect)(0), // 77: talos.resource.definitions.enums.NethelpersADSelect - (enums.NethelpersADLACPActive)(0), // 78: talos.resource.definitions.enums.NethelpersADLACPActive - (enums.NethelpersClientIdentifier)(0), // 79: talos.resource.definitions.enums.NethelpersClientIdentifier - (enums.NethelpersWOLMode)(0), // 80: talos.resource.definitions.enums.NethelpersWOLMode - (enums.NethelpersPort)(0), // 81: talos.resource.definitions.enums.NethelpersPort - (enums.NethelpersDuplex)(0), // 82: talos.resource.definitions.enums.NethelpersDuplex - (*common.NetIPPort)(nil), // 83: common.NetIPPort - (enums.NethelpersLinkType)(0), // 84: talos.resource.definitions.enums.NethelpersLinkType - (enums.NethelpersOperationalState)(0), // 85: talos.resource.definitions.enums.NethelpersOperationalState - (enums.NethelpersNfTablesChainHook)(0), // 86: talos.resource.definitions.enums.NethelpersNfTablesChainHook - (enums.NethelpersNfTablesChainPriority)(0), // 87: talos.resource.definitions.enums.NethelpersNfTablesChainPriority - (enums.NethelpersNfTablesVerdict)(0), // 88: talos.resource.definitions.enums.NethelpersNfTablesVerdict - (enums.NethelpersConntrackState)(0), // 89: talos.resource.definitions.enums.NethelpersConntrackState - (enums.NethelpersICMPType)(0), // 90: talos.resource.definitions.enums.NethelpersICMPType - (enums.NethelpersMatchOperator)(0), // 91: talos.resource.definitions.enums.NethelpersMatchOperator - (enums.NethelpersProtocol)(0), // 92: talos.resource.definitions.enums.NethelpersProtocol - (enums.NethelpersAddressSortAlgorithm)(0), // 93: talos.resource.definitions.enums.NethelpersAddressSortAlgorithm - (enums.NetworkOperator)(0), // 94: talos.resource.definitions.enums.NetworkOperator - (*runtime.PlatformMetadataSpec)(nil), // 95: talos.resource.definitions.runtime.PlatformMetadataSpec - (*durationpb.Duration)(nil), // 96: google.protobuf.Duration - (enums.NethelpersRoutingTable)(0), // 97: talos.resource.definitions.enums.NethelpersRoutingTable - (enums.NethelpersRouteType)(0), // 98: talos.resource.definitions.enums.NethelpersRouteType - (enums.NethelpersRouteProtocol)(0), // 99: talos.resource.definitions.enums.NethelpersRouteProtocol - (enums.NethelpersRoutingRuleAction)(0), // 100: talos.resource.definitions.enums.NethelpersRoutingRuleAction - (enums.NethelpersVLANProtocol)(0), // 101: talos.resource.definitions.enums.NethelpersVLANProtocol + (*HTTPProbeSpec)(nil), // 18: talos.resource.definitions.network.HTTPProbeSpec + (*HardwareAddrSpec)(nil), // 19: talos.resource.definitions.network.HardwareAddrSpec + (*HostDNSConfigSpec)(nil), // 20: talos.resource.definitions.network.HostDNSConfigSpec + (*HostnameSpecSpec)(nil), // 21: talos.resource.definitions.network.HostnameSpecSpec + (*HostnameStatusSpec)(nil), // 22: talos.resource.definitions.network.HostnameStatusSpec + (*LinkAliasSpecSpec)(nil), // 23: talos.resource.definitions.network.LinkAliasSpecSpec + (*LinkRefreshSpec)(nil), // 24: talos.resource.definitions.network.LinkRefreshSpec + (*LinkSpecSpec)(nil), // 25: talos.resource.definitions.network.LinkSpecSpec + (*LinkStatusSpec)(nil), // 26: talos.resource.definitions.network.LinkStatusSpec + (*NfTablesAddressMatch)(nil), // 27: talos.resource.definitions.network.NfTablesAddressMatch + (*NfTablesChainSpec)(nil), // 28: talos.resource.definitions.network.NfTablesChainSpec + (*NfTablesClampMSS)(nil), // 29: talos.resource.definitions.network.NfTablesClampMSS + (*NfTablesConntrackStateMatch)(nil), // 30: talos.resource.definitions.network.NfTablesConntrackStateMatch + (*NfTablesICMPTypeMatch)(nil), // 31: talos.resource.definitions.network.NfTablesICMPTypeMatch + (*NfTablesIfNameMatch)(nil), // 32: talos.resource.definitions.network.NfTablesIfNameMatch + (*NfTablesLayer4Match)(nil), // 33: talos.resource.definitions.network.NfTablesLayer4Match + (*NfTablesLimitMatch)(nil), // 34: talos.resource.definitions.network.NfTablesLimitMatch + (*NfTablesMark)(nil), // 35: talos.resource.definitions.network.NfTablesMark + (*NfTablesPortMatch)(nil), // 36: talos.resource.definitions.network.NfTablesPortMatch + (*NfTablesRule)(nil), // 37: talos.resource.definitions.network.NfTablesRule + (*NodeAddressFilterSpec)(nil), // 38: talos.resource.definitions.network.NodeAddressFilterSpec + (*NodeAddressSortAlgorithmSpec)(nil), // 39: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec + (*NodeAddressSpec)(nil), // 40: talos.resource.definitions.network.NodeAddressSpec + (*OperatorSpecSpec)(nil), // 41: talos.resource.definitions.network.OperatorSpecSpec + (*PlatformConfigSpec)(nil), // 42: talos.resource.definitions.network.PlatformConfigSpec + (*PortRange)(nil), // 43: talos.resource.definitions.network.PortRange + (*ProbeSpecSpec)(nil), // 44: talos.resource.definitions.network.ProbeSpecSpec + (*ProbeStatusSpec)(nil), // 45: talos.resource.definitions.network.ProbeStatusSpec + (*ResolverSpecSpec)(nil), // 46: talos.resource.definitions.network.ResolverSpecSpec + (*ResolverStatusSpec)(nil), // 47: talos.resource.definitions.network.ResolverStatusSpec + (*RouteSpecSpec)(nil), // 48: talos.resource.definitions.network.RouteSpecSpec + (*RouteStatusSpec)(nil), // 49: talos.resource.definitions.network.RouteStatusSpec + (*RoutingRuleSpecSpec)(nil), // 50: talos.resource.definitions.network.RoutingRuleSpecSpec + (*RoutingRuleStatusSpec)(nil), // 51: talos.resource.definitions.network.RoutingRuleStatusSpec + (*STPSpec)(nil), // 52: talos.resource.definitions.network.STPSpec + (*StatusSpec)(nil), // 53: talos.resource.definitions.network.StatusSpec + (*TCPProbeSpec)(nil), // 54: talos.resource.definitions.network.TCPProbeSpec + (*TimeServerSpecSpec)(nil), // 55: talos.resource.definitions.network.TimeServerSpecSpec + (*TimeServerStatusSpec)(nil), // 56: talos.resource.definitions.network.TimeServerStatusSpec + (*VIPEquinixMetalSpec)(nil), // 57: talos.resource.definitions.network.VIPEquinixMetalSpec + (*VIPHCloudSpec)(nil), // 58: talos.resource.definitions.network.VIPHCloudSpec + (*VIPOperatorSpec)(nil), // 59: talos.resource.definitions.network.VIPOperatorSpec + (*VLANSpec)(nil), // 60: talos.resource.definitions.network.VLANSpec + (*VRFMasterSpec)(nil), // 61: talos.resource.definitions.network.VRFMasterSpec + (*VRFSlave)(nil), // 62: talos.resource.definitions.network.VRFSlave + (*WireguardPeer)(nil), // 63: talos.resource.definitions.network.WireguardPeer + (*WireguardSpec)(nil), // 64: talos.resource.definitions.network.WireguardSpec + nil, // 65: talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry + (*common.NetIPPrefix)(nil), // 66: common.NetIPPrefix + (enums.NethelpersFamily)(0), // 67: talos.resource.definitions.enums.NethelpersFamily + (enums.NethelpersScope)(0), // 68: talos.resource.definitions.enums.NethelpersScope + (enums.NetworkConfigLayer)(0), // 69: talos.resource.definitions.enums.NetworkConfigLayer + (*common.NetIP)(nil), // 70: common.NetIP + (enums.NethelpersBondMode)(0), // 71: talos.resource.definitions.enums.NethelpersBondMode + (enums.NethelpersBondXmitHashPolicy)(0), // 72: talos.resource.definitions.enums.NethelpersBondXmitHashPolicy + (enums.NethelpersLACPRate)(0), // 73: talos.resource.definitions.enums.NethelpersLACPRate + (enums.NethelpersARPValidate)(0), // 74: talos.resource.definitions.enums.NethelpersARPValidate + (enums.NethelpersARPAllTargets)(0), // 75: talos.resource.definitions.enums.NethelpersARPAllTargets + (enums.NethelpersPrimaryReselect)(0), // 76: talos.resource.definitions.enums.NethelpersPrimaryReselect + (enums.NethelpersFailOverMAC)(0), // 77: talos.resource.definitions.enums.NethelpersFailOverMAC + (enums.NethelpersADSelect)(0), // 78: talos.resource.definitions.enums.NethelpersADSelect + (enums.NethelpersADLACPActive)(0), // 79: talos.resource.definitions.enums.NethelpersADLACPActive + (enums.NethelpersClientIdentifier)(0), // 80: talos.resource.definitions.enums.NethelpersClientIdentifier + (enums.NethelpersWOLMode)(0), // 81: talos.resource.definitions.enums.NethelpersWOLMode + (enums.NethelpersPort)(0), // 82: talos.resource.definitions.enums.NethelpersPort + (enums.NethelpersDuplex)(0), // 83: talos.resource.definitions.enums.NethelpersDuplex + (*common.URL)(nil), // 84: common.URL + (*durationpb.Duration)(nil), // 85: google.protobuf.Duration + (*common.NetIPPort)(nil), // 86: common.NetIPPort + (enums.NethelpersLinkType)(0), // 87: talos.resource.definitions.enums.NethelpersLinkType + (enums.NethelpersOperationalState)(0), // 88: talos.resource.definitions.enums.NethelpersOperationalState + (enums.NethelpersNfTablesChainHook)(0), // 89: talos.resource.definitions.enums.NethelpersNfTablesChainHook + (enums.NethelpersNfTablesChainPriority)(0), // 90: talos.resource.definitions.enums.NethelpersNfTablesChainPriority + (enums.NethelpersNfTablesVerdict)(0), // 91: talos.resource.definitions.enums.NethelpersNfTablesVerdict + (enums.NethelpersConntrackState)(0), // 92: talos.resource.definitions.enums.NethelpersConntrackState + (enums.NethelpersICMPType)(0), // 93: talos.resource.definitions.enums.NethelpersICMPType + (enums.NethelpersMatchOperator)(0), // 94: talos.resource.definitions.enums.NethelpersMatchOperator + (enums.NethelpersProtocol)(0), // 95: talos.resource.definitions.enums.NethelpersProtocol + (enums.NethelpersAddressSortAlgorithm)(0), // 96: talos.resource.definitions.enums.NethelpersAddressSortAlgorithm + (enums.NetworkOperator)(0), // 97: talos.resource.definitions.enums.NetworkOperator + (*runtime.PlatformMetadataSpec)(nil), // 98: talos.resource.definitions.runtime.PlatformMetadataSpec + (enums.NethelpersRoutingTable)(0), // 99: talos.resource.definitions.enums.NethelpersRoutingTable + (enums.NethelpersRouteType)(0), // 100: talos.resource.definitions.enums.NethelpersRouteType + (enums.NethelpersRouteProtocol)(0), // 101: talos.resource.definitions.enums.NethelpersRouteProtocol + (enums.NethelpersRoutingRuleAction)(0), // 102: talos.resource.definitions.enums.NethelpersRoutingRuleAction + (enums.NethelpersVLANProtocol)(0), // 103: talos.resource.definitions.enums.NethelpersVLANProtocol } var file_resource_definitions_network_network_proto_depIdxs = []int32{ - 65, // 0: talos.resource.definitions.network.AddressSpecSpec.address:type_name -> common.NetIPPrefix - 66, // 1: talos.resource.definitions.network.AddressSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 67, // 2: talos.resource.definitions.network.AddressSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope - 68, // 3: talos.resource.definitions.network.AddressSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 65, // 4: talos.resource.definitions.network.AddressStatusSpec.address:type_name -> common.NetIPPrefix - 69, // 5: talos.resource.definitions.network.AddressStatusSpec.local:type_name -> common.NetIP - 69, // 6: talos.resource.definitions.network.AddressStatusSpec.broadcast:type_name -> common.NetIP - 69, // 7: talos.resource.definitions.network.AddressStatusSpec.anycast:type_name -> common.NetIP - 69, // 8: talos.resource.definitions.network.AddressStatusSpec.multicast:type_name -> common.NetIP - 66, // 9: talos.resource.definitions.network.AddressStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 67, // 10: talos.resource.definitions.network.AddressStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope - 70, // 11: talos.resource.definitions.network.BondMasterSpec.mode:type_name -> talos.resource.definitions.enums.NethelpersBondMode - 71, // 12: talos.resource.definitions.network.BondMasterSpec.hash_policy:type_name -> talos.resource.definitions.enums.NethelpersBondXmitHashPolicy - 72, // 13: talos.resource.definitions.network.BondMasterSpec.lacp_rate:type_name -> talos.resource.definitions.enums.NethelpersLACPRate - 73, // 14: talos.resource.definitions.network.BondMasterSpec.arp_validate:type_name -> talos.resource.definitions.enums.NethelpersARPValidate - 74, // 15: talos.resource.definitions.network.BondMasterSpec.arp_all_targets:type_name -> talos.resource.definitions.enums.NethelpersARPAllTargets - 75, // 16: talos.resource.definitions.network.BondMasterSpec.primary_reselect:type_name -> talos.resource.definitions.enums.NethelpersPrimaryReselect - 76, // 17: talos.resource.definitions.network.BondMasterSpec.fail_over_mac:type_name -> talos.resource.definitions.enums.NethelpersFailOverMAC - 77, // 18: talos.resource.definitions.network.BondMasterSpec.ad_select:type_name -> talos.resource.definitions.enums.NethelpersADSelect - 69, // 19: talos.resource.definitions.network.BondMasterSpec.arpip_targets:type_name -> common.NetIP - 69, // 20: talos.resource.definitions.network.BondMasterSpec.nsip6_targets:type_name -> common.NetIP - 78, // 21: talos.resource.definitions.network.BondMasterSpec.adlacp_active:type_name -> talos.resource.definitions.enums.NethelpersADLACPActive - 51, // 22: talos.resource.definitions.network.BridgeMasterSpec.stp:type_name -> talos.resource.definitions.network.STPSpec + 66, // 0: talos.resource.definitions.network.AddressSpecSpec.address:type_name -> common.NetIPPrefix + 67, // 1: talos.resource.definitions.network.AddressSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 68, // 2: talos.resource.definitions.network.AddressSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope + 69, // 3: talos.resource.definitions.network.AddressSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 66, // 4: talos.resource.definitions.network.AddressStatusSpec.address:type_name -> common.NetIPPrefix + 70, // 5: talos.resource.definitions.network.AddressStatusSpec.local:type_name -> common.NetIP + 70, // 6: talos.resource.definitions.network.AddressStatusSpec.broadcast:type_name -> common.NetIP + 70, // 7: talos.resource.definitions.network.AddressStatusSpec.anycast:type_name -> common.NetIP + 70, // 8: talos.resource.definitions.network.AddressStatusSpec.multicast:type_name -> common.NetIP + 67, // 9: talos.resource.definitions.network.AddressStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 68, // 10: talos.resource.definitions.network.AddressStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope + 71, // 11: talos.resource.definitions.network.BondMasterSpec.mode:type_name -> talos.resource.definitions.enums.NethelpersBondMode + 72, // 12: talos.resource.definitions.network.BondMasterSpec.hash_policy:type_name -> talos.resource.definitions.enums.NethelpersBondXmitHashPolicy + 73, // 13: talos.resource.definitions.network.BondMasterSpec.lacp_rate:type_name -> talos.resource.definitions.enums.NethelpersLACPRate + 74, // 14: talos.resource.definitions.network.BondMasterSpec.arp_validate:type_name -> talos.resource.definitions.enums.NethelpersARPValidate + 75, // 15: talos.resource.definitions.network.BondMasterSpec.arp_all_targets:type_name -> talos.resource.definitions.enums.NethelpersARPAllTargets + 76, // 16: talos.resource.definitions.network.BondMasterSpec.primary_reselect:type_name -> talos.resource.definitions.enums.NethelpersPrimaryReselect + 77, // 17: talos.resource.definitions.network.BondMasterSpec.fail_over_mac:type_name -> talos.resource.definitions.enums.NethelpersFailOverMAC + 78, // 18: talos.resource.definitions.network.BondMasterSpec.ad_select:type_name -> talos.resource.definitions.enums.NethelpersADSelect + 70, // 19: talos.resource.definitions.network.BondMasterSpec.arpip_targets:type_name -> common.NetIP + 70, // 20: talos.resource.definitions.network.BondMasterSpec.nsip6_targets:type_name -> common.NetIP + 79, // 21: talos.resource.definitions.network.BondMasterSpec.adlacp_active:type_name -> talos.resource.definitions.enums.NethelpersADLACPActive + 52, // 22: talos.resource.definitions.network.BridgeMasterSpec.stp:type_name -> talos.resource.definitions.network.STPSpec 6, // 23: talos.resource.definitions.network.BridgeMasterSpec.vlan:type_name -> talos.resource.definitions.network.BridgeVLANSpec - 79, // 24: talos.resource.definitions.network.ClientIdentifierSpec.client_identifier:type_name -> talos.resource.definitions.enums.NethelpersClientIdentifier + 80, // 24: talos.resource.definitions.network.ClientIdentifierSpec.client_identifier:type_name -> talos.resource.definitions.enums.NethelpersClientIdentifier 7, // 25: talos.resource.definitions.network.DHCP4OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec 7, // 26: talos.resource.definitions.network.DHCP6OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec 14, // 27: talos.resource.definitions.network.EthernetSpecSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsSpec - 64, // 28: talos.resource.definitions.network.EthernetSpecSpec.features:type_name -> talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry + 65, // 28: talos.resource.definitions.network.EthernetSpecSpec.features:type_name -> talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry 11, // 29: talos.resource.definitions.network.EthernetSpecSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsSpec - 80, // 30: talos.resource.definitions.network.EthernetSpecSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode - 81, // 31: talos.resource.definitions.network.EthernetStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort - 82, // 32: talos.resource.definitions.network.EthernetStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex + 81, // 30: talos.resource.definitions.network.EthernetSpecSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode + 82, // 31: talos.resource.definitions.network.EthernetStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort + 83, // 32: talos.resource.definitions.network.EthernetStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex 15, // 33: talos.resource.definitions.network.EthernetStatusSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsStatus 13, // 34: talos.resource.definitions.network.EthernetStatusSpec.features:type_name -> talos.resource.definitions.network.EthernetFeatureStatus 12, // 35: talos.resource.definitions.network.EthernetStatusSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsStatus - 80, // 36: talos.resource.definitions.network.EthernetStatusSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode - 83, // 37: talos.resource.definitions.network.HostDNSConfigSpec.listen_addresses:type_name -> common.NetIPPort - 69, // 38: talos.resource.definitions.network.HostDNSConfigSpec.service_host_dns_address:type_name -> common.NetIP - 68, // 39: talos.resource.definitions.network.HostnameSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 84, // 40: talos.resource.definitions.network.LinkSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType - 3, // 41: talos.resource.definitions.network.LinkSpecSpec.bond_slave:type_name -> talos.resource.definitions.network.BondSlave - 5, // 42: talos.resource.definitions.network.LinkSpecSpec.bridge_slave:type_name -> talos.resource.definitions.network.BridgeSlave - 59, // 43: talos.resource.definitions.network.LinkSpecSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec - 2, // 44: talos.resource.definitions.network.LinkSpecSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec - 4, // 45: talos.resource.definitions.network.LinkSpecSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec - 63, // 46: talos.resource.definitions.network.LinkSpecSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec - 68, // 47: talos.resource.definitions.network.LinkSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 60, // 48: talos.resource.definitions.network.LinkSpecSpec.vrf_master:type_name -> talos.resource.definitions.network.VRFMasterSpec - 61, // 49: talos.resource.definitions.network.LinkSpecSpec.vrf_slave:type_name -> talos.resource.definitions.network.VRFSlave - 84, // 50: talos.resource.definitions.network.LinkStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType - 85, // 51: talos.resource.definitions.network.LinkStatusSpec.operational_state:type_name -> talos.resource.definitions.enums.NethelpersOperationalState - 81, // 52: talos.resource.definitions.network.LinkStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort - 82, // 53: talos.resource.definitions.network.LinkStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex - 59, // 54: talos.resource.definitions.network.LinkStatusSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec - 4, // 55: talos.resource.definitions.network.LinkStatusSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec - 2, // 56: talos.resource.definitions.network.LinkStatusSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec - 63, // 57: talos.resource.definitions.network.LinkStatusSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec - 60, // 58: talos.resource.definitions.network.LinkStatusSpec.vrf_master:type_name -> talos.resource.definitions.network.VRFMasterSpec - 65, // 59: talos.resource.definitions.network.NfTablesAddressMatch.include_subnets:type_name -> common.NetIPPrefix - 65, // 60: talos.resource.definitions.network.NfTablesAddressMatch.exclude_subnets:type_name -> common.NetIPPrefix - 86, // 61: talos.resource.definitions.network.NfTablesChainSpec.hook:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainHook - 87, // 62: talos.resource.definitions.network.NfTablesChainSpec.priority:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainPriority - 36, // 63: talos.resource.definitions.network.NfTablesChainSpec.rules:type_name -> talos.resource.definitions.network.NfTablesRule - 88, // 64: talos.resource.definitions.network.NfTablesChainSpec.policy:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict - 89, // 65: talos.resource.definitions.network.NfTablesConntrackStateMatch.states:type_name -> talos.resource.definitions.enums.NethelpersConntrackState - 90, // 66: talos.resource.definitions.network.NfTablesICMPTypeMatch.types:type_name -> talos.resource.definitions.enums.NethelpersICMPType - 91, // 67: talos.resource.definitions.network.NfTablesIfNameMatch.operator:type_name -> talos.resource.definitions.enums.NethelpersMatchOperator - 92, // 68: talos.resource.definitions.network.NfTablesLayer4Match.protocol:type_name -> talos.resource.definitions.enums.NethelpersProtocol - 35, // 69: talos.resource.definitions.network.NfTablesLayer4Match.match_source_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch - 35, // 70: talos.resource.definitions.network.NfTablesLayer4Match.match_destination_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch - 30, // 71: talos.resource.definitions.network.NfTablesLayer4Match.match_icmp_type:type_name -> talos.resource.definitions.network.NfTablesICMPTypeMatch - 42, // 72: talos.resource.definitions.network.NfTablesPortMatch.ranges:type_name -> talos.resource.definitions.network.PortRange - 31, // 73: talos.resource.definitions.network.NfTablesRule.match_o_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch - 88, // 74: talos.resource.definitions.network.NfTablesRule.verdict:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict - 34, // 75: talos.resource.definitions.network.NfTablesRule.match_mark:type_name -> talos.resource.definitions.network.NfTablesMark - 34, // 76: talos.resource.definitions.network.NfTablesRule.set_mark:type_name -> talos.resource.definitions.network.NfTablesMark - 26, // 77: talos.resource.definitions.network.NfTablesRule.match_source_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch - 26, // 78: talos.resource.definitions.network.NfTablesRule.match_destination_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch - 32, // 79: talos.resource.definitions.network.NfTablesRule.match_layer4:type_name -> talos.resource.definitions.network.NfTablesLayer4Match - 31, // 80: talos.resource.definitions.network.NfTablesRule.match_i_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch - 28, // 81: talos.resource.definitions.network.NfTablesRule.clamp_mss:type_name -> talos.resource.definitions.network.NfTablesClampMSS - 33, // 82: talos.resource.definitions.network.NfTablesRule.match_limit:type_name -> talos.resource.definitions.network.NfTablesLimitMatch - 29, // 83: talos.resource.definitions.network.NfTablesRule.match_conntrack_state:type_name -> talos.resource.definitions.network.NfTablesConntrackStateMatch - 65, // 84: talos.resource.definitions.network.NodeAddressFilterSpec.include_subnets:type_name -> common.NetIPPrefix - 65, // 85: talos.resource.definitions.network.NodeAddressFilterSpec.exclude_subnets:type_name -> common.NetIPPrefix - 93, // 86: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec.algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm - 65, // 87: talos.resource.definitions.network.NodeAddressSpec.addresses:type_name -> common.NetIPPrefix - 93, // 88: talos.resource.definitions.network.NodeAddressSpec.sort_algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm - 94, // 89: talos.resource.definitions.network.OperatorSpecSpec.operator:type_name -> talos.resource.definitions.enums.NetworkOperator - 8, // 90: talos.resource.definitions.network.OperatorSpecSpec.dhcp4:type_name -> talos.resource.definitions.network.DHCP4OperatorSpec - 9, // 91: talos.resource.definitions.network.OperatorSpecSpec.dhcp6:type_name -> talos.resource.definitions.network.DHCP6OperatorSpec - 58, // 92: talos.resource.definitions.network.OperatorSpecSpec.vip:type_name -> talos.resource.definitions.network.VIPOperatorSpec - 68, // 93: talos.resource.definitions.network.OperatorSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 0, // 94: talos.resource.definitions.network.PlatformConfigSpec.addresses:type_name -> talos.resource.definitions.network.AddressSpecSpec - 24, // 95: talos.resource.definitions.network.PlatformConfigSpec.links:type_name -> talos.resource.definitions.network.LinkSpecSpec - 47, // 96: talos.resource.definitions.network.PlatformConfigSpec.routes:type_name -> talos.resource.definitions.network.RouteSpecSpec - 20, // 97: talos.resource.definitions.network.PlatformConfigSpec.hostnames:type_name -> talos.resource.definitions.network.HostnameSpecSpec - 45, // 98: talos.resource.definitions.network.PlatformConfigSpec.resolvers:type_name -> talos.resource.definitions.network.ResolverSpecSpec - 54, // 99: talos.resource.definitions.network.PlatformConfigSpec.time_servers:type_name -> talos.resource.definitions.network.TimeServerSpecSpec - 40, // 100: talos.resource.definitions.network.PlatformConfigSpec.operators:type_name -> talos.resource.definitions.network.OperatorSpecSpec - 69, // 101: talos.resource.definitions.network.PlatformConfigSpec.external_ips:type_name -> common.NetIP - 43, // 102: talos.resource.definitions.network.PlatformConfigSpec.probes:type_name -> talos.resource.definitions.network.ProbeSpecSpec - 95, // 103: talos.resource.definitions.network.PlatformConfigSpec.metadata:type_name -> talos.resource.definitions.runtime.PlatformMetadataSpec - 96, // 104: talos.resource.definitions.network.ProbeSpecSpec.interval:type_name -> google.protobuf.Duration - 53, // 105: talos.resource.definitions.network.ProbeSpecSpec.tcp:type_name -> talos.resource.definitions.network.TCPProbeSpec - 68, // 106: talos.resource.definitions.network.ProbeSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 69, // 107: talos.resource.definitions.network.ResolverSpecSpec.dns_servers:type_name -> common.NetIP - 68, // 108: talos.resource.definitions.network.ResolverSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 69, // 109: talos.resource.definitions.network.ResolverStatusSpec.dns_servers:type_name -> common.NetIP - 66, // 110: talos.resource.definitions.network.RouteSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 65, // 111: talos.resource.definitions.network.RouteSpecSpec.destination:type_name -> common.NetIPPrefix - 69, // 112: talos.resource.definitions.network.RouteSpecSpec.source:type_name -> common.NetIP - 69, // 113: talos.resource.definitions.network.RouteSpecSpec.gateway:type_name -> common.NetIP - 97, // 114: talos.resource.definitions.network.RouteSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable - 67, // 115: talos.resource.definitions.network.RouteSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope - 98, // 116: talos.resource.definitions.network.RouteSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType - 99, // 117: talos.resource.definitions.network.RouteSpecSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol - 68, // 118: talos.resource.definitions.network.RouteSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 66, // 119: talos.resource.definitions.network.RouteStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 65, // 120: talos.resource.definitions.network.RouteStatusSpec.destination:type_name -> common.NetIPPrefix - 69, // 121: talos.resource.definitions.network.RouteStatusSpec.source:type_name -> common.NetIP - 69, // 122: talos.resource.definitions.network.RouteStatusSpec.gateway:type_name -> common.NetIP - 97, // 123: talos.resource.definitions.network.RouteStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable - 67, // 124: talos.resource.definitions.network.RouteStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope - 98, // 125: talos.resource.definitions.network.RouteStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType - 99, // 126: talos.resource.definitions.network.RouteStatusSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol - 66, // 127: talos.resource.definitions.network.RoutingRuleSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 65, // 128: talos.resource.definitions.network.RoutingRuleSpecSpec.src:type_name -> common.NetIPPrefix - 65, // 129: talos.resource.definitions.network.RoutingRuleSpecSpec.dst:type_name -> common.NetIPPrefix - 97, // 130: talos.resource.definitions.network.RoutingRuleSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable - 100, // 131: talos.resource.definitions.network.RoutingRuleSpecSpec.action:type_name -> talos.resource.definitions.enums.NethelpersRoutingRuleAction - 68, // 132: talos.resource.definitions.network.RoutingRuleSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 66, // 133: talos.resource.definitions.network.RoutingRuleStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily - 65, // 134: talos.resource.definitions.network.RoutingRuleStatusSpec.src:type_name -> common.NetIPPrefix - 65, // 135: talos.resource.definitions.network.RoutingRuleStatusSpec.dst:type_name -> common.NetIPPrefix - 97, // 136: talos.resource.definitions.network.RoutingRuleStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable - 100, // 137: talos.resource.definitions.network.RoutingRuleStatusSpec.action:type_name -> talos.resource.definitions.enums.NethelpersRoutingRuleAction - 96, // 138: talos.resource.definitions.network.TCPProbeSpec.timeout:type_name -> google.protobuf.Duration - 68, // 139: talos.resource.definitions.network.TimeServerSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer - 69, // 140: talos.resource.definitions.network.VIPOperatorSpec.ip:type_name -> common.NetIP - 56, // 141: talos.resource.definitions.network.VIPOperatorSpec.equinix_metal:type_name -> talos.resource.definitions.network.VIPEquinixMetalSpec - 57, // 142: talos.resource.definitions.network.VIPOperatorSpec.h_cloud:type_name -> talos.resource.definitions.network.VIPHCloudSpec - 101, // 143: talos.resource.definitions.network.VLANSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersVLANProtocol - 97, // 144: talos.resource.definitions.network.VRFMasterSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable - 96, // 145: talos.resource.definitions.network.WireguardPeer.persistent_keepalive_interval:type_name -> google.protobuf.Duration - 65, // 146: talos.resource.definitions.network.WireguardPeer.allowed_ips:type_name -> common.NetIPPrefix - 62, // 147: talos.resource.definitions.network.WireguardSpec.peers:type_name -> talos.resource.definitions.network.WireguardPeer - 148, // [148:148] is the sub-list for method output_type - 148, // [148:148] is the sub-list for method input_type - 148, // [148:148] is the sub-list for extension type_name - 148, // [148:148] is the sub-list for extension extendee - 0, // [0:148] is the sub-list for field type_name + 81, // 36: talos.resource.definitions.network.EthernetStatusSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode + 84, // 37: talos.resource.definitions.network.HTTPProbeSpec.url:type_name -> common.URL + 85, // 38: talos.resource.definitions.network.HTTPProbeSpec.timeout:type_name -> google.protobuf.Duration + 86, // 39: talos.resource.definitions.network.HostDNSConfigSpec.listen_addresses:type_name -> common.NetIPPort + 70, // 40: talos.resource.definitions.network.HostDNSConfigSpec.service_host_dns_address:type_name -> common.NetIP + 69, // 41: talos.resource.definitions.network.HostnameSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 87, // 42: talos.resource.definitions.network.LinkSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType + 3, // 43: talos.resource.definitions.network.LinkSpecSpec.bond_slave:type_name -> talos.resource.definitions.network.BondSlave + 5, // 44: talos.resource.definitions.network.LinkSpecSpec.bridge_slave:type_name -> talos.resource.definitions.network.BridgeSlave + 60, // 45: talos.resource.definitions.network.LinkSpecSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec + 2, // 46: talos.resource.definitions.network.LinkSpecSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec + 4, // 47: talos.resource.definitions.network.LinkSpecSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec + 64, // 48: talos.resource.definitions.network.LinkSpecSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec + 69, // 49: talos.resource.definitions.network.LinkSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 61, // 50: talos.resource.definitions.network.LinkSpecSpec.vrf_master:type_name -> talos.resource.definitions.network.VRFMasterSpec + 62, // 51: talos.resource.definitions.network.LinkSpecSpec.vrf_slave:type_name -> talos.resource.definitions.network.VRFSlave + 87, // 52: talos.resource.definitions.network.LinkStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType + 88, // 53: talos.resource.definitions.network.LinkStatusSpec.operational_state:type_name -> talos.resource.definitions.enums.NethelpersOperationalState + 82, // 54: talos.resource.definitions.network.LinkStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort + 83, // 55: talos.resource.definitions.network.LinkStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex + 60, // 56: talos.resource.definitions.network.LinkStatusSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec + 4, // 57: talos.resource.definitions.network.LinkStatusSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec + 2, // 58: talos.resource.definitions.network.LinkStatusSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec + 64, // 59: talos.resource.definitions.network.LinkStatusSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec + 61, // 60: talos.resource.definitions.network.LinkStatusSpec.vrf_master:type_name -> talos.resource.definitions.network.VRFMasterSpec + 66, // 61: talos.resource.definitions.network.NfTablesAddressMatch.include_subnets:type_name -> common.NetIPPrefix + 66, // 62: talos.resource.definitions.network.NfTablesAddressMatch.exclude_subnets:type_name -> common.NetIPPrefix + 89, // 63: talos.resource.definitions.network.NfTablesChainSpec.hook:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainHook + 90, // 64: talos.resource.definitions.network.NfTablesChainSpec.priority:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainPriority + 37, // 65: talos.resource.definitions.network.NfTablesChainSpec.rules:type_name -> talos.resource.definitions.network.NfTablesRule + 91, // 66: talos.resource.definitions.network.NfTablesChainSpec.policy:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict + 92, // 67: talos.resource.definitions.network.NfTablesConntrackStateMatch.states:type_name -> talos.resource.definitions.enums.NethelpersConntrackState + 93, // 68: talos.resource.definitions.network.NfTablesICMPTypeMatch.types:type_name -> talos.resource.definitions.enums.NethelpersICMPType + 94, // 69: talos.resource.definitions.network.NfTablesIfNameMatch.operator:type_name -> talos.resource.definitions.enums.NethelpersMatchOperator + 95, // 70: talos.resource.definitions.network.NfTablesLayer4Match.protocol:type_name -> talos.resource.definitions.enums.NethelpersProtocol + 36, // 71: talos.resource.definitions.network.NfTablesLayer4Match.match_source_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch + 36, // 72: talos.resource.definitions.network.NfTablesLayer4Match.match_destination_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch + 31, // 73: talos.resource.definitions.network.NfTablesLayer4Match.match_icmp_type:type_name -> talos.resource.definitions.network.NfTablesICMPTypeMatch + 43, // 74: talos.resource.definitions.network.NfTablesPortMatch.ranges:type_name -> talos.resource.definitions.network.PortRange + 32, // 75: talos.resource.definitions.network.NfTablesRule.match_o_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch + 91, // 76: talos.resource.definitions.network.NfTablesRule.verdict:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict + 35, // 77: talos.resource.definitions.network.NfTablesRule.match_mark:type_name -> talos.resource.definitions.network.NfTablesMark + 35, // 78: talos.resource.definitions.network.NfTablesRule.set_mark:type_name -> talos.resource.definitions.network.NfTablesMark + 27, // 79: talos.resource.definitions.network.NfTablesRule.match_source_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch + 27, // 80: talos.resource.definitions.network.NfTablesRule.match_destination_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch + 33, // 81: talos.resource.definitions.network.NfTablesRule.match_layer4:type_name -> talos.resource.definitions.network.NfTablesLayer4Match + 32, // 82: talos.resource.definitions.network.NfTablesRule.match_i_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch + 29, // 83: talos.resource.definitions.network.NfTablesRule.clamp_mss:type_name -> talos.resource.definitions.network.NfTablesClampMSS + 34, // 84: talos.resource.definitions.network.NfTablesRule.match_limit:type_name -> talos.resource.definitions.network.NfTablesLimitMatch + 30, // 85: talos.resource.definitions.network.NfTablesRule.match_conntrack_state:type_name -> talos.resource.definitions.network.NfTablesConntrackStateMatch + 66, // 86: talos.resource.definitions.network.NodeAddressFilterSpec.include_subnets:type_name -> common.NetIPPrefix + 66, // 87: talos.resource.definitions.network.NodeAddressFilterSpec.exclude_subnets:type_name -> common.NetIPPrefix + 96, // 88: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec.algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm + 66, // 89: talos.resource.definitions.network.NodeAddressSpec.addresses:type_name -> common.NetIPPrefix + 96, // 90: talos.resource.definitions.network.NodeAddressSpec.sort_algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm + 97, // 91: talos.resource.definitions.network.OperatorSpecSpec.operator:type_name -> talos.resource.definitions.enums.NetworkOperator + 8, // 92: talos.resource.definitions.network.OperatorSpecSpec.dhcp4:type_name -> talos.resource.definitions.network.DHCP4OperatorSpec + 9, // 93: talos.resource.definitions.network.OperatorSpecSpec.dhcp6:type_name -> talos.resource.definitions.network.DHCP6OperatorSpec + 59, // 94: talos.resource.definitions.network.OperatorSpecSpec.vip:type_name -> talos.resource.definitions.network.VIPOperatorSpec + 69, // 95: talos.resource.definitions.network.OperatorSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 0, // 96: talos.resource.definitions.network.PlatformConfigSpec.addresses:type_name -> talos.resource.definitions.network.AddressSpecSpec + 25, // 97: talos.resource.definitions.network.PlatformConfigSpec.links:type_name -> talos.resource.definitions.network.LinkSpecSpec + 48, // 98: talos.resource.definitions.network.PlatformConfigSpec.routes:type_name -> talos.resource.definitions.network.RouteSpecSpec + 21, // 99: talos.resource.definitions.network.PlatformConfigSpec.hostnames:type_name -> talos.resource.definitions.network.HostnameSpecSpec + 46, // 100: talos.resource.definitions.network.PlatformConfigSpec.resolvers:type_name -> talos.resource.definitions.network.ResolverSpecSpec + 55, // 101: talos.resource.definitions.network.PlatformConfigSpec.time_servers:type_name -> talos.resource.definitions.network.TimeServerSpecSpec + 41, // 102: talos.resource.definitions.network.PlatformConfigSpec.operators:type_name -> talos.resource.definitions.network.OperatorSpecSpec + 70, // 103: talos.resource.definitions.network.PlatformConfigSpec.external_ips:type_name -> common.NetIP + 44, // 104: talos.resource.definitions.network.PlatformConfigSpec.probes:type_name -> talos.resource.definitions.network.ProbeSpecSpec + 98, // 105: talos.resource.definitions.network.PlatformConfigSpec.metadata:type_name -> talos.resource.definitions.runtime.PlatformMetadataSpec + 85, // 106: talos.resource.definitions.network.ProbeSpecSpec.interval:type_name -> google.protobuf.Duration + 54, // 107: talos.resource.definitions.network.ProbeSpecSpec.tcp:type_name -> talos.resource.definitions.network.TCPProbeSpec + 69, // 108: talos.resource.definitions.network.ProbeSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 18, // 109: talos.resource.definitions.network.ProbeSpecSpec.http:type_name -> talos.resource.definitions.network.HTTPProbeSpec + 70, // 110: talos.resource.definitions.network.ResolverSpecSpec.dns_servers:type_name -> common.NetIP + 69, // 111: talos.resource.definitions.network.ResolverSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 70, // 112: talos.resource.definitions.network.ResolverStatusSpec.dns_servers:type_name -> common.NetIP + 67, // 113: talos.resource.definitions.network.RouteSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 66, // 114: talos.resource.definitions.network.RouteSpecSpec.destination:type_name -> common.NetIPPrefix + 70, // 115: talos.resource.definitions.network.RouteSpecSpec.source:type_name -> common.NetIP + 70, // 116: talos.resource.definitions.network.RouteSpecSpec.gateway:type_name -> common.NetIP + 99, // 117: talos.resource.definitions.network.RouteSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable + 68, // 118: talos.resource.definitions.network.RouteSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope + 100, // 119: talos.resource.definitions.network.RouteSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType + 101, // 120: talos.resource.definitions.network.RouteSpecSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol + 69, // 121: talos.resource.definitions.network.RouteSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 67, // 122: talos.resource.definitions.network.RouteStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 66, // 123: talos.resource.definitions.network.RouteStatusSpec.destination:type_name -> common.NetIPPrefix + 70, // 124: talos.resource.definitions.network.RouteStatusSpec.source:type_name -> common.NetIP + 70, // 125: talos.resource.definitions.network.RouteStatusSpec.gateway:type_name -> common.NetIP + 99, // 126: talos.resource.definitions.network.RouteStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable + 68, // 127: talos.resource.definitions.network.RouteStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope + 100, // 128: talos.resource.definitions.network.RouteStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType + 101, // 129: talos.resource.definitions.network.RouteStatusSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol + 67, // 130: talos.resource.definitions.network.RoutingRuleSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 66, // 131: talos.resource.definitions.network.RoutingRuleSpecSpec.src:type_name -> common.NetIPPrefix + 66, // 132: talos.resource.definitions.network.RoutingRuleSpecSpec.dst:type_name -> common.NetIPPrefix + 99, // 133: talos.resource.definitions.network.RoutingRuleSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable + 102, // 134: talos.resource.definitions.network.RoutingRuleSpecSpec.action:type_name -> talos.resource.definitions.enums.NethelpersRoutingRuleAction + 69, // 135: talos.resource.definitions.network.RoutingRuleSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 67, // 136: talos.resource.definitions.network.RoutingRuleStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily + 66, // 137: talos.resource.definitions.network.RoutingRuleStatusSpec.src:type_name -> common.NetIPPrefix + 66, // 138: talos.resource.definitions.network.RoutingRuleStatusSpec.dst:type_name -> common.NetIPPrefix + 99, // 139: talos.resource.definitions.network.RoutingRuleStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable + 102, // 140: talos.resource.definitions.network.RoutingRuleStatusSpec.action:type_name -> talos.resource.definitions.enums.NethelpersRoutingRuleAction + 85, // 141: talos.resource.definitions.network.TCPProbeSpec.timeout:type_name -> google.protobuf.Duration + 69, // 142: talos.resource.definitions.network.TimeServerSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer + 70, // 143: talos.resource.definitions.network.VIPOperatorSpec.ip:type_name -> common.NetIP + 57, // 144: talos.resource.definitions.network.VIPOperatorSpec.equinix_metal:type_name -> talos.resource.definitions.network.VIPEquinixMetalSpec + 58, // 145: talos.resource.definitions.network.VIPOperatorSpec.h_cloud:type_name -> talos.resource.definitions.network.VIPHCloudSpec + 103, // 146: talos.resource.definitions.network.VLANSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersVLANProtocol + 99, // 147: talos.resource.definitions.network.VRFMasterSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable + 85, // 148: talos.resource.definitions.network.WireguardPeer.persistent_keepalive_interval:type_name -> google.protobuf.Duration + 66, // 149: talos.resource.definitions.network.WireguardPeer.allowed_ips:type_name -> common.NetIPPrefix + 63, // 150: talos.resource.definitions.network.WireguardSpec.peers:type_name -> talos.resource.definitions.network.WireguardPeer + 151, // [151:151] is the sub-list for method output_type + 151, // [151:151] is the sub-list for method input_type + 151, // [151:151] is the sub-list for extension type_name + 151, // [151:151] is the sub-list for extension extendee + 0, // [0:151] is the sub-list for field type_name } func init() { file_resource_definitions_network_network_proto_init() } @@ -5884,7 +5957,7 @@ func file_resource_definitions_network_network_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_resource_definitions_network_network_proto_rawDesc), len(file_resource_definitions_network_network_proto_rawDesc)), NumEnums: 0, - NumMessages: 65, + NumMessages: 66, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/machinery/api/resource/definitions/network/network_vtproto.pb.go b/pkg/machinery/api/resource/definitions/network/network_vtproto.pb.go index cb6f1ebb5..194a7219e 100644 --- a/pkg/machinery/api/resource/definitions/network/network_vtproto.pb.go +++ b/pkg/machinery/api/resource/definitions/network/network_vtproto.pb.go @@ -1541,6 +1541,71 @@ func (m *EthernetStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *HTTPProbeSpec) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPProbeSpec) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HTTPProbeSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timeout != nil { + size, err := (*durationpb.Duration)(m.Timeout).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Url != nil { + if vtmsg, ok := interface{}(m.Url).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.Url) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *HardwareAddrSpec) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -3573,6 +3638,16 @@ func (m *ProbeSpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Http != nil { + size, err := m.Http.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } if m.ConfigLayer != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConfigLayer)) i-- @@ -5707,6 +5782,30 @@ func (m *EthernetStatusSpec) SizeVT() (n int) { return n } +func (m *HTTPProbeSpec) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Url != nil { + if size, ok := interface{}(m.Url).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.Url) + } + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timeout != nil { + l = (*durationpb.Duration)(m.Timeout).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *HardwareAddrSpec) SizeVT() (n int) { if m == nil { return 0 @@ -6522,6 +6621,10 @@ func (m *ProbeSpecSpec) SizeVT() (n int) { if m.ConfigLayer != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.ConfigLayer)) } + if m.Http != nil { + l = m.Http.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } n += len(m.unknownFields) return n } @@ -10925,6 +11028,137 @@ func (m *EthernetStatusSpec) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *HTTPProbeSpec) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPProbeSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPProbeSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Url == nil { + m.Url = &common.URL{} + } + if unmarshal, ok := interface{}(m.Url).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Url); err != nil { + return err + } + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timeout == nil { + m.Timeout = &durationpb1.Duration{} + } + if err := (*durationpb.Duration)(m.Timeout).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *HardwareAddrSpec) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -16033,6 +16267,42 @@ func (m *ProbeSpecSpec) UnmarshalVT(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Http == nil { + m.Http = &HTTPProbeSpec{} + } + if err := m.Http.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) diff --git a/pkg/machinery/config/config/network.go b/pkg/machinery/config/config/network.go index 0e3f4b075..a3a88a2dc 100644 --- a/pkg/machinery/config/config/network.go +++ b/pkg/machinery/config/config/network.go @@ -11,6 +11,7 @@ import ( "github.com/siderolabs/gen/optional" "github.com/siderolabs/talos/pkg/machinery/cel" + "github.com/siderolabs/talos/pkg/machinery/config/types/meta" "github.com/siderolabs/talos/pkg/machinery/nethelpers" ) @@ -388,3 +389,10 @@ type NetworkHostDNSConfig interface { ForwardKubeDNSToHost() bool ResolveMemberNames() bool } + +// NetworkHTTPProbeConfig defines an HTTP probe configuration. +type NetworkHTTPProbeConfig interface { + NetworkCommonProbeConfig + URL() meta.URL + Timeout() time.Duration +} diff --git a/pkg/machinery/config/schemas/config.schema.json b/pkg/machinery/config/schemas/config.schema.json index 9e22defa9..1d0c01d3c 100644 --- a/pkg/machinery/config/schemas/config.schema.json +++ b/pkg/machinery/config/schemas/config.schema.json @@ -2226,6 +2226,75 @@ ], "description": "HCloudVIPConfig is a config document to configure virtual IP using Hetzner Cloud APIs for announcement.\\nVirtual IP configuration should be used only on controlplane nodes to provide virtual IP for Kubernetes API server.\\nAny other use cases are not supported and may lead to unexpected behavior.\\nVirtual IP will be announced from only one node at a time using Hetzner Cloud APIs.\\n" }, + "network.HTTPProbeConfigV1Alpha1": { + "properties": { + "apiVersion": { + "enum": [ + "v1alpha1" + ], + "title": "apiVersion", + "description": "apiVersion is the API version of the resource.\n", + "markdownDescription": "apiVersion is the API version of the resource.", + "x-intellij-html-description": "\u003cp\u003eapiVersion is the API version of the resource.\u003c/p\u003e\n" + }, + "kind": { + "enum": [ + "HTTPProbeConfig" + ], + "title": "kind", + "description": "kind is the kind of the resource.\n", + "markdownDescription": "kind is the kind of the resource.", + "x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n" + }, + "name": { + "type": "string", + "title": "name", + "description": "Name of the probe.\n", + "markdownDescription": "Name of the probe.", + "x-intellij-html-description": "\u003cp\u003eName of the probe.\u003c/p\u003e\n" + }, + "interval": { + "type": "string", + "pattern": "^[-+]?(((\\d+(\\.\\d*)?|\\d*(\\.\\d+)+)([nuµm]?s|m|h))|0)+$", + "title": "interval", + "description": "Interval between probe attempts.\nDefaults to 1s.\n", + "markdownDescription": "Interval between probe attempts.\nDefaults to 1s.", + "x-intellij-html-description": "\u003cp\u003eInterval between probe attempts.\nDefaults to 1s.\u003c/p\u003e\n" + }, + "failureThreshold": { + "type": "integer", + "title": "failureThreshold", + "description": "Number of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).\n", + "markdownDescription": "Number of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).", + "x-intellij-html-description": "\u003cp\u003eNumber of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).\u003c/p\u003e\n" + }, + "url": { + "type": "string", + "pattern": "^(http|https)://", + "title": "url", + "description": "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.\n", + "markdownDescription": "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.", + "x-intellij-html-description": "\u003cp\u003eHTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.\u003c/p\u003e\n" + }, + "timeout": { + "type": "string", + "pattern": "^[-+]?(((\\d+(\\.\\d*)?|\\d*(\\.\\d+)+)([nuµm]?s|m|h))|0)+$", + "title": "timeout", + "description": "Timeout for the probe.\nDefaults to 10s.\n", + "markdownDescription": "Timeout for the probe.\nDefaults to 10s.", + "x-intellij-html-description": "\u003cp\u003eTimeout for the probe.\nDefaults to 10s.\u003c/p\u003e\n" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "url" + ], + "description": "HTTPProbeConfig is a config document to configure network HTTP connectivity probes." + }, "network.HostDNSConfig": { "properties": { "enabled": { @@ -5791,6 +5860,9 @@ { "$ref": "#/$defs/network.HostnameConfigV1Alpha1" }, + { + "$ref": "#/$defs/network.HTTPProbeConfigV1Alpha1" + }, { "$ref": "#/$defs/network.KubeSpanConfigV1Alpha1" }, diff --git a/pkg/machinery/config/types/network/deep_copy.generated.go b/pkg/machinery/config/types/network/deep_copy.generated.go index 921c6b5da..990a34f29 100644 --- a/pkg/machinery/config/types/network/deep_copy.generated.go +++ b/pkg/machinery/config/types/network/deep_copy.generated.go @@ -2,12 +2,13 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -// Code generated by "deep-copy -type BlackholeRouteConfigV1Alpha1 -type BondConfigV1Alpha1 -type BridgeConfigV1Alpha1 -type VRFConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubeSpanConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type ResolverConfigV1Alpha1 -type RoutingRuleConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type TCPProbeConfigV1Alpha1 -type TimeSyncConfigV1Alpha1 -type VLANConfigV1Alpha1 -type WireguardConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT. +// Code generated by "deep-copy -type BlackholeRouteConfigV1Alpha1 -type BondConfigV1Alpha1 -type BridgeConfigV1Alpha1 -type VRFConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HTTPProbeConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubeSpanConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type ResolverConfigV1Alpha1 -type RoutingRuleConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type TCPProbeConfigV1Alpha1 -type TimeSyncConfigV1Alpha1 -type VLANConfigV1Alpha1 -type WireguardConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT. package network import ( "net/netip" + "net/url" "github.com/siderolabs/talos/pkg/machinery/nethelpers" ) @@ -402,6 +403,20 @@ func (o *HCloudVIPConfigV1Alpha1) DeepCopy() *HCloudVIPConfigV1Alpha1 { return &cp } +// DeepCopy generates a deep copy of *HTTPProbeConfigV1Alpha1. +func (o *HTTPProbeConfigV1Alpha1) DeepCopy() *HTTPProbeConfigV1Alpha1 { + var cp HTTPProbeConfigV1Alpha1 = *o + if o.HTTPEndpoint.URL != nil { + cp.HTTPEndpoint.URL = new(url.URL) + *cp.HTTPEndpoint.URL = *o.HTTPEndpoint.URL + if o.HTTPEndpoint.URL.User != nil { + cp.HTTPEndpoint.URL.User = new(url.Userinfo) + *cp.HTTPEndpoint.URL.User = *o.HTTPEndpoint.URL.User + } + } + return &cp +} + // DeepCopy generates a deep copy of *HostnameConfigV1Alpha1. func (o *HostnameConfigV1Alpha1) DeepCopy() *HostnameConfigV1Alpha1 { var cp HostnameConfigV1Alpha1 = *o diff --git a/pkg/machinery/config/types/network/http_probe.go b/pkg/machinery/config/types/network/http_probe.go new file mode 100644 index 000000000..b0e775cb5 --- /dev/null +++ b/pkg/machinery/config/types/network/http_probe.go @@ -0,0 +1,165 @@ +// 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 network + +//docgen:jsonschema + +import ( + "errors" + "fmt" + "net/url" + "time" + + "github.com/siderolabs/gen/ensure" + + "github.com/siderolabs/talos/pkg/machinery/config/config" + "github.com/siderolabs/talos/pkg/machinery/config/internal/registry" + "github.com/siderolabs/talos/pkg/machinery/config/types/meta" + "github.com/siderolabs/talos/pkg/machinery/config/validation" +) + +// HTTPProbeKind is a HTTPProbe config document kind. +const HTTPProbeKind = "HTTPProbeConfig" + +func init() { + registry.Register(HTTPProbeKind, func(version string) config.Document { + switch version { + case "v1alpha1": //nolint:goconst + return &HTTPProbeConfigV1Alpha1{} + default: + return nil + } + }) +} + +// Check interfaces. +var ( + _ config.NamedDocument = &HTTPProbeConfigV1Alpha1{} + _ config.Validator = &HTTPProbeConfigV1Alpha1{} + _ config.NetworkHTTPProbeConfig = &HTTPProbeConfigV1Alpha1{} +) + +// HTTPProbeConfigV1Alpha1 is a config document to configure network HTTP connectivity probes. +// +// examples: +// - value: exampleHTTPProbeConfigV1Alpha1() +// alias: HTTPProbeConfig +// schemaRoot: true +// schemaMeta: v1alpha1/HTTPProbeConfig +type HTTPProbeConfigV1Alpha1 struct { + meta.Meta `yaml:",inline"` + + // description: | + // Name of the probe. + // examples: + // - value: > + // "http-check" + // schemaRequired: true + MetaName string `yaml:"name"` + //nolint:embeddedstructfieldcheck + CommonProbeConfig `yaml:",inline"` + // description: | + // HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code. + // Probe does not follow redirects. + // examples: + // - value: > + // "https://example.com" + // schema: + // type: string + // pattern: "^(http|https)://" + // schemaRequired: true + HTTPEndpoint meta.URL `yaml:"url"` + // description: | + // Timeout for the probe. + // Defaults to 10s. + // examples: + // - value: > + // 10 * time.Second + // schema: + // type: string + // pattern: ^[-+]?(((\d+(\.\d*)?|\d*(\.\d+)+)([nuµm]?s|m|h))|0)+$ + HTTPTimeout time.Duration `yaml:"timeout,omitempty"` +} + +// NewHTTPProbeConfigV1Alpha1 creates a new HTTPProbeConfigV1Alpha1 config document. +func NewHTTPProbeConfigV1Alpha1(name string) *HTTPProbeConfigV1Alpha1 { + return &HTTPProbeConfigV1Alpha1{ + Meta: meta.Meta{ + MetaKind: HTTPProbeKind, + MetaAPIVersion: "v1alpha1", + }, + MetaName: name, + } +} + +// Name implements config.NamedDocument interface. +func (p *HTTPProbeConfigV1Alpha1) Name() string { + return p.MetaName +} + +// Clone implements config.Document interface. +func (p *HTTPProbeConfigV1Alpha1) Clone() config.Document { + return p.DeepCopy() +} + +// Validate implements config.Validator interface. +func (p *HTTPProbeConfigV1Alpha1) Validate(validation.RuntimeMode, ...validation.Option) ([]string, error) { + var ( + errs error + warnings []string //nolint:prealloc + ) + + if p.MetaName == "" { + errs = errors.Join(errs, errors.New("probe name is required")) + } + + if p.HTTPEndpoint.URL == nil { + errs = errors.Join(errs, errors.New("HTTP probe URL is required")) + } else { + if p.HTTPEndpoint.URL.Scheme != "http" && p.HTTPEndpoint.URL.Scheme != "https" { + errs = errors.Join(errs, fmt.Errorf("HTTP probe URL scheme must be http or https, got %q", p.HTTPEndpoint.URL.Scheme)) + } else if p.HTTPEndpoint.URL.Opaque != "" || p.HTTPEndpoint.URL.Hostname() == "" { + errs = errors.Join(errs, errors.New("HTTP probe URL must be an absolute http or https URL with a non-empty host")) + } + } + + if p.HTTPTimeout < 0 { + errs = errors.Join(errs, fmt.Errorf("HTTP probe timeout cannot be negative: %s", p.HTTPTimeout)) + } + + extraWarnings, extraErrs := p.CommonProbeConfig.Validate() + errs = errors.Join(errs, extraErrs) + + warnings = append(warnings, extraWarnings...) + + return warnings, errs +} + +func exampleHTTPProbeConfigV1Alpha1() *HTTPProbeConfigV1Alpha1 { + cfg := NewHTTPProbeConfigV1Alpha1("http-check") + + cfg.CommonProbeConfig = CommonProbeConfig{ + ProbeInterval: time.Second, + ProbeFailureThreshold: 3, + } + cfg.HTTPEndpoint.URL = ensure.Value(url.Parse("https://example.com")) + cfg.HTTPTimeout = 10 * time.Second + + return cfg +} + +// URL implements config.NetworkHTTPProbeConfig interface. +func (p *HTTPProbeConfigV1Alpha1) URL() meta.URL { + return p.HTTPEndpoint +} + +// Timeout implements config.NetworkHTTPProbeConfig interface. +func (p *HTTPProbeConfigV1Alpha1) Timeout() time.Duration { + if p.HTTPTimeout == 0 { + return 10 * time.Second + } + + return p.HTTPTimeout +} diff --git a/pkg/machinery/config/types/network/http_probe_test.go b/pkg/machinery/config/types/network/http_probe_test.go new file mode 100644 index 000000000..47af3ea3c --- /dev/null +++ b/pkg/machinery/config/types/network/http_probe_test.go @@ -0,0 +1,256 @@ +// 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 network_test + +import ( + _ "embed" + "net/url" + "testing" + "time" + + "github.com/siderolabs/gen/ensure" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/siderolabs/talos/pkg/machinery/config/configloader" + "github.com/siderolabs/talos/pkg/machinery/config/encoder" + "github.com/siderolabs/talos/pkg/machinery/config/types/meta" + "github.com/siderolabs/talos/pkg/machinery/config/types/network" +) + +//go:embed testdata/httpprobeconfig.yaml +var expectedHTTPProbeConfigDocument []byte + +const exampleHTTPURL = "https://example.com" + +func TestHTTPProbeConfigMarshalStability(t *testing.T) { + t.Parallel() + + cfg := network.NewHTTPProbeConfigV1Alpha1("http-check") + cfg.CommonProbeConfig = network.CommonProbeConfig{ + ProbeInterval: time.Second, + ProbeFailureThreshold: 3, + } + cfg.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + cfg.HTTPTimeout = 10 * time.Second + + marshaled, err := encoder.NewEncoder(cfg, encoder.WithComments(encoder.CommentsDisabled)).Encode() + require.NoError(t, err) + + t.Log(string(marshaled)) + + assert.Equal(t, expectedHTTPProbeConfigDocument, marshaled) +} + +//nolint:dupl +func TestHTTPProbeConfigUnmarshal(t *testing.T) { + t.Parallel() + + provider, err := configloader.NewFromBytes(expectedHTTPProbeConfigDocument) + require.NoError(t, err) + + docs := provider.Documents() + require.Len(t, docs, 1) + + assert.Equal(t, &network.HTTPProbeConfigV1Alpha1{ + Meta: meta.Meta{ + MetaAPIVersion: "v1alpha1", + MetaKind: network.HTTPProbeKind, + }, + MetaName: "http-check", + CommonProbeConfig: network.CommonProbeConfig{ + ProbeInterval: time.Second, + ProbeFailureThreshold: 3, + }, + HTTPEndpoint: meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))}, + HTTPTimeout: 10 * time.Second, + }, docs[0]) +} + +func TestHTTPProbeConfigValidate(t *testing.T) { + t.Parallel() + + for _, test := range []struct { + name string + cfg func() *network.HTTPProbeConfigV1Alpha1 + + expectedError string + expectedWarnings []string + }{ + { + name: "valid config", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("test-probe") + c.CommonProbeConfig = network.CommonProbeConfig{ + ProbeInterval: time.Second, + ProbeFailureThreshold: 3, + } + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + + return c + }, + }, + { + name: "valid http url", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("test-probe") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse("http://proxy.example.com:3128/health"))} + + return c + }, + }, + { + name: "missing name", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + + return c + }, + expectedError: "probe name is required", + }, + { + name: "missing URL", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("probe44") + + return c + }, + expectedError: "HTTP probe URL is required", + }, + { + name: "invalid scheme", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("probe-scheme") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse("ftp://example.com"))} + + return c + }, + expectedError: `HTTP probe URL scheme must be http or https, got "ftp"`, + }, + { + name: "negative timeout", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("probe33") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + c.HTTPTimeout = -5 * time.Second + + return c + }, + expectedError: "HTTP probe timeout cannot be negative: -5s", + }, + { + name: "negative values", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("probe33") + c.CommonProbeConfig.ProbeFailureThreshold = -1 + c.CommonProbeConfig.ProbeInterval = -time.Second + c.HTTPTimeout = -5 * time.Second + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + + return c + }, + expectedError: "HTTP probe timeout cannot be negative: -5s\nprobe interval cannot be negative: -1s\nprobe failure threshold cannot be negative: -1", + }, + { + name: "empty", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + return network.NewHTTPProbeConfigV1Alpha1("") + }, + expectedError: "probe name is required\nHTTP probe URL is required", + }, + { + name: "url without host", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("no-host") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse("https://"))} + + return c + }, + expectedError: "HTTP probe URL must be an absolute http or https URL with a non-empty host", + }, + { + name: "opaque url", + cfg: func() *network.HTTPProbeConfigV1Alpha1 { + c := network.NewHTTPProbeConfigV1Alpha1("opaque") + c.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse("http:opaque-url"))} + + return c + }, + expectedError: "HTTP probe URL must be an absolute http or https URL with a non-empty host", + }, + } { + t.Run(test.name, func(t *testing.T) { + t.Parallel() + + warnings, err := test.cfg().Validate(validationMode{}) + + assert.Equal(t, test.expectedWarnings, warnings) + + if test.expectedError != "" { + assert.EqualError(t, err, test.expectedError) + } else { + assert.NoError(t, err) + } + }) + } +} + +func TestHTTPProbeConfigMethods(t *testing.T) { + t.Parallel() + + t.Run("URL", func(t *testing.T) { + t.Parallel() + + cfg := network.NewHTTPProbeConfigV1Alpha1("test") + cfg.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + + assert.Equal(t, meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))}, cfg.URL()) + }) + + t.Run("Name", func(t *testing.T) { + t.Parallel() + + probeName := "my-probe" + cfg := network.NewHTTPProbeConfigV1Alpha1(probeName) + + assert.Equal(t, probeName, cfg.Name()) + }) + + t.Run("Timeout with default", func(t *testing.T) { + t.Parallel() + + cfg := network.NewHTTPProbeConfigV1Alpha1("test") + cfg.HTTPTimeout = 0 + + assert.Equal(t, 10*time.Second, cfg.Timeout()) + }) + + t.Run("Timeout with custom value", func(t *testing.T) { + t.Parallel() + + cfg := network.NewHTTPProbeConfigV1Alpha1("test") + cfg.HTTPTimeout = 5 * time.Second + + assert.Equal(t, 5*time.Second, cfg.Timeout()) + }) + + t.Run("Clone", func(t *testing.T) { + t.Parallel() + + cfg := network.NewHTTPProbeConfigV1Alpha1("clone-test") + cfg.CommonProbeConfig = network.CommonProbeConfig{ + ProbeInterval: 500 * time.Millisecond, + ProbeFailureThreshold: 5, + } + cfg.HTTPEndpoint = meta.URL{URL: ensure.Value(url.Parse(exampleHTTPURL))} + cfg.HTTPTimeout = 15 * time.Second + + cloned := cfg.Clone() + + assert.Equal(t, cfg, cloned) + assert.NotSame(t, cfg, cloned) + }) +} diff --git a/pkg/machinery/config/types/network/network.go b/pkg/machinery/config/types/network/network.go index acf8bae9c..65b974207 100644 --- a/pkg/machinery/config/types/network/network.go +++ b/pkg/machinery/config/types/network/network.go @@ -5,6 +5,6 @@ // Package network provides network machine configuration documents. package network -//go:generate go tool github.com/siderolabs/talos/tools/docgen -output network_doc.go network.go blackhole_route.go bond.go bridge.go vrf.go default_action_config.go dhcp4.go dhcp6.go dummy.go ethernet.go hcloud_vip.go hostname.go kubespan.go kubespan_endpoints.go layer2_vip.go link.go link_alias.go port_range.go resolver.go routing_rule.go rule_config.go static_host.go tcp_probe.go time_sync.go vlan.go wireguard.go +//go:generate go tool github.com/siderolabs/talos/tools/docgen -output network_doc.go network.go blackhole_route.go bond.go bridge.go vrf.go default_action_config.go dhcp4.go dhcp6.go dummy.go ethernet.go hcloud_vip.go hostname.go http_probe.go kubespan.go kubespan_endpoints.go layer2_vip.go link.go link_alias.go port_range.go resolver.go routing_rule.go rule_config.go static_host.go tcp_probe.go time_sync.go vlan.go wireguard.go -//go:generate go tool github.com/siderolabs/deep-copy -type BlackholeRouteConfigV1Alpha1 -type BondConfigV1Alpha1 -type BridgeConfigV1Alpha1 -type VRFConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubeSpanConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type ResolverConfigV1Alpha1 -type RoutingRuleConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type TCPProbeConfigV1Alpha1 -type TimeSyncConfigV1Alpha1 -type VLANConfigV1Alpha1 -type WireguardConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go . +//go:generate go tool github.com/siderolabs/deep-copy -type BlackholeRouteConfigV1Alpha1 -type BondConfigV1Alpha1 -type BridgeConfigV1Alpha1 -type VRFConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HTTPProbeConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubeSpanConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type ResolverConfigV1Alpha1 -type RoutingRuleConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type TCPProbeConfigV1Alpha1 -type TimeSyncConfigV1Alpha1 -type VLANConfigV1Alpha1 -type WireguardConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go . diff --git a/pkg/machinery/config/types/network/network_doc.go b/pkg/machinery/config/types/network/network_doc.go index a6429db81..eac5d4f3b 100644 --- a/pkg/machinery/config/types/network/network_doc.go +++ b/pkg/machinery/config/types/network/network_doc.go @@ -997,6 +997,53 @@ func (HostnameConfigV1Alpha1) Doc() *encoder.Doc { return doc } +func (HTTPProbeConfigV1Alpha1) Doc() *encoder.Doc { + doc := &encoder.Doc{ + Type: "HTTPProbeConfig", + Comments: [3]string{"" /* encoder.HeadComment */, "HTTPProbeConfig is a config document to configure network HTTP connectivity probes." /* encoder.LineComment */, "" /* encoder.FootComment */}, + Description: "HTTPProbeConfig is a config document to configure network HTTP connectivity probes.", + Fields: []encoder.Doc{ + { + Type: "Meta", + Inline: true, + }, + { + Name: "name", + Type: "string", + Note: "", + Description: "Name of the probe.", + Comments: [3]string{"" /* encoder.HeadComment */, "Name of the probe." /* encoder.LineComment */, "" /* encoder.FootComment */}, + }, + { + Type: "CommonProbeConfig", + Inline: true, + }, + { + Name: "url", + Type: "URL", + Note: "", + Description: "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.", + Comments: [3]string{"" /* encoder.HeadComment */, "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code." /* encoder.LineComment */, "" /* encoder.FootComment */}, + }, + { + Name: "timeout", + Type: "Duration", + Note: "", + Description: "Timeout for the probe.\nDefaults to 10s.", + Comments: [3]string{"" /* encoder.HeadComment */, "Timeout for the probe." /* encoder.LineComment */, "" /* encoder.FootComment */}, + }, + }, + } + + doc.AddExample("", exampleHTTPProbeConfigV1Alpha1()) + + doc.Fields[1].AddExample("", "http-check") + doc.Fields[3].AddExample("", "https://example.com") + doc.Fields[4].AddExample("", 10*time.Second) + + return doc +} + func (KubeSpanConfigV1Alpha1) Doc() *encoder.Doc { doc := &encoder.Doc{ Type: "KubeSpanConfig", @@ -1864,6 +1911,10 @@ func (CommonProbeConfig) Doc() *encoder.Doc { Comments: [3]string{"" /* encoder.HeadComment */, "CommonProbeConfig holds fields common to all probe types." /* encoder.LineComment */, "" /* encoder.FootComment */}, Description: "CommonProbeConfig holds fields common to all probe types.", AppearsIn: []encoder.Appearance{ + { + TypeName: "HTTPProbeConfigV1Alpha1", + FieldName: "", + }, { TypeName: "TCPProbeConfigV1Alpha1", FieldName: "", @@ -2190,6 +2241,7 @@ func GetFileDoc() *encoder.FileDoc { EthernetChannelsConfig{}.Doc(), HCloudVIPConfigV1Alpha1{}.Doc(), HostnameConfigV1Alpha1{}.Doc(), + HTTPProbeConfigV1Alpha1{}.Doc(), KubeSpanConfigV1Alpha1{}.Doc(), KubeSpanFiltersConfig{}.Doc(), KubespanEndpointsConfigV1Alpha1{}.Doc(), diff --git a/pkg/machinery/config/types/network/tcp_probe_test.go b/pkg/machinery/config/types/network/tcp_probe_test.go index a8e355f86..6f67ed84d 100644 --- a/pkg/machinery/config/types/network/tcp_probe_test.go +++ b/pkg/machinery/config/types/network/tcp_probe_test.go @@ -40,6 +40,7 @@ func TestTCPProbeConfigMarshalStability(t *testing.T) { assert.Equal(t, expectedTCPProbeConfigDocument, marshaled) } +//nolint:dupl func TestTCPProbeConfigUnmarshal(t *testing.T) { t.Parallel() diff --git a/pkg/machinery/config/types/network/testdata/httpprobeconfig.yaml b/pkg/machinery/config/types/network/testdata/httpprobeconfig.yaml new file mode 100644 index 000000000..9306f7e95 --- /dev/null +++ b/pkg/machinery/config/types/network/testdata/httpprobeconfig.yaml @@ -0,0 +1,7 @@ +apiVersion: v1alpha1 +kind: HTTPProbeConfig +name: http-check +interval: 1s +failureThreshold: 3 +url: https://example.com +timeout: 10s diff --git a/pkg/machinery/resources/network/deep_copy.generated.go b/pkg/machinery/resources/network/deep_copy.generated.go index d5deb2af7..fcfd1db9f 100644 --- a/pkg/machinery/resources/network/deep_copy.generated.go +++ b/pkg/machinery/resources/network/deep_copy.generated.go @@ -8,6 +8,7 @@ package network import ( "net/netip" + "net/url" "github.com/siderolabs/talos/pkg/machinery/nethelpers" ) @@ -569,6 +570,14 @@ func (o PlatformConfigSpec) DeepCopy() PlatformConfigSpec { // DeepCopy generates a deep copy of ProbeSpecSpec. func (o ProbeSpecSpec) DeepCopy() ProbeSpecSpec { var cp ProbeSpecSpec = o + if o.HTTP.URL != nil { + cp.HTTP.URL = new(url.URL) + *cp.HTTP.URL = *o.HTTP.URL + if o.HTTP.URL.User != nil { + cp.HTTP.URL.User = new(url.Userinfo) + *cp.HTTP.URL.User = *o.HTTP.URL.User + } + } return cp } diff --git a/pkg/machinery/resources/network/probe_spec.go b/pkg/machinery/resources/network/probe_spec.go index daf3703ea..40bea9fdf 100644 --- a/pkg/machinery/resources/network/probe_spec.go +++ b/pkg/machinery/resources/network/probe_spec.go @@ -7,6 +7,7 @@ package network import ( "errors" "fmt" + "net/url" "time" "github.com/cosi-project/runtime/pkg/resource" @@ -31,21 +32,29 @@ type ProbeSpecSpec struct { Interval time.Duration `yaml:"interval" protobuf:"1"` // FailureThreshold is the number of consecutive failures for the probe to be considered failed after having succeeded. FailureThreshold int `yaml:"failureThreshold" protobuf:"2"` - // One of the probe types should be specified, for now it's only TCP. + // TCP is the TCP probe spec. One of TCP or HTTP must be specified. TCP TCPProbeSpec `yaml:"tcp,omitempty" protobuf:"3"` // Configuration layer. ConfigLayer ConfigLayer `yaml:"layer" protobuf:"4"` + // HTTP is the HTTP probe spec. One of TCP or HTTP must be specified. + HTTP HTTPProbeSpec `yaml:"http,omitempty" protobuf:"5"` } // ID returns the ID of the resource based on the spec. func (spec *ProbeSpecSpec) ID() (resource.ID, error) { var zeroTCP TCPProbeSpec - if spec.TCP == zeroTCP { - return "", errors.New("no probe type specified") + if spec.TCP != zeroTCP { + return fmt.Sprintf("tcp:%s", spec.TCP.Endpoint), nil } - return fmt.Sprintf("tcp:%s", spec.TCP.Endpoint), nil + var zeroHTTP HTTPProbeSpec + + if spec.HTTP != zeroHTTP { + return fmt.Sprintf("http:%s", spec.HTTP.URL.String()), nil + } + + return "", errors.New("no probe type specified") } // Equal returns true if the specs are equal. @@ -63,6 +72,16 @@ type TCPProbeSpec struct { Timeout time.Duration `yaml:"timeout" protobuf:"2"` } +// HTTPProbeSpec describes the HTTP Probe. +// +//gotagsrewrite:gen +type HTTPProbeSpec struct { + // URL to probe: http:// or https:// URL. + URL *url.URL `yaml:"url" protobuf:"1"` + // Timeout for the probe. + Timeout time.Duration `yaml:"timeout" protobuf:"2"` +} + // NewProbeSpec initializes a ProbeSpec resource. func NewProbeSpec(namespace resource.Namespace, id resource.ID) *ProbeSpec { return typed.NewResource[ProbeSpecSpec, ProbeSpecExtension]( diff --git a/tools/docgen/main.go b/tools/docgen/main.go index bc8fed42e..d3451c4f9 100644 --- a/tools/docgen/main.go +++ b/tools/docgen/main.go @@ -21,7 +21,6 @@ import ( "text/template" "github.com/siderolabs/gen/xslices" - "go.yaml.in/yaml/v4" "mvdan.cc/gofumpt/format" ) diff --git a/website/content/v1.14/reference/api.md b/website/content/v1.14/reference/api.md index 1b2b3fef1..56a910436 100644 --- a/website/content/v1.14/reference/api.md +++ b/website/content/v1.14/reference/api.md @@ -534,6 +534,7 @@ description: Talos gRPC API reference. - [EthernetSpecSpec](#talos.resource.definitions.network.EthernetSpecSpec) - [EthernetSpecSpec.FeaturesEntry](#talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry) - [EthernetStatusSpec](#talos.resource.definitions.network.EthernetStatusSpec) + - [HTTPProbeSpec](#talos.resource.definitions.network.HTTPProbeSpec) - [HardwareAddrSpec](#talos.resource.definitions.network.HardwareAddrSpec) - [HostDNSConfigSpec](#talos.resource.definitions.network.HostDNSConfigSpec) - [HostnameSpecSpec](#talos.resource.definitions.network.HostnameSpecSpec) @@ -9373,6 +9374,22 @@ EthernetStatusSpec describes status of rendered secrets. + + +### HTTPProbeSpec +HTTPProbeSpec describes the HTTP Probe. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| url | [common.URL](#common.URL) | | URL to probe: http:// or https:// URL. | +| timeout | [google.protobuf.Duration](#google.protobuf.Duration) | | Timeout for the probe. | + + + + + + ### HardwareAddrSpec @@ -9870,8 +9887,9 @@ ProbeSpecSpec describes the Probe. | ----- | ---- | ----- | ----------- | | interval | [google.protobuf.Duration](#google.protobuf.Duration) | | Interval between the probes. | | failure_threshold | [int64](#int64) | | FailureThreshold is the number of consecutive failures for the probe to be considered failed after having succeeded. | -| tcp | [TCPProbeSpec](#talos.resource.definitions.network.TCPProbeSpec) | | One of the probe types should be specified, for now it's only TCP. | +| tcp | [TCPProbeSpec](#talos.resource.definitions.network.TCPProbeSpec) | | TCP is the TCP probe spec. One of TCP or HTTP must be specified. | | config_layer | [talos.resource.definitions.enums.NetworkConfigLayer](#talos.resource.definitions.enums.NetworkConfigLayer) | | Configuration layer. | +| http | [HTTPProbeSpec](#talos.resource.definitions.network.HTTPProbeSpec) | | HTTP is the HTTP probe spec. One of TCP or HTTP must be specified. | diff --git a/website/content/v1.14/reference/configuration/network/httpprobeconfig.md b/website/content/v1.14/reference/configuration/network/httpprobeconfig.md new file mode 100644 index 000000000..b936bffb4 --- /dev/null +++ b/website/content/v1.14/reference/configuration/network/httpprobeconfig.md @@ -0,0 +1,49 @@ +--- +description: HTTPProbeConfig is a config document to configure network HTTP connectivity probes. +title: HTTPProbeConfig +--- + + + + + + + + + + + +{{< highlight yaml >}} +apiVersion: v1alpha1 +kind: HTTPProbeConfig +name: http-check # Name of the probe. +interval: 1s # Interval between probe attempts. +failureThreshold: 3 # Number of consecutive failures for the probe to be considered failed after having succeeded. +url: https://example.com # HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code. +timeout: 10s # Timeout for the probe. +{{< /highlight >}} + + +| Field | Type | Description | Value(s) | +|-------|------|-------------|----------| +|`name` |string |Name of the probe.
Show example(s){{< highlight yaml >}} +name: http-check +{{< /highlight >}}
| | +|`interval` |Duration |Interval between probe attempts.
Defaults to 1s.
Show example(s){{< highlight yaml >}} +interval: 1s +{{< /highlight >}}
| | +|`failureThreshold` |int |Number of consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 0 (immediately fail on first failure).
Show example(s){{< highlight yaml >}} +failureThreshold: 3 +{{< /highlight >}}
| | +|`url` |URL |HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.
Probe does not follow redirects.
Show example(s){{< highlight yaml >}} +url: https://example.com +{{< /highlight >}}
| | +|`timeout` |Duration |Timeout for the probe.
Defaults to 10s.
Show example(s){{< highlight yaml >}} +timeout: 10s +{{< /highlight >}}
| | + + + + + + diff --git a/website/content/v1.14/schemas/config.schema.json b/website/content/v1.14/schemas/config.schema.json index 9e22defa9..1d0c01d3c 100644 --- a/website/content/v1.14/schemas/config.schema.json +++ b/website/content/v1.14/schemas/config.schema.json @@ -2226,6 +2226,75 @@ ], "description": "HCloudVIPConfig is a config document to configure virtual IP using Hetzner Cloud APIs for announcement.\\nVirtual IP configuration should be used only on controlplane nodes to provide virtual IP for Kubernetes API server.\\nAny other use cases are not supported and may lead to unexpected behavior.\\nVirtual IP will be announced from only one node at a time using Hetzner Cloud APIs.\\n" }, + "network.HTTPProbeConfigV1Alpha1": { + "properties": { + "apiVersion": { + "enum": [ + "v1alpha1" + ], + "title": "apiVersion", + "description": "apiVersion is the API version of the resource.\n", + "markdownDescription": "apiVersion is the API version of the resource.", + "x-intellij-html-description": "\u003cp\u003eapiVersion is the API version of the resource.\u003c/p\u003e\n" + }, + "kind": { + "enum": [ + "HTTPProbeConfig" + ], + "title": "kind", + "description": "kind is the kind of the resource.\n", + "markdownDescription": "kind is the kind of the resource.", + "x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n" + }, + "name": { + "type": "string", + "title": "name", + "description": "Name of the probe.\n", + "markdownDescription": "Name of the probe.", + "x-intellij-html-description": "\u003cp\u003eName of the probe.\u003c/p\u003e\n" + }, + "interval": { + "type": "string", + "pattern": "^[-+]?(((\\d+(\\.\\d*)?|\\d*(\\.\\d+)+)([nuµm]?s|m|h))|0)+$", + "title": "interval", + "description": "Interval between probe attempts.\nDefaults to 1s.\n", + "markdownDescription": "Interval between probe attempts.\nDefaults to 1s.", + "x-intellij-html-description": "\u003cp\u003eInterval between probe attempts.\nDefaults to 1s.\u003c/p\u003e\n" + }, + "failureThreshold": { + "type": "integer", + "title": "failureThreshold", + "description": "Number of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).\n", + "markdownDescription": "Number of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).", + "x-intellij-html-description": "\u003cp\u003eNumber of consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 0 (immediately fail on first failure).\u003c/p\u003e\n" + }, + "url": { + "type": "string", + "pattern": "^(http|https)://", + "title": "url", + "description": "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.\n", + "markdownDescription": "HTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.", + "x-intellij-html-description": "\u003cp\u003eHTTP or HTTPS URL to probe. The probe succeeds if the server responds with a 2xx or 3xx status code.\nProbe does not follow redirects.\u003c/p\u003e\n" + }, + "timeout": { + "type": "string", + "pattern": "^[-+]?(((\\d+(\\.\\d*)?|\\d*(\\.\\d+)+)([nuµm]?s|m|h))|0)+$", + "title": "timeout", + "description": "Timeout for the probe.\nDefaults to 10s.\n", + "markdownDescription": "Timeout for the probe.\nDefaults to 10s.", + "x-intellij-html-description": "\u003cp\u003eTimeout for the probe.\nDefaults to 10s.\u003c/p\u003e\n" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "url" + ], + "description": "HTTPProbeConfig is a config document to configure network HTTP connectivity probes." + }, "network.HostDNSConfig": { "properties": { "enabled": { @@ -5791,6 +5860,9 @@ { "$ref": "#/$defs/network.HostnameConfigV1Alpha1" }, + { + "$ref": "#/$defs/network.HTTPProbeConfigV1Alpha1" + }, { "$ref": "#/$defs/network.KubeSpanConfigV1Alpha1" },