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

On Helm release with the specified option pullSecretRef does not find the Secret in the namespace #185

Open
alexey-pankratyev opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@alexey-pankratyev
Copy link

alexey-pankratyev commented Mar 29, 2023

What happened?

I'm trying to install a helm oci package using the crossplane helm provider xpkg.upbound.io/crossplane-contrib/provider-helm:v0.14.0 in eks with the following configuration

    name: helm-test
    base:
      apiVersion: helm.crossplane.io/v1beta1
      kind: Release
      spec:
        rollbackLimit: 5
        forProvider:
          namespace: test
          chart:
            version: 0.1.0
            name: arena-reaper
            repository: "oci://****.[dkr.ecr.eu-west-1.amazonaws.com/test](http://dkr.ecr.eu-west-1.amazonaws.com/test)"
            pullSecretRef:
              name: oci-creds
              namespace: external-secrets

before these, secret with name oci-creds had been created with data - user and password, in the external-secrets namespace

> kg secrets  oci-creds -o yaml
   apiVersion: v1
   data:
     password: ********
     username: QVdT
   immutable: false
   kind: Secret
   metadata:
     name: oci-creds
     namespace: external-secrets

but got error

Warning CannotCreateExternalResource 3s (x6 over 8s) managed/release.helm.crossplane.io failed to install release: failed to get user name and password from secret reference: failed to get repo pull secret: failed to get secret from namespace "external-secrets": Secret "oci-creds" not found

According to this code
chart.go#L43-L68 and chart.go#L31-L34

I created the secret and cross-plane resource for the helm correctly, but for some reason it cannot find the secret in the namespace !!!

How can we reproduce it?

You can create a secret like this

kg secrets oci-creds -o yaml

  apiVersion: v1
  data:
    password: ********
    username: QVdT
  immutable: false
  kind: Secret
  metadata:
    name: oci-creds
    namespace: external-secrets

and than a helm release resource

    name: helm-test
    base:
      apiVersion: helm.crossplane.io/v1beta1
      kind: Release
      spec:
        rollbackLimit: 5
        forProvider:
          namespace: test
          chart:
            version: 0.1.0
            name: arena-reaper
            repository: "oci://****.[dkr.ecr.eu-west-1.amazonaws.com/test](http://dkr.ecr.eu-west-1.amazonaws.com/test)"
            pullSecretRef:
              name: oci-creds
              namespace: external-secrets   

What environment did it happen in?

Crossplane version:
helm.sh/chart=crossplane-1.11.0
Image: crossplane/crossplane:v1.11.0
helm provider [xpkg.upbound.io/crossplane-contrib/provider-helm:v0.14.0](http://xpkg.upbound.io/crossplane-
contrib/provider-helm:v0.14.0)

Hw:
EKS Kubernetes Worker AMI with AmazonLinux2 image, (k8s: 1.25.6, containerd: 1.6.6-1.amzn2.0.2)

@alexey-pankratyev alexey-pankratyev added the bug Something isn't working label Mar 29, 2023
@anjuchaurasiya
Copy link

Is there any update on this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants