mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
add nodeport-addresses flag for kube-proxy
This commit is contained in:
@@ -44,7 +44,9 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
obj.IPTables.MasqueradeBit = utilpointer.Int32Ptr(c.Int31())
|
||||
obj.MetricsBindAddress = fmt.Sprintf("%d.%d.%d.%d:%d", c.Intn(256), c.Intn(256), c.Intn(256), c.Intn(256), c.Intn(65536))
|
||||
obj.OOMScoreAdj = utilpointer.Int32Ptr(c.Int31())
|
||||
obj.ResourceContainer = c.RandString()
|
||||
obj.ResourceContainer = "foo"
|
||||
obj.ClientConnection.ContentType = "bar"
|
||||
obj.NodePortAddresses = []string{"1.2.3.0/24"}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,14 @@ type KubeProxyConfiguration struct {
|
||||
// configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater
|
||||
// than 0.
|
||||
ConfigSyncPeriod metav1.Duration
|
||||
// nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid
|
||||
// IP blocks. These values are as a parameter to select the interfaces where nodeport works.
|
||||
// In case someone would like to expose a service on localhost for local visit and some other interfaces for
|
||||
// particular purpose, a list of IP blocks would do that.
|
||||
// If set it to "127.0.0.0/8", kube-proxy will only select the loopback interface for NodePort.
|
||||
// If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node.
|
||||
// An empty string slice is meant to select all network interfaces.
|
||||
NodePortAddresses []string
|
||||
}
|
||||
|
||||
// Currently, three modes of proxy are available in Linux platform: 'userspace' (older, going to be EOL), 'iptables'
|
||||
|
||||
@@ -140,6 +140,14 @@ type KubeProxyConfiguration struct {
|
||||
// configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater
|
||||
// than 0.
|
||||
ConfigSyncPeriod metav1.Duration `json:"configSyncPeriod"`
|
||||
// nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid
|
||||
// IP blocks. These values are as a parameter to select the interfaces where nodeport works.
|
||||
// In case someone would like to expose a service on localhost for local visit and some other interfaces for
|
||||
// particular purpose, a list of IP blocks would do that.
|
||||
// If set it to "127.0.0.0/8", kube-proxy will only select the loopback interface for NodePort.
|
||||
// If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node.
|
||||
// An empty string slice is meant to select all network interfaces.
|
||||
NodePortAddresses []string `json:"nodePortAddresses"`
|
||||
}
|
||||
|
||||
// Currently, three modes of proxy are available in Linux platform: 'userspace' (older, going to be EOL), 'iptables'
|
||||
|
||||
Reference in New Issue
Block a user