-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Abhilash/ArcGateway-Feature #7753
Draft
9lash
wants to merge
19
commits into
Azure:main
Choose a base branch
from
9lash:abiyer/add-arcgateway
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
eebb983
Copied folder from swagger spec PR check
9lash 261fde2
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash 28de5a4
consume the connection-type variable and set the 07-24 client factory
9lash 4a397ad
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash 33c889f
Updates for new RP and DP structure
9lash 8719dbf
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash 8102821
remove redundant old methods
5a93702
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash b4e04db
Accept gatewayArmID and enablegateway flag in connect command and per…
9lash 33e6828
Merge branch 'abiyer/add-arcgateway' of https://github.com/9lash/azur…
137e395
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash 633cd72
add configuration and protectedsettings parameter
3b6fe00
Merge branch 'abiyer/add-arcgateway' of https://github.com/9lash/azur…
e956d5d
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash dab33c2
use helm values returned from DP
4a64810
Merge branch 'abiyer/add-arcgateway' of https://github.com/9lash/azur…
ac2cedd
update variable names
4ad0456
Add more params in update command
9lash 182b9d3
update the cli version
9lash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,10 @@ | |
from knack.arguments import (CLIArgumentType, CaseInsensitiveList) | ||
|
||
from ._validators import validate_private_link_properties | ||
from .action import ( | ||
AddConfigurationSettings, | ||
AddConfigurationProtectedSettings, | ||
) | ||
|
||
features_types = CLIArgumentType( | ||
nargs='+', | ||
|
@@ -51,6 +55,10 @@ def load_arguments(self, _): | |
c.argument('container_log_path', help='Override the default container log path to enable fluent-bit logging') | ||
c.argument('skip_ssl_verification', action='store_true', help='Skip SSL verification for any cluster connection.') | ||
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') | ||
c.argument('enable_gateway', options_list=['--enable-gateway'], help='Pass this value to enable Arc Gateway.') | ||
c.argument('gateway_resource_id', options_list=['--gateway-resource-id'], help='ArmID of the Arc Gateway resource.') | ||
c.argument('configuration_settings', options_list=['--configuration-settings', '--config'], action=AddConfigurationSettings, nargs='+', help='Configuration Settings as key=value pair. Repeat parameter for each setting. Do not use this for secrets, as this value is returned in response.') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would |
||
c.argument('configuration_protected_settings', options_list=['--config-protected-settings', '--config-protected'], action=AddConfigurationProtectedSettings, nargs='+', help='Configuration Protected Settings as key=value pair. Repeat parameter for each setting. Only the key is returned in response, the value is not.') | ||
|
||
with self.argument_context('connectedk8s update') as c: | ||
c.argument('tags', tags_type) | ||
|
@@ -69,6 +77,9 @@ def load_arguments(self, _): | |
c.argument('container_log_path', help='Override the default container log path to enable fluent-bit logging') | ||
c.argument('skip_ssl_verification', action='store_true', help='Skip SSL verification for any cluster connection.') | ||
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') | ||
c.argument('disable_gateway', options_list=['--disable_gateway'], help='pass this value to disable Arc Gateway') | ||
c.argument('enable_gateway', options_list=['--enable-gateway'], help='Pass this value to enable Arc Gateway.') | ||
c.argument('gateway_resource_id', options_list=['--gateway-resource-id'], help='ArmID of the Arc Gateway resource.') | ||
|
||
with self.argument_context('connectedk8s upgrade') as c: | ||
c.argument('cluster_name', options_list=['--name', '-n'], id_part='name', help='The name of the connected cluster.') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
import argparse | ||
from azure.cli.core.azclierror import ArgumentUsageError | ||
|
||
# pylint: disable=protected-access, too-few-public-methods | ||
class AddConfigurationSettings(argparse._AppendAction): | ||
def __call__(self, parser, namespace, values, option_string=None): | ||
config_settings = getattr(namespace, self.dest, None) | ||
if config_settings is None: | ||
config_settings = {} | ||
for item in values: | ||
try: | ||
key, value = item.split('=', 1) | ||
feature, setting = key.split(".") | ||
# Check if the feature is already in the dictionary | ||
if feature not in config_settings: | ||
# If not, add it with an empty dictionary as value | ||
config_settings[feature] = {} | ||
# Update the setting in the feature's dictionary | ||
config_settings[feature][setting] = value | ||
except ValueError as ex: | ||
raise ArgumentUsageError('Usage error: {} configuration_setting_key=configuration_setting_value'. | ||
format(option_string)) from ex | ||
setattr(namespace, self.dest, config_settings) | ||
|
||
# pylint: disable=protected-access, too-few-public-methods | ||
class AddConfigurationProtectedSettings(argparse._AppendAction): | ||
|
||
def __call__(self, parser, namespace, values, option_string=None): | ||
prot_settings = getattr(namespace, self.dest, None) | ||
if prot_settings is None: | ||
prot_settings = {} | ||
for item in values: | ||
try: | ||
key, value = item.split('=', 1) | ||
feature, setting = key.split(".") | ||
# Check if the feature is already in the dictionary | ||
if feature not in prot_settings: | ||
# If not, add it with an empty dictionary as value | ||
prot_settings[feature] = {} | ||
# Add the setting to the feature's dictionary | ||
prot_settings[feature][setting] = value | ||
except ValueError as ex: | ||
raise ArgumentUsageError('Usage error: {} configuration_protected_setting_key=' | ||
'configuration_protected_setting_value'.format(option_string)) from ex | ||
setattr(namespace, self.dest, prot_settings) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there was a real requirement to keep these as a single change, it would have been nice to see these are two PRs so that the specific changes for the two were clearly communicated.