Skip to content

ocm-kit CLI panics over Helm registry credentials within OCM config #36

Description

@lukasgr90

What happened:

The OCM Kit CLI panicked over a nil de-reference, when my OCM configuration included aHelmChartRepository definition (as described here: https://ocm.software/docs/reference/credential-consumer-identities/#helmchartrepository).

What you expected to happen:

Accepting the HelmChartRepository definition or at least break with a meaningful error message instead of a stacktrace.

How to reproduce it (as minimally and precisely as possible):

Use following a OCM configuration:

type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    consumers:
      - identities:
          - type: HelmChartRepository
            hostname: example.org 
        credentials:
          - type: HelmHTTPCredentials/v1
            username: anything
            password: anything

Then ocm-kit exits with:

🐸💻  ~/Development/community/ocm-kit/ocm-kit http://localhost:5000/something//something:anything
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7f00c5]

goroutine 1 [running]:
[...]

Environment:

Nixos 26.05
ocm-kit build based on commit "3b866d48da741488e4307d66de120e90bc11b503"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions