1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-16 00:15:51 +00:00

Added new variables for ACI-CNI 5.2.3.5

This commit is contained in:
siva-muni 2022-12-27 14:57:50 +05:30 committed by Jiaqi Luo
parent 34a41717b0
commit 91e00a3f30
3 changed files with 87 additions and 76 deletions

View File

@ -117,6 +117,7 @@ const (
DefaultAciMultusDisable = "true"
DefaultAciNoWaitForServiceEpReadiness = "false"
DefaultAciAddExternalSubnetsToRdconfig = "false"
DefaultAciServiceGraphEndpointAddDelay = "0"
KubeAPIArgAdmissionControlConfigFile = "admission-control-config-file"
DefaultKubeAPIArgAdmissionControlConfigFileValue = "/etc/kubernetes/admission.yaml"
@ -795,6 +796,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
AciMultusDisable: DefaultAciMultusDisable,
AciNoWaitForServiceEpReadiness: DefaultAciNoWaitForServiceEpReadiness,
AciAddExternalSubnetsToRdconfig: DefaultAciAddExternalSubnetsToRdconfig,
AciServiceGraphEndpointAddDelay: DefaultAciServiceGraphEndpointAddDelay,
}
}
if c.Network.CalicoNetworkProvider != nil {
@ -853,6 +855,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
setDefaultIfEmpty(&c.Network.AciNetworkProvider.UseClusterRole, DefaultAciUseClusterRole)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness, DefaultAciNoWaitForServiceEpReadiness)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig, DefaultAciAddExternalSubnetsToRdconfig)
setDefaultIfEmpty(&c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay, DefaultAciServiceGraphEndpointAddDelay)
networkPluginConfigDefaultsMap[AciOVSMemoryLimit] = c.Network.AciNetworkProvider.OVSMemoryLimit
networkPluginConfigDefaultsMap[AciImagePullPolicy] = c.Network.AciNetworkProvider.ImagePullPolicy
networkPluginConfigDefaultsMap[AciPBRTrackingNonSnat] = c.Network.AciNetworkProvider.PBRTrackingNonSnat
@ -894,6 +897,7 @@ func (c *Cluster) setClusterNetworkDefaults() {
networkPluginConfigDefaultsMap[AciMultusDisable] = c.Network.AciNetworkProvider.MultusDisable
networkPluginConfigDefaultsMap[AciNoWaitForServiceEpReadiness] = c.Network.AciNetworkProvider.NoWaitForServiceEpReadiness
networkPluginConfigDefaultsMap[AciAddExternalSubnetsToRdconfig] = c.Network.AciNetworkProvider.AddExternalSubnetsToRdconfig
networkPluginConfigDefaultsMap[AciServiceGraphEndpointAddDelay] = c.Network.AciNetworkProvider.ServiceGraphEndpointAddDelay
networkPluginConfigDefaultsMap[AciSystemIdentifier] = c.Network.AciNetworkProvider.SystemIdentifier
networkPluginConfigDefaultsMap[AciToken] = c.Network.AciNetworkProvider.Token
networkPluginConfigDefaultsMap[AciApicUserName] = c.Network.AciNetworkProvider.ApicUserName

View File

@ -149,6 +149,7 @@ const (
AciMultusDisable = "aci_multus_disable"
AciNoWaitForServiceEpReadiness = "aci_no_wait_for_service_ep_readiness"
AciAddExternalSubnetsToRdconfig = "aci_add_external_subnets_to_rdconfig"
AciServiceGraphEndpointAddDelay = "aci_service_graph_endpoint_add_delay"
// List of map keys to be used with network templates
// EtcdEndpoints is the server address for Etcd, used by calico
@ -287,6 +288,8 @@ const (
MultusDisable = "MultusDisable"
NoWaitForServiceEpReadiness = "NoWaitForServiceEpReadiness"
AddExternalSubnetsToRdconfig = "AddExternalSubnetsToRdconfig"
ServiceGraphEndpointAddDelay = "ServiceGraphEndpointAddDelay"
ServiceGraphEndpointAddServices = "ServiceGraphEndpointAddServices"
OVSMemoryLimit = "OVSMemoryLimit"
NodeSubnet = "NodeSubnet"
NodeSelector = "NodeSelector"
@ -585,6 +588,8 @@ func (c *Cluster) doAciDeploy(ctx context.Context, data map[string]interface{})
MultusDisable: c.Network.Options[AciMultusDisable],
NoWaitForServiceEpReadiness: c.Network.Options[AciNoWaitForServiceEpReadiness],
AddExternalSubnetsToRdconfig: c.Network.Options[AciAddExternalSubnetsToRdconfig],
ServiceGraphEndpointAddDelay: c.Network.Options[AciServiceGraphEndpointAddDelay],
ServiceGraphEndpointAddServices: c.Network.AciNetworkProvider.ServiceGraphEndpointAddServices,
AciCniDeployContainer: c.SystemImages.AciCniDeployContainer,
AciHostContainer: c.SystemImages.AciHostContainer,
AciOpflexContainer: c.SystemImages.AciOpflexContainer,

View File

@ -590,82 +590,84 @@ type WeaveNetworkProvider struct {
}
type AciNetworkProvider struct {
SystemIdentifier string `yaml:"system_id,omitempty" json:"systemId,omitempty"`
ApicHosts []string `yaml:"apic_hosts" json:"apicHosts,omitempty"`
Token string `yaml:"token,omitempty" json:"token,omitempty"`
ApicUserName string `yaml:"apic_user_name,omitempty" json:"apicUserName,omitempty"`
ApicUserKey string `yaml:"apic_user_key,omitempty" json:"apicUserKey,omitempty"`
ApicUserCrt string `yaml:"apic_user_crt,omitempty" json:"apicUserCrt,omitempty"`
ApicRefreshTime string `yaml:"apic_refresh_time,omitempty" json:"apicRefreshTime,omitempty" norman:"default=1200"`
VmmDomain string `yaml:"vmm_domain,omitempty" json:"vmmDomain,omitempty"`
VmmController string `yaml:"vmm_controller,omitempty" json:"vmmController,omitempty"`
EncapType string `yaml:"encap_type,omitempty" json:"encapType,omitempty"`
NodeSubnet string `yaml:"node_subnet,omitempty" json:"nodeSubnet,omitempty"`
McastRangeStart string `yaml:"mcast_range_start,omitempty" json:"mcastRangeStart,omitempty"`
McastRangeEnd string `yaml:"mcast_range_end,omitempty" json:"mcastRangeEnd,omitempty"`
AEP string `yaml:"aep,omitempty" json:"aep,omitempty"`
VRFName string `yaml:"vrf_name,omitempty" json:"vrfName,omitempty"`
VRFTenant string `yaml:"vrf_tenant,omitempty" json:"vrfTenant,omitempty"`
L3Out string `yaml:"l3out,omitempty" json:"l3out,omitempty"`
L3OutExternalNetworks []string `yaml:"l3out_external_networks" json:"l3outExternalNetworks,omitempty"`
DynamicExternalSubnet string `yaml:"extern_dynamic,omitempty" json:"externDynamic,omitempty"`
StaticExternalSubnet string `yaml:"extern_static,omitempty" json:"externStatic,omitempty"`
ServiceGraphSubnet string `yaml:"node_svc_subnet,omitempty" json:"nodeSvcSubnet,omitempty"`
KubeAPIVlan string `yaml:"kube_api_vlan,omitempty" json:"kubeApiVlan,omitempty"`
ServiceVlan string `yaml:"service_vlan,omitempty" json:"serviceVlan,omitempty"`
InfraVlan string `yaml:"infra_vlan,omitempty" json:"infraVlan,omitempty"`
Tenant string `yaml:"tenant,omitempty" json:"tenant,omitempty"`
OVSMemoryLimit string `yaml:"ovs_memory_limit,omitempty" json:"ovsMemoryLimit,omitempty"`
ImagePullPolicy string `yaml:"image_pull_policy,omitempty" json:"imagePullPolicy,omitempty"`
ImagePullSecret string `yaml:"image_pull_secret,omitempty" json:"imagePullSecret,omitempty"`
ServiceMonitorInterval string `yaml:"service_monitor_interval,omitempty" json:"serviceMonitorInterval,omitempty"`
PBRTrackingNonSnat string `yaml:"pbr_tracking_non_snat,omitempty" json:"pbrTrackingNonSnat,omitempty"`
InstallIstio string `yaml:"install_istio,omitempty" json:"installIstio,omitempty"`
IstioProfile string `yaml:"istio_profile,omitempty" json:"istioProfile,omitempty"`
DropLogEnable string `yaml:"drop_log_enable,omitempty" json:"dropLogEnable,omitempty"`
ControllerLogLevel string `yaml:"controller_log_level,omitempty" json:"controllerLogLevel,omitempty"`
HostAgentLogLevel string `yaml:"host_agent_log_level,omitempty" json:"hostAgentLogLevel,omitempty"`
OpflexAgentLogLevel string `yaml:"opflex_log_level,omitempty" json:"opflexLogLevel,omitempty"`
UseAciCniPriorityClass string `yaml:"use_aci_cni_priority_class,omitempty" json:"useAciCniPriorityClass,omitempty"`
NoPriorityClass string `yaml:"no_priority_class,omitempty" json:"noPriorityClass,omitempty"`
MaxNodesSvcGraph string `yaml:"max_nodes_svc_graph,omitempty" json:"maxNodesSvcGraph,omitempty"`
SnatContractScope string `yaml:"snat_contract_scope,omitempty" json:"snatContractScope,omitempty"`
PodSubnetChunkSize string `yaml:"pod_subnet_chunk_size,omitempty" json:"podSubnetChunkSize,omitempty"`
EnableEndpointSlice string `yaml:"enable_endpoint_slice,omitempty" json:"enableEndpointSlice,omitempty"`
SnatNamespace string `yaml:"snat_namespace,omitempty" json:"snatNamespace,omitempty"`
EpRegistry string `yaml:"ep_registry,omitempty" json:"epRegistry,omitempty"`
OpflexMode string `yaml:"opflex_mode,omitempty" json:"opflexMode,omitempty"`
SnatPortRangeStart string `yaml:"snat_port_range_start,omitempty" json:"snatPortRangeStart,omitempty"`
SnatPortRangeEnd string `yaml:"snat_port_range_end,omitempty" json:"snatPortRangeEnd,omitempty"`
SnatPortsPerNode string `yaml:"snat_ports_per_node,omitempty" json:"snatPortsPerNode,omitempty"`
OpflexClientSSL string `yaml:"opflex_client_ssl,omitempty" json:"opflexClientSsl,omitempty"`
UsePrivilegedContainer string `yaml:"use_privileged_container,omitempty" json:"usePrivilegedContainer,omitempty"`
UseHostNetnsVolume string `yaml:"use_host_netns_volume,omitempty" json:"useHostNetnsVolume,omitempty"`
UseOpflexServerVolume string `yaml:"use_opflex_server_volume,omitempty" json:"useOpflexServerVolume,omitempty"`
SubnetDomainName string `yaml:"subnet_domain_name,omitempty" json:"subnetDomainName,omitempty"`
KafkaBrokers []string `yaml:"kafka_brokers,omitempty" json:"kafkaBrokers,omitempty"`
KafkaClientCrt string `yaml:"kafka_client_crt,omitempty" json:"kafkaClientCrt,omitempty"`
KafkaClientKey string `yaml:"kafka_client_key,omitempty" json:"kafkaClientKey,omitempty"`
CApic string `yaml:"capic,omitempty" json:"capic,omitempty"`
UseAciAnywhereCRD string `yaml:"use_aci_anywhere_crd,omitempty" json:"useAciAnywhereCrd,omitempty"`
OverlayVRFName string `yaml:"overlay_vrf_name,omitempty" json:"overlayVrfName,omitempty"`
GbpPodSubnet string `yaml:"gbp_pod_subnet,omitempty" json:"gbpPodSubnet,omitempty"`
RunGbpContainer string `yaml:"run_gbp_container,omitempty" json:"runGbpContainer,omitempty"`
RunOpflexServerContainer string `yaml:"run_opflex_server_container,omitempty" json:"runOpflexServerContainer,omitempty"`
OpflexServerPort string `yaml:"opflex_server_port,omitempty" json:"opflexServerPort,omitempty"`
DurationWaitForNetwork string `yaml:"duration_wait_for_network,omitempty" json:"durationWaitForNetwork,omitempty"`
DisableWaitForNetwork string `yaml:"disable_wait_for_network,omitempty" json:"disableWaitForNetwork,omitempty"`
ApicSubscriptionDelay string `yaml:"apic_subscription_delay,omitempty" json:"apicSubscriptionDelay,omitempty"`
ApicRefreshTickerAdjust string `yaml:"apic_refresh_ticker_adjust,omitempty" json:"apicRefreshTickerAdjust,omitempty"`
DisablePeriodicSnatGlobalInfoSync string `yaml:"disable_periodic_snat_global_info_sync,omitempty" json:"disablePeriodicSnatGlobalInfoSync,omitempty"`
OpflexDeviceDeleteTimeout string `yaml:"opflex_device_delete_timeout,omitempty" json:"opflexDeviceDeleteTimeout,omitempty"`
MTUHeadRoom string `yaml:"mtu_head_room,omitempty" json:"mtuHeadRoom,omitempty"`
NodePodIfEnable string `yaml:"node_pod_if_enable,omitempty" json:"nodePodIfEnable,omitempty"`
SriovEnable string `yaml:"sriov_enable,omitempty" json:"sriovEnable,omitempty"`
MultusDisable string `yaml:"multus_disable,omitempty" json:"multusDisable,omitempty"`
UseClusterRole string `yaml:"use_cluster_role,omitempty" json:"useClusterRole,omitempty"`
NoWaitForServiceEpReadiness string `yaml:"no_wait_for_service_ep_readiness,omitempty" json:"noWaitForServiceEpReadiness,omitempty"`
AddExternalSubnetsToRdconfig string `yaml:"add_external_subnets_to_rdconfig,omitempty" json:"addExternalSubnetsToRdconfig,omitempty"`
SystemIdentifier string `yaml:"system_id,omitempty" json:"systemId,omitempty"`
ApicHosts []string `yaml:"apic_hosts" json:"apicHosts,omitempty"`
Token string `yaml:"token,omitempty" json:"token,omitempty"`
ApicUserName string `yaml:"apic_user_name,omitempty" json:"apicUserName,omitempty"`
ApicUserKey string `yaml:"apic_user_key,omitempty" json:"apicUserKey,omitempty"`
ApicUserCrt string `yaml:"apic_user_crt,omitempty" json:"apicUserCrt,omitempty"`
ApicRefreshTime string `yaml:"apic_refresh_time,omitempty" json:"apicRefreshTime,omitempty" norman:"default=1200"`
VmmDomain string `yaml:"vmm_domain,omitempty" json:"vmmDomain,omitempty"`
VmmController string `yaml:"vmm_controller,omitempty" json:"vmmController,omitempty"`
EncapType string `yaml:"encap_type,omitempty" json:"encapType,omitempty"`
NodeSubnet string `yaml:"node_subnet,omitempty" json:"nodeSubnet,omitempty"`
McastRangeStart string `yaml:"mcast_range_start,omitempty" json:"mcastRangeStart,omitempty"`
McastRangeEnd string `yaml:"mcast_range_end,omitempty" json:"mcastRangeEnd,omitempty"`
AEP string `yaml:"aep,omitempty" json:"aep,omitempty"`
VRFName string `yaml:"vrf_name,omitempty" json:"vrfName,omitempty"`
VRFTenant string `yaml:"vrf_tenant,omitempty" json:"vrfTenant,omitempty"`
L3Out string `yaml:"l3out,omitempty" json:"l3out,omitempty"`
L3OutExternalNetworks []string `yaml:"l3out_external_networks" json:"l3outExternalNetworks,omitempty"`
DynamicExternalSubnet string `yaml:"extern_dynamic,omitempty" json:"externDynamic,omitempty"`
StaticExternalSubnet string `yaml:"extern_static,omitempty" json:"externStatic,omitempty"`
ServiceGraphSubnet string `yaml:"node_svc_subnet,omitempty" json:"nodeSvcSubnet,omitempty"`
KubeAPIVlan string `yaml:"kube_api_vlan,omitempty" json:"kubeApiVlan,omitempty"`
ServiceVlan string `yaml:"service_vlan,omitempty" json:"serviceVlan,omitempty"`
InfraVlan string `yaml:"infra_vlan,omitempty" json:"infraVlan,omitempty"`
Tenant string `yaml:"tenant,omitempty" json:"tenant,omitempty"`
OVSMemoryLimit string `yaml:"ovs_memory_limit,omitempty" json:"ovsMemoryLimit,omitempty"`
ImagePullPolicy string `yaml:"image_pull_policy,omitempty" json:"imagePullPolicy,omitempty"`
ImagePullSecret string `yaml:"image_pull_secret,omitempty" json:"imagePullSecret,omitempty"`
ServiceMonitorInterval string `yaml:"service_monitor_interval,omitempty" json:"serviceMonitorInterval,omitempty"`
PBRTrackingNonSnat string `yaml:"pbr_tracking_non_snat,omitempty" json:"pbrTrackingNonSnat,omitempty"`
InstallIstio string `yaml:"install_istio,omitempty" json:"installIstio,omitempty"`
IstioProfile string `yaml:"istio_profile,omitempty" json:"istioProfile,omitempty"`
DropLogEnable string `yaml:"drop_log_enable,omitempty" json:"dropLogEnable,omitempty"`
ControllerLogLevel string `yaml:"controller_log_level,omitempty" json:"controllerLogLevel,omitempty"`
HostAgentLogLevel string `yaml:"host_agent_log_level,omitempty" json:"hostAgentLogLevel,omitempty"`
OpflexAgentLogLevel string `yaml:"opflex_log_level,omitempty" json:"opflexLogLevel,omitempty"`
UseAciCniPriorityClass string `yaml:"use_aci_cni_priority_class,omitempty" json:"useAciCniPriorityClass,omitempty"`
NoPriorityClass string `yaml:"no_priority_class,omitempty" json:"noPriorityClass,omitempty"`
MaxNodesSvcGraph string `yaml:"max_nodes_svc_graph,omitempty" json:"maxNodesSvcGraph,omitempty"`
SnatContractScope string `yaml:"snat_contract_scope,omitempty" json:"snatContractScope,omitempty"`
PodSubnetChunkSize string `yaml:"pod_subnet_chunk_size,omitempty" json:"podSubnetChunkSize,omitempty"`
EnableEndpointSlice string `yaml:"enable_endpoint_slice,omitempty" json:"enableEndpointSlice,omitempty"`
SnatNamespace string `yaml:"snat_namespace,omitempty" json:"snatNamespace,omitempty"`
EpRegistry string `yaml:"ep_registry,omitempty" json:"epRegistry,omitempty"`
OpflexMode string `yaml:"opflex_mode,omitempty" json:"opflexMode,omitempty"`
SnatPortRangeStart string `yaml:"snat_port_range_start,omitempty" json:"snatPortRangeStart,omitempty"`
SnatPortRangeEnd string `yaml:"snat_port_range_end,omitempty" json:"snatPortRangeEnd,omitempty"`
SnatPortsPerNode string `yaml:"snat_ports_per_node,omitempty" json:"snatPortsPerNode,omitempty"`
OpflexClientSSL string `yaml:"opflex_client_ssl,omitempty" json:"opflexClientSsl,omitempty"`
UsePrivilegedContainer string `yaml:"use_privileged_container,omitempty" json:"usePrivilegedContainer,omitempty"`
UseHostNetnsVolume string `yaml:"use_host_netns_volume,omitempty" json:"useHostNetnsVolume,omitempty"`
UseOpflexServerVolume string `yaml:"use_opflex_server_volume,omitempty" json:"useOpflexServerVolume,omitempty"`
SubnetDomainName string `yaml:"subnet_domain_name,omitempty" json:"subnetDomainName,omitempty"`
KafkaBrokers []string `yaml:"kafka_brokers,omitempty" json:"kafkaBrokers,omitempty"`
KafkaClientCrt string `yaml:"kafka_client_crt,omitempty" json:"kafkaClientCrt,omitempty"`
KafkaClientKey string `yaml:"kafka_client_key,omitempty" json:"kafkaClientKey,omitempty"`
CApic string `yaml:"capic,omitempty" json:"capic,omitempty"`
UseAciAnywhereCRD string `yaml:"use_aci_anywhere_crd,omitempty" json:"useAciAnywhereCrd,omitempty"`
OverlayVRFName string `yaml:"overlay_vrf_name,omitempty" json:"overlayVrfName,omitempty"`
GbpPodSubnet string `yaml:"gbp_pod_subnet,omitempty" json:"gbpPodSubnet,omitempty"`
RunGbpContainer string `yaml:"run_gbp_container,omitempty" json:"runGbpContainer,omitempty"`
RunOpflexServerContainer string `yaml:"run_opflex_server_container,omitempty" json:"runOpflexServerContainer,omitempty"`
OpflexServerPort string `yaml:"opflex_server_port,omitempty" json:"opflexServerPort,omitempty"`
DurationWaitForNetwork string `yaml:"duration_wait_for_network,omitempty" json:"durationWaitForNetwork,omitempty"`
DisableWaitForNetwork string `yaml:"disable_wait_for_network,omitempty" json:"disableWaitForNetwork,omitempty"`
ApicSubscriptionDelay string `yaml:"apic_subscription_delay,omitempty" json:"apicSubscriptionDelay,omitempty"`
ApicRefreshTickerAdjust string `yaml:"apic_refresh_ticker_adjust,omitempty" json:"apicRefreshTickerAdjust,omitempty"`
DisablePeriodicSnatGlobalInfoSync string `yaml:"disable_periodic_snat_global_info_sync,omitempty" json:"disablePeriodicSnatGlobalInfoSync,omitempty"`
OpflexDeviceDeleteTimeout string `yaml:"opflex_device_delete_timeout,omitempty" json:"opflexDeviceDeleteTimeout,omitempty"`
MTUHeadRoom string `yaml:"mtu_head_room,omitempty" json:"mtuHeadRoom,omitempty"`
NodePodIfEnable string `yaml:"node_pod_if_enable,omitempty" json:"nodePodIfEnable,omitempty"`
SriovEnable string `yaml:"sriov_enable,omitempty" json:"sriovEnable,omitempty"`
MultusDisable string `yaml:"multus_disable,omitempty" json:"multusDisable,omitempty"`
UseClusterRole string `yaml:"use_cluster_role,omitempty" json:"useClusterRole,omitempty"`
NoWaitForServiceEpReadiness string `yaml:"no_wait_for_service_ep_readiness,omitempty" json:"noWaitForServiceEpReadiness,omitempty"`
AddExternalSubnetsToRdconfig string `yaml:"add_external_subnets_to_rdconfig,omitempty" json:"addExternalSubnetsToRdconfig,omitempty"`
ServiceGraphEndpointAddDelay string `yaml:"service_graph_endpoint_add_delay,omitempty" json:"serviceGraphEndpointAddDelay,omitempty"`
ServiceGraphEndpointAddServices []map[string]string `yaml:"service_graph_endpoint_add_services,omitempty" json:"serviceGraphEndpointAddServices,omitempty"`
}
type KubernetesServicesOptions struct {