From 75c9ed76abefbd851d71b296c90000a76490542e Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Thu, 30 Apr 2026 15:17:50 -0700 Subject: [PATCH 1/2] feat: add connectors.iroh config block and config validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a new IrohConnectorConfig under connector.iroh that gates the upcoming iroh DNS discovery controller. When dnsEnabled is true the controller will publish ".." TXT records into a downstream DNSZone for every Connector backed by an iroh-routed ConnectorClass. The block carries: - DNSEnabled (default false) - DownstreamCluster.KubeconfigSecretRef pointing at the cluster where DNSRecordSets are written - DNSZoneRef identifying the zone that owns the names - RecordPrefix (default "_iroh") and BaseDomain - TTLSeconds (default 30) Also introduces a Validate() entrypoint on NetworkServicesOperator and wires it into cmd/main.go where the previous "TODO(jreese) validate the config" lived. Today only Connector.Iroh is checked; future cross-field rules can extend the same dispatch. Validation only fires when DNSEnabled is true, so existing deployments are unaffected. No controller behavior is registered yet — that lands in a follow-up. --- cmd/main.go | 5 +- internal/config/config.go | 102 ++++++++++++++++++ internal/config/config_test.go | 128 +++++++++++++++++++++++ internal/config/zz_generated.deepcopy.go | 64 ++++++++++++ internal/config/zz_generated.defaults.go | 9 ++ 5 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 internal/config/config_test.go diff --git a/cmd/main.go b/cmd/main.go index b8f2549..28fc80d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -164,7 +164,10 @@ func main() { setupLog.Info("server config", "config", serverConfig) - // TODO(jreese) validate the config + if err := serverConfig.Validate(); err != nil { + setupLog.Error(err, "invalid server config") + os.Exit(1) + } cfg := ctrl.GetConfigOrDie() serverConfig.ControlPlaneClient.ApplyTo(cfg) diff --git a/internal/config/config.go b/internal/config/config.go index 0b9e3c7..3b66e88 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -3,6 +3,7 @@ package config import ( "context" "crypto/tls" + "errors" "fmt" "os" "path/filepath" @@ -150,6 +151,74 @@ type ConnectorConfig struct { // Defaults to 30 seconds. // +default=30 LeaseDurationSeconds int32 `json:"leaseDurationSeconds,omitempty"` + + // Iroh contains configuration specific to iroh-tunneled connectors. + Iroh IrohConnectorConfig `json:"iroh,omitempty"` +} + +// +k8s:deepcopy-gen=true + +// IrohConnectorConfig configures the iroh DNS discovery controller, which +// publishes ".." TXT records +// into a downstream DNS cluster for every Connector whose ConnectorClass +// is routed to iroh. +type IrohConnectorConfig struct { + // DNSEnabled toggles the iroh DNS discovery controller. When false the + // controller is not registered and the rest of these fields may be + // omitted. + // + // +default=false + DNSEnabled bool `json:"dnsEnabled,omitempty"` + + // DownstreamCluster identifies the cluster where iroh DNSRecordSet + // resources are written. + DownstreamCluster IrohDownstreamClusterConfig `json:"downstreamCluster,omitempty"` + + // DNSZoneRef references the DNSZone (in the downstream cluster) that + // owns the names this controller manages. + DNSZoneRef IrohDNSZoneRef `json:"dnsZoneRef,omitempty"` + + // RecordPrefix is the leading DNS label of the discovery name. + // iroh uses "_iroh" by convention. + // + // +default="_iroh" + RecordPrefix string `json:"recordPrefix,omitempty"` + + // BaseDomain is the suffix appended to the prefix and z32 EndpointId + // to form the full lookup name "..". + BaseDomain string `json:"baseDomain,omitempty"` + + // TTLSeconds is the TTL written on each TXT record. + // + // +default=30 + TTLSeconds int32 `json:"ttlSeconds,omitempty"` +} + +// +k8s:deepcopy-gen=true + +type IrohDownstreamClusterConfig struct { + // KubeconfigSecretRef references a Secret in the upstream cluster that + // holds a kubeconfig pointing at the downstream cluster. + KubeconfigSecretRef IrohKubeconfigSecretRef `json:"kubeconfigSecretRef,omitempty"` +} + +// +k8s:deepcopy-gen=true + +type IrohKubeconfigSecretRef struct { + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` + + // Key is the secret data key holding the kubeconfig bytes. + // + // +default="kubeconfig" + Key string `json:"key,omitempty"` +} + +// +k8s:deepcopy-gen=true + +type IrohDNSZoneRef struct { + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` } // +k8s:deepcopy-gen=true @@ -1032,6 +1101,39 @@ func (c *DiscoveryConfig) ProjectRestConfig() (*rest.Config, error) { return clientcmd.BuildConfigFromFlags("", c.ProjectKubeconfigPath) } +// Validate returns a non-nil error if the loaded configuration violates a +// known invariant. New cross-field rules should land here as the +// codebase grows; today only Connector.Iroh is checked. +func (c *NetworkServicesOperator) Validate() error { + if err := c.Connector.Iroh.validate(); err != nil { + return fmt.Errorf("connector.iroh: %w", err) + } + return nil +} + +func (c *IrohConnectorConfig) validate() error { + if !c.DNSEnabled { + return nil + } + var errs []error + if c.BaseDomain == "" { + errs = append(errs, errors.New("baseDomain is required when dnsEnabled is true")) + } + if c.DNSZoneRef.Name == "" { + errs = append(errs, errors.New("dnsZoneRef.name is required when dnsEnabled is true")) + } + if c.DNSZoneRef.Namespace == "" { + errs = append(errs, errors.New("dnsZoneRef.namespace is required when dnsEnabled is true")) + } + if c.DownstreamCluster.KubeconfigSecretRef.Name == "" { + errs = append(errs, errors.New("downstreamCluster.kubeconfigSecretRef.name is required when dnsEnabled is true")) + } + if c.DownstreamCluster.KubeconfigSecretRef.Namespace == "" { + errs = append(errs, errors.New("downstreamCluster.kubeconfigSecretRef.namespace is required when dnsEnabled is true")) + } + return errors.Join(errs...) +} + func init() { SchemeBuilder.Register(&NetworkServicesOperator{}) } diff --git a/internal/config/config_test.go b/internal/config/config_test.go new file mode 100644 index 0000000..785fa42 --- /dev/null +++ b/internal/config/config_test.go @@ -0,0 +1,128 @@ +package config + +import ( + "strings" + "testing" +) + +func TestNetworkServicesOperator_Validate_IrohDisabled(t *testing.T) { + // When DNSEnabled is false the rest of the iroh config is allowed to + // be empty — nothing depends on it. + cfg := &NetworkServicesOperator{} + if err := cfg.Validate(); err != nil { + t.Fatalf("expected nil, got %v", err) + } +} + +func TestNetworkServicesOperator_Validate_IrohEnabled(t *testing.T) { + full := IrohConnectorConfig{ + DNSEnabled: true, + BaseDomain: "datumconnect.net", + DNSZoneRef: IrohDNSZoneRef{Namespace: "datum-dns", Name: "datumconnect-net"}, + DownstreamCluster: IrohDownstreamClusterConfig{ + KubeconfigSecretRef: IrohKubeconfigSecretRef{ + Namespace: "datum-system", + Name: "downstream-kubeconfig", + Key: "kubeconfig", + }, + }, + } + + tests := []struct { + name string + mutate func(*IrohConnectorConfig) + wantSub string + }{ + {name: "all required fields set"}, + { + name: "missing baseDomain", + mutate: func(c *IrohConnectorConfig) { c.BaseDomain = "" }, + wantSub: "baseDomain is required", + }, + { + name: "missing dnsZoneRef.name", + mutate: func(c *IrohConnectorConfig) { c.DNSZoneRef.Name = "" }, + wantSub: "dnsZoneRef.name is required", + }, + { + name: "missing dnsZoneRef.namespace", + mutate: func(c *IrohConnectorConfig) { c.DNSZoneRef.Namespace = "" }, + wantSub: "dnsZoneRef.namespace is required", + }, + { + name: "missing kubeconfigSecretRef.name", + mutate: func(c *IrohConnectorConfig) { c.DownstreamCluster.KubeconfigSecretRef.Name = "" }, + wantSub: "downstreamCluster.kubeconfigSecretRef.name is required", + }, + { + name: "missing kubeconfigSecretRef.namespace", + mutate: func(c *IrohConnectorConfig) { c.DownstreamCluster.KubeconfigSecretRef.Namespace = "" }, + wantSub: "downstreamCluster.kubeconfigSecretRef.namespace is required", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + iroh := full + if tt.mutate != nil { + tt.mutate(&iroh) + } + cfg := &NetworkServicesOperator{Connector: ConnectorConfig{Iroh: iroh}} + err := cfg.Validate() + if tt.wantSub == "" { + if err != nil { + t.Fatalf("expected nil, got %v", err) + } + return + } + if err == nil { + t.Fatalf("expected error containing %q, got nil", tt.wantSub) + } + if !strings.Contains(err.Error(), tt.wantSub) { + t.Fatalf("expected error containing %q, got %q", tt.wantSub, err.Error()) + } + }) + } +} + +func TestNetworkServicesOperator_Validate_IrohEnabledAggregatesErrors(t *testing.T) { + cfg := &NetworkServicesOperator{ + Connector: ConnectorConfig{Iroh: IrohConnectorConfig{DNSEnabled: true}}, + } + err := cfg.Validate() + if err == nil { + t.Fatal("expected error, got nil") + } + // errors.Join joins distinct messages with newlines; all five required + // fields should be surfaced. + for _, want := range []string{ + "baseDomain is required", + "dnsZoneRef.name is required", + "dnsZoneRef.namespace is required", + "downstreamCluster.kubeconfigSecretRef.name is required", + "downstreamCluster.kubeconfigSecretRef.namespace is required", + } { + if !strings.Contains(err.Error(), want) { + t.Errorf("expected error to mention %q, got %q", want, err.Error()) + } + } +} + +func TestSetObjectDefaults_IrohConnectorConfig(t *testing.T) { + cfg := &NetworkServicesOperator{} + SetObjectDefaults_NetworkServicesOperator(cfg) + + iroh := cfg.Connector.Iroh + if got, want := iroh.RecordPrefix, "_iroh"; got != want { + t.Errorf("RecordPrefix = %q, want %q", got, want) + } + if got, want := iroh.TTLSeconds, int32(30); got != want { + t.Errorf("TTLSeconds = %d, want %d", got, want) + } + if got, want := iroh.DownstreamCluster.KubeconfigSecretRef.Key, "kubeconfig"; got != want { + t.Errorf("KubeconfigSecretRef.Key = %q, want %q", got, want) + } + if iroh.DNSEnabled { + t.Error("DNSEnabled should default to false") + } +} diff --git a/internal/config/zz_generated.deepcopy.go b/internal/config/zz_generated.deepcopy.go index 1cdd6ec..71a82b0 100644 --- a/internal/config/zz_generated.deepcopy.go +++ b/internal/config/zz_generated.deepcopy.go @@ -113,6 +113,7 @@ func (in *ClusterSettingsValidationOptions) DeepCopy() *ClusterSettingsValidatio // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConnectorConfig) DeepCopyInto(out *ConnectorConfig) { *out = *in + out.Iroh = in.Iroh } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorConfig. @@ -403,6 +404,69 @@ func (in *HTTPRouteValidationOptions) DeepCopy() *HTTPRouteValidationOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IrohConnectorConfig) DeepCopyInto(out *IrohConnectorConfig) { + *out = *in + out.DownstreamCluster = in.DownstreamCluster + out.DNSZoneRef = in.DNSZoneRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohConnectorConfig. +func (in *IrohConnectorConfig) DeepCopy() *IrohConnectorConfig { + if in == nil { + return nil + } + out := new(IrohConnectorConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IrohDNSZoneRef) DeepCopyInto(out *IrohDNSZoneRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohDNSZoneRef. +func (in *IrohDNSZoneRef) DeepCopy() *IrohDNSZoneRef { + if in == nil { + return nil + } + out := new(IrohDNSZoneRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IrohDownstreamClusterConfig) DeepCopyInto(out *IrohDownstreamClusterConfig) { + *out = *in + out.KubeconfigSecretRef = in.KubeconfigSecretRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohDownstreamClusterConfig. +func (in *IrohDownstreamClusterConfig) DeepCopy() *IrohDownstreamClusterConfig { + if in == nil { + return nil + } + out := new(IrohDownstreamClusterConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IrohKubeconfigSecretRef) DeepCopyInto(out *IrohKubeconfigSecretRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohKubeconfigSecretRef. +func (in *IrohKubeconfigSecretRef) DeepCopy() *IrohKubeconfigSecretRef { + if in == nil { + return nil + } + out := new(IrohKubeconfigSecretRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaderElectionConfig) DeepCopyInto(out *LeaderElectionConfig) { *out = *in diff --git a/internal/config/zz_generated.defaults.go b/internal/config/zz_generated.defaults.go index 65817ce..374e5a8 100644 --- a/internal/config/zz_generated.defaults.go +++ b/internal/config/zz_generated.defaults.go @@ -230,6 +230,15 @@ func SetObjectDefaults_NetworkServicesOperator(in *NetworkServicesOperator) { if in.Connector.LeaseDurationSeconds == 0 { in.Connector.LeaseDurationSeconds = 30 } + if in.Connector.Iroh.DownstreamCluster.KubeconfigSecretRef.Key == "" { + in.Connector.Iroh.DownstreamCluster.KubeconfigSecretRef.Key = "kubeconfig" + } + if in.Connector.Iroh.RecordPrefix == "" { + in.Connector.Iroh.RecordPrefix = "_iroh" + } + if in.Connector.Iroh.TTLSeconds == 0 { + in.Connector.Iroh.TTLSeconds = 30 + } SetDefaults_DiscoveryConfig(&in.Discovery) if in.Redis.DialTimeout == nil { if err := json.Unmarshal([]byte(`"5s"`), &in.Redis.DialTimeout); err != nil { From 45f032313a215b50911f9d472a02731d99da535d Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Thu, 30 Apr 2026 15:23:48 -0700 Subject: [PATCH 2/2] refactor: take downstream kubeconfig as a path, not a SecretRef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the IrohDownstreamClusterConfig / IrohKubeconfigSecretRef nesting with a single DownstreamKubeconfigPath field on IrohConnectorConfig, matching the existing DiscoveryConfig pattern (DiscoveryKubeconfigPath / ProjectKubeconfigPath). Empty path falls back to the operator's own in-cluster config — supports single-cluster deployments with no extra knobs. Adds a DownstreamRestConfig() helper that builds the rest.Config the upcoming controller will use, mirroring DiscoveryConfig.DiscoveryRestConfig. Validation no longer flags missing kubeconfig fields since the empty fallback is intentional. Regenerated zz_generated.{deepcopy,defaults}.go via make generate. --- internal/config/config.go | 40 ++++++++---------------- internal/config/config_test.go | 31 ++++++------------ internal/config/zz_generated.deepcopy.go | 32 ------------------- internal/config/zz_generated.defaults.go | 3 -- 4 files changed, 22 insertions(+), 84 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 3b66e88..3876afc 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -170,9 +170,11 @@ type IrohConnectorConfig struct { // +default=false DNSEnabled bool `json:"dnsEnabled,omitempty"` - // DownstreamCluster identifies the cluster where iroh DNSRecordSet - // resources are written. - DownstreamCluster IrohDownstreamClusterConfig `json:"downstreamCluster,omitempty"` + // DownstreamKubeconfigPath is the path to a kubeconfig file pointing + // at the cluster where DNSRecordSet resources are written. When empty, + // the operator's own in-cluster config is used (single-cluster + // deployment). + DownstreamKubeconfigPath string `json:"downstreamKubeconfigPath,omitempty"` // DNSZoneRef references the DNSZone (in the downstream cluster) that // owns the names this controller manages. @@ -194,24 +196,14 @@ type IrohConnectorConfig struct { TTLSeconds int32 `json:"ttlSeconds,omitempty"` } -// +k8s:deepcopy-gen=true - -type IrohDownstreamClusterConfig struct { - // KubeconfigSecretRef references a Secret in the upstream cluster that - // holds a kubeconfig pointing at the downstream cluster. - KubeconfigSecretRef IrohKubeconfigSecretRef `json:"kubeconfigSecretRef,omitempty"` -} - -// +k8s:deepcopy-gen=true - -type IrohKubeconfigSecretRef struct { - Namespace string `json:"namespace,omitempty"` - Name string `json:"name,omitempty"` - - // Key is the secret data key holding the kubeconfig bytes. - // - // +default="kubeconfig" - Key string `json:"key,omitempty"` +// DownstreamRestConfig builds a rest.Config for the downstream cluster. +// An empty DownstreamKubeconfigPath falls back to the operator's own +// in-cluster config — same convention as DiscoveryConfig. +func (c *IrohConnectorConfig) DownstreamRestConfig() (*rest.Config, error) { + if c.DownstreamKubeconfigPath == "" { + return ctrl.GetConfig() + } + return clientcmd.BuildConfigFromFlags("", c.DownstreamKubeconfigPath) } // +k8s:deepcopy-gen=true @@ -1125,12 +1117,6 @@ func (c *IrohConnectorConfig) validate() error { if c.DNSZoneRef.Namespace == "" { errs = append(errs, errors.New("dnsZoneRef.namespace is required when dnsEnabled is true")) } - if c.DownstreamCluster.KubeconfigSecretRef.Name == "" { - errs = append(errs, errors.New("downstreamCluster.kubeconfigSecretRef.name is required when dnsEnabled is true")) - } - if c.DownstreamCluster.KubeconfigSecretRef.Namespace == "" { - errs = append(errs, errors.New("downstreamCluster.kubeconfigSecretRef.namespace is required when dnsEnabled is true")) - } return errors.Join(errs...) } diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 785fa42..c0ad2b4 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -16,16 +16,9 @@ func TestNetworkServicesOperator_Validate_IrohDisabled(t *testing.T) { func TestNetworkServicesOperator_Validate_IrohEnabled(t *testing.T) { full := IrohConnectorConfig{ - DNSEnabled: true, - BaseDomain: "datumconnect.net", - DNSZoneRef: IrohDNSZoneRef{Namespace: "datum-dns", Name: "datumconnect-net"}, - DownstreamCluster: IrohDownstreamClusterConfig{ - KubeconfigSecretRef: IrohKubeconfigSecretRef{ - Namespace: "datum-system", - Name: "downstream-kubeconfig", - Key: "kubeconfig", - }, - }, + DNSEnabled: true, + BaseDomain: "datumconnect.net", + DNSZoneRef: IrohDNSZoneRef{Namespace: "datum-dns", Name: "datumconnect-net"}, } tests := []struct { @@ -50,14 +43,10 @@ func TestNetworkServicesOperator_Validate_IrohEnabled(t *testing.T) { wantSub: "dnsZoneRef.namespace is required", }, { - name: "missing kubeconfigSecretRef.name", - mutate: func(c *IrohConnectorConfig) { c.DownstreamCluster.KubeconfigSecretRef.Name = "" }, - wantSub: "downstreamCluster.kubeconfigSecretRef.name is required", - }, - { - name: "missing kubeconfigSecretRef.namespace", - mutate: func(c *IrohConnectorConfig) { c.DownstreamCluster.KubeconfigSecretRef.Namespace = "" }, - wantSub: "downstreamCluster.kubeconfigSecretRef.namespace is required", + name: "downstream kubeconfig path is optional (in-cluster fallback)", + mutate: func(c *IrohConnectorConfig) { + c.DownstreamKubeconfigPath = "" + }, }, } @@ -99,8 +88,6 @@ func TestNetworkServicesOperator_Validate_IrohEnabledAggregatesErrors(t *testing "baseDomain is required", "dnsZoneRef.name is required", "dnsZoneRef.namespace is required", - "downstreamCluster.kubeconfigSecretRef.name is required", - "downstreamCluster.kubeconfigSecretRef.namespace is required", } { if !strings.Contains(err.Error(), want) { t.Errorf("expected error to mention %q, got %q", want, err.Error()) @@ -119,8 +106,8 @@ func TestSetObjectDefaults_IrohConnectorConfig(t *testing.T) { if got, want := iroh.TTLSeconds, int32(30); got != want { t.Errorf("TTLSeconds = %d, want %d", got, want) } - if got, want := iroh.DownstreamCluster.KubeconfigSecretRef.Key, "kubeconfig"; got != want { - t.Errorf("KubeconfigSecretRef.Key = %q, want %q", got, want) + if iroh.DownstreamKubeconfigPath != "" { + t.Errorf("DownstreamKubeconfigPath should default to empty (in-cluster), got %q", iroh.DownstreamKubeconfigPath) } if iroh.DNSEnabled { t.Error("DNSEnabled should default to false") diff --git a/internal/config/zz_generated.deepcopy.go b/internal/config/zz_generated.deepcopy.go index 71a82b0..3243fbd 100644 --- a/internal/config/zz_generated.deepcopy.go +++ b/internal/config/zz_generated.deepcopy.go @@ -407,7 +407,6 @@ func (in *HTTPRouteValidationOptions) DeepCopy() *HTTPRouteValidationOptions { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IrohConnectorConfig) DeepCopyInto(out *IrohConnectorConfig) { *out = *in - out.DownstreamCluster = in.DownstreamCluster out.DNSZoneRef = in.DNSZoneRef } @@ -436,37 +435,6 @@ func (in *IrohDNSZoneRef) DeepCopy() *IrohDNSZoneRef { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IrohDownstreamClusterConfig) DeepCopyInto(out *IrohDownstreamClusterConfig) { - *out = *in - out.KubeconfigSecretRef = in.KubeconfigSecretRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohDownstreamClusterConfig. -func (in *IrohDownstreamClusterConfig) DeepCopy() *IrohDownstreamClusterConfig { - if in == nil { - return nil - } - out := new(IrohDownstreamClusterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IrohKubeconfigSecretRef) DeepCopyInto(out *IrohKubeconfigSecretRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrohKubeconfigSecretRef. -func (in *IrohKubeconfigSecretRef) DeepCopy() *IrohKubeconfigSecretRef { - if in == nil { - return nil - } - out := new(IrohKubeconfigSecretRef) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaderElectionConfig) DeepCopyInto(out *LeaderElectionConfig) { *out = *in diff --git a/internal/config/zz_generated.defaults.go b/internal/config/zz_generated.defaults.go index 374e5a8..d3dc318 100644 --- a/internal/config/zz_generated.defaults.go +++ b/internal/config/zz_generated.defaults.go @@ -230,9 +230,6 @@ func SetObjectDefaults_NetworkServicesOperator(in *NetworkServicesOperator) { if in.Connector.LeaseDurationSeconds == 0 { in.Connector.LeaseDurationSeconds = 30 } - if in.Connector.Iroh.DownstreamCluster.KubeconfigSecretRef.Key == "" { - in.Connector.Iroh.DownstreamCluster.KubeconfigSecretRef.Key = "kubeconfig" - } if in.Connector.Iroh.RecordPrefix == "" { in.Connector.Iroh.RecordPrefix = "_iroh" }