decoded CA
This commit is contained in:
@@ -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),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user