[AKS]: add network policy support (#523)
* add network policy * remove trailing space
This commit is contained in:
Родитель
a470d5d817
Коммит
e877a223e1
|
@ -2,6 +2,10 @@
|
|||
|
||||
Release History
|
||||
===============
|
||||
0.2.2
|
||||
+++++
|
||||
* Add support of Network Policy when creating new AKS clusters
|
||||
|
||||
0.2.1
|
||||
+++++
|
||||
* add support of apiserver authorized IP ranges
|
||||
|
|
|
@ -104,6 +104,13 @@ helps['aks create'] = """
|
|||
type: string
|
||||
short-summary: The Kubernetes network plugin to use.
|
||||
long-summary: Specify "azure" for advanced networking configurations. Defaults to "kubenet".
|
||||
- name: --network-policy
|
||||
type: string
|
||||
short-summary: (PREVIEW) The Kubernetes network policy to use.
|
||||
long-summary: |
|
||||
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: --no-ssh-key -x
|
||||
type: string
|
||||
short-summary: Do not use or create a local SSH key.
|
||||
|
|
|
@ -52,6 +52,7 @@ def load_arguments(self, _):
|
|||
deprecate_info=c.deprecate(redirect="--disable-rbac", hide="2.0.45"))
|
||||
c.argument('max_pods', type=int, options_list=['--max-pods', '-m'], validator=validate_max_pods)
|
||||
c.argument('network_plugin')
|
||||
c.argument('network_policy')
|
||||
c.argument('no_ssh_key', options_list=['--no-ssh-key', '-x'])
|
||||
c.argument('pod_cidr')
|
||||
c.argument('service_cidr')
|
||||
|
|
|
@ -352,6 +352,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
|
|||
skip_subnet_role_assignment=False,
|
||||
enable_cluster_autoscaler=False,
|
||||
network_plugin=None,
|
||||
network_policy=None,
|
||||
pod_cidr=None,
|
||||
service_cidr=None,
|
||||
dns_service_ip=None,
|
||||
|
@ -424,13 +425,19 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
|
|||
'Are you an Owner on this subscription?')
|
||||
|
||||
network_profile = None
|
||||
if any([network_plugin, pod_cidr, service_cidr, dns_service_ip, docker_bridge_address]):
|
||||
if any([network_plugin,
|
||||
pod_cidr,
|
||||
service_cidr,
|
||||
dns_service_ip,
|
||||
docker_bridge_address,
|
||||
network_policy]):
|
||||
network_profile = ContainerServiceNetworkProfile(
|
||||
network_plugin=network_plugin,
|
||||
pod_cidr=pod_cidr,
|
||||
service_cidr=service_cidr,
|
||||
dns_service_ip=dns_service_ip,
|
||||
docker_bridge_cidr=docker_bridge_address
|
||||
docker_bridge_cidr=docker_bridge_address,
|
||||
network_policy=network_policy
|
||||
)
|
||||
|
||||
addon_profiles = _handle_addons_args(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
from codecs import open as open1
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION = "0.2.1"
|
||||
VERSION = "0.2.2"
|
||||
CLASSIFIERS = [
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
|
|
Загрузка…
Ссылка в новой задаче