Skip to content

(eks oci repository): Installing from OCI repository causing helm seg fault #19167

@mvs5465

Description

@mvs5465

What is the problem?

I am trying to use the new OCI repository support (thanks for adding that!) and am running into a helm error when trying to use it:

Received response status [FAILED] from custom resource. Message returned: Error: b'panic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1612e03]\n\ngoroutine 1 [running]
:\nhelm.sh/helm/v3/internal/experimental/registry.(*Client).PullChart(0x0, 0xc0007d0be0, 0xc0007d0be0, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/internal/experimental/registry/client.go:156 +0x183\nhelm.sh/helm/v3/pkg/getter.(*OCIGetter).get(0xc0008535e0
, 0xc0004e4680, 0x4c, 0x20, 0x198d560, 0x1a8f801)\n\t/home/circleci/helm.sh/helm/pkg/getter/ocigetter.go:52 +0xc5\nhelm.sh/helm/v3/pkg/getter.(*OCIGetter).Get(0xc0008535e0, 0xc0004e4680, 0x4c, 0xc0007d0b80, 0x4, 0x4, 0xc000856d00, 0xc00089a690, 0x50)\n\
t/home/circleci/helm.sh/helm/pkg/getter/ocigetter.go:36 +0x77\nhelm.sh/helm/v3/pkg/repo.(*ChartRepository).DownloadIndexFile(0xc00089a690, 0xc000856c80, 0x2, 0x2, 0xc00089a690)\n\t/home/circleci/helm.sh/helm/pkg/repo/chartrepo.go:127 +0x330\nhelm.sh/hel
m/v3/pkg/repo.FindChartInAuthAndTLSRepoURL(0x7ffdf885b768, 0x41, 0x0, 0x0, 0x0, 0x0, 0x7ffdf885b74f, 0x7, 0x0, 0x0, ...)\n\t/home/circleci/helm.sh/helm/pkg/repo/chartrepo.go:240 +0x2d2\nhelm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart(0xc00013
8a08, 0x7ffdf885b74f, 0x7, 0xc0004f2000, 0xa, 0x10, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/pkg/action/install.go:663 +0x805\nmain.newUpgradeCmd.func2(0xc0004ff340, 0xc0005b46e0, 0x2, 0xb, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/cmd/helm/upgrade.go:13
0 +0x1cd\ngithub.com/spf13/cobra.(*Command).execute(0xc0004ff340, 0xc0005b4630, 0xb, 0xb, 0xc0004ff340, 0xc0005b4630)\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x47c\ngithub.com/spf13/cobra.(*Command).ExecuteC(0xc000726b00, 0xc00000e3
a8, 0x1, 0xc00081ff60)\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375\ngithub.com/spf13/cobra.(*Command).Execute(...)\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:895\nmain.main()\n\t/home/circleci/helm.sh/helm/cmd/helm/he
lm.go:80 +0x24d\n'

Reproduction Steps

My CDK code looks like this:

cluster.addHelmChart(this.props.serviceName, {
      chart: 'backend',
      repository: 'oci://redactedAccountId.dkr.ecr.us-east-1.amazonaws.com/backend:0.0.1',
      namespace: this.props.serviceNamespace,
      createNamespace: false,
      values: this.values,
    });

I followed the instructions here to create an ECR OCI repo and upload my chart: https://docs.aws.amazon.com/AmazonECR/latest/userguide/push-oci-artifact.html

Then followed the instructions here to use it: https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-eks/README.md#oci-charts

What did you expect to happen?

Expected helm to reference chart in ECR OCI repository.

What actually happened?

Seg fault

CDK CLI Version

2.14.0 (build 762d71b)

Framework Version

No response

Node.js Version

v17.3.1

OS

MacOS Catalina 10.15.7

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.effort/mediumMedium work item – several days of effortneeds-reproductionThis issue needs reproduction.p2response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions