Skip to content

GFI: Automate Helm repository setup with a Taskfile command #191

@itsharshvb

Description

@itsharshvb

Summary
Create an automated Taskfile command that scans all Chart.yaml files and adds external Helm repositories in one command.

Type
Enhancement

Context
Currently, developers must manually run 7+ helm repo add commands for external dependencies (Bitnami, Prometheus, Grafana, OpenTelemetry, Istio, Codecentric, Vector) when cloning the repository. This creates friction for new contributors and is error-prone. The repository contains 8 Helm charts with various external dependencies that need to be added before charts can be used.

The current manual process requires developers to identify and add these repositories individually:

  • helm repo add bitnami https://charts.bitnami.com/bitnami
  • helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
  • helm repo add grafana https://grafana.github.io/helm-charts
  • helm repo add opentelemetry https://open-telemetry.github.io/opentelemetry-helm-charts
  • helm repo add istio https://istio-release.storage.googleapis.com/charts
  • helm repo add codecentric https://codecentric.github.io/helm-charts
  • helm repo add vector https://helm.vector.dev

Starter tasks

  1. Examine existing charts/incubator/hyperswitch-app/Taskfile.yaml for the helm-add-repo pattern
  2. Scan all Chart.yaml files in charts/incubator/ to identify external repository URLs
  3. Add the new task to root Taskfile.yaml following existing patterns

Implementation hints

  • File to modify: Taskfile.yaml (root level)
  • Reference pattern: charts/incubator/hyperswitch-app/Taskfile.yaml has existing helm-add-repo task
  • Required repositories:
    bitnami: https://charts.bitnami.com/bitnami
    prometheus-community: https://prometheus-community.github.io/helm-charts
    grafana: https://grafana.github.io/helm-charts
    opentelemetry: https://open-telemetry.github.io/opentelemetry-helm-charts
    istio: https://istio-release.storage.googleapis.com/charts
    codecentric: https://codecentric.github.io/helm-charts
    vector: https://helm.vector.dev
    
  • Exclude: Filter out file:// repositories (local dependencies)
  • Task structure:
    setup-helm-repos:
      desc: "Automatically add all external Helm repositories used by charts"
      cmds:
        - echo "Adding external Helm repositories..."
        # Add parsing and helm repo add logic here
        - helm repo update
        - echo "Helm repositories setup complete!"
      aliases:
        - shr

Acceptance criteria

  • Task setup-helm-repos (alias shr) added to root Taskfile.yaml
  • All 7 external repositories are added correctly
  • Command task setup-helm-repos passes locally
  • Command includes error handling for duplicate repositories (use || true)
  • Command runs helm repo update after adding repositories
  • Task provides clear output showing which repositories were added
  • Test by removing existing repos and running the new task

Resources

Mentor contact
@itsharshvb

Pre-flight

  • I read the Contributing Guide and setup
  • I searched existing issues and PRs

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershacktoberfestIssues created specifically for Hacktoberfest.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions