Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 1ac4ef5

Browse files
Show detail when extension install fails
1 parent 8a33470 commit 1ac4ef5

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/k8s-configuration/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Release History
44
===============
55

6+
1.3.0
7+
++++++++++++++++++
8+
* Add `deployed-object` command group for showing deployed Flux objects from configuration
9+
* Show extension error when `microsoft.flux` extension is in a failed state
10+
611
1.2.0
712
++++++++++++++++++
813
* Add Flux v2 support with command subgroups

src/k8s-configuration/azext_k8s_configuration/_help.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@
175175
--kustomization-name my-kustomization
176176
"""
177177

178+
helps['k8s-configuration flux deployed-object'] = """
179+
type: group
180+
short-summary: Commands to see deployed objects associated with Flux v2 Kubernetes configurations.
181+
"""
182+
178183
helps['k8s-configuration flux deployed-object list'] = """
179184
type: command
180185
short-summary: List deployed objects associated with a Kubernetes Flux v2 Configuration.

src/k8s-configuration/azext_k8s_configuration/providers/FluxConfigurationProvider.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,9 @@ def _validate_extension_install(self, resource_group_name, cluster_rp, cluster_t
433433
consts.FLUX_EXTENSION_CREATING_HELP
434434
)
435435
elif flux_extension.provisioning_state != consts.SUCCEEDED:
436+
# Print the error detail so the user know how to fix it
437+
if flux_extension.error_detail:
438+
logger.error('%s %s', flux_extension.error_detail.code, flux_extension.error_detail.message)
436439
raise DeploymentError(
437440
consts.FLUX_EXTENSION_NOT_SUCCEEDED_OR_CREATING_ERROR,
438441
consts.FLUX_EXTENSION_NOT_SUCCEEDED_OR_CREATING_HELP

0 commit comments

Comments
 (0)