Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
GetConfig creates a *rest.Config for talking to a Kubernetes apiserver. Otherwise will assume running in cluster and use the cluster provided kubeconfig.
Config precedence ¶
* KUBECONFIG environment variable pointing at a file
* In-cluster config if running in cluster
* $HOME/.kube/config if exists
Note that if you have done `oc login...` the `current-context` will be used. this means that the test will run as whatever user is currently logged in. kube:admin has a token, but no certs. - kube:admin is an oauth user, this is why it has tokens. system:admin has certs, but no token. - system:admin is a cert based user only. other users, your mileage may vary.
func NewClientConfigForTest ¶
authn operator approach to getting config. choose func as needed. https://github.com/openshift/cluster-authentication-operator/blob/master/test/library/client.go NewClientConfigForTest returns a config configured to connect to the api server
Types ¶
This section is empty.