1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-10 19:39:14 +00:00

Merge pull request #3127 from noironetworks/aci-5-2-3-5

This commit is contained in:
Jiaqi Luo
2022-12-28 13:22:32 -07:00
committed by GitHub
6 changed files with 1350 additions and 107 deletions

View File

@@ -114,6 +114,7 @@ const (
DefaultAciMultusDisable = "true" DefaultAciMultusDisable = "true"
DefaultAciNoWaitForServiceEpReadiness = "false" DefaultAciNoWaitForServiceEpReadiness = "false"
DefaultAciAddExternalSubnetsToRdconfig = "false" DefaultAciAddExternalSubnetsToRdconfig = "false"
DefaultAciServiceGraphEndpointAddDelay = "0"
KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file" KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file"
DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml" DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml"
@@ -672,6 +673,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
AciMultusDisable: DefaultAciMultusDisable, AciMultusDisable: DefaultAciMultusDisable,
AciNoWaitForServiceEpReadiness: DefaultAciNoWaitForServiceEpReadiness, AciNoWaitForServiceEpReadiness: DefaultAciNoWaitForServiceEpReadiness,
AciAddExternalSubnetsToRdconfig: DefaultAciAddExternalSubnetsToRdconfig, AciAddExternalSubnetsToRdconfig: DefaultAciAddExternalSubnetsToRdconfig,
AciServiceGraphEndpointAddDelay: DefaultAciServiceGraphEndpointAddDelay,
} }
} }
if c.Network.CalicoNetworkProvider != nil { if c.Network.CalicoNetworkProvider != nil {
@@ -730,6 +732,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
setDefaultIfEmpty(&c.Network.AciNetworkProvider.UseClusterRole, DefaultAciUseClusterRole) setDefaultIfEmpty(&c.Network.AciNetworkProvider.UseClusterRole, DefaultAciUseClusterRole)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness, DefaultAciNoWaitForServiceEpReadiness) setDefaultIfEmpty(&c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness, DefaultAciNoWaitForServiceEpReadiness)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig, DefaultAciAddExternalSubnetsToRdconfig) setDefaultIfEmpty(&c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig, DefaultAciAddExternalSubnetsToRdconfig)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay, DefaultAciServiceGraphEndpointAddDelay)
networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit
networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy
networkPluginConfigDefaultsMap[AciPBRTrackingNonSnat] = c.Network.AciNetworkProvider.PBRTrackingNonSnat networkPluginConfigDefaultsMap[AciPBRTrackingNonSnat] = c.Network.AciNetworkProvider.PBRTrackingNonSnat
@@ -771,6 +774,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
networkPluginConfigDefaultsMap[AciMultusDisable] = c.Network.AciNetworkProvider.MultusDisable networkPluginConfigDefaultsMap[AciMultusDisable] = c.Network.AciNetworkProvider.MultusDisable
networkPluginConfigDefaultsMap[AciNoWaitForServiceEpReadiness] = c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness networkPluginConfigDefaultsMap[AciNoWaitForServiceEpReadiness] = c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness
networkPluginConfigDefaultsMap[AciAddExternalSubnetsToRdconfig] = c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig networkPluginConfigDefaultsMap[AciAddExternalSubnetsToRdconfig] = c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig
networkPluginConfigDefaultsMap[AciServiceGraphEndpointAddDelay] = c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay
networkPluginConfigDefaultsMap[AciSystemIdentifier] = c.Network.AciNetworkProvider.SystemIdentifier networkPluginConfigDefaultsMap[AciSystemIdentifier] = c.Network.AciNetworkProvider.SystemIdentifier
networkPluginConfigDefaultsMap[AciToken] = c.Network.AciNetworkProvider.Token networkPluginConfigDefaultsMap[AciToken] = c.Network.AciNetworkProvider.Token
networkPluginConfigDefaultsMap[AciApicUserName] = c.Network.AciNetworkProvider.ApicUserName networkPluginConfigDefaultsMap[AciApicUserName] = c.Network.AciNetworkProvider.ApicUserName

View File

