title | sidebar_position |
---|---|
Immediate Errors |
1 |
In this example, we deploy again the Helm chart of the hello-world example.
To illustrate the error handling, we have introduced an error: a :
is missing in the imports section
of the blueprint in the Installation.
For prerequisites, see here.
We will again create a Target custom resource, containing the access information for the target cluster, and an Installation custom resource, containing the instructions to deploy our example Helm chart.
-
In the settings file, adjust the variables
RESOURCE_CLUSTER_KUBECONFIG_PATH
andTARGET_CLUSTER_KUBECONFIG_PATH
. -
On the Landscaper resource cluster, create a namespace
cu-example
. -
Run script commands/deploy-k8s-resources.sh. It creates a Target and an Installation on the resource cluster.
This time, the Installation will fail due to the invalid blueprint.
status:
lastError:
message: 'unable to decode blueprint definition from inline defined blueprint.yaml: line 6: could not find expected '':'''
...
phase: Failed
Here you can find a fixed version of the Installation: installation/installation-fixed.yaml.
Deploy it with the script commands/deploy-fixed-installation.sh.
Note that this fixed version already contains the annotation
landscaper.gardener.cloud/operation: reconcile
, so that Landscaper will start processing it. This is considered a good practice, as it eliminates the additional step of adding the reconcile annotation afterwards.
After some time, the phase of the Installation should change to Succeeded
, and the ConfigMap deployed by the Helm chart should exist on the target cluster.
You can remove the Installation with the delete-installation script. When the Installation is gone, you can delete the Target with the delete-other-k8s-resources script.