From 93ad8db9a8af293b8a92b34b7d9f33bf378b5c94 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 19 Mar 2026 11:17:14 +0100 Subject: [PATCH] decoded CA --- tools/kubernetes.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/kubernetes.go b/tools/kubernetes.go index 25715d1..b482452 100644 --- a/tools/kubernetes.go +++ b/tools/kubernetes.go @@ -35,12 +35,16 @@ type KubernetesService struct { } func NewDynamicClient(host string, ca string, cert string, data string) (*dynamic.DynamicClient, error) { + decodedCa, _ := base64.StdEncoding.DecodeString(ca) + decodedCert, _ := base64.StdEncoding.DecodeString(cert) + decodedKey, _ := base64.StdEncoding.DecodeString(data) + config := &rest.Config{ Host: host, TLSClientConfig: rest.TLSClientConfig{ - CAData: []byte(ca), - CertData: []byte(cert), - KeyData: []byte(data), + CAData: []byte(decodedCa), + CertData: []byte(decodedCert), + KeyData: []byte(decodedKey), }, }