From 542c5cd00d8d917a64f29da563f5fa2cb98f5503 Mon Sep 17 00:00:00 2001 From: Nick Badger Date: Fri, 31 Aug 2018 09:30:29 +0100 Subject: [PATCH] Fix check for IDPCaPem when generating --auth-provider-arg --- templates/linux-mac-common.html | 2 +- templates/windows-tab.html | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/linux-mac-common.html b/templates/linux-mac-common.html index e66e88f..1732268 100644 --- a/templates/linux-mac-common.html +++ b/templates/linux-mac-common.html @@ -84,7 +84,7 @@

Run configuration commands

--auth-provider-arg=client-secret={{ .ClientSecret }} \ --auth-provider-arg=refresh-token={{ .RefreshToken }} \ --auth-provider-arg=id-token={{ .IDToken }} - {{- if .IDPCaURI }} \ + {{- if or (.IDPCaURI) (.IDPCaPem) }} \ --auth-provider-arg=idp-certificate-authority=${HOME}/.kube/certs/{{ .ClusterName }}/idp-ca.crt {{- end }} diff --git a/templates/windows-tab.html b/templates/windows-tab.html index bbc2e7a..b9f1aa5 100644 --- a/templates/windows-tab.html +++ b/templates/windows-tab.html @@ -94,10 +94,9 @@

Run configuration commands

kubectl config set-credentials {{ .Username }}-{{ .ClusterName }} --auth-provider=oidc --auth-provider-arg=idp-issuer-url={{ .Issuer }} --auth-provider-arg=client-id={{ .ClientID }} --auth-provider-arg=client-secret={{ .ClientSecret }} --auth-provider-arg=refresh-token={{ .RefreshToken }} --auth-provider-arg=id-token={{ .IDToken }}
-  {{- if .IDPCaURI }} --auth-provider-arg=idp-certificate-authority=${HOME}/.kube/certs/{{ .ClusterName }}/idp-ca.crt
+  {{- if or (.IDPCaURI) (.IDPCaPem) }} --auth-provider-arg=idp-certificate-authority=${HOME}/.kube/certs/{{ .ClusterName }}/idp-ca.crt
   {{- end }}
-