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

Problems with use spec.credentials.source with Filesystem or Environment types #147

Open
ghost opened this issue Oct 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 18, 2022

What happened?

I am trying to specify a kubeconfig file in spec.credentials to connect to my remote GKE cluster using either a Filesystem or Environment as my spec.credentials.source. When I set the source to Filesystem and provide the correct path to my kubeconfig file (tested and verified working fine with helm cmd) the release does failes to install with error message: failed to extract kubeconfig: open kubeconfig-new: permission denied. Same issue even when giving the kubeconfig file with 777 permissions.

I tried to get around then by using a source of Environment with environment variable containing the kubeconfig and received a different error cannot create new rest config using provider secret: currentContext not set in kubeconfig even though verified that current-context field is set in the kubeconfig.

How can we reproduce it?

Apply this file to crossplane with a verified working kubeconfig file in the same directory:

---
apiVersion: helm.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
  name: demo-helm-provider
spec:
  credentials:
    source: Filesystem
    fs:
      path: kubeconfig-new
    env: 
      name: MYKUBES
---
apiVersion: helm.crossplane.io/v1beta1
kind: Release
metadata:
  name: hello-world
spec:
  forProvider:
    chart:
      name: hello
      repository: https://cloudecho.github.io/charts/
      version: 0.1.2
    namespace: default
  providerConfigRef: 
    name: demo-helm-provider

What environment did it happen in?

  • Crossplane version: crossplane-1.9.1
  • Kubernetes version (use kubectl version): v1.25.2
  • Kubernetes distribution (e.g. Tectonic, GKE, OpenShift): GKE
  • OS (e.g. from /etc/os-release): Ubuntu 20 on WSL
  • Kernel (e.g. uname -a): Linux 5.10.16.3-microsoft-standard-WSL2 Post Rendering Patches #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
@ghost ghost added the bug Something isn't working label Oct 18, 2022
@ghost ghost changed the title Problems with use spec.credentials.source using Filesystem or Environment types Problems with use spec.credentials.source with Filesystem or Environment types Oct 18, 2022
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

0 participants