Skip to content

Commit

Permalink
Show detail when extension install fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Nov 24, 2021
1 parent 8a33470 commit 1ac4ef5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/k8s-configuration/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.3.0
++++++++++++++++++
* Add `deployed-object` command group for showing deployed Flux objects from configuration
* Show extension error when `microsoft.flux` extension is in a failed state

1.2.0
++++++++++++++++++
* Add Flux v2 support with command subgroups
Expand Down
5 changes: 5 additions & 0 deletions src/k8s-configuration/azext_k8s_configuration/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@
--kustomization-name my-kustomization
"""

helps['k8s-configuration flux deployed-object'] = """
type: group
short-summary: Commands to see deployed objects associated with Flux v2 Kubernetes configurations.
"""

helps['k8s-configuration flux deployed-object list'] = """
type: command
short-summary: List deployed objects associated with a Kubernetes Flux v2 Configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ def _validate_extension_install(self, resource_group_name, cluster_rp, cluster_t
consts.FLUX_EXTENSION_CREATING_HELP
)
elif flux_extension.provisioning_state != consts.SUCCEEDED:
# Print the error detail so the user know how to fix it
if flux_extension.error_detail:
logger.error('%s %s', flux_extension.error_detail.code, flux_extension.error_detail.message)
raise DeploymentError(
consts.FLUX_EXTENSION_NOT_SUCCEEDED_OR_CREATING_ERROR,
consts.FLUX_EXTENSION_NOT_SUCCEEDED_OR_CREATING_HELP
Expand Down

0 comments on commit 1ac4ef5

Please sign in to comment.