// NewSecretsCredentialProvider creates a new secrets credential provider.
func NewSecretsCredentialProvider() ICredentialProvider {
	kubernetesConfig := &util.KubernetesConfig{
		KubePath:       *kubePath,
		KubeService:    *kubeService,
		KubeServer:     *kubeServer,
		KubeInsecure:   *kubeInsecure,
		KubeConfig:     *kubeConfig,
		KubeCertAuth:   *kubeCertAuth,
		KubeClientCert: *kubeClientCert,
		KubeClientKey:  *kubeClientKey,
		KubeToken:      *kubeToken,
		KubeUsername:   *kubeUsername,
		KubePassword:   *kubePassword,
	}
	return &SecretsCredentialProvider{util.NewKubernetesKubectl(kubernetesConfig)}
}
Example #2
0
func getConfigurator() *configurator.Configurator {
	kubernetesConfig := &util.KubernetesConfig{
		KubePath:       *kubePath,
		KubeService:    *kubeService,
		KubeServer:     *kubeServer,
		KubeInsecure:   *kubeInsecure,
		KubeConfig:     *kubeConfig,
		KubeCertAuth:   *kubeCertAuth,
		KubeClientCert: *kubeClientCert,
		KubeClientKey:  *kubeClientKey,
		KubeToken:      *kubeToken,
		KubeUsername:   *kubeUsername,
		KubePassword:   *kubePassword,
	}
	return configurator.NewConfigurator(util.NewKubernetesKubectl(kubernetesConfig))
}