From d4d80d94dac0f1f62e1f93f3060b3cb7c2106abd Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Mon, 14 Mar 2022 09:01:49 -0700 Subject: [PATCH] Update help text (#21) * Update help text * Update punctuation * master -> main --- src/containerapp/azext_containerapp/_help.py | 267 ++++++++---------- .../azext_containerapp/_params.py | 58 ++-- src/containerapp/azext_containerapp/custom.py | 2 +- 3 files changed, 143 insertions(+), 184 deletions(-) diff --git a/src/containerapp/azext_containerapp/_help.py b/src/containerapp/azext_containerapp/_help.py index 0720d816793..4f6fd755cc7 100644 --- a/src/containerapp/azext_containerapp/_help.py +++ b/src/containerapp/azext_containerapp/_help.py @@ -9,92 +9,47 @@ helps['containerapp'] = """ type: group - short-summary: Commands to manage Containerapps. + short-summary: Commands to manage Azure Container Apps. """ helps['containerapp create'] = """ type: command - short-summary: Create a Containerapp. + short-summary: Create a container app. examples: - - name: Create a Containerapp + - name: Create a container app and retrieve its fully qualified domain name. text: | az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ + --image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \\ + --ingress external --target-port 80 \\ --query properties.configuration.ingress.fqdn - - name: Create a Containerapp with secrets and environment variables + - name: Create a container app with resource requirements and replica count limits. text: | az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ - --secrets mysecret=escapefromtarkov,anothersecret=isadifficultgame \\ - --env-vars myenvvar=foo,anotherenvvar=bar \\ - --query properties.configuration.ingress.fqdn - - name: Create a Containerapp that only accepts internal traffic - text: | - az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ - --ingress internal \\ - --query properties.configuration.ingress.fqdn - - name: Create a Containerapp using an image from a private registry - text: | - az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ - --secrets mypassword=verysecurepassword \\ - --registry-server MyRegistryServerAddress \\ - --registry-username MyUser \\ - --registry-password mypassword \\ - --query properties.configuration.ingress.fqdn - - name: Create a Containerapp with a specified startup command and arguments - text: | - az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ - --command "/bin/sh" \\ - --args "-c", "while true; do echo hello; sleep 10;done" \\ - --query properties.configuration.ingress.fqdn - - name: Create a Containerapp with a minimum resource and replica requirements + --image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \\ + --cpu 0.5 --memory 1.0Gi \\ + --min-replicas 4 --max-replicas 8 + - name: Create a container app with secrets and environment variables. text: | az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage -e MyContainerappEnv \\ - --cpu 0.5 --memory 1.0Gi \\ - --min-replicas 4 --max-replicas 8 \\ - --query properties.configuration.ingress.fqdn - - name: Create a Containerapp using a YAML configuration. Example YAML configuration - https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples + --image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \\ + --secrets mysecret=secretvalue1 anothersecret="secret value 2" \\ + --env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret + - name: Create a container app using a YAML configuration. Example YAML configuration - https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples text: | az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --yaml "C:/path/to/yaml/file.yml" + --environment MyContainerappEnv \\ + --yaml "path/to/yaml/file.yml" """ helps['containerapp update'] = """ type: command - short-summary: Update a Containerapp. + short-summary: Update a container app. In multiple revisions mode, create a new revision based on the latest revision. examples: - - name: Update a Containerapp's container image - text: | - az containerapp update -n MyContainerapp -g MyResourceGroup \\ - --image MyNewContainerImage - - name: Update a Containerapp with secrets and environment variables - text: | - az containerapp update -n MyContainerapp -g MyResourceGroup \\ - --secrets mysecret=secretfoo,anothersecret=secretbar - --env-vars myenvvar=foo,anotherenvvar=secretref:mysecretname - - name: Update a Containerapp's ingress setting to internal + - name: Update a container app's container image. text: | az containerapp update -n MyContainerapp -g MyResourceGroup \\ - --ingress internal - - name: Update a Containerapp using an image from a private registry - text: | - az containerapp update -n MyContainerapp -g MyResourceGroup \\ - --image MyNewContainerImage \\ - --secrets mypassword=verysecurepassword \\ - --registry-server MyRegistryServerAddress \\ - --registry-username MyUser \\ - --registry-password mypassword - - name: Update a Containerapp using a specified startup command and arguments - text: | - az containerapp update -n MyContainerapp -g MyResourceGroup \\ - --image MyContainerImage \\ - --command "/bin/sh" - --args "-c", "while true; do echo hello; sleep 10;done" - - name: Update a Containerapp with a minimum resource and replica requirements + --image myregistry.azurecr.io/my-app:v2.0 + - name: Update a container app's resource requirements and scale limits. text: | az containerapp update -n MyContainerapp -g MyResourceGroup \\ --cpu 0.5 --memory 1.0Gi \\ @@ -103,37 +58,37 @@ helps['containerapp delete'] = """ type: command - short-summary: Delete a Containerapp. + short-summary: Delete a container app. examples: - - name: Delete a Containerapp. + - name: Delete a container app. text: az containerapp delete -g MyResourceGroup -n MyContainerapp """ helps['containerapp scale'] = """ type: command - short-summary: Set the min and max replicas for a Containerapp. + short-summary: Set the min and max replicas for a container app (latest revision in multiple revisions mode). examples: - - name: Scale a Containerapp. + - name: Scale a container's latest revision. text: az containerapp scale -g MyResourceGroup -n MyContainerapp --min-replicas 1 --max-replicas 2 """ helps['containerapp show'] = """ type: command - short-summary: Show details of a Containerapp. + short-summary: Show details of a container app. examples: - - name: Show the details of a Containerapp. + - name: Show the details of a container app. text: | az containerapp show -n MyContainerapp -g MyResourceGroup """ helps['containerapp list'] = """ type: command - short-summary: List Containerapps. + short-summary: List container apps. examples: - - name: List Containerapps by subscription. + - name: List container apps in the current subscription. text: | az containerapp list - - name: List Containerapps by resource group. + - name: List container apps by resource group. text: | az containerapp list -g MyResourceGroup """ @@ -141,61 +96,62 @@ # Revision Commands helps['containerapp revision'] = """ type: group - short-summary: Commands to manage a Containerapp's revisions. + short-summary: Commands to manage revisions. """ helps['containerapp revision show'] = """ type: command - short-summary: Show details of a Containerapp's revision. + short-summary: Show details of a revision. examples: - - name: Show details of a Containerapp's revision. + - name: Show details of a revision. text: | - az containerapp revision show --revision-name MyContainerappRevision -g MyResourceGroup + az containerapp revision show -n MyContainerapp -g MyResourceGroup \\ + --revision-name MyContainerappRevision """ helps['containerapp revision list'] = """ type: command - short-summary: List details of a Containerapp's revisions. + short-summary: List a container app's revisions. examples: - - name: List a Containerapp's revisions. + - name: List a container app's revisions. text: | - az containerapp revision list --revision-name MyContainerapp -g MyResourceGroup + az containerapp revision list -n MyContainerapp -g MyResourceGroup """ helps['containerapp revision restart'] = """ type: command - short-summary: Restart a Containerapps's revision. + short-summary: Restart a revision. examples: - - name: Restart a Containerapp's revision. + - name: Restart a revision. text: | - az containerapp revision restart --revision-name MyContainerappRevision -g MyResourceGroup + az containerapp revision restart -n MyContainerapp -g MyResourceGroup --revision-name MyContainerappRevision """ helps['containerapp revision activate'] = """ type: command - short-summary: Activates Containerapp's revision. + short-summary: Activate a revision. examples: - - name: Activate a Containerapp's revision. + - name: Activate a revision. text: | - az containerapp revision activate --revision-name MyContainerappRevision -g MyResourceGroup + az containerapp revision activate -n MyContainerapp -g MyResourceGroup --revision-name MyContainerappRevision """ helps['containerapp revision deactivate'] = """ type: command - short-summary: Deactivates Containerapp's revision. + short-summary: Deactivate a revision. examples: - - name: Deactivate a Containerapp's revision. + - name: Deactivate a revision. text: | - az containerapp revision deactivate --revision-name MyContainerappRevision -g MyResourceGroup + az containerapp revision deactivate -n MyContainerapp -g MyResourceGroup --revision-name MyContainerappRevision """ helps['containerapp revision mode set'] = """ type: command - short-summary: Set the revision mode of a Containerapp. + short-summary: Set the revision mode of a container app. examples: - - name: Set the revision mode of a Containerapp. + - name: Set a container app to single revision mode. text: | - az containerapp revision set --mode Single -n MyContainerapp -g MyResourceGroup + az containerapp revision mode set-n MyContainerapp -g MyResourceGroup --mode Single """ helps['containerapp revision copy'] = """ @@ -204,61 +160,62 @@ examples: - name: Create a revision based on a previous revision. text: | - az containerapp revision copy -n MyContainerapp -g MyResourceGroup --cpu 0.75 --memory 1.5Gi + az containerapp revision copy -n MyContainerapp -g MyResourceGroup \\ + --from-revision PreviousRevisionName --cpu 0.75 --memory 1.5Gi """ # Environment Commands helps['containerapp env'] = """ type: group - short-summary: Commands to manage Containerapp environments. + short-summary: Commands to manage Container Apps environments. """ helps['containerapp env create'] = """ type: command - short-summary: Create a Containerapp environment. + short-summary: Create a Container Apps environment. examples: - - name: Create a Containerapp Environment with an autogenerated Log Analytics + - name: Create an environment with an auto-generated Log Analytics workspace. text: | az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\ - -- location Canada Central - - name: Create a Containerapp Environment with Log Analytics + --location "Canada Central" + - name: Create an environment with an existing Log Analytics workspace. text: | az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\ --logs-workspace-id myLogsWorkspaceID \\ --logs-workspace-key myLogsWorkspaceKey \\ - --location Canada Central + --location "Canada Central" """ helps['containerapp env update'] = """ type: command - short-summary: Update a Containerapp environment. Currently Unsupported. + short-summary: Update a Container Apps environment. Currently Unsupported. """ helps['containerapp env delete'] = """ type: command - short-summary: Delete a Containerapp Environment. + short-summary: Delete a Container Apps environment. examples: - - name: Delete Containerapp Environment. - text: az containerapp env delete -g MyResourceGroup -n MyContainerappEnvironment + - name: Delete an environment. + text: az containerapp env delete -n MyContainerappEnvironment -g MyResourceGroup """ helps['containerapp env show'] = """ type: command - short-summary: Show details of a Containerapp environment. + short-summary: Show details of a Container Apps environment. examples: - - name: Show the details of a Containerapp Environment. + - name: Show the details of an environment. text: | az containerapp env show -n MyContainerappEnvironment -g MyResourceGroup """ helps['containerapp env list'] = """ type: command - short-summary: List Containerapp environments by subscription or resource group. + short-summary: List Container Apps environments by subscription or resource group. examples: - - name: List Containerapp Environments by subscription. + - name: List environments in the current subscription. text: | az containerapp env list - - name: List Containerapp Environments by resource group. + - name: List environments by resource group. text: | az containerapp env list -g MyResourceGroup """ @@ -266,60 +223,64 @@ # Ingress Commands helps['containerapp ingress'] = """ type: group - short-summary: Commands to manage Containerapp ingress. + short-summary: Commands to manage ingress and traffic-splitting. """ helps['containerapp ingress traffic'] = """ type: subgroup - short-summary: Commands to manage Containerapp ingress traffic. + short-summary: Commands to manage traffic-splitting. """ helps['containerapp ingress show'] = """ type: command - short-summary: Show details of a Containerapp ingress. + short-summary: Show details of a container app's ingress. examples: - - name: Show the details of a Containerapp ingress. + - name: Show the details of a container app's ingress. text: | az containerapp ingress show -n MyContainerapp -g MyResourceGroup """ helps['containerapp ingress enable'] = """ type: command - short-summary: Enable Containerapp ingress. + short-summary: Enable ingress for a container app. examples: - - name: Enable Containerapp ingress. + - name: Enable ingress for a container app. text: | - az containerapp ingress enable -n MyContainerapp -g MyResourceGroup --type external --allow-insecure --target-port 80 --transport auto + az containerapp ingress enable -n MyContainerapp -g MyResourceGroup \\ + --type external --allow-insecure --target-port 80 --transport auto """ helps['containerapp ingress disable'] = """ type: command - short-summary: Disable Containerapp ingress. + short-summary: Disable ingress for a container app. examples: - - name: Disable Containerapp ingress. + - name: Disable ingress for a container app. text: | az containerapp ingress disable -n MyContainerapp -g MyResourceGroup """ helps['containerapp ingress traffic'] = """ type: group - short-summary: Commands to manage Containerapp ingress traffic. + short-summary: Commands to manage traffic-splitting. """ helps['containerapp ingress traffic set'] = """ type: command - short-summary: Set Containerapp ingress traffic. + short-summary: Configure traffic-splitting for a container app. examples: - - name: Set Containerapp ingress traffic. + - name: Route 100%% of a container app's traffic to its latest revision. text: | az containerapp ingress traffic set -n MyContainerapp -g MyResourceGroup --traffic-weight latest=100 + - name: Split a container app's traffic between two revisions. + text: | + az containerapp ingress traffic set -n MyContainerapp -g MyResourceGroup --traffic-weight latest=80 MyRevisionName=20 """ helps['containerapp ingress traffic show'] = """ type: command - short-summary: Show Containerapp ingress traffic. + short-summary: Show traffic-splitting configuration for a container app. examples: - - name: Show Containerapp ingress traffic. + - name: Show a container app's ingress traffic configuration. text: | az containerapp ingress traffic show -n MyContainerapp -g MyResourceGroup """ @@ -327,45 +288,43 @@ # Registry Commands helps['containerapp registry'] = """ type: group - short-summary: Commands to manage Containerapp registries. + short-summary: Commands to manage container registry information. """ helps['containerapp registry show'] = """ type: command - short-summary: Show details of a Containerapp registry. + short-summary: Show details of a container registry. examples: - - name: Show the details of a Containerapp registry. + - name: Show the details of a container registry. text: | az containerapp registry show -n MyContainerapp -g MyResourceGroup --server MyContainerappRegistry.azurecr.io """ helps['containerapp registry list'] = """ type: command - short-summary: List registries assigned to a Containerapp. + short-summary: List container registries configured in a container app. examples: - - name: Show the details of a Containerapp registry. + - name: List container registries configured in a container app. text: | az containerapp registry list -n MyContainerapp -g MyResourceGroup """ helps['containerapp registry set'] = """ type: command - short-summary: Add or update a Containerapp registry. + short-summary: Add or update a container registry's details. examples: - - name: Add a registry to a Containerapp. - text: | - az containerapp registry set -n MyContainerapp -g MyResourceGroup --server MyContainerappRegistry.azurecr.io - - name: Update a Containerapp registry. + - name: Configure a container app to use a registry. text: | - az containerapp registry set -n MyContainerapp -g MyResourceGroup --server MyExistingContainerappRegistry.azurecr.io --username MyRegistryUsername --password MyRegistryPassword + az containerapp registry set -n MyContainerapp -g MyResourceGroup \\ + --server MyExistingContainerappRegistry.azurecr.io --username MyRegistryUsername --password MyRegistryPassword """ helps['containerapp registry delete'] = """ type: command - short-summary: Delete a registry from a Containerapp. + short-summary: Remove a container registry's details. examples: - - name: Delete a registry from a Containerapp. + - name: Remove a registry from a Containerapp. text: | az containerapp registry delete -n MyContainerapp -g MyResourceGroup --server MyContainerappRegistry.azurecr.io """ @@ -373,51 +332,51 @@ # Secret Commands helps['containerapp secret'] = """ type: group - short-summary: Commands to manage Containerapp secrets. + short-summary: Commands to manage secrets. """ helps['containerapp secret show'] = """ type: command - short-summary: Show details of a Containerapp secret. + short-summary: Show details of a secret. examples: - - name: Show the details of a Containerapp secret. + - name: Show the details of a secret. text: | az containerapp secret show -n MyContainerapp -g MyResourceGroup --secret-name MySecret """ helps['containerapp secret list'] = """ type: command - short-summary: List the secrets of a Containerapp. + short-summary: List the secrets of a container app. examples: - - name: List the secrets of a Containerapp. + - name: List the secrets of a container app. text: | az containerapp secret list -n MyContainerapp -g MyResourceGroup """ helps['containerapp secret delete'] = """ type: command - short-summary: Delete secrets from a Containerapp. + short-summary: Delete secrets from a container app. examples: - - name: Delete secrets from a Containerapp. + - name: Delete secrets from a container app. text: | az containerapp secret delete -n MyContainerapp -g MyResourceGroup --secret-names MySecret MySecret2 """ helps['containerapp secret set'] = """ type: command - short-summary: Create/update Containerapp secrets. + short-summary: Create/update secrets. examples: - - name: Add a secret to a Containerapp. + - name: Add secrets to a container app. text: | - az containerapp secret set -n MyContainerapp -g MyResourceGroup --secrets MySecretName=MySecretValue - - name: Update a Containerapp secret. + az containerapp secret set -n MyContainerapp -g MyResourceGroup --secrets MySecretName1=MySecretValue1 MySecretName2=MySecretValue2 + - name: Update a secret. text: | az containerapp secret set -n MyContainerapp -g MyResourceGroup --secrets MyExistingSecretName=MyNewSecretValue """ helps['containerapp github-action add'] = """ type: command - short-summary: Adds GitHub Actions to the Containerapp + short-summary: Add a Github Actions workflow to a repository to deploy a container app. examples: - name: Add GitHub Actions, using Azure Container Registry and personal access token. text: az containerapp github-action add -g MyResourceGroup -n MyContainerapp --repo-url https://github.com/userid/repo --branch main @@ -433,7 +392,7 @@ --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --login-with-github - - name: Add GitHub Actions, using Dockerhub and log in to GitHub flow to retrieve personal access token. + - name: Add GitHub Actions, using Docker Hub and log in to GitHub flow to retrieve personal access token. text: az containerapp github-action add -g MyResourceGroup -n MyContainerapp --repo-url https://github.com/userid/repo --branch main --registry-username MyUsername --registry-password MyPassword @@ -445,20 +404,20 @@ helps['containerapp github-action delete'] = """ type: command - short-summary: Removes GitHub Actions from the Containerapp + short-summary: Remove a previously configured Container Apps GitHub Actions workflow from a repository. examples: - - name: Removes GitHub Actions, personal access token. + - name: Remove GitHub Actions using a personal access token. text: az containerapp github-action delete -g MyResourceGroup -n MyContainerapp --token MyAccessToken - - name: Removes GitHub Actions, using log in to GitHub flow to retrieve personal access token. + - name: Remove GitHub Actions using log in to GitHub flow to retrieve personal access token. text: az containerapp github-action delete -g MyResourceGroup -n MyContainerapp --login-with-github """ helps['containerapp github-action show'] = """ type: command - short-summary: Show the GitHub Actions configuration on a Containerapp + short-summary: Show the GitHub Actions configuration on a container app. examples: - - name: Show the GitHub Actions configuration on a Containerapp + - name: Show the GitHub Actions configuration on a Containerapp. text: az containerapp github-action show -g MyResourceGroup -n MyContainerapp """ \ No newline at end of file diff --git a/src/containerapp/azext_containerapp/_params.py b/src/containerapp/azext_containerapp/_params.py index e6fb2908f67..b15851f2b66 100644 --- a/src/containerapp/azext_containerapp/_params.py +++ b/src/containerapp/azext_containerapp/_params.py @@ -26,54 +26,54 @@ 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 containerapp's environment.") - c.argument('yaml', type=file_type, help='Path to a .yaml file with the configuration of a containerapp. All other parameters will be ignored') + 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') # 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('image_name', type=str, options_list=['--image-name'], help="Name of the Container image.") + c.argument('image_name', type=str, options_list=['--image-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 containerapp. Space-separated values in 'key=value' format. Empty string to clear existing values") - c.argument('startup_command', nargs='*', options_list=['--command'], help="A list of supported commands on the container app that will executed during container startup. Space-separated values e.g. \"/bin/queue\" \"mycommand\". Empty string to clear existing values") + 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") + 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') # 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 containerapp replicas.") - c.argument('max_replicas', type=int, options_list=['--max-replicas'], help="The maximum number of containerapp replicas.") + 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.") # Dapr - with self.argument_context('containerapp', arg_group='Dapr (Creates new revision)') as c: + 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="Tells Dapr the port your application is listening on.") + 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="Tells Dapr which protocol your application is using.") + 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.") # 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 containerapp.") - c.argument('registry_server', type=str, validator=validate_registry_server, options_list=['--registry-server'], help="The url of the registry, 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 container image registry server. 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 container image registry server") - c.argument('secrets', nargs='*', options_list=['--secrets', '-s'], help="A list of secret(s) for the containerapp. Space-separated values in 'key=value' format.") + 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('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="Ingress type that allows either internal or external traffic to the Containerapp.") + 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('transport', arg_type=get_enum_type(['auto', 'http', 'http2']), help="The transport protocol used for ingress traffic.") - c.argument('traffic_weights', nargs='*', options_list=['--traffic-weight'], help="A list of revision weight(s) for the Containerapp. Space-separated values in 'revision_name=weight' format. For latest revision, use 'latest=weight'") + 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 containerapp replicas.") - c.argument('max_replicas', type=int, options_list=['--max-replicas'], help="The maximum number of containerapp replicas.") + 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.") with self.argument_context('containerapp env') as c: - c.argument('name', name_type, help='Name of the containerapp environment') + c.argument('name', name_type, help='Name of the Container Apps environment.') c.argument('resource_group_name', arg_type=resource_group_name_type) c.argument('location', arg_type=get_location_type(self.cli_ctx), help='Location of resource. Examples: Canada Central, North Europe') c.argument('tags', arg_type=tags_type) @@ -94,21 +94,21 @@ def load_arguments(self, _): c.argument('internal_only', arg_type=get_three_state_flag(), options_list=['--internal-only'], help='Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource, therefore must provide infrastructureSubnetResourceId and appSubnetResourceId if enabling this property') with self.argument_context('containerapp env update') as c: - c.argument('name', name_type, help='Name of the managed environment.') + c.argument('name', name_type, help='Name of the Container Apps environment.') c.argument('tags', arg_type=tags_type) with self.argument_context('containerapp env delete') as c: - c.argument('name', name_type, help='Name of the managed Environment.') + c.argument('name', name_type, help='Name of the Container Apps Environment.') with self.argument_context('containerapp env show') as c: - c.argument('name', name_type, help='Name of the managed Environment.') + c.argument('name', name_type, help='Name of the Container Apps Environment.') with self.argument_context('containerapp github-action add') as c: c.argument('repo_url', help='The GitHub repository to which the workflow file will be added. In the format: https://github.com//') c.argument('token', help='A Personal Access Token with write access to the specified repository. For more information: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line') - c.argument('branch', options_list=['--branch', '-b'], help='The branch of the GitHub repo. Defaults to "master" if not specified.') + c.argument('branch', options_list=['--branch', '-b'], help='The branch of the GitHub repo. Defaults to "main" if not specified.') c.argument('login_with_github', help='Interactively log in with Github to retrieve the Personal Access Token') - c.argument('registry_url', help='The url of the registry, e.g. myregistry.azurecr.io') + c.argument('registry_url', help='The container registry server, e.g. myregistry.azurecr.io') c.argument('registry_username', help='The username of the registry. If using Azure Container Registry, we will try to infer the credentials if not supplied') c.argument('registry_password', help='The password of the registry. If using Azure Container Registry, we will try to infer the credentials if not supplied') c.argument('docker_file_path', help='The dockerfile location, e.g. ./Dockerfile') @@ -128,15 +128,15 @@ def load_arguments(self, _): with self.argument_context('containerapp ingress') as c: c.argument('allow_insecure', help='Allow insecure connections for ingress traffic.') - c.argument('type', validator=validate_ingress, arg_type=get_enum_type(['internal', 'external']), help="Ingress type that allows either internal or external traffic to the Containerapp.") + c.argument('type', validator=validate_ingress, arg_type=get_enum_type(['internal', 'external']), help="The ingress type.") c.argument('transport', arg_type=get_enum_type(['auto', 'http', 'http2']), help="The transport protocol used for ingress traffic.") c.argument('target_port', type=int, validator=validate_target_port, help="The application port used for ingress traffic.") with self.argument_context('containerapp ingress traffic') as c: - c.argument('traffic_weights', nargs='*', options_list=['--traffic-weight'], help="A list of revision weight(s) for the Containerapp. Space-separated values in 'revision_name=weight' format. For latest revision, use 'latest=weight'") + 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 secret set') as c: - c.argument('secrets', nargs='+', options_list=['--secrets', '-s'], help="A list of secret(s) for the containerapp. Space-separated values in 'key=value' format.") + 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.") with self.argument_context('containerapp secret delete') as c: - c.argument('secret_names', nargs='+', help="A list of secret(s) for the containerapp. Space-separated secret values names.") + c.argument('secret_names', nargs='+', help="A list of secret(s) for the container app. Space-separated secret values names.") diff --git a/src/containerapp/azext_containerapp/custom.py b/src/containerapp/azext_containerapp/custom.py index f814103c875..c3277dad616 100644 --- a/src/containerapp/azext_containerapp/custom.py +++ b/src/containerapp/azext_containerapp/custom.py @@ -1013,7 +1013,7 @@ def create_or_update_github_action(cmd, if branch: source_control_info["properties"]["branch"] = branch if not source_control_info["properties"]["branch"]: - source_control_info["properties"]["branch"] = "master" + source_control_info["properties"]["branch"] = "main" azure_credentials = None