fresh-yak-35965
12/03/2024, 7:23 PMgarden deploy
and garden cleanup
operations happen in different containers. When garden cleanup
occurs, kustomize
is not installed in the new context and it fails to find the binary. My guess is that this doesn't happen with deploy
because garden deploy
checks for these dependencies being present.microscopic-river-74022
12/03/2024, 7:23 PMmicroscopic-river-74022
12/03/2024, 7:23 PMgarden util fetch-tools
command is designed for this purpose. This command pre-fetches all the available tools for the configured providers in the current project/environment, or for all registered providers if you use the --all
option.
Here's how you can use it:
1. To fetch tools for the current project/environment:
garden util fetch-tools
2. To fetch tools for all registered providers:
garden util fetch-tools --all
Garden Commands Reference ()
By running this command before your garden cleanup
operation in CI, you can ensure that all necessary tools, including kustomize
, are installed and available for use.
Additionally, Garden plugins generally define their external tool dependencies, allowing Garden to automatically fetch them when needed. The garden tools
command can be used to access these tools without separate installation. This command works within a Garden project root.
Using the CLI - Plugin tools ()
By incorporating the garden util fetch-tools
command into your CI pipeline before the garden cleanup
step, you should be able to resolve the issue of missing tools in the cleanup container.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
12/03/2024, 7:23 PMfresh-yak-35965
12/03/2024, 7:25 PMmicroscopic-river-74022
12/03/2024, 7:25 PMmicroscopic-river-74022
12/03/2024, 7:25 PMkubectl
and potentially helm
. Similarly, if you have the Terraform plugin configured, it will register the terraform
tool.
The specific tools that are registered depend on:
1. The plugins you have configured in your Garden project.
2. The specific requirements of each plugin.
3. The current environment you're working in (as different environments might use different plugins or plugin configurations).
It's worth noting that Garden has a powerful templating engine that allows you to enable or disable parts of the configuration depending on your environment. As mentioned in the Templating section ():
"You might for e.g. deploy a development database with the Kubernetes plugin in development but use the Terraform plugin to provision a managed database for production."microscopic-river-74022
12/03/2024, 7:25 PMgarden tools
command without any arguments. This will list all available tools for your current project and environment configuration.
Garden Tools Command Reference ()
Remember, the tools are fetched and made available based on the needs of the configured plugins in your specific project and environment setup.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
12/03/2024, 7:25 PM