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) {
|
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{
|
config := &rest.Config{
|
||||||
Host: host,
|
Host: host,
|
||||||
TLSClientConfig: rest.TLSClientConfig{
|
TLSClientConfig: rest.TLSClientConfig{
|
||||||
CAData: []byte(ca),
|
CAData: []byte(decodedCa),
|
||||||
CertData: []byte(cert),
|
CertData: []byte(decodedCert),
|
||||||
KeyData: []byte(data),
|
KeyData: []byte(decodedKey),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user