Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

InjectedIdentity provider config source is not working #66

Open
himanshu-josh1 opened this issue Jul 19, 2022 · 1 comment
Open

InjectedIdentity provider config source is not working #66

himanshu-josh1 opened this issue Jul 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@himanshu-josh1
Copy link

What happened?

I made an attempt to use InjectedIdentity as a source for ProviderConfig. As a test, I created an instance resource, but it triggered the subsequent event.

Warning  CannotConnectToProvider  3m38s (x25 over 3m52s)  managed/compute.gcp.jet.crossplane.io/v1alpha2, kind=instance  cannot get terraform setup: cannot extract credentials: no extraction handler registered for source: InjectedIdentity

How can we reproduce it?

Cluster has been setup to use Workload Identity using the below document
https://github.com/crossplane-contrib/provider-gcp/blob/master/docs/AUTHENTICATION.md

  • Install crossplane [stable version]
  • Install provider-jet-gcp package (Version: v0.2.0-preview)
  • Adding credential source as InjectedIdentity in ProviderConfig
kind: ProviderConfig
metadata:
  name: default
spec:
  projectID: <<ProjectId>>
  credentials:
    source: InjectedIdentity
  • Deploying Instance resource using provider-jet-gcp
apiVersion: compute.gcp.jet.crossplane.io/v1alpha2
kind: Instance
metadata:
  name: <<InstanceName>>
spec:
  providerConfigRef: 
    name: default
  forProvider:
    machineType: e2-medium
    zone: us-east4-c
    labels:
      managed-by: crossplane
    networkInterface:
      - network: <<NetworkName>>
        subnetwork: <<SubnetName>>
    bootDisk:
      - initializeParams:
          - image: debian-cloud/debian-9

What environment did it happen in?

Crossplane version:
Provider version:

  • kubernetes version:
    Client Version: v1.23.4
    Server Version: v1.22.8-gke.202
  • Kubernetes distribution : GKE
  • Crossplane Installation:
helm repo add crossplane-stable https://charts.crossplane.io/stable  
helm install crossplane --create-namespace --namespace crossplane-system crossplane-stable/crossplane
  • Provider version: crossplane/provider-jet-gcp:v0.2.0-preview
@himanshu-josh1 himanshu-josh1 added the bug Something isn't working label Jul 19, 2022
@pkrishnath
Copy link

pkrishnath commented Aug 10, 2022

after some deep dive into to code, I have fixed by setting “None” as source for credentials

apiVersion: gcp.jet.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: gcp-jet-provider
spec:
  projectID: XXXX
  credentials:
    source: None

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

No branches or pull requests

2 participants