feat: Add initial support for Helm chart URLs #1265
+193
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preliminary Support for Deploying Helm Charts from .tgz URLs
This PR introduces preliminary support for deploying Helm charts directly from URLs pointing to .tgz files, addressing issue #775. While the core functionality is implemented, this PR is still a work in progress and is not ready for merge.
Current Status
Core Features Implemented
url
field has been added to theHelmChartConfig
structure to support .tgz Helm charts sourced from URLs.Modified Files
pkg/helm/chart.go
: Added logic to handle URL-based charts, including download and extraction functionality.pkg/helm/helm_release.go
: Updated release handling to accommodate charts sourced from URLs.pkg/helm/pulled_chart.go
: Enhanced support for pulling charts from URL sources, ensuring proper validation and error handling.pkg/types/helm_chart.go
: Introduced theurl
field and validation logic to ensure that only valid URLs are accepted.pkg/utils/tar.go
: Added utility functions to handle .tgz files, including extraction and validation.Checklist
Type of Change
PR Status
Implementation Details
What’s Done
ChartName
to be provided when using a URL.chart.go
to fetch and cache the .tgz files.utils/tar.go
to handle the downloaded files properly.Work in Progress
TODO Before Merge
Testing Summary for PR:
To ensure the functionality of the changes made in this PR, I conducted a comprehensive testing process that involved the following steps:
Configuration Validation:
.kluctl.yaml
configuration file, which is crucial for defining the deployment targets and their respective environments. The configuration is as follows:discriminator
is set to create unique identifiers for the Helm deployments based on the target name.targets
section defines a target namedsimple-helm
, which specifies the environment assimple-helm
and usesminikube
as the context for deployment.Deployment Configuration:
deployment.yml
:deployment
directory, allowing for modular organization of deployment files.Specific Deployment Details:
deployment/deployment.yml
file specifies the details of the NGINX deployment:nginx
, and the namespace is overridden to ensure that all resources are created within thenginx
namespace.Helm Chart Configuration:
nginx/helm-chart.yml
file defines helm chart to be downloaded either from repo or url:ClusterIP
, and it sets resource limits to manage resource allocation effectively.Helm Values Configuration:
nginx/helm-values.yml
file defines resource limits and requests for the NGINX deployment:ClusterIP
, and it sets resource limits to manage resource allocation effectively.Kustomization Configuration:
nginx/kustomization.yml
file is responsible for managing the resources for the NGINX deployment:namespace.yml
and a placeholder forhelm-rendered.yml
, which is generated during the deployment process.Namespace Definition:
nginx/namespace.yml
file defines the namespace for the NGINX deployment: