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

Cannot get connection details: object is not part of release #148

Closed
huaxk opened this issue Oct 26, 2022 · 2 comments
Closed

Cannot get connection details: object is not part of release #148

huaxk opened this issue Oct 26, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@huaxk
Copy link

huaxk commented Oct 26, 2022

What happened?

I tried to expose one of the secret fields in connectionDetails, but got warning: cannot get connection details:

cannot get connection details: object is not part of release: {Secret test vc-vcluster-test v1 data.config}

because reason:

CannotObserveExternalResource

But I found out that the secret named vc-vcluster-test exists in namespace test.

How can we reproduce it?

Apply this file to crossplane with a verified secret named vc-vcluster-test exists in namespace test:

apiVersion: helm.crossplane.io/v1beta1
kind: Release
metadata:
  name: vcluster-test
  annotations:
    crossplane.io/external-name: vcluster-test
spec:
  connectionDetails:
    - apiVersion: v1
      kind: Secret
      name: vc-vcluster-test
      namespace: test
      fieldPath: data.config
      toConnectionSecretKey: kubeconfig
  writeConnectionSecretToRef:
    name: vcluster-test-secret
    namespace: crossplane-system
  rollbackLimit: 3
  providerConfigRef:
    name: helm-provider
  forProvider:
    namespace: test
    chart:
      name: vcluster
      repository: https://charts.loft.sh
      version: "0.12.2"

What environment did it happen in?

  • Crossplane version: crossplane-1.9.1
  • Kubernetes version: v1.21.11
  • Kubernetes distribution: rke2r1
  • provider-helm: xpkg.upbound.io/crossplane-contrib/provider-helm:v0.12.0
  • Kernel :Linux harvester1 5.3.18-150300.59.63-default Post Rendering Patches #1 SMP Tue Apr 5 12:47:31 UTC 2022 (d77db66) x86_64 x86_64 x86_64 GNU/Linux
@huaxk huaxk added the bug Something isn't working label Oct 26, 2022
@ksawerykarwacki
Copy link

It seems to be the same as #99. As provider-helm expects all objects to be marked as part of the release which means it contains helm annotations: https://github.com/crossplane-contrib/provider-helm/blob/master/pkg/controller/release/observe.go#L175

There is unfortunately no workaround for that. You can use provider-kubernetes to observe any resource and just wrap those two to custom XRD.

@turkenh
Copy link
Collaborator

turkenh commented Oct 26, 2022

Closing as duplicate of #99

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

3 participants