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

yaml param override #58

Closed
wants to merge 10 commits into from
Closed
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
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@

/src/ssh/ @rlrossiter @danybeam @fengzhou-msft @N6UDP

/src/k8sconfiguration/ @NarayanThiru @jonathan-innis

/src/k8s-configuration/ @NarayanThiru @jonathan-innis

/src/k8s-extension/ @NarayanThiru @jonathan-innis
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def load_arguments(self, _):
with self.argument_context('containerapp') as c:
c.argument('tags', arg_type=tags_type)
c.argument('managed_env', validator=validate_managed_env_name_or_id, options_list=['--environment'], help="Name or resource ID of the container app's environment.")
c.argument('yaml', type=file_type, help='Path to a .yaml file with the configuration of a container app. All other parameters will be ignored. For an example, see https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples')
c.argument('yaml', type=file_type, help='Path to a .yaml file with the configuration of a container app. Parameters passed in as flags will take precedence over the yaml. For an example, see https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples')

# Container
with self.argument_context('containerapp', arg_group='Container') as c:
Expand Down
4 changes: 2 additions & 2 deletions src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def _remove_env_vars(existing_env_vars, remove_env_vars):


def _add_or_update_tags(containerapp_def, tags):
if 'tags' not in containerapp_def:
if 'tags' not in containerapp_def or not containerapp_def['tags']:
if tags:
containerapp_def['tags'] = tags
else:
Expand Down Expand Up @@ -532,7 +532,7 @@ def _is_valid_weight(weight):


def _update_traffic_weights(containerapp_def, list_weights):
if "traffic" not in containerapp_def["properties"]["configuration"]["ingress"] or list_weights and len(list_weights):
if "traffic" not in containerapp_def["properties"]["configuration"]["ingress"] or not containerapp_def["properties"]["configuration"]["ingress"]["traffic"] or (list_weights and len(list_weights)):
containerapp_def["properties"]["configuration"]["ingress"]["traffic"] = []

for new_weight in list_weights:
Expand Down
445 changes: 411 additions & 34 deletions src/containerapp/azext_containerapp/custom.py

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -19797,6 +19797,58 @@
"version": "1.5.0"
},
"sha256Digest": "240ec430dc52af32a03450707a9734d29f7077c9961f7d1ebc871891f3f2d906"
},
{
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_configuration-1.5.1-py3-none-any.whl",
"filename": "k8s_configuration-1.5.1-py3-none-any.whl",
"metadata": {
"azext.minCliCoreVersion": "2.15.0",
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License"
],
"extensions": {
"python.details": {
"contacts": [
{
"email": "azpycli@microsoft.com",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/k8s-configuration"
}
}
},
"extras": [],
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "k8s-configuration",
"run_requires": [
{
"requires": [
"pycryptodome (~=3.14.1)"
]
}
],
"summary": "Microsoft Azure Command-Line Tools K8s-configuration Extension",
"version": "1.5.1"
},
"sha256Digest": "bf697ea1cb07d7792ba8cbadb677797398b9a818ffad2c5b979eecb5d7740ea7"
}
],
"k8s-extension": [
Expand Down
6 changes: 5 additions & 1 deletion src/k8s-configuration/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.5.1
++++++++++++++++++
* Bump pycryptodome to 3.14.1 to support Python 3.10

1.5.0
++++++++++++++++++
* Update models to 2022-03-01 for GA
Expand Down Expand Up @@ -45,4 +49,4 @@ Release History
++++++++++++++++++
* Support api-version 2021-03-01
* Update helm operator parameter aliases
* Migrate from k8sconfiguration to k8s-configuration
* Migrate from k8sconfiguration to k8s-configuration
6 changes: 4 additions & 2 deletions src/k8s-configuration/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

logger.warn("Wheel is not available, disabling bdist_wheel hook")

VERSION = "1.5.0"
VERSION = "1.5.1"

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand All @@ -29,10 +29,12 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
]

DEPENDENCIES = ["pycryptodome~=3.9.8"]
DEPENDENCIES = ["pycryptodome~=3.14.1"]

with open("README.rst", "r", encoding="utf-8") as f:
README = f.read()
Expand Down
28 changes: 0 additions & 28 deletions src/k8sconfiguration/HISTORY.rst

This file was deleted.

74 changes: 0 additions & 74 deletions src/k8sconfiguration/README.rst

This file was deleted.

32 changes: 0 additions & 32 deletions src/k8sconfiguration/azext_k8sconfiguration/__init__.py

This file was deleted.

15 changes: 0 additions & 15 deletions src/k8sconfiguration/azext_k8sconfiguration/_client_factory.py

This file was deleted.

25 changes: 0 additions & 25 deletions src/k8sconfiguration/azext_k8sconfiguration/_format.py

This file was deleted.

70 changes: 0 additions & 70 deletions src/k8sconfiguration/azext_k8sconfiguration/_help.py

This file was deleted.

Loading