azure-deploy-cli 0.1.12__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.pre-commit-config.yaml +1 -1
  2. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/CHANGELOG.md +5 -0
  3. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/PKG-INFO +62 -9
  4. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/README.md +59 -8
  5. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/pyproject.toml +1 -0
  6. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/requirements-dev.txt +1 -0
  7. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/requirements.txt +1 -0
  8. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/_version.py +3 -3
  9. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/aca/aca_cli.py +41 -75
  10. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/aca/deploy_aca.py +111 -60
  11. azure_deploy_cli-1.0.0/src/azure_deploy_cli/aca/model.py +81 -0
  12. azure_deploy_cli-1.0.0/src/azure_deploy_cli/aca/yaml_loader.py +53 -0
  13. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/docker.py +43 -33
  14. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/logging.py +1 -1
  15. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/PKG-INFO +62 -9
  16. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/SOURCES.txt +2 -0
  17. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/requires.txt +2 -0
  18. azure_deploy_cli-1.0.0/tests/test_probe_config.py +165 -0
  19. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test_retag_image.py +94 -55
  20. azure_deploy_cli-0.1.12/src/azure_deploy_cli/aca/model.py +0 -35
  21. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.github/dependabot.yml +0 -0
  22. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.github/workflows/1-1-pr-build-check.yaml +0 -0
  23. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.github/workflows/1-2-staging.yaml +0 -0
  24. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.github/workflows/1-3-release.yaml +0 -0
  25. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.github/workflows/2-build.yaml +0 -0
  26. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/.gitignore +0 -0
  27. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/LICENSE +0 -0
  28. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/Makefile +0 -0
  29. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/setup.cfg +0 -0
  30. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/setup.sh +0 -0
  31. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/__init__.py +0 -0
  32. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/aca/bash/aca-cert/create.sh +0 -0
  33. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/aca/bash/aca-cert/destroy.sh +0 -0
  34. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/cli.py +0 -0
  35. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/__init__.py +0 -0
  36. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/group.py +0 -0
  37. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/identity_cli.py +0 -0
  38. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/managed_identity.py +0 -0
  39. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/models.py +0 -0
  40. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/py.typed +0 -0
  41. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/role.py +0 -0
  42. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/identity/service_principal.py +0 -0
  43. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/py.typed +0 -0
  44. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/__init__.py +0 -0
  45. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/azure_cli.py +0 -0
  46. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/env.py +0 -0
  47. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/key_vault.py +0 -0
  48. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli/utils/py.typed +0 -0
  49. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/dependency_links.txt +0 -0
  50. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/entry_points.txt +0 -0
  51. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/src/azure_deploy_cli.egg-info/top_level.txt +0 -0
  52. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/__init__.py +0 -0
  53. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/fixtures/.env.example +0 -0
  54. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/identity/__init__.py +0 -0
  55. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/identity/test_models.py +0 -0
  56. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/roles-config.json +0 -0
  57. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test.sh +0 -0
  58. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test_aca_cli.py +0 -0
  59. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test_deploy_aca.py +0 -0
  60. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test_env.py +0 -0
  61. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.0}/tests/test_package.py +0 -0
@@ -22,7 +22,7 @@ repos:
22
22
  rev: v1.11.2
23
23
  hooks:
24
24
  - id: mypy
25
- additional_dependencies: []
25
+ additional_dependencies: [types-PyYAML]
26
26
  args: [--config-file=pyproject.toml]
27
27
  exclude: ^tests/
28
28
 
