Skip to content

Commit dcdb8b8

Browse files
addon: remove shared flag from AGIC addon (#1816)
1 parent 17c1be2 commit dcdb8b8

File tree

3 files changed

+17
-28
lines changed

3 files changed

+17
-28
lines changed

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
CONST_INGRESS_APPGW_SUBNET_ID = "subnetId"
2020
CONST_INGRESS_APPGW_SUBNET_PREFIX = "subnetPrefix"
2121
CONST_INGRESS_APPGW_WATCH_NAMESPACE = "watchNamespace"
22-
CONST_INGRESS_APPGW_SHARED = "shared"
2322

2423
CONST_NODEPOOL_MODE_SYSTEM = "System"
2524
CONST_NODEPOOL_MODE_USER = "User"

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -220,22 +220,19 @@
220220
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
221221
- name: --appgw-name
222222
type: string
223-
short-summary: Used along with IngressApplicationGateway addon. Name of the application gateway to create/use in the node resource group
223+
short-summary: Name of the application gateway to create/use in the node resource group. Use with ingress-azure addon.
224224
- name: --appgw-subnet-prefix
225225
type: string
226-
short-summary: Used along with IngressApplicationGateway addon. Subnet Prefix to use for a new subnet created to deploy the Application Gateway
226+
short-summary: Subnet Prefix to use for a new subnet created to deploy the Application Gateway. Use with ingress-azure addon.
227227
- name: --appgw-id
228228
type: string
229-
short-summary: Used along with IngressApplicationGateway addon. Resource Id of an existing Application Gateway to use with AGIC
229+
short-summary: Resource Id of an existing Application Gateway to use with AGIC. Use with ingress-azure addon.
230230
- name: --appgw-subnet-id
231231
type: string
232-
short-summary: Used along with IngressApplicationGateway addon. Resource Id of an existing Subnet used to deploy the Application Gateway.
233-
- name: --appgw-shared
234-
type: bool
235-
short-summary: Used along with IngressApplicationGateway addon. Use shared flag if application gateway will be shared.
232+
short-summary: Resource Id of an existing Subnet used to deploy the Application Gateway. Use with ingress-azure addon.
236233
- name: --appgw-watch-namespace
237234
type: string
238-
short-summary: Used along with IngressApplicationGateway addon. Specify the namespace, which AGIC should watch. This could be a single string value, or a comma-separated list of namespaces.
235+
short-summary: Specify the namespace, which AGIC should watch. This could be a single string value, or a comma-separated list of namespaces.
239236
examples:
240237
- name: Create a Kubernetes cluster with an existing SSH public key.
241238
text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey
@@ -613,26 +610,26 @@
613610
short-summary: The subnet name for the virtual node to use.
614611
- name: --appgw-name
615612
type: string
616-
short-summary: Used along with IngressApplicationGateway addon. Name of the application gateway to create/use in the node resource group
613+
short-summary: Name of the application gateway to create/use in the node resource group. Use with ingress-azure addon.
617614
- name: --appgw-subnet-prefix
618615
type: string
619-
short-summary: Used along with IngressApplicationGateway addon. Subnet Prefix to use for a new subnet created to deploy the Application Gateway
616+
short-summary: Subnet Prefix to use for a new subnet created to deploy the Application Gateway. Use with ingress-azure addon.
620617
- name: --appgw-id
621618
type: string
622-
short-summary: Used along with IngressApplicationGateway addon. Resource Id of an existing Application Gateway to use with AGIC
619+
short-summary: Resource Id of an existing Application Gateway to use with AGIC. Use with ingress-azure addon.
623620
- name: --appgw-subnet-id
624621
type: string
625-
short-summary: Used along with IngressApplicationGateway addon. Resource Id of an existing Subnet used to deploy the Application Gateway
626-
- name: --appgw-shared
627-
type: bool
628-
short-summary: Used along with IngressApplicationGateway addon. Use shared flag if application gateway will be shared
622+
short-summary: Resource Id of an existing Subnet used to deploy the Application Gateway. Use with ingress-azure addon.
629623
- name: --appgw-watch-namespace
630624
type: string
631-
short-summary: Used along with IngressApplicationGateway addon. Specify the namespace, which AGIC should watch. This could be a single string value, or a comma-separated list of namespaces.
625+
short-summary: Specify the namespace, which AGIC should watch. This could be a single string value, or a comma-separated list of namespaces. Use with ingress-azure addon.
632626
examples:
633627
- name: Enable Kubernetes addons. (autogenerated)
634628
text: az aks enable-addons --addons virtual-node --name MyManagedCluster --resource-group MyResourceGroup --subnet-name VirtualNodeSubnet
635629
crafted: true
630+
- name: Enable ingress-appgw addon with subnet prefix.
631+
text: az aks enable-addons --name MyManagedCluster --resource-group MyResourceGroup --addons ingress-appgw --appgw-subnet-prefix 10.2.0.0/16 --appgw-name gateway
632+
crafted: true
636633
"""
637634

638635
helps['aks get-versions'] = """

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
from ._consts import CONST_INGRESS_APPGW_ADDON_NAME
8484
from ._consts import CONST_INGRESS_APPGW_APPLICATION_GATEWAY_ID, CONST_INGRESS_APPGW_APPLICATION_GATEWAY_NAME
8585
from ._consts import CONST_INGRESS_APPGW_SUBNET_PREFIX, CONST_INGRESS_APPGW_SUBNET_ID
86-
from ._consts import CONST_INGRESS_APPGW_SHARED, CONST_INGRESS_APPGW_WATCH_NAMESPACE
86+
from ._consts import CONST_INGRESS_APPGW_WATCH_NAMESPACE
8787
from ._consts import CONST_SCALE_SET_PRIORITY_REGULAR, CONST_SCALE_SET_PRIORITY_SPOT, CONST_SPOT_EVICTION_POLICY_DELETE
8888

8989
logger = get_logger(__name__)
@@ -806,7 +806,6 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
806806
appgw_subnet_prefix=None,
807807
appgw_id=None,
808808
appgw_subnet_id=None,
809-
appgw_shared=None,
810809
appgw_watch_namespace=None,
811810
enable_aad=False,
812811
aad_admin_group_object_ids=None,
@@ -962,7 +961,6 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
962961
appgw_subnet_prefix,
963962
appgw_id,
964963
appgw_subnet_id,
965-
appgw_shared,
966964
appgw_watch_namespace
967965
)
968966
monitoring = False
@@ -1663,7 +1661,7 @@ def _upgrade_single_agent_pool_node_image(client, resource_group_name, cluster_n
16631661

16641662

16651663
def _handle_addons_args(cmd, addons_str, subscription_id, resource_group_name, addon_profiles=None,
1666-
workspace_resource_id=None, appgw_name=None, appgw_subnet_prefix=None, appgw_id=None, appgw_subnet_id=None, appgw_shared=False, appgw_watch_namespace=None):
1664+
workspace_resource_id=None, appgw_name=None, appgw_subnet_prefix=None, appgw_id=None, appgw_subnet_id=None, appgw_watch_namespace=None):
16671665
if not addon_profiles:
16681666
addon_profiles = {}
16691667
addons = addons_str.split(',') if addons_str else []
@@ -1704,8 +1702,6 @@ def _handle_addons_args(cmd, addons_str, subscription_id, resource_group_name, a
17041702
addon_profile.config[CONST_INGRESS_APPGW_APPLICATION_GATEWAY_ID] = appgw_id
17051703
if appgw_subnet_id is not None:
17061704
addon_profile.config[CONST_INGRESS_APPGW_SUBNET_ID] = appgw_subnet_id
1707-
if appgw_shared:
1708-
addon_profile.config[CONST_INGRESS_APPGW_SHARED] = "true"
17091705
if appgw_watch_namespace is not None:
17101706
addon_profile.config[CONST_INGRESS_APPGW_WATCH_NAMESPACE] = appgw_watch_namespace
17111707
addon_profiles[CONST_INGRESS_APPGW_ADDON_NAME] = addon_profile
@@ -2360,12 +2356,12 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F
23602356

23612357

23622358
def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_resource_id=None,
2363-
subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_id=None, appgw_subnet_id=None, appgw_shared=False, appgw_watch_namespace=None, no_wait=False):
2359+
subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_id=None, appgw_subnet_id=None, appgw_watch_namespace=None, no_wait=False):
23642360
instance = client.get(resource_group_name, name)
23652361
subscription_id = get_subscription_id(cmd.cli_ctx)
23662362
instance = _update_addons(cmd, instance, subscription_id, resource_group_name, name, addons, enable=True,
23672363
workspace_resource_id=workspace_resource_id, subnet_name=subnet_name,
2368-
appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_shared=appgw_shared, appgw_watch_namespace=appgw_watch_namespace, no_wait=no_wait)
2364+
appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, no_wait=no_wait)
23692365

23702366
if 'omsagent' in instance.addon_profiles and instance.addon_profiles['omsagent'].enabled:
23712367
_ensure_container_insights_for_monitoring(cmd, instance.addon_profiles['omsagent'])
@@ -2414,7 +2410,6 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements
24142410
appgw_subnet_prefix=None,
24152411
appgw_id=None,
24162412
appgw_subnet_id=None,
2417-
appgw_shared=False,
24182413
appgw_watch_namespace=None,
24192414
no_wait=False): # pylint: disable=unused-argument
24202415

@@ -2479,8 +2474,6 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements
24792474
addon_profile.config[CONST_INGRESS_APPGW_APPLICATION_GATEWAY_ID] = appgw_id
24802475
if appgw_subnet_id is not None:
24812476
addon_profile.config[CONST_INGRESS_APPGW_SUBNET_ID] = appgw_subnet_id
2482-
if appgw_shared:
2483-
addon_profile.config[CONST_INGRESS_APPGW_SHARED] = "true"
24842477
if appgw_watch_namespace is not None:
24852478
addon_profile.config[CONST_INGRESS_APPGW_WATCH_NAMESPACE] = appgw_watch_namespace
24862479
addon_profiles[addon] = addon_profile

0 commit comments

Comments
 (0)