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

Add --enable-cilium-dataplane to AKS cluster create #5465

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

0.5.109
+++++++

* Add --enable-cilium-dataplane flag for creating a cluster that uses Cilium as the networking dataplane.

0.5.108
+++++++

Expand Down
3 changes: 3 additions & 0 deletions src/aks-preview/azext_aks_preview/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
# network plugin mode
CONST_NETWORK_PLUGIN_MODE_OVERLAY = "overlay"

# networkprofile eBPF dataplane
CONST_EBPF_DATAPLANE_CILIUM = "cilium"

# disk driver versions
CONST_DISK_DRIVER_V1 = "v1"
CONST_DISK_DRIVER_V2 = "v2"
Expand Down
6 changes: 6 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@
Using together with "azure" network plugin.
Specify "azure" for Azure network policy manager and "calico" for calico network policy controller.
Defaults to "" (network policy disabled).
- name: --enable-cilium-dataplane
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--ebp-dataplane cillium to be more consistent with api?

type: bool
short-summary: Use Cilium as the networking dataplane for the Kubernetes cluster.
long-summary: |
Used together with the "azure" network plugin.
Requires either --pod-subnet-id or --network-plugin-mode=overlay.
- name: --no-ssh-key -x
type: string
short-summary: Do not use or create a local SSH key.
Expand Down
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def load_arguments(self, _):
c.argument('dns_zone_resource_id')
c.argument('enable_keda', action='store_true', is_preview=True)
c.argument('enable_node_restriction', action='store_true', is_preview=True, help="enable node restriction for cluster")
c.argument('enable_cilium_dataplane', action='store_true', is_preview=True)
# nodepool
c.argument('host_group_id', validator=validate_host_group_id, is_preview=True)
c.argument('crg_id', validator=validate_crg_id, is_preview=True)
Expand Down
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ def aks_create(
enable_keda=False,
enable_node_restriction=False,
enable_vpa=False,
enable_cilium_dataplane=False,
# nodepool
host_group_id=None,
crg_id=None,
Expand Down
11 changes: 11 additions & 0 deletions src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
CONST_LOAD_BALANCER_SKU_BASIC,
CONST_PRIVATE_DNS_ZONE_NONE,
CONST_PRIVATE_DNS_ZONE_SYSTEM,
CONST_EBPF_DATAPLANE_CILIUM,
)
from azext_aks_preview._helpers import (
get_cluster_snapshot_by_snapshot_id,
Expand Down Expand Up @@ -321,6 +322,13 @@ def get_network_plugin_mode(self) -> Union[str, None]:
"""
return self.raw_param.get('network_plugin_mode')

def get_enable_cilium_dataplane(self) -> bool:
"""Get the value of enable_cilium_dataplane

:return: bool
"""
return bool(self.raw_param.get('enable_cilium_dataplane'))

def get_load_balancer_managed_outbound_ipv6_count(self) -> Union[int, None]:
"""Obtain the expected count of IPv6 managed outbound IPs.

Expand Down Expand Up @@ -2160,6 +2168,9 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster:

network_profile.network_plugin_mode = self.context.get_network_plugin_mode()

if self.context.get_enable_cilium_dataplane():
network_profile.ebpf_dataplane = CONST_EBPF_DATAPLANE_CILIUM

return mc

def set_up_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster:
Expand Down
Loading