fleet icon indicating copy to clipboard operation
fleet copied to clipboard

[SURE-7369] Add documentation for support for using git repo as a single source of truth for helm charts.

Open pratikjagrut opened this issue 2 years ago • 4 comments

Is your feature request related to a problem?

I noticed that currently installing helm charts using git URL is not supported by the fleet. However, I’ve been thinking, there’s an interest in using the git directory for Helm charts directly – pulling and utilizing them instead of bundling, especially in the development phase, would that be a beneficial feature or perhaps an enhancement worth considering?

Solution you'd like

I can think of two types of solutions:

  1. Introduce new fields in config e.g: fleet.yaml
    helm:
        gitRepo:
  1. Use existing charts or repo field for git repo URL and then based on the URL format if it's helm repo url or git url

Alternatives you've considered

No response

Anything else?

SURE-7369

pratikjagrut avatar Jan 09 '24 06:01 pratikjagrut

The bundlereader and the multitude of fleet.yaml helm: options are not easy to follow. However the docs say this about the helm options:

Use a custom location for the Helm chart. This can refer to any go-getter URL or OCI registry based helm chart URL e.g. "oci://ghcr.io/fleetrepoci/guestbook". This allows one to download charts from most any location. Also know that go-getter URL supports adding a digest to validate the download. If repo is set below this field is the name of the chart to lookup

That made me look up the go-getter URLs support and it turns out, it can already download git 🤷

For example, I created a folder "app" with a fleet.yaml inside:

helm:
  #chart: git::http://github.com/rancher/fleet-examples
  #chart: git::http://github.com/rancher/fleet-examples//single-cluster/helm
  chart: [email protected]:rancher/fleet-examples//single-cluster/helm

I can then run fleet apply -n fleet-local -o bundle.yaml test app and the result is a bundle.yaml with the bundle resource, as expected.

manno avatar Jan 16 '24 16:01 manno

Below scenario's are performed:

  • Helm chart available in public GitHub repository.
  • Helm Chart available in Private GitHub repository and can be accessible via SSH.

Scenarios

Scenario Test Case Result
1 Test Helm chart available in public GitHub repository. :white_check_mark:
2 Helm Chart available in Private GitHub repository and can be accessible via SSH. :white_check_mark:

Steps First Scenario

  1. Create GitRepo with fleet.yaml contains chart URL: git::http://github.com/rancher/fleet-examples//single-cluster/helm including path to the application.
  2. Wait for GitRepo to become Active state.
  3. Check the gitjob status.
  4. Verify that applications are installed from the above GitHub URL successfully.

Second Scenario

  1. Create GitRepo with fleet.yaml like this: https://github.com/sbulage/test-fleet/blob/main/helm-chart-package/fleet.yaml.
  2. While creating GitRepo use the Helm Authentication: Create SSH key secret to store the private and public key.
  3. Wait for the GitRepo to become Active state.
  4. Check the gitjob for any errors.
  5. Verify that application from the private chart URL is installed successfully.

sbulage avatar Jan 19 '24 15:01 sbulage

Thank you @manno and @sbulage. Then this is a documentation bug. Let's add the steps for this or information/examples in the documentation.

pratikjagrut avatar Jan 22 '24 06:01 pratikjagrut

@pratikjagrut @skanakal See this documentation update PR: https://github.com/rancher/fleet-docs/pull/112

sbulage avatar Jan 22 '24 09:01 sbulage

SURE-7369 is resolved

manno avatar Nov 05 '24 11:11 manno