@@ -149,6 +149,7 @@ const (
AciMultusDisable = "aci_multus_disable" AciMultusDisable = "aci_multus_disable"
AciNoWaitForServiceEpReadiness = "aci_no_wait_for_service_ep_readiness" AciNoWaitForServiceEpReadiness = "aci_no_wait_for_service_ep_readiness"
AciAddExternalSubnetsToRdconfig = "aci_add_external_subnets_to_rdconfig" AciAddExternalSubnetsToRdconfig = "aci_add_external_subnets_to_rdconfig"
AciServiceGraphEndpointAddDelay = "aci_service_graph_endpoint_add_delay"
// List of map keys to be used with network templates // List of map keys to be used with network templates
// EtcdEndpoints is the server address for Etcd, used by calico // EtcdEndpoints is the server address for Etcd, used by calico
@@ -287,6 +288,8 @@ const (
MultusDisable = "MultusDisable" MultusDisable = "MultusDisable"
NoWaitForServiceEpReadiness = "NoWaitForServiceEpReadiness" NoWaitForServiceEpReadiness = "NoWaitForServiceEpReadiness"
AddExternalSubnetsToRdconfig = "AddExternalSubnetsToRdconfig" AddExternalSubnetsToRdconfig = "AddExternalSubnetsToRdconfig"
ServiceGraphEndpointAddDelay = "ServiceGraphEndpointAddDelay"
ServiceGraphEndpointAddServices = "ServiceGraphEndpointAddServices"
OVSMemoryLimit = "OVSMemoryLimit" OVSMemoryLimit = "OVSMemoryLimit"
NodeSubnet = "NodeSubnet" NodeSubnet = "NodeSubnet"
NodeSelector = "NodeSelector" NodeSelector = "NodeSelector"
@@ -585,6 +588,8 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{})
MultusDisable: c.Network.Options[AciMultusDisable], MultusDisable: c.Network.Options[AciMultusDisable],
NoWaitForServiceEpReadiness: c.Network.Options[AciNoWaitForServiceEpReadiness], NoWaitForServiceEpReadiness: c.Network.Options[AciNoWaitForServiceEpReadiness],
AddExternalSubnetsToRdconfig: c.Network.Options[AciAddExternalSubnetsToRdconfig], AddExternalSubnetsToRdconfig: c.Network.Options[AciAddExternalSubnetsToRdconfig],
ServiceGraphEndpointAddDelay: c.Network.Options[AciServiceGraphEndpointAddDelay],
ServiceGraphEndpointAddServices: c.Network.AciNetworkProvider.ServiceGraphEndpointAddServices,
AciCniDeployContainer: c.SystemImages.AciCniDeployContainer, AciCniDeployContainer: c.SystemImages.AciCniDeployContainer,
AciHostContainer: c.SystemImages.AciHostContainer, AciHostContainer: c.SystemImages.AciHostContainer,
AciOpflexContainer: c.SystemImages.AciOpflexContainer, AciOpflexContainer: c.SystemImages.AciOpflexContainer,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -663,6 +663,8 @@ type AciNetworkProvider struct {
UseClusterRole string `yaml:"use_cluster_role,omitempty" json:"useClusterRole,omitempty"` UseClusterRole string `yaml:"use_cluster_role,omitempty" json:"useClusterRole,omitempty"`
NoWaitForServiceEpReadiness string `yaml:"no_wait_for_service_ep_readiness,omitempty" json:"noWaitForServiceEpReadiness,omitempty"` NoWaitForServiceEpReadiness string `yaml:"no_wait_for_service_ep_readiness,omitempty" json:"noWaitForServiceEpReadiness,omitempty"`
AddExternalSubnetsToRdconfig string `yaml:"add_external_subnets_to_rdconfig,omitempty" json:"addExternalSubnetsToRdconfig,omitempty"` AddExternalSubnetsToRdconfig string `yaml:"add_external_subnets_to_rdconfig,omitempty" json:"addExternalSubnetsToRdconfig,omitempty"`
ServiceGraphEndpointAddDelay string `yaml:"service_graph_endpoint_add_delay,omitempty" json:"serviceGraphEndpointAddDelay,omitempty"`
ServiceGraphEndpointAddServices []map[string]string `yaml:"service_graph_endpoint_add_services,omitempty" json:"serviceGraphEndpointAddServices,omitempty"`
} }
type KubernetesServicesOptions struct { type KubernetesServicesOptions struct {

View File

@@ -72,6 +72,19 @@ func (in *AciNetworkProvider) DeepCopyInto(out *AciNetworkProvider) {
*out = make([]string, len(*in)) *out = make([]string, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.ServiceGraphEndpointAddServices != nil {
in, out := &in.ServiceGraphEndpointAddServices, &out.ServiceGraphEndpointAddServices
*out = make([]map[string]string, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
}
return return
} }