@@ -1,3 +1,8 @@
1
+ ## [1.0.0] - 2026-01-09
2
+
3
+ ### 🚀 Features
4
+
5
+ - [**breaking**] Add new required YAML-based multi-container configuration for Azure Container Apps (#27)
1
6
  ## [0.1.12] - 2026-01-06
2
7
 
3
8
  ### 🐛 Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azure-deploy-cli
3
- Version: 0.1.12
3
+ Version: 1.0.0
4
4
  Summary: Python CLI for Azure deployment automation - identity, roles, and container apps management
5
5
  Author-email: decewei <celinew1221@gmail.com>
6
6
  License: Mozilla Public License Version 2.0
@@ -399,6 +399,7 @@ Requires-Dist: azure-mgmt-keyvault
399
399
  Requires-Dist: azure-mgmt-msi
400
400
  Requires-Dist: python-dotenv>=1.0.0
401
401
  Requires-Dist: pydantic>=2.0.0
402
+ Requires-Dist: pyyaml>=6.0
402
403
  Provides-Extra: dev
403
404
  Requires-Dist: ruff>=0.1.0; extra == "dev"
404
405
  Requires-Dist: mypy>=1.7.0; extra == "dev"
@@ -409,6 +410,7 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
409
410
  Requires-Dist: commitizen>=3.0.0; extra == "dev"
410
411
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
411
412
  Requires-Dist: types-setuptools; extra == "dev"
413
+ Requires-Dist: types-PyYAML; extra == "dev"
412
414
  Dynamic: license-file
413
415
 
414
416
  # Azure Deploy CLI
@@ -459,11 +461,11 @@ pip install -e /path/to/scripts
459
461
 
460
462
  ### Azure Container Apps (ACA) Deployment
461
463
 
462
- The ACA deployment process is split into two stages for better control:
464
+ The ACA deployment process uses YAML configuration for containers and is split into two stages for better control:
463
465
 
464
466
  #### Stage 1: Deploy Revision
465
467
 
466
- Deploy a new container revision without affecting traffic:
468
+ Deploy a new container revision from YAML configuration without affecting traffic:
467
469
 
468
470
  ```bash
469
471
  azd azaca deploy \
@@ -474,25 +476,76 @@ azd azaca deploy \
474
476
  --user-assigned-identity-name my-identity \
475
477
  --container-app my-app \
476
478
  --registry-server myregistry.azurecr.io \
477
- --image-name my-image \
478
479
  --stage prod \
479
- --target-port 8000 \
480
- --cpu 0.5 \
481
- --memory 1.0 \
480
+ --target-port 8080 \
482
481
  --min-replicas 1 \
483
482
  --max-replicas 10 \
484
483
  --keyvault-name my-keyvault \
485
- --dockerfile ./Dockerfile \
486
- --env-vars ENV_VAR1 ENV_VAR2 \
484
+ --container-config ./container-config.yaml \
487
485
  --env-var-secrets SECRET1 SECRET2
488
486
  ```
489
487
 
490
488
  This command:
491
489
 
490
+ - Loads container configurations from YAML file
491
+ - Builds/pushes container images for all containers
492
492
  - Creates or updates a new revision with 0% traffic
493
+ - Supports multiple containers with independent configurations
493
494
  - Verifies the revision is healthy and active
494
495
  - Outputs the revision name for use in traffic management
495
496
 
497
+ **Container Configuration YAML:**
498
+
499
+ The `--container-config` file specifies container settings including images, resources, environment variables, and health probes:
500
+
501
+ ```yaml
502
+ containers:
503
+ - name: my-app
504
+ image_name: my-image
505
+ cpu: 0.5
506
+ memory: "1.0Gi"
507
+ env_vars:
508
+ - ENV_VAR1
509
+ - ENV_VAR2
510
+ # relative to the directory which command will run fromm
511
+ dockerfile: ./Dockerfile
512
+ probes:
513
+ - type: Liveness
514
+ http_get:
515
+ path: /health
516
+ port: 8080
517
+ initial_delay_seconds: 10
518
+ period_seconds: 30
519
+ - type: Readiness
520
+ http_get:
521
+ path: /ready
522
+ port: 8080
523
+ initial_delay_seconds: 5
524
+ period_seconds: 10
525
+
526
+ - name: sidecar
527
+ image_name: sidecar-image
528
+ cpu: 0.25
529
+ memory: "0.5Gi"
530
+ env_vars:
531
+ - SIDECAR_CONFIG
532
+ existing_image_tag: v1.0.0 # Optional: retag from existing image
533
+ ```
534
+
535
+ **Configuration Fields:**
536
+
537
+ - `containers` (required): List of container configurations
538
+ - `name`: Container name (required)
539
+ - `image_name`: Image name without registry/tag (required)
540
+ - `cpu`: CPU allocation (required, e.g., 0.5)
541
+ - `memory`: Memory allocation (required, e.g., "1.0Gi")
542
+ - `env_vars`: List of environment variable names to load (optional)
543
+ - `dockerfile`: Path to Dockerfile for building (required if existing_image_tag not provided)
544
+ - `existing_image_tag`: Tag to retag from instead of building (required if dockerfile not provided)
545
+ - `probes`: List of health probes (optional)
546
+
547
+ **Note:** Ingress configuration (target port) and scaling parameters (min/max replicas) are specified via CLI arguments, not in the YAML file.
548
+
496
549
  #### Stage 2: Update Traffic Weights
497
550
 
498
551
  Update traffic distribution and deactivate old revisions:
@@ -46,11 +46,11 @@ pip install -e /path/to/scripts
46
46
 
47
47
  ### Azure Container Apps (ACA) Deployment
48
48
 
49
- The ACA deployment process is split into two stages for better control:
49
+ The ACA deployment process uses YAML configuration for containers and is split into two stages for better control:
50
50
 
51
51
  #### Stage 1: Deploy Revision
52
52
 
53
- Deploy a new container revision without affecting traffic:
53
+ Deploy a new container revision from YAML configuration without affecting traffic:
54
54
 
55
55
  ```bash
56
56
  azd azaca deploy \
@@ -61,25 +61,76 @@ azd azaca deploy \
61
61
  --user-assigned-identity-name my-identity \
62
62
  --container-app my-app \
63
63
  --registry-server myregistry.azurecr.io \
64
- --image-name my-image \
65
64
  --stage prod \
66
- --target-port 8000 \
67
- --cpu 0.5 \
68
- --memory 1.0 \
65
+ --target-port 8080 \
69
66
  --min-replicas 1 \
70
67
  --max-replicas 10 \
71
68
  --keyvault-name my-keyvault \
72
- --dockerfile ./Dockerfile \
73
- --env-vars ENV_VAR1 ENV_VAR2 \
69
+ --container-config ./container-config.yaml \
74
70
  --env-var-secrets SECRET1 SECRET2
75
71
  ```
76
72
 
77
73
  This command:
78
74
 
75
+ - Loads container configurations from YAML file
76
+ - Builds/pushes container images for all containers
79
77
  - Creates or updates a new revision with 0% traffic
78
+ - Supports multiple containers with independent configurations
80
79
  - Verifies the revision is healthy and active
81
80
  - Outputs the revision name for use in traffic management
82
81
 
82
+ **Container Configuration YAML:**
83
+
84
+ The `--container-config` file specifies container settings including images, resources, environment variables, and health probes:
85
+
86
+ ```yaml
87
+ containers:
88
+ - name: my-app
89
+ image_name: my-image
90
+ cpu: 0.5
91
+ memory: "1.0Gi"
92
+ env_vars:
93
+ - ENV_VAR1
94
+ - ENV_VAR2
95
+ # relative to the directory which command will run fromm
96
+ dockerfile: ./Dockerfile
97
+ probes:
98
+ - type: Liveness
99
+ http_get:
100
+ path: /health
101
+ port: 8080
102
+ initial_delay_seconds: 10
103
+ period_seconds: 30
104
+ - type: Readiness
105
+ http_get:
106
+ path: /ready
107
+ port: 8080
108
+ initial_delay_seconds: 5
109
+ period_seconds: 10
110
+
111
+ - name: sidecar
112
+ image_name: sidecar-image
113
+ cpu: 0.25
114
+ memory: "0.5Gi"
115
+ env_vars:
116
+ - SIDECAR_CONFIG
117
+ existing_image_tag: v1.0.0 # Optional: retag from existing image
118
+ ```
119
+
120
+ **Configuration Fields:**
121
+
122
+ - `containers` (required): List of container configurations
123
+ - `name`: Container name (required)
124
+ - `image_name`: Image name without registry/tag (required)
125
+ - `cpu`: CPU allocation (required, e.g., 0.5)
126
+ - `memory`: Memory allocation (required, e.g., "1.0Gi")
127
+ - `env_vars`: List of environment variable names to load (optional)
128
+ - `dockerfile`: Path to Dockerfile for building (required if existing_image_tag not provided)
129
+ - `existing_image_tag`: Tag to retag from instead of building (required if dockerfile not provided)
130
+ - `probes`: List of health probes (optional)
131
+
132
+ **Note:** Ingress configuration (target port) and scaling parameters (min/max replicas) are specified via CLI arguments, not in the YAML file.
133
+
83
134
  #### Stage 2: Update Traffic Weights
84
135
 
85
136
  Update traffic distribution and deactivate old revisions:
@@ -58,6 +58,7 @@ azure_deploy_cli = [
58
58
  line-length = 100
59
59
  target-version = "py310"
60
60
  src = ["src", "tests"]
61
+ exclude = ["*/_version.py"]
61
62
 
62
63
  [tool.ruff.lint]
63
64
  select = [
@@ -7,3 +7,4 @@ pytest-cov>=4.0.0
7
7
  commitizen>=3.0.0
8
8
  pre-commit>=3.0.0
9
9
  types-setuptools
10
+ types-PyYAML
@@ -5,3 +5,4 @@ azure-mgmt-keyvault
5
5
  azure-mgmt-msi
6
6
  python-dotenv>=1.0.0
7
7
  pydantic>=2.0.0
8
+ pyyaml>=6.0
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.12'
32
- __version_tuple__ = version_tuple = (0, 1, 12)
31
+ __version__ = version = '1.0.0'
32
+ __version_tuple__ = version_tuple = (1, 0, 0)
33
33
 
34
- __commit_id__ = commit_id = 'gce185d829'
34
+ __commit_id__ = commit_id = 'g2aebd8fbb'
@@ -15,14 +15,13 @@ from ..utils.logging import get_logger
15
15
  from .deploy_aca import (
16
16
  SecretKeyVaultConfig,
17
17
  bind_aca_managed_certificate,
18
- build_acr_image,
19
18
  create_container_app_env,
20
19
  deploy_revision,
21
20
  generate_revision_suffix,
22
- get_aca_docker_image_name,
23
21
  update_traffic_weights,
24
22
  validate_revision_suffix_and_throw,
25
23
  )
24
+ from .yaml_loader import ContainerAppConfig, load_app_config_yaml
26
25
 
27
26
  logger = get_logger(__name__)
28
27
 
@@ -92,16 +91,16 @@ def _validate_cli_deploy(args: Any):
92
91
 
93
92
  def cli_deploy(args: Any) -> None:
94
93
  """
95
- Note: this is an opinionated deployment flow for ACA.
96
- Deploy Azure Container App revision without updating traffic.
94
+ Deploy Azure Container App revision from YAML configuration without updating traffic.
97
95
 
98
96
  This command orchestrates:
99
- 1. Create/get user-assigned managed identity (if specified)
100
- 2. Assign roles to the identity (if role config provided)
101
- 3. Build and push container image (if not skipped)
102
- 4. Deploy new revision with 0% traffic
103
- 5. Verify revision activation and health
104
- 6. Output the revision name for use in traffic management
97
+ 1. Load container configuration from YAML
98
+ 2. Create/get user-assigned managed identity (if specified)
99
+ 3. Assign roles to the identity (if role config provided)
100
+ 4. Build/push container images for all containers
101
+ 5. Deploy new revision with 0% traffic
102
+ 6. Verify revision activation and health
103
+ 7. Output the revision name for use in traffic management
105
104
 
106
105
  Args:
107
106
  args: Parsed command line arguments
@@ -128,24 +127,9 @@ def cli_deploy(args: Any) -> None:
128
127
  else generate_revision_suffix(stage=args.stage)
129
128
  )
130
129
 
131
- logger.critical("Building and pushing ACR image...")
132
- logger.info(f"Using revision suffix '{revision_suffix}' as target image tag")
133
- build_acr_image(
134
- registry_server=args.registry_server,
135
- dockerfile=args.dockerfile,
136
- full_image_name=get_aca_docker_image_name(
137
- registry_server=args.registry_server,
138
- image_name=args.image_name,
139
- image_tag=revision_suffix,
140
- ),
141
- source_full_image_name=get_aca_docker_image_name(
142
- registry_server=args.registry_server,
143
- image_name=args.image_name,
144
- image_tag=args.existing_image_tag,
145
- )
146
- if args.existing_image_tag
147
- else None,
148
- )
130
+ logger.critical(f"Loading container configuration from '{args.container_config}'...")
131
+ app_config: ContainerAppConfig = load_app_config_yaml(args.container_config)
132
+ logger.critical(f"Loaded configuration with {len(app_config.containers)} container(s)")
149
133
 
150
134
  logger.critical("Setting up managed identity and roles...")
151
135
  user_identity = create_or_get_user_identity(
@@ -180,14 +164,13 @@ def cli_deploy(args: Any) -> None:
180
164
  registry_server=args.registry_server,
181
165
  registry_user=registry_user,
182
166
  registry_pass_env_name=REGISTRY_PASS_SECRET_ENV_NAME,
183
- image_name=args.image_name,
184
- image_tag=revision_suffix,
185
167
  revision_suffix=revision_suffix,
186
168
  location=args.location,
187
169
  stage=args.stage,
170
+ container_configs=app_config.containers,
188
171
  target_port=args.target_port,
189
- cpu=args.cpu,
190
- memory=args.memory,
172
+ ingress_external=args.ingress_external,
173
+ ingress_transport=args.ingress_transport,
191
174
  min_replicas=args.min_replicas,
192
175
  max_replicas=args.max_replicas,
193
176
  secret_key_vault_config=SecretKeyVaultConfig(
@@ -196,8 +179,6 @@ def cli_deploy(args: Any) -> None:
196
179
  secret_names=args.env_var_secrets or [],
197
180
  user_identity=user_identity,
198
181
  ),
199
- env_var_names=args.env_vars,
200
- existing_image_tag=args.existing_image_tag,
201
182
  )
202
183
 
203
184
  if args.custom_domains:
@@ -352,65 +333,57 @@ def add_commands(subparsers: argparse._SubParsersAction) -> None:
352
333
  help="Container registry server.",
353
334
  )
354
335
  deploy_parser.add_argument(
355
- "--image-name",
336
+ "--keyvault-name",
356
337
  required=True,
357
338
  type=str,
358
- help="Name of the container image.",
339
+ help="Name of the Key Vault for storing secrets.",
359
340
  )
341
+
360
342
  deploy_parser.add_argument(
361
- "--existing-image-tag",
362
- required=False,
343
+ "--stage",
344
+ required=True,
363
345
  type=str,
364
- help=(
365
- "Tag of an existing image to retag to the revision suffix. "
366
- "If provided, the image with this tag will be pulled from the registry, "
367
- "retagged to the revision suffix, and pushed. "
368
- "If the image doesn't exist, deployment will fail."
369
- ),
346
+ help="Deployment stage label (e.g., staging, prod) used for revision naming.",
370
347
  )
348
+
371
349
  deploy_parser.add_argument(
372
350
  "--target-port",
373
351
  required=True,
374
352
  type=int,
375
- help="Target port for the container app.",
353
+ help="Target port for the container app ingress.",
376
354
  )
355
+
377
356
  deploy_parser.add_argument(
378
- "--cpu",
379
- required=True,
380
- type=float,
381
- help="CPU allocation for the container app.",
357
+ "--ingress-external",
358
+ required=False,
359
+ type=bool,
360
+ default=True,
361
+ help="Whether ingress is external (default: True).",
382
362
  )
363
+
383
364
  deploy_parser.add_argument(
384
- "--memory",
385
- required=True,
365
+ "--ingress-transport",
366
+ required=False,
386
367
  type=str,
387
- help="Memory allocation for the container app (e.g., '2.0Gi').",
368
+ default="auto",
369
+ choices=["auto", "http", "http2", "tcp"],
370
+ help="Ingress transport protocol (default: auto).",
388
371
  )
372
+
389
373
  deploy_parser.add_argument(
390
374
  "--min-replicas",
391
375
  required=True,
392
376
  type=int,
393
377
  help="Minimum number of replicas for the container app.",
394
378
  )
379
+
395
380
  deploy_parser.add_argument(
396
381
  "--max-replicas",
397
382
  required=True,
398
383
  type=int,
399
384
  help="Maximum number of replicas for the container app.",
400
385
  )
401
- deploy_parser.add_argument(
402
- "--keyvault-name",
403
- required=True,
404
- type=str,
405
- help="Name of the Key Vault for storing secrets.",
406
- )
407
386
 
408
- deploy_parser.add_argument(
409
- "--stage",
410
- required=True,
411
- type=str,
412
- help="Deployment stage label (e.g., staging, prod) used for revision naming.",
413
- )
414
387
  deploy_parser.add_argument(
415
388
  "--env-var-secrets",
416
389
  required=False,
@@ -419,14 +392,6 @@ def add_commands(subparsers: argparse._SubParsersAction) -> None:
419
392
  help="Space-separated names of environment variables to be stored as secrets in Key Vault.",
420
393
  )
421
394
 
422
- deploy_parser.add_argument(
423
- "--env-vars",
424
- required=False,
425
- type=str,
426
- nargs="+",
427
- help="Space-separated names of environment variables to pass to the container.",
428
- )
429
-
430
395
  deploy_parser.add_argument(
431
396
  "--role-config",
432
397
  required=False,
@@ -458,10 +423,11 @@ def add_commands(subparsers: argparse._SubParsersAction) -> None:
458
423
  )
459
424
 
460
425
  deploy_parser.add_argument(
461
- "--dockerfile",
426
+ "--container-config",
462
427
  required=True,
463
- type=str,
464
- help="Path to the Dockerfile for building the container image.",
428
+ type=Path,
429
+ help="Path to YAML file containing container configurations "
430
+ "(includes image names, cpu, memory, env_vars, probes, ingress, and scale settings)",
465
431
  )
466
432
 
467
433
  deploy_parser.set_defaults(func=cli_deploy)