diff --git a/config/v1alpha1/types.go b/config/v1alpha1/types.go index 06d933d..ba02859 100644 --- a/config/v1alpha1/types.go +++ b/config/v1alpha1/types.go @@ -103,6 +103,18 @@ type KubeProxyWinkernelConfiguration struct { ForwardHealthCheckVip bool `json:"forwardHealthCheckVip"` } +// DetectLocalConfiguration contains optional settings related to DetectLocalMode option +type DetectLocalConfiguration struct { + // BridgeInterface is a string argument which represents a single bridge interface name. + // Kube-proxy considers traffic as local if originating from this given bridge. + // This argument should be set if DetectLocalMode is set to LocalModeBridgeInterface. + BridgeInterface string `json:"bridgeInterface"` + // InterfaceNamePrefix is a string argument which represents a single interface prefix name. + // Kube-proxy considers traffic as local if originating from one or more interfaces which match + // the given prefix. This argument should be set if DetectLocalMode is set to LocalModeInterfaceNamePrefix. + InterfaceNamePrefix string `json:"interfaceNamePrefix"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // KubeProxyConfiguration contains everything necessary to configure the @@ -170,6 +182,8 @@ type KubeProxyConfiguration struct { ShowHiddenMetricsForVersion string `json:"showHiddenMetricsForVersion"` // DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR DetectLocalMode LocalMode `json:"detectLocalMode"` + // DetectLocal contains optional configuration settings related to DetectLocalMode. + DetectLocal DetectLocalConfiguration `json:"detectLocal"` } // ProxyMode represents modes used by the Kubernetes proxy server. diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go index dafffda..c7c8b5f 100644 --- a/config/v1alpha1/zz_generated.deepcopy.go +++ b/config/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,22 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DetectLocalConfiguration) DeepCopyInto(out *DetectLocalConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetectLocalConfiguration. +func (in *DetectLocalConfiguration) DeepCopy() *DetectLocalConfiguration { + if in == nil { + return nil + } + out := new(DetectLocalConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { *out = *in @@ -54,6 +70,7 @@ func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { copy(*out, *in) } out.Winkernel = in.Winkernel + out.DetectLocal = in.DetectLocal return }