Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use private helm chart repo in an umbrella chart during promtion #1987

Closed
jamessthompson opened this issue May 9, 2024 · 1 comment

Comments

@jamessthompson
Copy link

Checklist

  • [ x ] I've searched the issue queue to verify this is not a duplicate bug report.
  • [ x ] I've included steps to reproduce the bug.
  • [ x ] I've pasted the output of kargo version.
  • [ x ] I've pasted logs, if applicable.

Description

When using a helm chart in a private repo as an umbrella chart dependency, the provided credentials, which are used by the warehouse, are not used during the promotion.

Screenshots

N/A

Steps to Reproduce

Below is my setup with the private registry and repo names changed. I have secrets in place to access both the private GitHub repo and the private Helm chart repo. The warehouse can access both without issue and generate freight when values change. However, promotions fail as Helm is unable to access the private Helm repo.

apiVersion: kargo.akuity.io/v1alpha1
kind: Project
metadata:
  name: kargo-goldilocks
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: goldilocks
  namespace: kargo-goldilocks
spec:
  subscriptions:
  - chart:
      name: goldilocks
      repoURL: https://charts.fairwinds.com/stable
      semverConstraint: 6.5.0
  - chart:
      name: fc-gateway-link
      repoURL: https://ourprivaterepo.jfrog.io/artifactory/api/helm/fc-helm
      semverConstraint: ~1
  - image:
      imageSelectionStrategy: SemVer
      repoURL: us-docker.pkg.dev/fairwinds-ops/oss/goldilocks
      semverConstraint: 4.6.3
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
  name: stg
  namespace: kargo-goldilocks
spec:
  subscriptions:
    warehouse: goldilocks
  promotionMechanisms:
    gitRepoUpdates:
    - repoURL: https://github.com/our-company/sre-infra-kubernetes.git
      readBranch: sandbox
      writeBranch: sandbox
      helm:
        charts:
        - name: goldilocks
          chartPath: apps/infra/goldilocks/stg
          repository: https://charts.fairwinds.com/stable
        - name: fc-gateway-link
          chartPath: apps/infra/goldilocks/stg
          repository: https://ourprivaterepo.jfrog.io/artifactory/api/helm/fc-helm
        images:
        - image: us-docker.pkg.dev/fairwinds-ops/oss/goldilocks
          key: goldilocks.image.tag
          value: Tag
          valuesFilePath: apps/infra/goldilocks/stg/values.yaml
    argoCDAppUpdates:
    - appName: goldilocks-stg
      appNamespace: argocd-infra

Version

╰─$ kargo version                                                                                                                                                                                                     
Client Version: v0.5.2
Server Version: v0.6.0```

# Logs

kargo-controller-7d69c8cb9-2wsfv controller time="2024-05-09T15:54:30Z" level=error msg="error executing Promotion: error executing Git-based promotion mechanisms: error executing Helm promotion mechanism: error updating dependencies for chart "apps/infra/goldilocks/stg": :error running helm dependency update for chart at "/tmp/repo-3645567429/repo/apps/infra/goldilocks/stg": error executing cmd [/usr/local/bin/helm dependency update /tmp/repo-3645567429/repo/apps/infra/goldilocks/stg]: Getting updates for unmanaged Helm repositories...\n...Unable to get an update from the "https://ourprivaterepo.jfrog.io/artifactory/api/helm/fc-helm\" chart repository:\n\tfailed to fetch https://ourprivaterepo.jfrog.io/artifactory/api/helm/fc-helm/index.yaml : 401 \n...Successfully got an update from the "https://charts.fairwinds.com/stable\" chart repository\nError: no cached repository for helm-manager-11bf74fc0d880338f4cda581406d0ee8f0b023a55b172c0da9c0fc9fef9c7d76 found. (try 'helm repo update'): open /tmp/.cache/helm/repository/helm-manager-11bf74fc0d880338f4cda581406d0ee8f0b023a55b172c0da9c0fc9fef9c7d76-index.yaml: no such file or directory\n" freight=53e2793ed8502e48dacd3f2d934852d498896fb8 namespace=kargo-goldilocks promotion=stg.01hxf1085akg8yc3rb76wqxqte.53e2793 stage=stg

@hiddeco
Copy link
Contributor

hiddeco commented May 9, 2024

Duplicate of #1946, which is being addressed in #1977.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants