Skip to content

Commit

Permalink
Merge pull request #3464 from kinarashah/ckp
Browse files Browse the repository at this point in the history
[v1.5] Added ACI 6.0.3.1 variables
  • Loading branch information
snasovich authored Jan 4, 2024
2 parents f2373b7 + 4e119cb commit ae3630a
Show file tree
Hide file tree
Showing 5 changed files with 429 additions and 330 deletions.
137 changes: 84 additions & 53 deletions cluster/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,59 +76,63 @@ const (

DefaultCanalFlexVolPluginDirectory = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds"

DefaultAciApicRefreshTime = "1200"
DefaultAciOVSMemoryLimit = "1Gi"
DefaultAciImagePullPolicy = "Always"
DefaultAciServiceMonitorInterval = "5"
DefaultAciPBRTrackingNonSnat = "false"
DefaultAciInstallIstio = "false"
DefaultAciIstioProfile = "demo"
DefaultAciDropLogEnable = "true"
DefaultAciControllerLogLevel = "info"
DefaultAciHostAgentLogLevel = "info"
DefaultAciOpflexAgentLogLevel = "info"
DefaultAciUseAciCniPriorityClass = "false"
DefaultAciNoPriorityClass = "false"
DefaultAciMaxNodesSvcGraph = "32"
DefaultAciSnatContractScope = "global"
DefaultAciSnatNamespace = "aci-containers-system"
DefaultAciCApic = "false"
DefaultAciPodSubnetChunkSize = "32"
DefaultAciSnatPortRangeStart = "5000"
DefaultAciSnatPortRangeEnd = "65000"
DefaultAciSnatPortsPerNode = "3000"
DefaultAciUseHostNetnsVolume = "false"
DefaultAciRunGbpContainer = "false"
DefaultAciRunOpflexServerContainer = "false"
DefaultAciUseAciAnywhereCRD = "false"
DefaultAciEnableEndpointSlice = "false"
DefaultAciOpflexClientSSL = "true"
DefaultAciUsePrivilegedContainer = "false"
DefaultAciUseOpflexServerVolume = "false"
DefaultAciDurationWaitForNetwork = "210"
DefaultAciUseClusterRole = "true"
DefaultAciDisableWaitForNetwork = "false"
DefaultAciApicSubscriptionDelay = "0"
DefaultAciApicRefreshTickerAdjust = "0"
DefaultAciDisablePeriodicSnatGlobalInfoSync = "false"
DefaultAciOpflexDeviceDeleteTimeout = "0"
DefaultAciMTUHeadRoom = "0"
DefaultAciNodePodIfEnable = "false"
DefaultAciSriovEnable = "false"
DefaultAciMultusDisable = "true"
DefaultAciNoWaitForServiceEpReadiness = "false"
DefaultAciAddExternalSubnetsToRdconfig = "false"
DefaultAciServiceGraphEndpointAddDelay = "0"
DefaultAciHppOptimization = "false"
DefaultAciSleepTimeSnatGlobalInfoSync = "0"
DefaultAciOpflexAgentOpflexAsyncjsonEnabled = "false"
DefaultAciOpflexAgentOvsAsyncjsonEnabled = "false"
DefaultAciOpflexAgentPolicyRetryDelayTimer = "10"
DefaultAciAciMultipod = "false"
DefaultAciAciMultipodUbuntu = "false"
DefaultAciDhcpRenewMaxRetryCount = "0"
DefaultAciDhcpDelay = "0"

DefaultAciApicRefreshTime = "1200"
DefaultAciOVSMemoryLimit = "1Gi"
DefaultAciOVSMemoryRequest = "128Mi"
DefaultAciImagePullPolicy = "Always"
DefaultAciServiceMonitorInterval = "5"
DefaultAciPBRTrackingNonSnat = "false"
DefaultAciInstallIstio = "false"
DefaultAciIstioProfile = "demo"
DefaultAciDropLogEnable = "true"
DefaultAciControllerLogLevel = "info"
DefaultAciHostAgentLogLevel = "info"
DefaultAciOpflexAgentLogLevel = "info"
DefaultAciUseAciCniPriorityClass = "false"
DefaultAciNoPriorityClass = "false"
DefaultAciMaxNodesSvcGraph = "32"
DefaultAciSnatContractScope = "global"
DefaultAciSnatNamespace = "aci-containers-system"
DefaultAciCApic = "false"
DefaultAciPodSubnetChunkSize = "32"
DefaultAciSnatPortRangeStart = "5000"
DefaultAciSnatPortRangeEnd = "65000"
DefaultAciSnatPortsPerNode = "3000"
DefaultAciUseHostNetnsVolume = "false"
DefaultAciRunGbpContainer = "false"
DefaultAciRunOpflexServerContainer = "false"
DefaultAciUseAciAnywhereCRD = "false"
DefaultAciEnableEndpointSlice = "false"
DefaultAciOpflexClientSSL = "true"
DefaultAciUsePrivilegedContainer = "false"
DefaultAciUseOpflexServerVolume = "false"
DefaultAciDurationWaitForNetwork = "210"
DefaultAciUseClusterRole = "true"
DefaultAciDisableWaitForNetwork = "false"
DefaultAciApicSubscriptionDelay = "0"
DefaultAciApicRefreshTickerAdjust = "0"
DefaultAciDisablePeriodicSnatGlobalInfoSync = "false"
DefaultAciOpflexDeviceDeleteTimeout = "0"
DefaultAciMTUHeadRoom = "0"
DefaultAciNodePodIfEnable = "false"
DefaultAciSriovEnable = "false"
DefaultAciMultusDisable = "true"
DefaultAciNoWaitForServiceEpReadiness = "false"
DefaultAciAddExternalSubnetsToRdconfig = "false"
DefaultAciServiceGraphEndpointAddDelay = "0"
DefaultAciHppOptimization = "false"
DefaultAciSleepTimeSnatGlobalInfoSync = "0"
DefaultAciOpflexAgentOpflexAsyncjsonEnabled = "false"
DefaultAciOpflexAgentOvsAsyncjsonEnabled = "false"
DefaultAciOpflexAgentPolicyRetryDelayTimer = "10"
DefaultAciOpflexDeviceReconnectWaitTimeout = "5"
DefaultAciAciMultipod = "false"
DefaultAciAciMultipodUbuntu = "false"
DefaultAciDhcpRenewMaxRetryCount = "0"
DefaultAciDhcpDelay = "0"
DefaultAciUseSystemNodePriorityClass = "false"
DefaultAciAciContainersMemoryLimit = "3Gi"
DefaultAciAciContainersMemoryRequest = "128Mi"
KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file"
DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml"

Expand Down Expand Up @@ -777,6 +781,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
case AciNetworkPlugin:
networkPluginConfigDefaultsMap = map[string]string{
AciOVSMemoryLimit: DefaultAciOVSMemoryLimit,
AciOVSMemoryRequest: DefaultAciOVSMemoryRequest,
AciImagePullPolicy: DefaultAciImagePullPolicy,
AciPBRTrackingNonSnat: DefaultAciPBRTrackingNonSnat,
AciInstallIstio: DefaultAciInstallIstio,
Expand Down Expand Up @@ -825,9 +830,13 @@ func (c *Cluster) setClusterNetworkDefaults() {
AciOpflexAgentOvsAsyncjsonEnabled: DefaultAciOpflexAgentOvsAsyncjsonEnabled,
AciOpflexAgentPolicyRetryDelayTimer: DefaultAciOpflexAgentPolicyRetryDelayTimer,
AciAciMultipod: DefaultAciAciMultipod,
AciOpflexDeviceReconnectWaitTimeout: DefaultAciOpflexDeviceReconnectWaitTimeout,
AciAciMultipodUbuntu: DefaultAciAciMultipodUbuntu,
AciDhcpRenewMaxRetryCount: DefaultAciDhcpRenewMaxRetryCount,
AciDhcpDelay: DefaultAciDhcpDelay,
AciUseSystemNodePriorityClass: DefaultAciUseSystemNodePriorityClass,
AciContainersMemoryRequest: DefaultAciAciContainersMemoryRequest,
AciContainersMemoryLimit: DefaultAciAciContainersMemoryLimit,
}
}
if c.Network.CalicoNetworkProvider != nil {
Expand All @@ -846,6 +855,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
}
if c.Network.AciNetworkProvider != nil {
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OVSMemoryLimit, DefaultAciOVSMemoryLimit)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OVSMemoryRequest, DefaultAciOVSMemoryRequest)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.ImagePullPolicy, DefaultAciImagePullPolicy)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.PBRTrackingNonSnat, DefaultAciPBRTrackingNonSnat)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.InstallIstio, DefaultAciInstallIstio)
Expand Down Expand Up @@ -893,10 +903,15 @@ func (c *Cluster) setClusterNetworkDefaults() {
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexAgentOvsAsyncjsonEnabled, DefaultAciOpflexAgentOvsAsyncjsonEnabled)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexAgentPolicyRetryDelayTimer, DefaultAciOpflexAgentPolicyRetryDelayTimer)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AciMultipod, DefaultAciAciMultipod)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexDeviceReconnectWaitTimeout, DefaultAciOpflexDeviceReconnectWaitTimeout)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AciMultipodUbuntu, DefaultAciAciMultipodUbuntu)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.DhcpRenewMaxRetryCount, DefaultAciDhcpRenewMaxRetryCount)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.DhcpDelay, DefaultAciDhcpDelay)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.UseSystemNodePriorityClass, DefaultAciUseSystemNodePriorityClass)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AciContainersMemoryLimit, DefaultAciAciContainersMemoryLimit)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AciContainersMemoryRequest, DefaultAciAciContainersMemoryRequest)
networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit
networkPluginConfigDefaultsMap[AciOVSMemoryRequest] = c.Network.AciNetworkProvider.OVSMemoryRequest
networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy
networkPluginConfigDefaultsMap[AciPBRTrackingNonSnat] = c.Network.AciNetworkProvider.PBRTrackingNonSnat
networkPluginConfigDefaultsMap[AciInstallIstio] = c.Network.AciNetworkProvider.InstallIstio
Expand Down Expand Up @@ -946,6 +961,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
networkPluginConfigDefaultsMap[AciDhcpRenewMaxRetryCount] = c.Network.AciNetworkProvider.DhcpRenewMaxRetryCount
networkPluginConfigDefaultsMap[AciDhcpDelay] = c.Network.AciNetworkProvider.DhcpDelay
networkPluginConfigDefaultsMap[AciAciMultipod] = c.Network.AciNetworkProvider.AciMultipod
networkPluginConfigDefaultsMap[AciOpflexDeviceReconnectWaitTimeout] = c.Network.AciNetworkProvider.OpflexDeviceReconnectWaitTimeout
networkPluginConfigDefaultsMap[AciAciMultipodUbuntu] = c.Network.AciNetworkProvider.AciMultipodUbuntu
networkPluginConfigDefaultsMap[AciSystemIdentifier] = c.Network.AciNetworkProvider.SystemIdentifier
networkPluginConfigDefaultsMap[AciToken] = c.Network.AciNetworkProvider.Token
Expand Down Expand Up @@ -980,6 +996,21 @@ func (c *Cluster) setClusterNetworkDefaults() {
networkPluginConfigDefaultsMap[AciOverlayVRFName] = c.Network.AciNetworkProvider.OverlayVRFName
networkPluginConfigDefaultsMap[AciGbpPodSubnet] = c.Network.AciNetworkProvider.GbpPodSubnet
networkPluginConfigDefaultsMap[AciOpflexServerPort] = c.Network.AciNetworkProvider.OpflexServerPort
networkPluginConfigDefaultsMap[AciUseSystemNodePriorityClass] = c.Network.AciNetworkProvider.UseSystemNodePriorityClass
networkPluginConfigDefaultsMap[AciAccProvisionOperatorMemoryRequest] = c.Network.AciNetworkProvider.AccProvisionOperatorMemoryRequest
networkPluginConfigDefaultsMap[AciAccProvisionOperatorMemoryLimit] = c.Network.AciNetworkProvider.AccProvisionOperatorMemoryLimit
networkPluginConfigDefaultsMap[AciAciContainersControllerMemoryRequest] = c.Network.AciNetworkProvider.AciContainersControllerMemoryRequest
networkPluginConfigDefaultsMap[AciAciContainersControllerMemoryLimit] = c.Network.AciNetworkProvider.AciContainersControllerMemoryLimit
networkPluginConfigDefaultsMap[AciAciContainersHostMemoryRequest] = c.Network.AciNetworkProvider.AciContainersHostMemoryRequest
networkPluginConfigDefaultsMap[AciAciContainersHostMemoryLimit] = c.Network.AciNetworkProvider.AciContainersHostMemoryLimit
networkPluginConfigDefaultsMap[AciAciContainersOperatorMemoryRequest] = c.Network.AciNetworkProvider.AciContainersOperatorMemoryRequest
networkPluginConfigDefaultsMap[AciAciContainersOperatorMemoryLimit] = c.Network.AciNetworkProvider.AciContainersOperatorMemoryLimit
networkPluginConfigDefaultsMap[AciMcastDaemonMemoryRequest] = c.Network.AciNetworkProvider.McastDaemonMemoryRequest
networkPluginConfigDefaultsMap[AciMcastDaemonMemoryLimit] = c.Network.AciNetworkProvider.McastDaemonMemoryLimit
networkPluginConfigDefaultsMap[AciOpflexAgentMemoryRequest] = c.Network.AciNetworkProvider.OpflexAgentMemoryRequest
networkPluginConfigDefaultsMap[AciOpflexAgentMemoryLimit] = c.Network.AciNetworkProvider.OpflexAgentMemoryLimit
networkPluginConfigDefaultsMap[AciAciContainersMemoryRequest] = c.Network.AciNetworkProvider.AciContainersMemoryRequest
networkPluginConfigDefaultsMap[AciAciContainersMemoryLimit] = c.Network.AciNetworkProvider.AciContainersMemoryLimit
}
for k, v := range networkPluginConfigDefaultsMap {
setDefaultIfEmptyMapValue(c.Network.Options, k, v)
Expand Down
Loading

0 comments on commit ae3630a

Please sign in to comment.