Skip to content

helm-ci support for dependencies #438

@kkonstan-ovo

Description

@kkonstan-ovo

The helm-ci orb currently doesn't run helm dependency build or update, so will fail if the chart being checked has any dependencies unless the dependencies were committed to the repo as well.

This is an issue when trying to use it to lint charts that use KMI provided charts as dependencies.

To enhance this to support KMI my suggestion is to:

  • switch to cimg/base:stable image
  • add the circleci/aws-ecr@7.2.0 and circleci/helm@2.0.0 orbs
  • run helm/install-helm-client to install the helm client

This should be backwards compatible.

To then handle dependencies via the KMI helm repo, the following env variables would need to be provided:

  • AWS_ACCESS_KEY_ID=<provided by #kaluza-managed-infra>
  • AWS_SECRET_ACCESS_KEY=<provided by #kaluza-managed-infra>
  • AWS_REGION=eu-west-1
  • AWS_ECR_ACCOUNT_URL=215727133225.dkr.ecr.eu-west-1.amazonaws.com
  • HELM_EXPERIMENTAL_OCI=1

To pull dependencies it would then need to:

  • run aws-ecr/ecr-login to login to ECR
  • run aws ecr get-login-password --region eu-west-1 | helm registry login --username AWS --password-stdin ${AWS_ECR_ACCOUNT_URL} to login to the KMI helm repo
  • run helm dependency build or update before linting.

I've implemented something like this for the event-streaming-platform-kmi-gitops repo, and can prepare a PR for this too if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions