Skip to content

consumer identity type fix for helm input method #967

@fabianburth

Description

@fabianburth

Description
Currently, the helm input method is currently able to fetch helm charts from OCI registries by specifying it with an oci prefix, as shown below.

  resources:
    - name: podinfo-chart
      type: helmChart
      input:
        type: helm/v1
        helmRepository: oci://ghcr.io/stefanprodan/charts/podinfo:6.9.1
        repository: charts/podinfo:6.9.1

Since the helm input method currently ALWAYS returns a consumer identity of type HelmChartRepository, the credential look up fails.

	identity, err = runtime.ParseURLToIdentity(helm.HelmRepository)
	if err != nil {
		return nil, fmt.Errorf("error parsing helm repository URL to identity: %w", err)
	}

	identity.SetType(runtime.NewUnversionedType(LegacyHelmChartConsumerType))

(see here: https://github.com/open-component-model/open-component-model/blob/a3c1debc152db69e292d608eb69a472267e7ddc9/bindings/go/helm/input/method.go#L73)

Previously, this worked because we registered oci for AnyConsumerIdentityType, so it served as fallback. This behaviour has been removed as part of a recent issue.

Done Criteria

  • Code has been reviewed by other team members
  • Analysis of existing tests (Unit and Integration)
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated (includes deletion of existing unnecessary Integration Test and/or creation of new ones if required)
  • Enduser Documentation updated (if applicable)
  • Internal technical Documentation created/updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Assignees

Labels

area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

Type

No fields configured for Task.

Projects

Status
🔍 Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions