From 92d946b1e1035a832939becfc438ec0bc9b5c258 Mon Sep 17 00:00:00 2001 From: JeffinKottaram Date: Thu, 29 Feb 2024 07:57:24 -0800 Subject: [PATCH] Add ACI CNI 6041 variables --- cluster/defaults.go | 12 ++++++++++++ cluster/network.go | 12 ++++++++++++ types/rke_types.go | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/cluster/defaults.go b/cluster/defaults.go index 740ca9524..fd454e3bc 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -137,6 +137,10 @@ const ( DefaultAciEnableOpflexAgentReconnect = "false" DefaultAciOpflexOpensslCompat = "false" DefaultAciTolerationSeconds = "600" + DefaultAciDisableHppRendering = "false" + DefaultAciApicConnectionRetryLimit = "5" + DefaultAciTaintNotReadyNode = "false" + DefaultAciDropLogDisableEvents = "false" KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file" DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml" @@ -917,6 +921,10 @@ func (c *Cluster) setClusterNetworkDefaults() { setDefaultIfEmpty(&c.Network.AciNetworkProvider.EnableOpflexAgentReconnect, DefaultAciEnableOpflexAgentReconnect) setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexOpensslCompat, DefaultAciOpflexOpensslCompat) setDefaultIfEmpty(&c.Network.AciNetworkProvider.TolerationSeconds, DefaultAciTolerationSeconds) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.DisableHppRendering, DefaultAciDisableHppRendering) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.ApicConnectionRetryLimit, DefaultAciApicConnectionRetryLimit) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.TaintNotReadyNode, DefaultAciTaintNotReadyNode) + setDefaultIfEmpty(&c.Network.AciNetworkProvider.DropLogDisableEvents, DefaultAciDropLogDisableEvents) networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit networkPluginConfigDefaultsMap[AciOVSMemoryRequest] = c.Network.AciNetworkProvider.OVSMemoryRequest networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy @@ -1019,6 +1027,10 @@ func (c *Cluster) setClusterNetworkDefaults() { networkPluginConfigDefaultsMap[AciEnableOpflexAgentReconnect] = c.Network.AciNetworkProvider.EnableOpflexAgentReconnect networkPluginConfigDefaultsMap[AciOpflexOpensslCompat] = c.Network.AciNetworkProvider.OpflexOpensslCompat networkPluginConfigDefaultsMap[AciTolerationSeconds] = c.Network.AciNetworkProvider.TolerationSeconds + networkPluginConfigDefaultsMap[AciDisableHppRendering] = c.Network.AciNetworkProvider.DisableHppRendering + networkPluginConfigDefaultsMap[AciApicConnectionRetryLimit] = c.Network.AciNetworkProvider.ApicConnectionRetryLimit + networkPluginConfigDefaultsMap[AciTaintNotReadyNode] = c.Network.AciNetworkProvider.TaintNotReadyNode + networkPluginConfigDefaultsMap[AciDropLogDisableEvents] = c.Network.AciNetworkProvider.DropLogDisableEvents } for k, v := range networkPluginConfigDefaultsMap { setDefaultIfEmptyMapValue(c.Network.Options, k, v) diff --git a/cluster/network.go b/cluster/network.go index 5fd829a77..dab2db6a8 100644 --- a/cluster/network.go +++ b/cluster/network.go @@ -177,6 +177,10 @@ const ( AciEnableOpflexAgentReconnect = "aci_enable_opflex_agent_reconnect" AciOpflexOpensslCompat = "aci_opflex_openssl_compat" AciTolerationSeconds = "aci_toleration_seconds" + AciDisableHppRendering = "aci_disable_hpp_rendering" + AciApicConnectionRetryLimit = "aci_apic_connection_retry_limit" + AciTaintNotReadyNode = "aci_taint_not_ready_node" + AciDropLogDisableEvents = "aci_drop_log_disable_events" // List of map keys to be used with network templates // EtcdEndpoints is the server address for Etcd, used by calico @@ -348,6 +352,10 @@ const ( OpflexOpensslCompat = "OpflexOpensslCompat" NodeSnatRedirectExclude = "NodeSnatRedirectExclude" TolerationSeconds = "TolerationSeconds" + DisableHppRendering = "DisableHppRendering" + ApicConnectionRetryLimit = "ApicConnectionRetryLimit" + TaintNotReadyNode = "TaintNotReadyNode" + DropLogDisableEvents = "DropLogDisableEvents" ) type IPPool struct { @@ -712,6 +720,10 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{}) EnableOpflexAgentReconnect: c.Network.Options[AciEnableOpflexAgentReconnect], OpflexOpensslCompat: c.Network.Options[AciOpflexOpensslCompat], TolerationSeconds: c.Network.Options[AciTolerationSeconds], + DisableHppRendering: c.Network.Options[AciDisableHppRendering], + ApicConnectionRetryLimit: c.Network.Options[AciApicConnectionRetryLimit], + TaintNotReadyNode: c.Network.Options[AciTaintNotReadyNode], + DropLogDisableEvents: c.Network.Options[AciDropLogDisableEvents], NodeSnatRedirectExclude: c.Network.AciNetworkProvider.NodeSnatRedirectExclude, AciCniDeployContainer: c.SystemImages.AciCniDeployContainer, AciHostContainer: c.SystemImages.AciHostContainer, diff --git a/types/rke_types.go b/types/rke_types.go index 352231a97..09819c98d 100644 --- a/types/rke_types.go +++ b/types/rke_types.go @@ -698,6 +698,10 @@ type AciNetworkProvider struct { OpflexOpensslCompat string `yaml:"opflex_openssl_compat,omitempty" json:"opflexOpensslCompat,omitempty"` NodeSnatRedirectExclude []map[string]string `yaml:"node_snat_redirect_exclude,omitempty" json:"nodeSnatRedirectExclude,omitempty"` TolerationSeconds string `yaml:"toleration_seconds,omitempty" json:"tolerationSeconds,omitempty"` + DisableHppRendering string `yaml:"disable_hpp_rendering,omitempty" json:"disableHppRendering,omitempty"` + ApicConnectionRetryLimit string `yaml:"apic_connection_retry_limit,omitempty" json:"apicConnectionRetryLimit,omitempty"` + TaintNotReadyNode string `yaml:"taint_not_ready_node,omitempty" json:"taintNotReadyNode,omitempty"` + DropLogDisableEvents string `yaml:"drop_log_disable_events,omitempty" json:"dropLogDisableEvents,omitempty"` } type KubernetesServicesOptions struct {