Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v1.5] Add ACI CNI 6042 variables #3625

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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