Skip to content

Commit

Permalink
Merge pull request #3466 from noironetworks/aci-6.0.3.2-rke-1.4
Browse files Browse the repository at this point in the history
Added ACI-CNI 6.0.3.2 variables
  • Loading branch information
kinarashah authored Jan 17, 2024
2 parents 186ce0c + e238c7d commit 3ec0460
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 29 deletions.
22 changes: 15 additions & 7 deletions cluster/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ const (
DefaultAciOpflexAgentOpflexAsyncjsonEnabled = "false"
DefaultAciOpflexAgentOvsAsyncjsonEnabled = "false"
DefaultAciOpflexAgentPolicyRetryDelayTimer = "10"
DefaultAciOpflexDeviceReconnectWaitTimeout = "5"
DefaultAciAciMultipod = "false"
DefaultAciAciMultipodUbuntu = "false"
DefaultAciDhcpRenewMaxRetryCount = "0"
DefaultAciDhcpDelay = "0"
DefaultAciUseSystemNodePriorityClass = "false"
DefaultAciAciContainersMemoryLimit = "3Gi"
DefaultAciAciContainersMemoryRequest = "128Mi"
DefaultAciOpflexAgentStatistics = "true"
DefaultAciAddExternalContractToDefaultEpg = "false"
DefaultAciEnableOpflexAgentReconnect = "false"
DefaultAciOpflexOpensslCompat = "false"
DefaultAciTolerationSeconds = "600"
KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file"
DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml"

Expand Down Expand Up @@ -829,7 +833,6 @@ func (c *Cluster) setClusterNetworkDefaults() {
AciOpflexAgentOvsAsyncjsonEnabled: DefaultAciOpflexAgentOvsAsyncjsonEnabled,
AciOpflexAgentPolicyRetryDelayTimer: DefaultAciOpflexAgentPolicyRetryDelayTimer,
AciAciMultipod: DefaultAciAciMultipod,
AciOpflexDeviceReconnectWaitTimeout: DefaultAciOpflexDeviceReconnectWaitTimeout,
AciAciMultipodUbuntu: DefaultAciAciMultipodUbuntu,
AciDhcpRenewMaxRetryCount: DefaultAciDhcpRenewMaxRetryCount,
AciDhcpDelay: DefaultAciDhcpDelay,
Expand Down Expand Up @@ -902,13 +905,17 @@ 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)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexAgentStatistics, DefaultAciOpflexAgentStatistics)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AddExternalContractToDefaultEpg, DefaultAciAddExternalContractToDefaultEpg)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.EnableOpflexAgentReconnect, DefaultAciEnableOpflexAgentReconnect)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.OpflexOpensslCompat, DefaultAciOpflexOpensslCompat)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.TolerationSeconds, DefaultAciTolerationSeconds)
networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit
networkPluginConfigDefaultsMap[AciOVSMemoryRequest] = c.Network.AciNetworkProvider.OVSMemoryRequest
networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy
Expand Down Expand Up @@ -996,20 +1003,21 @@ func (c *Cluster) setClusterNetworkDefaults() {
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
networkPluginConfigDefaultsMap[AciOpflexAgentStatistics] = c.Network.AciNetworkProvider.OpflexAgentStatistics
networkPluginConfigDefaultsMap[AciAddExternalContractToDefaultEpg] = c.Network.AciNetworkProvider.AddExternalContractToDefaultEpg
networkPluginConfigDefaultsMap[AciEnableOpflexAgentReconnect] = c.Network.AciNetworkProvider.EnableOpflexAgentReconnect
networkPluginConfigDefaultsMap[AciOpflexOpensslCompat] = c.Network.AciNetworkProvider.OpflexOpensslCompat
networkPluginConfigDefaultsMap[AciTolerationSeconds] = c.Network.AciNetworkProvider.TolerationSeconds
}
for k, v := range networkPluginConfigDefaultsMap {
setDefaultIfEmptyMapValue(c.Network.Options, k, v)
Expand Down
29 changes: 17 additions & 12 deletions cluster/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,21 @@ const (
AciDhcpRenewMaxRetryCount = "aci_dhcp_renew_max_retry_count"
AciDhcpDelay = "aci_dhcp_delay"
AciUseSystemNodePriorityClass = "aci_use_system_node_priority_class"
AciAccProvisionOperatorMemoryRequest = "aci_acc_provision_operator_memory_request"
AciAccProvisionOperatorMemoryLimit = "aci_acc_provision_operator_memory_limit"
AciAciContainersControllerMemoryRequest = "aci_aci_containers_controller_memory_request"
AciAciContainersControllerMemoryLimit = "aci_aci_containers_controller_memory_limit"
AciAciContainersHostMemoryRequest = "aci_aci_containers_host_memory_request"
AciAciContainersHostMemoryLimit = "aci_aci_containers_host_memory_limit"
AciAciContainersOperatorMemoryRequest = "aci_aci_containers_operator_memory_request"
AciAciContainersOperatorMemoryLimit = "aci_aci_containers_operator_memory_limit"
AciMcastDaemonMemoryRequest = "aci_mcast_daemon_memory_request"
AciMcastDaemonMemoryLimit = "aci_mcast_daemon_memory_limit"
AciOpflexAgentMemoryRequest = "aci_opflex_agent_memory_request"
AciOpflexAgentMemoryLimit = "aci_opflex_agent_memory_limit"
AciAciContainersMemoryRequest = "aci_aci_containers_memory_request"
AciAciContainersMemoryLimit = "aci_aci_containers_memory_limit"
AciOpflexAgentStatistics = "aci_opflex_agent_statistics"
AciAddExternalContractToDefaultEpg = "aci_add_external_contract_to_default_epg"
AciEnableOpflexAgentReconnect = "aci_enable_opflex_agent_reconnect"
AciOpflexOpensslCompat = "aci_opflex_openssl_compat"
AciTolerationSeconds = "aci_toleration_seconds"
// List of map keys to be used with network templates

// EtcdEndpoints is the server address for Etcd, used by calico
Expand Down Expand Up @@ -331,20 +332,22 @@ const (
UpdateStrategy = "UpdateStrategy"
Tolerations = "Tolerations"
UseSystemNodePriorityClass = "UseSystemNodePriorityClass"
AccProvisionOperatorMemoryRequest = "AccProvisionOperatorMemoryRequest"
AccProvisionOperatorMemoryLimit = "AccProvisionOperatorMemoryLimit"
AciContainersControllerMemoryRequest = "AciContainersControllerMemoryRequest"
AciContainersControllerMemoryLimit = "AciContainersControllerMemoryLimit"
AciContainersHostMemoryRequest = "AciContainersHostMemoryRequest"
AciContainersHostMemoryLimit = "AciContainersHostMemoryLimit"
AciContainersOperatorMemoryRequest = "AciContainersOperatorMemoryRequest"
AciContainersOperatorMemoryLimit = "AciContainersOperatorMemoryLimit"
McastDaemonMemoryRequest = "McastDaemonMemoryRequest"
McastDaemonMemoryLimit = "McastDaemonMemoryLimit"
OpflexAgentMemoryRequest = "OpflexAgentMemoryRequest"
OpflexAgentMemoryLimit = "OpflexAgentMemoryLimit"
AciContainersMemoryRequest = "AciContainersMemoryRequest"
AciContainersMemoryLimit = "AciContainersMemoryLimit"
OpflexAgentStatistics = "OpflexAgentStatistics"
AddExternalContractToDefaultEpg = "AddExternalContractToDefaultEpg"
EnableOpflexAgentReconnect = "EnableOpflexAgentReconnect"
OpflexOpensslCompat = "OpflexOpensslCompat"
NodeSnatRedirectExclude = "NodeSnatRedirectExclude"
TolerationSeconds = "TolerationSeconds"
)

type IPPool struct {
Expand Down Expand Up @@ -694,20 +697,22 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{})
DhcpRenewMaxRetryCount: c.Network.Options[AciDhcpRenewMaxRetryCount],
DhcpDelay: c.Network.Options[AciDhcpDelay],
UseSystemNodePriorityClass: c.Network.Options[AciUseSystemNodePriorityClass],
AccProvisionOperatorMemoryRequest: c.Network.Options[AciAccProvisionOperatorMemoryRequest],
AccProvisionOperatorMemoryLimit: c.Network.Options[AciAccProvisionOperatorMemoryLimit],
AciContainersControllerMemoryRequest: c.Network.Options[AciAciContainersControllerMemoryRequest],
AciContainersControllerMemoryLimit: c.Network.Options[AciAciContainersControllerMemoryLimit],
AciContainersHostMemoryRequest: c.Network.Options[AciAciContainersHostMemoryRequest],
AciContainersHostMemoryLimit: c.Network.Options[AciAciContainersHostMemoryLimit],
AciContainersOperatorMemoryRequest: c.Network.Options[AciAciContainersOperatorMemoryRequest],
AciContainersOperatorMemoryLimit: c.Network.Options[AciAciContainersOperatorMemoryLimit],
McastDaemonMemoryRequest: c.Network.Options[AciMcastDaemonMemoryRequest],
McastDaemonMemoryLimit: c.Network.Options[AciMcastDaemonMemoryLimit],
OpflexAgentMemoryRequest: c.Network.Options[AciOpflexAgentMemoryRequest],
OpflexAgentMemoryLimit: c.Network.Options[AciOpflexAgentMemoryLimit],
AciContainersMemoryRequest: c.Network.Options[AciAciContainersMemoryRequest],
AciContainersMemoryLimit: c.Network.Options[AciAciContainersMemoryLimit],
OpflexAgentStatistics: c.Network.Options[AciOpflexAgentStatistics],
AddExternalContractToDefaultEpg: c.Network.Options[AciAddExternalContractToDefaultEpg],
EnableOpflexAgentReconnect: c.Network.Options[AciEnableOpflexAgentReconnect],
OpflexOpensslCompat: c.Network.Options[AciOpflexOpensslCompat],
TolerationSeconds: c.Network.Options[AciTolerationSeconds],
NodeSnatRedirectExclude: c.Network.AciNetworkProvider.NodeSnatRedirectExclude,
AciCniDeployContainer: c.SystemImages.AciCniDeployContainer,
AciHostContainer: c.SystemImages.AciHostContainer,
AciOpflexContainer: c.SystemImages.AciOpflexContainer,
Expand Down
2 changes: 1 addition & 1 deletion codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

const (
defaultURL = "https://releases.rancher.com/kontainer-driver-metadata/release-v2.7/data.json"
defaultURL = "https://releases.rancher.com/kontainer-driver-metadata/dev-v2.7/data.json"
dataFile = "data/data.json"
)

Expand Down
4 changes: 2 additions & 2 deletions data/bindata.go

Large diffs are not rendered by default.

91 changes: 88 additions & 3 deletions data/data.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions types/rke_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,20 +682,22 @@ type AciNetworkProvider struct {
DhcpRenewMaxRetryCount string `yaml:"dhcp_renew_max_retry_count,omitempty" json:"dhcpRenewMaxRetryCount,omitempty"`
DhcpDelay string `yaml:"dhcp_delay,omitempty" json:"dhcpDelay,omitempty"`
UseSystemNodePriorityClass string `yaml:"use_system_node_priority_class,omitempty" json:"useSystemNodePriorityClass,omitempty"`
AccProvisionOperatorMemoryRequest string `yaml:"acc_provision_operator_memory_request,omitempty" json:"accProvisionOperatorMemoryRequest,omitempty"`
AccProvisionOperatorMemoryLimit string `yaml:"acc_provision_operator_memory_limit,omitempty" json:"accProvisionOperatorMemoryLimit,omitempty"`
AciContainersControllerMemoryRequest string `yaml:"aci_containers_controller_memory_request,omitempty" json:"aciContainersControllerMemoryRequest,omitempty"`
AciContainersControllerMemoryLimit string `yaml:"aci_containers_controller_memory_limit,omitempty" json:"aciContainersControllerMemoryLimit,omitempty"`
AciContainersHostMemoryRequest string `yaml:"aci_containers_host_memory_request,omitempty" json:"aciContainersHostMemoryRequest,omitempty"`
AciContainersHostMemoryLimit string `yaml:"aci_containers_host_memory_limit,omitempty" json:"aciContainersHostMemoryLimit,omitempty"`
AciContainersOperatorMemoryRequest string `yaml:"aci_containers_operator_memory_request,omitempty" json:"aciContainersOperatorMemoryRequest,omitempty"`
AciContainersOperatorMemoryLimit string `yaml:"aci_containers_operator_memory_limit,omitempty" json:"aciContainersOperatorMemoryLimit,omitempty"`
McastDaemonMemoryRequest string `yaml:"mcast_daemon_memory_request,omitempty" json:"mcastDaemonMemoryRequest,omitempty"`
McastDaemonMemoryLimit string `yaml:"mcast_daemon_memory_limit,omitempty" json:"mcastDaemonMemoryLimit,omitempty"`
OpflexAgentMemoryRequest string `yaml:"opflex_agent_memory_request,omitempty" json:"opflexAgentMemoryRequest,omitempty"`
OpflexAgentMemoryLimit string `yaml:"opflex_agent_memory_limit,omitempty" json:"opflexAgentMemoryLimit,omitempty"`
AciContainersMemoryRequest string `yaml:"aci_containers_memory_request,omitempty" json:"aciContainersMemoryRequest,omitempty"`
AciContainersMemoryLimit string `yaml:"aci_containers_memory_limit,omitempty" json:"aciContainersMemoryLimit,omitempty"`
OpflexAgentStatistics string `yaml:"opflex_agent_statistics,omitempty" json:"opflexAgentStatistics,omitempty"`
AddExternalContractToDefaultEpg string `yaml:"add_external_contract_to_default_epg,omitempty" json:"addExternalContractToDefaultEpg,omitempty"`
EnableOpflexAgentReconnect string `yaml:"enable_opflex_agent_reconnect,omitempty" json:"enableOpflexAgentReconnect,omitempty"`
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"`
}

type KubernetesServicesOptions struct {
Expand Down
13 changes: 13 additions & 0 deletions types/zz_generated_deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ec0460

Please sign in to comment.