Skip to content

Unable to import a grafana-operator chart from OCI #2687

@wasd171

Description

@wasd171

Description of the bug:

Currently extractHelmChartDetails is too strict and always expects the version to start with a digit. However, grafana-operator uses a vX.Y.Z schema.

Reproduction Steps:

cdk8s import helm:oci://ghcr.io/grafana/helm-charts/grafana-operator@v5.18.0

Error Log:

Error: Invalid helm URL: helm:oci://ghcr.io/grafana/helm-charts/grafana-operator@v5.18.0. Must match the format: 'helm:<oci-registry-url>@<chart-version>'.
    at extractHelmChartDetails (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/import/helm.js:100:19)
    at new ImportHelm (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/import/helm.js:47:53)
    at ImportHelm.fromSpec (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/import/helm.js:42:16)
    at matchImporter (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/import/dispatch.js:36:34)
    at async importDispatch (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/import/dispatch.js:12:26)
    at async Object.handler (/mnt/career-lunch/common/temp/node_modules/.pnpm/cdk8s-cli@2.201.15/node_modules/cdk8s-cli/lib/cli/cmds/import.js:34:9)

Environment:

  • CLI version: 2.201.15
  • OS: Ubuntu 24.04

Other:


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeffort/small1 day topspriority/p2Dependent on community feedback. PR's are welcome :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions