mirror of https://github.com/kubernetes/kops.git
Merge pull request #11333 from bjhaid/master
Add support for configuring Cilium enable-host-reachable-services.
This commit is contained in:
commit
e035decbfc
|
|
@ -3459,6 +3459,12 @@ spec:
|
|||
description: 'EnableEncryption enables Cilium Encryption.
|
||||
Default: false'
|
||||
type: boolean
|
||||
enableHostReachableServices:
|
||||
description: 'EnableHostReachableServices configures Cilium
|
||||
to enable services to be reached from the host namespace
|
||||
in addition to pod namespaces. https://docs.cilium.io/en/v1.9/gettingstarted/host-services/
|
||||
Default: false'
|
||||
type: boolean
|
||||
enableNodePort:
|
||||
description: 'EnableNodePort replaces kube-proxy with Cilium''s
|
||||
BPF implementation. Requires spec.kubeProxy.enabled be set
|
||||
|
|
|
|||
|
|
@ -471,6 +471,11 @@ type CiliumNetworkingSpec struct {
|
|||
// AutoDirectNodeRoutes adds automatic L2 routing between nodes.
|
||||
// Default: false
|
||||
AutoDirectNodeRoutes bool `json:"autoDirectNodeRoutes,omitempty"`
|
||||
// EnableHostReachableServices configures Cilium to enable services to be
|
||||
// reached from the host namespace in addition to pod namespaces.
|
||||
// https://docs.cilium.io/en/v1.9/gettingstarted/host-services/
|
||||
// Default: false
|
||||
EnableHostReachableServices bool `json:"enableHostReachableServices,omitempty"`
|
||||
// EnableNodePort replaces kube-proxy with Cilium's BPF implementation.
|
||||
// Requires spec.kubeProxy.enabled be set to false.
|
||||
// Default: false
|
||||
|
|
|
|||
|
|
@ -469,6 +469,11 @@ type CiliumNetworkingSpec struct {
|
|||
// AutoDirectNodeRoutes adds automatic L2 routing between nodes.
|
||||
// Default: false
|
||||
AutoDirectNodeRoutes bool `json:"autoDirectNodeRoutes,omitempty"`
|
||||
// EnableHostReachableServices configures Cilium to enable services to be
|
||||
// reached from the host namespace in addition to pod namespaces.
|
||||
// https://docs.cilium.io/en/v1.9/gettingstarted/host-services/
|
||||
// Default: false
|
||||
EnableHostReachableServices bool `json:"enableHostReachableServices,omitempty"`
|
||||
// EnableNodePort replaces kube-proxy with Cilium's BPF implementation.
|
||||
// Requires spec.kubeProxy.enabled be set to false.
|
||||
// Default: false
|
||||
|
|
|
|||
|
|
@ -1729,6 +1729,7 @@ func autoConvert_v1alpha2_CiliumNetworkingSpec_To_kops_CiliumNetworkingSpec(in *
|
|||
out.Ipam = in.Ipam
|
||||
out.IPTablesRulesNoinstall = in.IPTablesRulesNoinstall
|
||||
out.AutoDirectNodeRoutes = in.AutoDirectNodeRoutes
|
||||
out.EnableHostReachableServices = in.EnableHostReachableServices
|
||||
out.EnableNodePort = in.EnableNodePort
|
||||
out.EtcdManaged = in.EtcdManaged
|
||||
out.EnableRemoteNodeIdentity = in.EnableRemoteNodeIdentity
|
||||
|
|
@ -1823,6 +1824,7 @@ func autoConvert_kops_CiliumNetworkingSpec_To_v1alpha2_CiliumNetworkingSpec(in *
|
|||
out.Ipam = in.Ipam
|
||||
out.IPTablesRulesNoinstall = in.IPTablesRulesNoinstall
|
||||
out.AutoDirectNodeRoutes = in.AutoDirectNodeRoutes
|
||||
out.EnableHostReachableServices = in.EnableHostReachableServices
|
||||
out.EnableNodePort = in.EnableNodePort
|
||||
out.EtcdManaged = in.EtcdManaged
|
||||
out.EnableRemoteNodeIdentity = in.EnableRemoteNodeIdentity
|
||||
|
|
|
|||
|
|
@ -249,6 +249,21 @@ func TestSetClusterFields(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Fields: []string{
|
||||
"cluster.spec.networking.cilium.enableHostReachableServices=true",
|
||||
},
|
||||
Input: kops.Cluster{},
|
||||
Output: kops.Cluster{
|
||||
Spec: kops.ClusterSpec{
|
||||
Networking: &kops.NetworkingSpec{
|
||||
Cilium: &kops.CiliumNetworkingSpec{
|
||||
EnableHostReachableServices: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Fields: []string{
|
||||
"cluster.spec.networking.cilium.enableNodePort=true",
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ data:
|
|||
masquerade: "{{- if .DisableMasquerade -}}false{{- else -}}true{{- end -}}"
|
||||
install-iptables-rules: "{{- if .IPTablesRulesNoinstall -}}false{{- else -}}true{{- end -}}"
|
||||
auto-direct-node-routes: "{{ .AutoDirectNodeRoutes }}"
|
||||
{{ if .EnableHostReachableServices }}
|
||||
enable-host-reachable-services: "{{ .EnableHostReachableServices }}"
|
||||
{{ end }}
|
||||
enable-node-port: "{{ .EnableNodePort }}"
|
||||
kube-proxy-replacement: "{{- if .EnableNodePort -}}strict{{- else -}}partial{{- end -}}"
|
||||
enable-remote-node-identity: "{{ .EnableRemoteNodeIdentity -}}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue