terraform-provider-argocd icon indicating copy to clipboard operation
terraform-provider-argocd copied to clipboard

kubeconfig parameter for kubernetes block

Open charlysotelo opened this issue 1 year ago • 1 comments

Description

Add a kubeconfig parameter for the kubernetes block. Currently you may set this via the KUBECONFIG env var, but this will not work when using multiple argocd providers necessitating distinct kubeconfig files

charlysotelo avatar Aug 03 '23 16:08 charlysotelo

Hi @charlysotelo,

I'm afraid this is not possible at present as the argocd codebase does not provide a mechanism for this to be configured when using port forwarding (relying instead on the standard behaviour of NewDefaultClientConfigLoadingRules in the kubernetes module).

That being said... This is pushing my knowledge of k8s configuration, but... I do believe that you can configure multiple kubeconfig files in the KUBECONFIG environment variable (see Kubernetes docs). So, AFAIK, you should be able to configure the env var with all required kubeconfig files and then use the provider configuration kubernetes.config_context to specify which context to use from the merged config.

onematchfox avatar Aug 04 '23 09:08 onematchfox

Stale

onematchfox avatar Mar 24 '24 21:03 onematchfox