Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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: 1 addition & 1 deletion src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Release History
upcoming
++++++
* Add command group 'az containerapp connected-env', support show/list/delete/create connected environment

* 'az containerapp service': add support for creation and deletion of Qdrant vector database as a container app dev service
0.3.39
++++++
* 'az containerapp update': fix bug for populating secret value with --yaml
Expand Down
6 changes: 5 additions & 1 deletion src/containerapp/azext_containerapp/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
MANAGED_CERTIFICATE_RT = "managedCertificates"
PRIVATE_CERTIFICATE_RT = "certificates"

DEV_SERVICE_LIST = ["kafka", "postgres", "redis", "mariadb"]
DEV_SERVICE_LIST = ["kafka", "postgres", "redis", "mariadb", "qdrant"]

DEV_KAFKA_IMAGE = 'kafka'
DEV_KAFKA_SERVICE_TYPE = 'kafka'
Expand All @@ -45,6 +45,10 @@
DEV_MARIADB_SERVICE_TYPE = 'mariadb'
DEV_MARIADB_CONTAINER_NAME = 'mariadb'

DEV_QDRANT_IMAGE = 'qdrant'
DEV_QDRANT_SERVICE_TYPE = 'qdrant'
DEV_QDRANT_CONTAINER_NAME = 'qdrant'

PENDING_STATUS = "Pending"
SUCCEEDED_STATUS = "Succeeded"
UPDATING_STATUS = "Updating"
Expand Down
15 changes: 15 additions & 0 deletions src/containerapp/azext_containerapp/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@
short-summary: Commands to manage the mariadb service for the Container Apps environment.
"""

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

helps['containerapp service redis create'] = """
type: command
short-summary: Command to create the redis service.
Expand All @@ -465,6 +470,11 @@
short-summary: Command to create the mariadb service.
"""

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

helps['containerapp service redis delete'] = """
type: command
short-summary: Command to delete the redis service.
Expand All @@ -485,6 +495,11 @@
short-summary: Command to delete the mariadb service.
"""

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

helps['containerapp env update'] = """
type: command
short-summary: Update a Container Apps environment.
Expand Down
4 changes: 4 additions & 0 deletions src/containerapp/azext_containerapp/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def load_command_table(self, _):
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:
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 identity') as g:
g.custom_command('assign', 'assign_managed_identity', supports_no_wait=True, exception_handler=ex_handler_factory())
g.custom_command('remove', 'remove_managed_identity', supports_no_wait=True, exception_handler=ex_handler_factory())
Expand Down
15 changes: 13 additions & 2 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
NAME_INVALID, NAME_ALREADY_EXISTS, ACR_IMAGE_SUFFIX, HELLO_WORLD_IMAGE, LOG_TYPE_SYSTEM, LOG_TYPE_CONSOLE,
MANAGED_CERTIFICATE_RT, PRIVATE_CERTIFICATE_RT, PENDING_STATUS, SUCCEEDED_STATUS, DEV_POSTGRES_IMAGE, DEV_POSTGRES_SERVICE_TYPE,
DEV_POSTGRES_CONTAINER_NAME, DEV_REDIS_IMAGE, DEV_REDIS_SERVICE_TYPE, DEV_REDIS_CONTAINER_NAME, DEV_KAFKA_CONTAINER_NAME,
DEV_KAFKA_IMAGE, DEV_KAFKA_SERVICE_TYPE, DEV_MARIADB_CONTAINER_NAME, DEV_MARIADB_IMAGE, DEV_MARIADB_SERVICE_TYPE, DEV_SERVICE_LIST,
CONTAINER_APPS_SDK_MODELS, BLOB_STORAGE_TOKEN_STORE_SECRET_SETTING_NAME)
DEV_KAFKA_IMAGE, DEV_KAFKA_SERVICE_TYPE, DEV_MARIADB_CONTAINER_NAME, DEV_MARIADB_IMAGE, DEV_MARIADB_SERVICE_TYPE, DEV_QDRANT_IMAGE,
DEV_QDRANT_CONTAINER_NAME, DEV_QDRANT_SERVICE_TYPE, DEV_SERVICE_LIST, CONTAINER_APPS_SDK_MODELS, BLOB_STORAGE_TOKEN_STORE_SECRET_SETTING_NAME)

logger = get_logger(__name__)

Expand Down Expand Up @@ -250,6 +250,17 @@ def delete_mariadb_service(cmd, service_name, resource_group_name, no_wait=False
return DevServiceUtils.delete_service(cmd, service_name, resource_group_name, no_wait, DEV_MARIADB_SERVICE_TYPE)


def create_qdrant_service(cmd, service_name, environment_name, resource_group_name, no_wait=False,
disable_warnings=True):
return DevServiceUtils.create_service(cmd, service_name, environment_name, resource_group_name, no_wait,
disable_warnings, DEV_QDRANT_IMAGE, DEV_QDRANT_SERVICE_TYPE,
DEV_QDRANT_CONTAINER_NAME)


def delete_qdrant_service(cmd, service_name, resource_group_name, no_wait=False):
return DevServiceUtils.delete_service(cmd, service_name, resource_group_name, no_wait, DEV_QDRANT_SERVICE_TYPE)


def update_containerapp_yaml(cmd, name, resource_group_name, file_name, from_revision=None, no_wait=False):
yaml_containerapp = process_loaded_yaml(load_yaml_file(file_name))

Expand Down
Loading