From 0263c835867835f9452fb4412c9110794ae3b6f2 Mon Sep 17 00:00:00 2001 From: siva-muni Date: Thu, 13 Apr 2023 15:04:25 +0530 Subject: [PATCH] Add new variables for ACI-CNI 5.2.3.6 --- cluster/defaults.go | 16 ++++++++++++++++ cluster/network.go | 12 ++++++++++++ types/rke_types.go | 4 ++++ 3 files changed, 32 insertions(+) diff --git a/cluster/defaults.go b/cluster/defaults.go index 65dbde09..bcf0346b 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -118,6 +118,10 @@ const ( DefaultAciNoWaitForServiceEpReadiness = "false" DefaultAciAddExternalSubnetsToRdconfig = "false" DefaultAciServiceGraphEndpointAddDelay = "0" + DefaultAciHppOptimization = "false" + DefaultAciSleepTimeSnatGlobalInfoSync = "0" + DefaultAciOpflexAgentOpflexAsyncjsonEnabled = "false" + DefaultAciOpflexAgentOvsAsyncjsonEnabled = "false" KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file" DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml" @@ -802,6 +806,10 @@ func (c *Cluster) setClusterNetworkDefaults() { AciNoWaitForServiceEpReadiness: DefaultAciNoWaitForServiceEpReadiness, AciAddExternalSubnetsToRdconfig: DefaultAciAddExternalSubnetsToRdconfig, AciServiceGraphEndpointAddDelay: DefaultAciServiceGraphEndpointAddDelay, + AciHppOptimization: DefaultAciHppOptimization, + AciSleepTimeSnatGlobalInfoSync: DefaultAciSleepTimeSnatGlobalInfoSync, + AciOpflexAgentOpflexAsyncjsonEnabled: DefaultAciOpflexAgentOpflexAsyncjsonEnabled, + AciOpflexAgentOvsAsyncjsonEnabled: DefaultAciOpflexAgentOvsAsyncjsonEnabled, } } if c.Network.CalicoNetworkProvider != nil { @@ -861,6 +869,10 @@ func (c *Cluster) setClusterNetworkDefaults() { setDefaultIfEmpty(&c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness, DefaultAciNoWaitForServiceEpReadiness) setDefaultIfEmpty(&c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig, DefaultAciAddExternalSubnetsToRdconfig) setDefaultIfEmpty(&c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay, DefaultAciServiceGraphEndpointAddDelay) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.HppOptimization, DefaultAciHppOptimization) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.SleepTimeSnatGlobalInfoSync, DefaultAciSleepTimeSnatGlobalInfoSync) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexAgentOpflexAsyncjsonEnabled, DefaultAciOpflexAgentOpflexAsyncjsonEnabled) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexAgentOvsAsyncjsonEnabled, DefaultAciOpflexAgentOvsAsyncjsonEnabled) networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy networkPluginConfigDefaultsMap[AciPBRTrackingNonSnat] = c.Network.AciNetworkProvider.PBRTrackingNonSnat @@ -903,6 +915,10 @@ func (c *Cluster) setClusterNetworkDefaults() { networkPluginConfigDefaultsMap[AciNoWaitForServiceEpReadiness] = c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness networkPluginConfigDefaultsMap[AciAddExternalSubnetsToRdconfig] = c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig networkPluginConfigDefaultsMap[AciServiceGraphEndpointAddDelay] = c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay + networkPluginConfigDefaultsMap[AciHppOptimization] = c.Network.AciNetworkProvider.HppOptimization + networkPluginConfigDefaultsMap[AciSleepTimeSnatGlobalInfoSync] = c.Network.AciNetworkProvider.SleepTimeSnatGlobalInfoSync + networkPluginConfigDefaultsMap[AciOpflexAgentOpflexAsyncjsonEnabled] = c.Network.AciNetworkProvider.OpflexAgentOpflexAsyncjsonEnabled + networkPluginConfigDefaultsMap[AciOpflexAgentOvsAsyncjsonEnabled] = c.Network.AciNetworkProvider.OpflexAgentOvsAsyncjsonEnabled networkPluginConfigDefaultsMap[AciSystemIdentifier] = c.Network.AciNetworkProvider.SystemIdentifier networkPluginConfigDefaultsMap[AciToken] = c.Network.AciNetworkProvider.Token networkPluginConfigDefaultsMap[AciApicUserName] = c.Network.AciNetworkProvider.ApicUserName diff --git a/cluster/network.go b/cluster/network.go index 92005bc3..07b3457f 100644 --- a/cluster/network.go +++ b/cluster/network.go @@ -150,6 +150,10 @@ const ( AciNoWaitForServiceEpReadiness = "aci_no_wait_for_service_ep_readiness" AciAddExternalSubnetsToRdconfig = "aci_add_external_subnets_to_rdconfig" AciServiceGraphEndpointAddDelay = "aci_service_graph_endpoint_add_delay" + AciHppOptimization = "aci_hpp_optimization" + AciSleepTimeSnatGlobalInfoSync = "aci_sleep_time_snat_global_info_sync" + AciOpflexAgentOpflexAsyncjsonEnabled = "aci_opflex_agent_opflex_asyncjson_enabled" + AciOpflexAgentOvsAsyncjsonEnabled = "aci_opflex_agent_ovs_asyncjson_enabled" // List of map keys to be used with network templates // EtcdEndpoints is the server address for Etcd, used by calico @@ -290,6 +294,10 @@ const ( AddExternalSubnetsToRdconfig = "AddExternalSubnetsToRdconfig" ServiceGraphEndpointAddDelay = "ServiceGraphEndpointAddDelay" ServiceGraphEndpointAddServices = "ServiceGraphEndpointAddServices" + HppOptimization = "HppOptimization" + SleepTimeSnatGlobalInfoSync = "SleepTimeSnatGlobalInfoSync" + OpflexAgentOpflexAsyncjsonEnabled = "OpflexAgentOpflexAsyncjsonEnabled" + OpflexAgentOvsAsyncjsonEnabled = "OpflexAgentOvsAsyncjsonEnabled" OVSMemoryLimit = "OVSMemoryLimit" NodeSubnet = "NodeSubnet" NodeSelector = "NodeSelector" @@ -590,6 +598,10 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{}) AddExternalSubnetsToRdconfig: c.Network.Options[AciAddExternalSubnetsToRdconfig], ServiceGraphEndpointAddDelay: c.Network.Options[AciServiceGraphEndpointAddDelay], ServiceGraphEndpointAddServices: c.Network.AciNetworkProvider.ServiceGraphEndpointAddServices, + HppOptimization: c.Network.Options[AciHppOptimization], + SleepTimeSnatGlobalInfoSync: c.Network.Options[AciSleepTimeSnatGlobalInfoSync], + OpflexAgentOpflexAsyncjsonEnabled: c.Network.Options[AciOpflexAgentOpflexAsyncjsonEnabled], + OpflexAgentOvsAsyncjsonEnabled: c.Network.Options[AciOpflexAgentOvsAsyncjsonEnabled], AciCniDeployContainer: c.SystemImages.AciCniDeployContainer, AciHostContainer: c.SystemImages.AciHostContainer, AciOpflexContainer: c.SystemImages.AciOpflexContainer, diff --git a/types/rke_types.go b/types/rke_types.go index 01137569..c6f437b6 100644 --- a/types/rke_types.go +++ b/types/rke_types.go @@ -670,6 +670,10 @@ type AciNetworkProvider struct { 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"` + HppOptimization string `yaml:"hpp_optimization,omitempty" json:"hppOptimization,omitempty"` + SleepTimeSnatGlobalInfoSync string `yaml:"sleep_time_snat_global_info_sync,omitempty" json:"sleepTimeSnatGlobalInfoSync,omitempty"` + OpflexAgentOpflexAsyncjsonEnabled string `yaml:"opflex_agent_opflex_asyncjson_enabled,omitempty" json:"opflexAgentOpflexAsyncjsonEnabled,omitempty"` + OpflexAgentOvsAsyncjsonEnabled string `yaml:"opflex_agent_ovs_asyncjson_enabled,omitempty" json:"opflexAgentOvsAsyncjsonEnabled,omitempty"` } type KubernetesServicesOptions struct {