testutils

package
v0.0.0-...-9e94eaf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiServerClientKubeconfigTemplate = template.Must(
	template.New("apiserver.kubeconfig").Option("missingkey=error").Parse(`
clusters:
  - name: kubernetes
    cluster:
      certificate-authority-data: {{.CertificateAuthorityBase64}}
      server: {{.ServerURL}}
current-context: kubernetes
contexts:
- name: kubernetes
  context:
    cluster: kubernetes
    user: kubernetes-client
users:
  - name: kubernetes-client
    user:
      token: {{.Token}}
`))

Functions

func CreateAPIServerClientKubeconfig

func CreateAPIServerClientKubeconfig(cert *x509.Certificate, token string, kubeconfigPath, serverURL string) error

CreateAPIServerClientKubeconfig will create a kubeconfig for the api server client

func LoadX509Certificate

func LoadX509Certificate(certPath string) (*x509.Certificate, error)

Types

type AuthenticatorTestFrameworkSetup

type AuthenticatorTestFrameworkSetup struct {
	ModifyAuthenticatorServerConfig func(*config.Config)
	AuthenticatorClientBinaryPath   string
	TestArtifacts                   string
	ClusterID                       string
	BackendMode                     []string
	RoleArn                         string
}

AuthenticatorTestFrameworkSetup holds configuration information for a kube-apiserver test server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL