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

Reset to 0.1.0 version, remove unneeded options-list #29

Merged
merged 2 commits into from
Mar 21, 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
14 changes: 1 addition & 13 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
Release History
===============

0.1.2
++++++
* Various fixes for bugs found
* Dapr subgroup
* Managed Identity

0.1.1
++++++
* Various fixes for az containerapp create, update
* Added github actions support
* Added subgroups for ingress, registry, revision, secret

0.1.0
++++++
* Initial release.
* Initial release.
38 changes: 19 additions & 19 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def load_arguments(self, _):
# Container
with self.argument_context('containerapp', arg_group='Container (Creates new revision)') as c:
c.argument('image', type=str, options_list=['--image', '-i'], help="Container image, e.g. publisher/image-name:tag.")
c.argument('container_name', type=str, options_list=['--container-name'], help="Name of the container.")
c.argument('cpu', type=float, validator=validate_cpu, options_list=['--cpu'], help="Required CPU in cores, e.g. 0.5")
c.argument('memory', type=str, validator=validate_memory, options_list=['--memory'], help="Required memory, e.g. 1.0Gi")
c.argument('env_vars', nargs='*', options_list=['--env-vars'], help="A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.")
c.argument('container_name', type=str, help="Name of the container.")
c.argument('cpu', type=float, validator=validate_cpu, help="Required CPU in cores, e.g. 0.5")
c.argument('memory', type=str, validator=validate_memory, help="Required memory, e.g. 1.0Gi")
c.argument('env_vars', nargs='*', help="A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.")
c.argument('startup_command', nargs='*', options_list=['--command'], help="A list of supported commands on the container that will executed during startup. Space-separated values e.g. \"/bin/queue\" \"mycommand\". Empty string to clear existing values")
c.argument('args', nargs='*', options_list=['--args'], help="A list of container startup command argument(s). Space-separated values e.g. \"-c\" \"mycommand\". Empty string to clear existing values")
c.argument('revision_suffix', type=str, options_list=['--revision-suffix'], help='User friendly suffix that is appended to the revision name')
c.argument('args', nargs='*', help="A list of container startup command argument(s). Space-separated values e.g. \"-c\" \"mycommand\". Empty string to clear existing values")
c.argument('revision_suffix', type=str, help='User friendly suffix that is appended to the revision name')

# Env vars
with self.argument_context('containerapp', arg_group='Environment variables (Creates new revision)') as c:
Expand All @@ -50,38 +50,38 @@ def load_arguments(self, _):

# Scale
with self.argument_context('containerapp', arg_group='Scale (Creates new revision)') as c:
c.argument('min_replicas', type=int, options_list=['--min-replicas'], help="The minimum number of replicas.")
c.argument('max_replicas', type=int, options_list=['--max-replicas'], help="The maximum number of replicas.")
c.argument('min_replicas', type=int, help="The minimum number of replicas.")
c.argument('max_replicas', type=int, help="The maximum number of replicas.")

# Dapr
with self.argument_context('containerapp', arg_group='Dapr') as c:
c.argument('dapr_enabled', options_list=['--enable-dapr'], default=False, arg_type=get_three_state_flag())
c.argument('dapr_app_port', type=int, options_list=['--dapr-app-port'], help="The port Dapr uses to talk to the application.")
c.argument('dapr_app_id', type=str, options_list=['--dapr-app-id'], help="The Dapr application identifier.")
c.argument('dapr_app_protocol', type=str, arg_type=get_enum_type(['http', 'grpc']), options_list=['--dapr-app-protocol'], help="The protocol Dapr uses to talk to the application.")
c.argument('dapr_components', options_list=['--dapr-components'], help="The name of a yaml file containing a list of dapr components.")
c.argument('dapr_app_port', type=int, help="The port Dapr uses to talk to the application.")
c.argument('dapr_app_id', type=str, help="The Dapr application identifier.")
c.argument('dapr_app_protocol', type=str, arg_type=get_enum_type(['http', 'grpc']), help="The protocol Dapr uses to talk to the application.")
c.argument('dapr_components', help="The name of a yaml file containing a list of dapr components.")

# Configuration
with self.argument_context('containerapp', arg_group='Configuration') as c:
c.argument('revisions_mode', arg_type=get_enum_type(['single', 'multiple']), options_list=['--revisions-mode'], help="The active revisions mode for the container app.")
c.argument('registry_server', type=str, validator=validate_registry_server, options_list=['--registry-server'], help="The container registry server hostname, e.g. myregistry.azurecr.io.")
c.argument('revisions_mode', arg_type=get_enum_type(['single', 'multiple']), help="The active revisions mode for the container app.")
c.argument('registry_server', type=str, validator=validate_registry_server, help="The container registry server hostname, e.g. myregistry.azurecr.io.")
c.argument('registry_pass', type=str, validator=validate_registry_pass, options_list=['--registry-password'], help="The password to log in to container registry. If stored as a secret, value must start with \'secretref:\' followed by the secret name.")
c.argument('registry_user', type=str, validator=validate_registry_user, options_list=['--registry-username'], help="The username to log in to container registry.")
c.argument('secrets', nargs='*', options_list=['--secrets', '-s'], help="A list of secret(s) for the container app. Space-separated values in 'key=value' format.")

# Ingress
with self.argument_context('containerapp', arg_group='Ingress') as c:
c.argument('ingress', validator=validate_ingress, options_list=['--ingress'], default=None, arg_type=get_enum_type(['internal', 'external']), help="The ingress type.")
c.argument('target_port', type=int, validator=validate_target_port, options_list=['--target-port'], help="The application port used for ingress traffic.")
c.argument('ingress', validator=validate_ingress, default=None, arg_type=get_enum_type(['internal', 'external']), help="The ingress type.")
c.argument('target_port', type=int, validator=validate_target_port, help="The application port used for ingress traffic.")
c.argument('transport', arg_type=get_enum_type(['auto', 'http', 'http2']), help="The transport protocol used for ingress traffic.")

with self.argument_context('containerapp create') as c:
c.argument('assign_identity', nargs='+', help="Space-separated identities. Use '[system]' to refer to the system assigned identity.")
c.argument('traffic_weights', nargs='*', options_list=['--traffic-weight'], help="A list of revision weight(s) for the container app. Space-separated values in 'revision_name=weight' format. For latest revision, use 'latest=weight'")

with self.argument_context('containerapp scale') as c:
c.argument('min_replicas', type=int, options_list=['--min-replicas'], help="The minimum number of replicas.")
c.argument('max_replicas', type=int, options_list=['--max-replicas'], help="The maximum number of replicas.")
c.argument('min_replicas', type=int, help="The minimum number of replicas.")
c.argument('max_replicas', type=int, help="The maximum number of replicas.")

with self.argument_context('containerapp env') as c:
c.argument('name', name_type, help='Name of the Container Apps environment.')
Expand All @@ -94,7 +94,7 @@ def load_arguments(self, _):
c.argument('logs_key', type=str, options_list=['--logs-workspace-key'], help='Log Analytics workspace key to configure your Log Analytics workspace. You can use \"az monitor log-analytics workspace get-shared-keys\" to retrieve the key.')

with self.argument_context('containerapp env', arg_group='Dapr') as c:
c.argument('instrumentation_key', options_list=['--dapr-instrumentation-key'], help='Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry')
c.argument('instrumentation_key', options_list=['--dapr-instrumentation-key'], help='Application Insights instrumentation key used by Dapr to export Service to Service communication telemetry')

with self.argument_context('containerapp env', arg_group='Virtual Network') as c:
c.argument('infrastructure_subnet_resource_id', type=str, options_list=['--infrastructure-subnet-resource-id'], help='Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId.')
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67"
"azext.minCliCoreVersion": "2.15.0"
}
2 changes: 1 addition & 1 deletion src/containerapp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.1.2'
VERSION = '0.1.0'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
82 changes: 0 additions & 82 deletions src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -12043,88 +12043,6 @@
"sha256Digest": "9a796d5187571990d27feb9efeedde38c194f13ea21cbf9ec06131196bfd821d"
}
],
"containerapp": [
{
"downloadUrl": "https://containerappcli.blob.core.windows.net/containerapp/containerapp-0.1.1-py2.py3-none-any.whl",
"filename": "containerapp-0.1.1-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67",
"extensions": {
"python.details": {
"contacts": [
{
"email": "[email protected]",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions"
}
}
},
"extras": [],
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "containerapp",
"run_requires": [
{
"requires": [
"azure-cli-core"
]
}
],
"summary": "Microsoft Azure Command-Line Tools Containerapp Extension",
"version": "0.1.1"
},
"sha256Digest": "9ca28bacd772b8c516d7d682ffe94665ff777774ab89602d4ca73c4ba16e0b9b"
},
{
"downloadUrl": "https://containerappcli.blob.core.windows.net/containerapp/containerapp-0.1.2-py2.py3-none-any.whl",
"filename": "containerapp-0.1.2-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67",
"extensions": {
"python.details": {
"contacts": [
{
"email": "[email protected]",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions"
}
}
},
"extras": [],
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "containerapp",
"run_requires": [
{
"requires": [
"azure-cli-core"
]
}
],
"summary": "Microsoft Azure Command-Line Tools Containerapp Extension",
"version": "0.1.2"
},
"sha256Digest": "b1d4cc823f761cfb5469f8d53a9fa04bdc1493c3c5d5f3a90333876287e7b2f8"
}
],
"cosmosdb-preview": [
{
"downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/cosmosdb_preview-0.1.0-py2.py3-none-any.whl",
Expand Down