Skip to content

Commit 9c27862

Browse files
author
Shaik Mahboob Shareef
committed
Add ProactiveConf CRD and proactive_conf flag
This CRD is introduced to notify the OpFlex agent from Host agent to adjusts the frequency of the tunnel endpoint advertisement timer accordingly. config to create the CRD and enable the functionality: --- kube_config: proactive_conf: True # Default is False (cherry picked from commit 3e94d46) (cherry picked from commit 8f3fbb7)
1 parent 49beeb1 commit 9c27862

File tree

5 files changed

+142
-4
lines changed

5 files changed

+142
-4
lines changed

provision/acc_provision/templates/aci-containers.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,56 @@ spec:
13421342
type: object
13431343
---
13441344
{% endif %} #}
1345+
{% if config.kube_config.proactive_conf %}
1346+
apiVersion: apiextensions.k8s.io/v1
1347+
kind: CustomResourceDefinition
1348+
metadata:
1349+
name: proactiveconfs.aci.pc
1350+
spec:
1351+
group: aci.pc
1352+
names:
1353+
kind: ProactiveConf
1354+
listKind: ProactiveConfList
1355+
plural: proactiveconfs
1356+
singular: proactiveconf
1357+
scope: Cluster
1358+
versions:
1359+
- name: v1
1360+
served: true
1361+
storage: true
1362+
subresources:
1363+
status: {}
1364+
schema:
1365+
openAPIV3Schema:
1366+
type: object
1367+
properties:
1368+
apiVersion:
1369+
type: string
1370+
description: 'APIVersion defines the versioned schema of this representation of an object.
1371+
Servers should convert recognized schemas to the latest internal value, and
1372+
may reject unrecognized values.
1373+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
1374+
kind:
1375+
type: string
1376+
description: 'Kind is a string value representing the REST resource this object represents.
1377+
Servers may infer this from the endpoint the client submits requests to.
1378+
Cannot be updated.
1379+
In CamelCase.
1380+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
1381+
metadata:
1382+
type: object
1383+
spec:
1384+
properties:
1385+
TunnelEpAdvertisementInterval:
1386+
type: integer
1387+
VmmEpgDeploymentImmediacy:
1388+
enum:
1389+
- Immediate
1390+
- OnDemand
1391+
type: string
1392+
type: object
1393+
---
1394+
{% endif %}
13451395
{% endif %}
13461396
{% if config.sriov_config.enable or config.chained_cni_config.secondary_interface_chaining or config.chained_cni_config.primary_interface_chaining %}
13471397
apiVersion: apiextensions.k8s.io/v1
@@ -1911,6 +1961,9 @@ data:
19111961
{% if config.kube_config.apic_connection_retry_limit %}
19121962
"apic-connection-retry-limit": {{ config.kube_config.apic_connection_retry_limit|json}},
19131963
{% endif %}
1964+
{% if config.kube_config.proactive_conf %}
1965+
"proactive-conf": {{ config.kube_config.proactive_conf|json }},
1966+
{% endif %}
19141967
{#
19151968
Commenting code to disable the install_istio flag as the functionality
19161969
is disabled to remove dependency from istio.io/istio package.
@@ -2108,6 +2161,9 @@ data:
21082161
{% if config.kube_config.disable_hpp_rendering %}
21092162
"disable-hpp-rendering": {{ config.kube_config.disable_hpp_rendering|json }},
21102163
{% endif %}
2164+
{% if config.kube_config.proactive_conf %}
2165+
"proactive-conf": {{ config.kube_config.proactive_conf|json }},
2166+
{% endif %}
21112167
"pod-subnet": {{ config.net_config.pod_subnet|json|indent(width=8) }},
21122168
"node-subnet": {{ config.net_config.node_subnet|json|indent(width=8) }},
21132169
"encap-type": {{ config.node_config.encap_type|json }},
@@ -2567,6 +2623,16 @@ and aci-containers-operator images for istio.io/istio package
25672623
- update
25682624
- patch
25692625
{% endif %}
2626+
{% if config.kube_config.proactive_conf %}
2627+
- apiGroups:
2628+
- "aci.pc"
2629+
resources:
2630+
- proactiveconfs
2631+
verbs:
2632+
- get
2633+
- list
2634+
- watch
2635+
{% endif %}
25702636
---
25712637
apiVersion: {{ config.kube_config.use_rbac_api }}
25722638
kind: ClusterRole
@@ -2748,6 +2814,16 @@ rules:
27482814
- list
27492815
- watch
27502816
{% endif %}
2817+
{% if config.kube_config.proactive_conf %}
2818+
- apiGroups:
2819+
- "aci.pc"
2820+
resources:
2821+
- proactiveconfs
2822+
verbs:
2823+
- get
2824+
- list
2825+
- watch
2826+
{% endif %}
27512827
---
27522828
apiVersion: {{ config.kube_config.use_rbac_api }}
27532829
kind: ClusterRoleBinding

provision/acc_provision/templates/provision-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ registry:
159159
# add_external_contract_to_default_epg: True # override if needed, default is False
160160
# apic_connection_retry_limit: 5 # number of times the controller tries to communicate with APIC before switching to next APIC if unsuccessful, default is 5
161161
# taint_not_ready_node: True # default is False, set to True if you want to make the node in not ready state unschedulable till the host agent initalization is complete.
162-
# unknown_mac_unicast_action: "flood" # override if needed, default is "proxy"
162+
# unknown_mac_unicast_action: "flood" # override if needed, default is "proxy"
163+
# proactive_conf: True # default is False, set to True to enable proactive configuration
163164

164165
#
165166
# Configuration for ACI CNI Operator

provision/testdata/with_overrides.apic.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ None
210210
{
211211
"vmmInjectedClusterDetails": {
212212
"attributes": {
213-
"accProvisionInput": "operator_managed_config:\n enable_updates: true\n\naci_config:\n system_id: kube\n use_legacy_kube_naming_convention: True\n cluster_tenant: demo\n apic_hosts:\n - 10.30.120.100\n apic_login:\n username: admin\n \n apic_version: \"5.0\"\n aep: kube-aep\n apic_subscription_delay: 100\n opflex_device_delete_timeout: 1200\n apic_refreshticker_adjust: 150\n vrf:\n name: kubernetes-vrf\n tenant: common\n l3out:\n name: l3out\n external_networks:\n - l3out\n physical_domain:\n domain: kubernetes-control\n sync_login:\n certfile: user.crt\n keyfile: user.key\n vmm_domain:\n domain: kubernetes1\n controller: kubernetes1\n encap_type: vxlan\n mcast_range:\n start: 225.2.1.1\n end: 225.2.255.255\n client_ssl: false\n\nnet_config:\n node_subnet: 10.1.0.1/16\n pod_subnet: 10.2.0.1/16\n pod_subnet_chunk_size: 24\n extern_dynamic: 10.4.0.1/16\n extern_static: 10.3.0.1/24\n node_svc_subnet: 10.6.0.1/24\n kubeapi_vlan: 4001\n service_vlan: 4003\n infra_vlan: 4093\n disable_wait_for_network: true\n\nkube_config:\n aci_multipod: true\n opflex_device_reconnect_wait_timeout: 10\n dhcp_renew_max_retry_count: 10\n dhcp_delay: 10\n use_external_service_ip_allocator: true\n use_privileged_containers: true\n use_openshift_security_context_constraints: true\n allow_kube_api_default_epg: true\n no_wait_for_service_ep_readiness: true\n hpp_optimization: true\n service_graph_endpoint_add_delay:\n delay: 30\n services:\n - name: ingress-service\n namespace: openshift-ingress\n - name: monitoring-service\n namespace: openshift-monitoring\n delay: 60\n add_external_subnets_to_rdconfig: true\n snat_operator:\n disable_periodic_snat_global_info_sync: true\n sleep_time_snat_global_info_sync: 60\n node_snat_redirect_exclude:\n - group: router\n labels:\n - worker\n - router\n - infra\n - group: infra\n labels:\n - infra\n - router\n image_pull_policy: IfNotPresent\n opflex_agent_policy_retry_delay_timer: 10\n use_system_node_priority_class: True\n ovs_memory_request: \"512Mi\"\n ovs_memory_limit: \"2Gi\" \n aci_containers_controller_memory_request: \"256Mi\"\n aci_containers_controller_memory_limit: \"5Gi\"\n aci_containers_host_memory_request: \"256Mi\"\n aci_containers_host_memory_limit: \"5Gi\"\n mcast_daemon_memory_request: \"256Mi\"\n mcast_daemon_memory_limit: \"5Gi\"\n opflex_agent_memory_request: \"256Mi\"\n opflex_agent_memory_limit: \"5Gi\"\n acc_provision_operator_memory_request: \"256Mi\"\n acc_provision_operator_memory_limit: \"5Gi\"\n aci_containers_operator_memory_request: \"256Mi\"\n aci_containers_operator_memory_limit: \"5Gi\"\n toleration_seconds: 100\n opflex_openssl_compat: true\n enable_opflex_agent_reconnect: true\n opflex_agent_statistics: false\n opflex_startup_enabled: true\n opflex_startup_policy_duration: 20\n opflex_startup_resolve_aft_conn: true\n opflex_switch_sync_delay: 10\n opflex_switch_sync_dynamic: 20\n add_external_contract_to_default_epg: True\n apic_connection_retry_limit: 10\n disable_hpp_rendering: True\n taint_not_ready_node: True\n unknown_mac_unicast_action: \"flood\"\n\nregistry:\n image_prefix: noiro\n aci_cni_operator_version: AciCniOperatorTag\n use_digest : true\n\nlogging:\n controller_log_level: debug\n hostagent_log_level: debug\n opflexagent_log_level: info\n operator_log_level: debug\n\nnodepodif_config:\n enable: true\n\ndrop_log_config:\n disable_events: True\n",
213+
"accProvisionInput": "operator_managed_config:\n enable_updates: true\n\naci_config:\n system_id: kube\n use_legacy_kube_naming_convention: True\n cluster_tenant: demo\n apic_hosts:\n - 10.30.120.100\n apic_login:\n username: admin\n \n apic_version: \"5.0\"\n aep: kube-aep\n apic_subscription_delay: 100\n opflex_device_delete_timeout: 1200\n apic_refreshticker_adjust: 150\n vrf:\n name: kubernetes-vrf\n tenant: common\n l3out:\n name: l3out\n external_networks:\n - l3out\n physical_domain:\n domain: kubernetes-control\n sync_login:\n certfile: user.crt\n keyfile: user.key\n vmm_domain:\n domain: kubernetes1\n controller: kubernetes1\n encap_type: vxlan\n mcast_range:\n start: 225.2.1.1\n end: 225.2.255.255\n client_ssl: false\n\nnet_config:\n node_subnet: 10.1.0.1/16\n pod_subnet: 10.2.0.1/16\n pod_subnet_chunk_size: 24\n extern_dynamic: 10.4.0.1/16\n extern_static: 10.3.0.1/24\n node_svc_subnet: 10.6.0.1/24\n kubeapi_vlan: 4001\n service_vlan: 4003\n infra_vlan: 4093\n disable_wait_for_network: true\n\nkube_config:\n aci_multipod: true\n opflex_device_reconnect_wait_timeout: 10\n dhcp_renew_max_retry_count: 10\n dhcp_delay: 10\n use_external_service_ip_allocator: true\n use_privileged_containers: true\n use_openshift_security_context_constraints: true\n allow_kube_api_default_epg: true\n no_wait_for_service_ep_readiness: true\n hpp_optimization: true\n service_graph_endpoint_add_delay:\n delay: 30\n services:\n - name: ingress-service\n namespace: openshift-ingress\n - name: monitoring-service\n namespace: openshift-monitoring\n delay: 60\n add_external_subnets_to_rdconfig: true\n snat_operator:\n disable_periodic_snat_global_info_sync: true\n sleep_time_snat_global_info_sync: 60\n node_snat_redirect_exclude:\n - group: router\n labels:\n - worker\n - router\n - infra\n - group: infra\n labels:\n - infra\n - router\n image_pull_policy: IfNotPresent\n opflex_agent_policy_retry_delay_timer: 10\n use_system_node_priority_class: True\n ovs_memory_request: \"512Mi\"\n ovs_memory_limit: \"2Gi\" \n aci_containers_controller_memory_request: \"256Mi\"\n aci_containers_controller_memory_limit: \"5Gi\"\n aci_containers_host_memory_request: \"256Mi\"\n aci_containers_host_memory_limit: \"5Gi\"\n mcast_daemon_memory_request: \"256Mi\"\n mcast_daemon_memory_limit: \"5Gi\"\n opflex_agent_memory_request: \"256Mi\"\n opflex_agent_memory_limit: \"5Gi\"\n acc_provision_operator_memory_request: \"256Mi\"\n acc_provision_operator_memory_limit: \"5Gi\"\n aci_containers_operator_memory_request: \"256Mi\"\n aci_containers_operator_memory_limit: \"5Gi\"\n toleration_seconds: 100\n opflex_openssl_compat: true\n enable_opflex_agent_reconnect: true\n opflex_agent_statistics: false\n opflex_startup_enabled: true\n opflex_startup_policy_duration: 20\n opflex_startup_resolve_aft_conn: true\n opflex_switch_sync_delay: 10\n opflex_switch_sync_dynamic: 20\n add_external_contract_to_default_epg: True\n apic_connection_retry_limit: 10\n disable_hpp_rendering: True\n taint_not_ready_node: True\n unknown_mac_unicast_action: \"flood\"\n proactive_conf: True\n\nregistry:\n image_prefix: noiro\n aci_cni_operator_version: AciCniOperatorTag\n use_digest : true\n\nlogging:\n controller_log_level: debug\n hostagent_log_level: debug\n opflexagent_log_level: info\n operator_log_level: debug\n\nnodepodif_config:\n enable: true\n\ndrop_log_config:\n disable_events: True\n",
214214
"userKey": "dummy\n",
215215
"userCert": "dummy\n"
216216
}

provision/testdata/with_overrides.inp.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ kube_config:
112112
disable_hpp_rendering: True
113113
taint_not_ready_node: True
114114
unknown_mac_unicast_action: "flood"
115+
proactive_conf: True
115116

116117
registry:
117118
image_prefix: noiro

provision/testdata/with_overrides.kube.yaml

+62-2
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)