feature: Add cluster-id for Cilium

hack/update-expected.sh
This commit is contained in:
zadjadr 2023-08-05 16:02:53 +02:00
parent 4fcd5943e6
commit d2358df1d7
12 changed files with 32 additions and 1 deletions

View File

@ -4830,6 +4830,11 @@ spec:
to provide L3/L4 network visibility, policy enforcement to provide L3/L4 network visibility, policy enforcement
and other advanced features. Default: none' and other advanced features. Default: none'
type: string type: string
clusterID:
description: ClusterID is the ID of the cluster. It is only
relevant when building a mesh of clusters. Must be a number
between 1 and 255.
type: integer
clusterName: clusterName:
description: ClusterName is the name of the cluster. It is description: ClusterName is the name of the cluster. It is
only relevant when building a mesh of clusters. only relevant when building a mesh of clusters.

View File

@ -438,6 +438,9 @@ type CiliumNetworkingSpec struct {
SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"` SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"`
// ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters. // ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters.
ClusterName string `json:"clusterName,omitempty"` ClusterName string `json:"clusterName,omitempty"`
// ClusterID is the ID of the cluster. It is only relevant when building a mesh of clusters.
// Must be a number between 1 and 255.
ClusterID uint8 `json:"clusterID,omitempty"`
// ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests. // ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests.
// Possible values are "nameError" or "refused". // Possible values are "nameError" or "refused".
// Default: refused // Default: refused

View File

@ -541,6 +541,9 @@ type CiliumNetworkingSpec struct {
SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"` SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"`
// ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters. // ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters.
ClusterName string `json:"clusterName,omitempty"` ClusterName string `json:"clusterName,omitempty"`
// ClusterID is the ID of the cluster. It is only relevant when building a mesh of clusters.
// Must be a number between 1 and 255.
ClusterID uint8 `json:"clusterID,omitempty"`
// ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests. // ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests.
// Possible values are "nameError" or "refused". // Possible values are "nameError" or "refused".
// Default: refused // Default: refused

View File

@ -1988,6 +1988,7 @@ func autoConvert_v1alpha2_CiliumNetworkingSpec_To_kops_CiliumNetworkingSpec(in *
out.PreallocateBPFMaps = in.PreallocateBPFMaps out.PreallocateBPFMaps = in.PreallocateBPFMaps
out.SidecarIstioProxyImage = in.SidecarIstioProxyImage out.SidecarIstioProxyImage = in.SidecarIstioProxyImage
out.ClusterName = in.ClusterName out.ClusterName = in.ClusterName
out.ClusterID = in.ClusterID
out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode
out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller
// INFO: in.ContainerRuntimeLabels opted out of conversion generation // INFO: in.ContainerRuntimeLabels opted out of conversion generation
@ -2053,6 +2054,7 @@ func autoConvert_kops_CiliumNetworkingSpec_To_v1alpha2_CiliumNetworkingSpec(in *
out.PreallocateBPFMaps = in.PreallocateBPFMaps out.PreallocateBPFMaps = in.PreallocateBPFMaps
out.SidecarIstioProxyImage = in.SidecarIstioProxyImage out.SidecarIstioProxyImage = in.SidecarIstioProxyImage
out.ClusterName = in.ClusterName out.ClusterName = in.ClusterName
out.ClusterID = in.ClusterID
out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode
out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller
out.IPAM = in.IPAM out.IPAM = in.IPAM

View File

@ -401,6 +401,9 @@ type CiliumNetworkingSpec struct {
SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"` SidecarIstioProxyImage string `json:"sidecarIstioProxyImage,omitempty"`
// ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters. // ClusterName is the name of the cluster. It is only relevant when building a mesh of clusters.
ClusterName string `json:"clusterName,omitempty"` ClusterName string `json:"clusterName,omitempty"`
// ClusterID is the ID of the cluster. It is only relevant when building a mesh of clusters.
// Must be a number between 1 and 255.
ClusterID uint8 `json:"clusterID,omitempty"`
// ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests. // ToFQDNsDNSRejectResponseCode sets the DNS response code for rejecting DNS requests.
// Possible values are "nameError" or "refused". // Possible values are "nameError" or "refused".
// Default: refused // Default: refused

View File

@ -2124,6 +2124,7 @@ func autoConvert_v1alpha3_CiliumNetworkingSpec_To_kops_CiliumNetworkingSpec(in *
out.PreallocateBPFMaps = in.PreallocateBPFMaps out.PreallocateBPFMaps = in.PreallocateBPFMaps
out.SidecarIstioProxyImage = in.SidecarIstioProxyImage out.SidecarIstioProxyImage = in.SidecarIstioProxyImage
out.ClusterName = in.ClusterName out.ClusterName = in.ClusterName
out.ClusterID = in.ClusterID
out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode
out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller
out.IPAM = in.IPAM out.IPAM = in.IPAM
@ -2188,6 +2189,7 @@ func autoConvert_kops_CiliumNetworkingSpec_To_v1alpha3_CiliumNetworkingSpec(in *
out.PreallocateBPFMaps = in.PreallocateBPFMaps out.PreallocateBPFMaps = in.PreallocateBPFMaps
out.SidecarIstioProxyImage = in.SidecarIstioProxyImage out.SidecarIstioProxyImage = in.SidecarIstioProxyImage
out.ClusterName = in.ClusterName out.ClusterName = in.ClusterName
out.ClusterID = in.ClusterID
out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode out.ToFQDNsDNSRejectResponseCode = in.ToFQDNsDNSRejectResponseCode
out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller out.ToFQDNsEnablePoller = in.ToFQDNsEnablePoller
out.IPAM = in.IPAM out.IPAM = in.IPAM

View File

@ -895,6 +895,11 @@ func Test_Validate_Cilium(t *testing.T) {
}, },
}, },
}, },
{
Cilium: kops.CiliumNetworkingSpec{
ClusterID: 253,
},
},
{ {
Cilium: kops.CiliumNetworkingSpec{ Cilium: kops.CiliumNetworkingSpec{
Masquerade: fi.PtrTo(true), Masquerade: fi.PtrTo(true),

View File

@ -206,6 +206,7 @@ spec:
bpfNATGlobalMax: 524288 bpfNATGlobalMax: 524288
bpfNeighGlobalMax: 524288 bpfNeighGlobalMax: 524288
bpfPolicyMapMax: 16384 bpfPolicyMapMax: 16384
clusterID: 253
clusterName: default clusterName: default
cpuRequest: 25m cpuRequest: 25m
disableCNPStatusUpdates: true disableCNPStatusUpdates: true

View File

@ -162,7 +162,7 @@ spec:
version: 9.99.0 version: 9.99.0
- id: k8s-1.16 - id: k8s-1.16
manifest: networking.cilium.io/k8s-1.16-v1.13.yaml manifest: networking.cilium.io/k8s-1.16-v1.13.yaml
manifestHash: 94282761f698163d4f9aa873a28fc28992db00d8f335c9c9a27d2a91cb8802fd manifestHash: d2ad53421a11b1a5fca6315c724813682a49d4c2e66b0213d1e6faf6efb1cb50
name: networking.cilium.io name: networking.cilium.io
needsPKI: true needsPKI: true
needsRollingUpdate: all needsRollingUpdate: all

View File

@ -51,6 +51,7 @@ data:
bpf-neigh-global-max: "524288" bpf-neigh-global-max: "524288"
bpf-policy-map-max: "16384" bpf-policy-map-max: "16384"
cgroup-root: /run/cilium/cgroupv2 cgroup-root: /run/cilium/cgroupv2
cluster-id: "253"
cluster-name: default cluster-name: default
debug: "false" debug: "false"
disable-cnp-status-updates: "true" disable-cnp-status-updates: "true"

View File

@ -28,6 +28,7 @@ spec:
networkCIDR: 172.20.0.0/16 networkCIDR: 172.20.0.0/16
networking: networking:
cilium: cilium:
clusterID: 253
hubble: hubble:
enabled: true enabled: true
nonMasqueradeCIDR: 100.64.0.0/10 nonMasqueradeCIDR: 100.64.0.0/10

View File

@ -193,6 +193,11 @@ data:
# Name of the cluster. Only relevant when building a mesh of clusters. # Name of the cluster. Only relevant when building a mesh of clusters.
cluster-name: "{{ .ClusterName }}" cluster-name: "{{ .ClusterName }}"
# ID of the cluster. Only relevant when building a mesh of clusters.
# Must be a number between 1 and 255.
{{ if .ClusterID }}
cluster-id: "{{ .ClusterID }}"
{{ end }}
# DNS response code for rejecting DNS requests, # DNS response code for rejecting DNS requests,
# available options are "nameError" and "refused" # available options are "nameError" and "refused"