Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release History
===============
upcoming
++++++
* 'az containerapp addon': support for az containerapp addon commands; deprecation of az containerapp service commands
* 'az containerapp env create': Support --enable-dedicated-gpu
* 'az containerapp job create': fix problem of parsing parameters minExecutions and maxExecutions from --yaml
* 'az containerapp env dapr-component init': support initializing Dapr components and dev services for an environment
Expand Down
86 changes: 86 additions & 0 deletions src/containerapp/azext_containerapp/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,24 @@
helps['containerapp service'] = """
type: group
short-summary: Commands to manage services available within the environment.
deprecate_info: This command group is deprecated. Use 'az containerapp addon' instead.
"""

helps['containerapp addon'] = """
type: group
short-summary: Commands to manage addons available within the environment.
"""

helps['containerapp service list'] = """
type: command
short-summary: List all services within the environment.
"""

helps['containerapp addon list'] = """
type: command
short-summary: List all addons within the environment.
"""

helps['containerapp service redis'] = """
type: group
short-summary: Commands to manage the redis service for the Container Apps environment.
Expand Down Expand Up @@ -190,6 +201,81 @@
short-summary: Command to delete the qdrant service.
"""

helps['containerapp addon redis'] = """
type: group
short-summary: Commands to manage the redis addon for the Container Apps environment.
"""

helps['containerapp addon postgres'] = """
type: group
short-summary: Commands to manage the postgres addon for the Container Apps environment.
"""

helps['containerapp addon kafka'] = """
type: group
short-summary: Commands to manage the kafka addon for the Container Apps environment.
"""

helps['containerapp addon mariadb'] = """
type: group
short-summary: Commands to manage the mariadb addon for the Container Apps environment.
"""

helps['containerapp addon qdrant'] = """
type: group
short-summary: Commands to manage the qdrant addon for the Container Apps environment.
"""

helps['containerapp addon redis create'] = """
type: command
short-summary: Command to create the redis addon.
"""

helps['containerapp addon postgres create'] = """
type: command
short-summary: Command to create the postgres addon.
"""

helps['containerapp addon kafka create'] = """
type: command
short-summary: Command to create the kafka addon.
"""

helps['containerapp addon mariadb create'] = """
type: command
short-summary: Command to create the mariadb addon.
"""

helps['containerapp addon qdrant create'] = """
type: command
short-summary: Command to create the qdrant addon.
"""

helps['containerapp addon redis delete'] = """
type: command
short-summary: Command to delete the redis addon.
"""

helps['containerapp addon postgres delete'] = """
type: command
short-summary: Command to delete the postgres addon.
"""

helps['containerapp addon kafka delete'] = """
type: command
short-summary: Command to delete the kafka addon.
"""

helps['containerapp addon mariadb delete'] = """
type: command
short-summary: Command to delete the mariadb addon.
"""

helps['containerapp addon qdrant delete'] = """
type: command
short-summary: Command to delete the qdrant addon.
"""

helps['containerapp env update'] = """
type: command
short-summary: Update a Container Apps environment.
Expand Down
5 changes: 5 additions & 0 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def load_arguments(self, _):
c.argument('environment_name', options_list=['--environment'], help="The environment name.")
c.argument('resource_group_name', arg_type=resource_group_name_type, id_part=None)

with self.argument_context('containerapp addon') as c:
c.argument('service_name', options_list=['--name', '-n'], help="The service name.")
c.argument('environment_name', options_list=['--environment'], help="The environment name.")
c.argument('resource_group_name', arg_type=resource_group_name_type, id_part=None)

with self.argument_context('containerapp env create') as c:
c.argument('enable_workload_profiles', arg_type=get_three_state_flag(), options_list=["--enable-workload-profiles", "-w"], help="Boolean indicating if the environment is enabled to have workload profiles")
c.argument('enable_dedicated_gpu', arg_type=get_three_state_flag(), options_list=["--enable-dedicated-gpu"],
Expand Down
35 changes: 29 additions & 6 deletions src/containerapp/azext_containerapp/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,49 @@ def load_command_table(self, _):
with self.command_group('containerapp env dapr-component') as g:
g.custom_command('init', 'init_dapr_components', is_preview=True)

with self.command_group('containerapp service', is_preview=True) as g:
with self.command_group('containerapp service', deprecate_info=self.deprecate(redirect='containerapp addon', hide=True), is_preview=True) as g:
g.custom_command('list', 'list_all_services')

with self.command_group('containerapp service redis') as g:
with self.command_group('containerapp addon', is_preview=True) as g:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what using containerapp add-on?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i don't get your question...help explain more?

@scrappywyrm scrappywyrm Nov 9, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but by the section that you commented on, the addon command group is the equivalent of the service one that's right above it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is should we use az containerapp add-on instead of using az containerapp addon ? @bgashirabake

@scrappywyrm scrappywyrm Nov 9, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh got it got it. in discussions with @SimonJakesch, addon was what was decided on, but i just checked the docs and add-on is what's being referenced. i can push the change for add-on in the morning but if release time is before then, i say we go with addon. the change is straight-forward so should be seamless if made in time

g.custom_command('list', 'list_all_services')

with self.command_group('containerapp service redis', deprecate_info=self.deprecate(redirect='containerapp addon redis', hide=True)) as g:
g.custom_command('create', 'create_redis_service', supports_no_wait=True)
g.custom_command('delete', 'delete_redis_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp addon redis') as g:
g.custom_command('create', 'create_redis_service', supports_no_wait=True)
g.custom_command('delete', 'delete_redis_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service postgres') as g:
with self.command_group('containerapp service postgres', deprecate_info=self.deprecate(redirect='containerapp addon postgres', hide=True)) as g:
g.custom_command('create', 'create_postgres_service', supports_no_wait=True)
g.custom_command('delete', 'delete_postgres_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service kafka') as g:
with self.command_group('containerapp addon postgres') as g:
g.custom_command('create', 'create_postgres_service', supports_no_wait=True)
g.custom_command('delete', 'delete_postgres_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service kafka', deprecate_info=self.deprecate(redirect='containerapp addon kafka', hide=True)) as g:
g.custom_command('create', 'create_kafka_service', supports_no_wait=True)
g.custom_command('delete', 'delete_kafka_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service mariadb') as g:
with self.command_group('containerapp addon kafka') as g:
g.custom_command('create', 'create_kafka_service', supports_no_wait=True)
g.custom_command('delete', 'delete_kafka_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service mariadb', deprecate_info=self.deprecate(redirect='containerapp addon mariadb', hide=True)) as g:
g.custom_command('create', 'create_mariadb_service', supports_no_wait=True)
g.custom_command('delete', 'delete_mariadb_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp addon mariadb') as g:
g.custom_command('create', 'create_mariadb_service', supports_no_wait=True)
g.custom_command('delete', 'delete_mariadb_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp service qdrant') as g:
with self.command_group('containerapp service qdrant', deprecate_info=self.deprecate(redirect='containerapp addon qdrant', hide=True)) as g:
g.custom_command('create', 'create_qdrant_service', supports_no_wait=True)
g.custom_command('delete', 'delete_qdrant_service', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp addon qdrant') as g:
g.custom_command('create', 'create_qdrant_service', supports_no_wait=True)
g.custom_command('delete', 'delete_qdrant_service', confirmation=True, supports_no_wait=True)

Expand Down
Loading