Skip to content

Commit

Permalink
Merge pull request #3625 from noironetworks/aci-6042-rke-1.5.11
Browse files Browse the repository at this point in the history
[release/v1.5] Add ACI CNI 6042 variables
  • Loading branch information
kinarashah authored Jul 5, 2024
2 parents 6958487 + c3cc433 commit fa04078
Show file tree
Hide file tree
Showing 5 changed files with 2,151 additions and 1,114 deletions.
20 changes: 20 additions & 0 deletions cluster/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ const (
DefaultAciApicConnectionRetryLimit = "5"
DefaultAciTaintNotReadyNode = "false"
DefaultAciDropLogDisableEvents = "false"
DefaultAciOpflexStartupEnabled = "false"
DefaultAciOpflexStartupPolicyDuration = "60"
DefaultAciOpflexStartupResolveAftConn = "false"
DefaultAciOpflexSwitchSyncDelay = "5"
DefaultAciOpflexSwitchSyncDynamic = "10"
KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file"
DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml"

Expand Down Expand Up @@ -844,6 +849,11 @@ func (c *Cluster) setClusterNetworkDefaults() {
AciUseSystemNodePriorityClass: DefaultAciUseSystemNodePriorityClass,
AciContainersMemoryRequest: DefaultAciAciContainersMemoryRequest,
AciContainersMemoryLimit: DefaultAciAciContainersMemoryLimit,
AciOpflexStartupEnabled: DefaultAciOpflexStartupEnabled,
AciOpflexStartupPolicyDuration: DefaultAciOpflexStartupPolicyDuration,
AciOpflexStartupResolveAftConn: DefaultAciOpflexStartupResolveAftConn,
AciOpflexSwitchSyncDelay: DefaultAciOpflexSwitchSyncDelay,
AciOpflexSwitchSyncDynamic: DefaultAciOpflexSwitchSyncDynamic,
}
}
if c.Network.CalicoNetworkProvider != nil {
Expand Down Expand Up @@ -925,6 +935,11 @@ func (c *Cluster) setClusterNetworkDefaults() {
setDefaultIfEmpty(&c.Network.AciNetworkProvider.ApicConnectionRetryLimit, DefaultAciApicConnectionRetryLimit)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.TaintNotReadyNode, DefaultAciTaintNotReadyNode)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.DropLogDisableEvents, DefaultAciDropLogDisableEvents)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexStartupEnabled, DefaultAciOpflexStartupEnabled)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexStartupPolicyDuration, DefaultAciOpflexStartupPolicyDuration)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexStartupResolveAftConn, DefaultAciOpflexStartupResolveAftConn)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexSwitchSyncDelay, DefaultAciOpflexSwitchSyncDelay)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexSwitchSyncDynamic, DefaultAciOpflexSwitchSyncDynamic)
networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit
networkPluginConfigDefaultsMap[AciOVSMemoryRequest] = c.Network.AciNetworkProvider.OVSMemoryRequest
networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy
Expand Down Expand Up @@ -1031,6 +1046,11 @@ func (c *Cluster) setClusterNetworkDefaults() {
networkPluginConfigDefaultsMap[AciApicConnectionRetryLimit] = c.Network.AciNetworkProvider.ApicConnectionRetryLimit
networkPluginConfigDefaultsMap[AciTaintNotReadyNode] = c.Network.AciNetworkProvider.TaintNotReadyNode
networkPluginConfigDefaultsMap[AciDropLogDisableEvents] = c.Network.AciNetworkProvider.DropLogDisableEvents
networkPluginConfigDefaultsMap[AciOpflexStartupEnabled] = c.Network.AciNetworkProvider.OpflexStartupEnabled
networkPluginConfigDefaultsMap[AciOpflexStartupPolicyDuration] = c.Network.AciNetworkProvider.OpflexStartupPolicyDuration
networkPluginConfigDefaultsMap[AciOpflexStartupResolveAftConn] = c.Network.AciNetworkProvider.OpflexStartupResolveAftConn
networkPluginConfigDefaultsMap[AciOpflexSwitchSyncDelay] = c.Network.AciNetworkProvider.OpflexSwitchSyncDelay
networkPluginConfigDefaultsMap[AciOpflexSwitchSyncDynamic] = c.Network.AciNetworkProvider.OpflexSwitchSyncDynamic
}
for k, v := range networkPluginConfigDefaultsMap {
setDefaultIfEmptyMapValue(c.Network.Options, k, v)
Expand Down
15 changes: 15 additions & 0 deletions cluster/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ const (
AciApicConnectionRetryLimit = "aci_apic_connection_retry_limit"
AciTaintNotReadyNode = "aci_taint_not_ready_node"
AciDropLogDisableEvents = "aci_drop_log_disable_events"
AciOpflexStartupEnabled = "aci_opflex_startup_enabled"
AciOpflexStartupPolicyDuration = "aci_opflex_startup_policy_duration"
AciOpflexStartupResolveAftConn = "aci_opflex_startup_resolve_aft_conn"
AciOpflexSwitchSyncDelay = "aci_opflex_switch_sync_delay"
AciOpflexSwitchSyncDynamic = "aci_opflex_switch_sync_dynamic"
// List of map keys to be used with network templates

// EtcdEndpoints is the server address for Etcd, used by calico
Expand Down Expand Up @@ -356,6 +361,11 @@ const (
ApicConnectionRetryLimit = "ApicConnectionRetryLimit"
TaintNotReadyNode = "TaintNotReadyNode"
DropLogDisableEvents = "DropLogDisableEvents"
OpflexStartupEnabled = "OpflexStartupEnabled"
OpflexStartupPolicyDuration = "OpflexStartupPolicyDuration"
OpflexStartupResolveAftConn = "OpflexStartupResolveAftConn"
OpflexSwitchSyncDelay = "OpflexSwitchSyncDelay"
OpflexSwitchSyncDynamic = "OpflexSwitchSyncDynamic"
)

type IPPool struct {
Expand Down Expand Up @@ -724,6 +734,11 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{})
ApicConnectionRetryLimit: c.Network.Options[AciApicConnectionRetryLimit],
TaintNotReadyNode: c.Network.Options[AciTaintNotReadyNode],
DropLogDisableEvents: c.Network.Options[AciDropLogDisableEvents],
OpflexStartupEnabled: c.Network.Options[AciOpflexStartupEnabled],
OpflexStartupPolicyDuration: c.Network.Options[AciOpflexStartupPolicyDuration],
OpflexStartupResolveAftConn: c.Network.Options[AciOpflexStartupResolveAftConn],
OpflexSwitchSyncDelay: c.Network.Options[AciOpflexSwitchSyncDelay],
OpflexSwitchSyncDynamic: c.Network.Options[AciOpflexSwitchSyncDynamic],
NodeSnatRedirectExclude: c.Network.AciNetworkProvider.NodeSnatRedirectExclude,
AciCniDeployContainer: c.SystemImages.AciCniDeployContainer,
AciHostContainer: c.SystemImages.AciHostContainer,
Expand Down
4 changes: 2 additions & 2 deletions data/bindata.go

Large diffs are not rendered by default.

3,221 changes: 2,109 additions & 1,112 deletions data/data.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions types/rke_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,11 @@ type AciNetworkProvider struct {
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"`
OpflexStartupEnabled string `yaml:"opflex_startup_enabled,omitempty" json:"opflexStartupEnabled,omitempty"`
OpflexStartupPolicyDuration string `yaml:"opflex_startup_policy_duration,omitempty" json:"opflexStartupPolicyDuration,omitempty"`
OpflexStartupResolveAftConn string `yaml:"opflex_startup_resolve_aft_conn,omitempty" json:"opflexStartupResolveAftConn,omitempty"`
OpflexSwitchSyncDelay string `yaml:"opflex_switch_sync_delay,omitempty" json:"opflexSwitchSyncDelay,omitempty"`
OpflexSwitchSyncDynamic string `yaml:"opflex_switch_sync_dynamic,omitempty" json:"opflexSwitchSyncDynamic,omitempty"`
}

type KubernetesServicesOptions struct {
Expand Down

0 comments on commit fa04078

Please sign in to comment.