Documentation ¶
Index ¶
- Constants
- type ControllerClientBuilder
- type SAControllerClientBuilder
- func (b SAControllerClientBuilder) Client(name string) (clientset.Interface, error)
- func (b SAControllerClientBuilder) ClientOrDie(name string) clientset.Interface
- func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, error)
- func (b SAControllerClientBuilder) ConfigOrDie(name string) *restclient.Config
- type SimpleControllerClientBuilder
- func (b SimpleControllerClientBuilder) Client(name string) (clientset.Interface, error)
- func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interface
- func (b SimpleControllerClientBuilder) Config(name string) (*restclient.Config, error)
- func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *restclient.Config
Constants ¶
const (
// SecretTypeField is copied from pkg/apis/cores/field_constants.go
SecretTypeField = "type"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerClientBuilder ¶
type ControllerClientBuilder interface { Config(name string) (*restclient.Config, error) ConfigOrDie(name string) *restclient.Config Client(name string) (clientset.Interface, error) ClientOrDie(name string) clientset.Interface }
ControllerClientBuilder allows you to get clients and configs for controllers Please note a copy also exists in staging/src/k8s.io/cloud-provider/cloud.go TODO: Extract this into a separate controller utilities repo (issues/68947)
type SAControllerClientBuilder ¶
type SAControllerClientBuilder struct { // ClientConfig is a skeleton config to clone and use as the basis for each controller client ClientConfig *restclient.Config // CoreClient is used to provision service accounts if needed and watch for their associated tokens // to construct a controller client CoreClient v1core.CoreV1Interface // AuthenticationClient is used to check API tokens to make sure they are valid before // building a controller client from them AuthenticationClient v1authentication.AuthenticationV1Interface // Namespace is the namespace used to host the service accounts that will back the // controllers. It must be highly privileged namespace which normal users cannot inspect. Namespace string }
SAControllerClientBuilder is a ControllerClientBuilder that returns clients identifying as service accounts
func (SAControllerClientBuilder) Client ¶
func (b SAControllerClientBuilder) Client(name string) (clientset.Interface, error)
Client returns clientset.Interface built from ClientBuilder
func (SAControllerClientBuilder) ClientOrDie ¶
func (b SAControllerClientBuilder) ClientOrDie(name string) clientset.Interface
ClientOrDie will return clientset.Interface built from ClientBuilder. If it gets an error getting the client, it will log the error and kill the process it's running in.
func (SAControllerClientBuilder) Config ¶
func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, error)
Config returns a complete clientConfig for constructing clients. This is separate in anticipation of composition which means that not all clientsets are known here
func (SAControllerClientBuilder) ConfigOrDie ¶
func (b SAControllerClientBuilder) ConfigOrDie(name string) *restclient.Config
ConfigOrDie returns clientConfig for constructing clients. If it gets an error, it will log the error and kill the process it's running in.
type SimpleControllerClientBuilder ¶
type SimpleControllerClientBuilder struct { // ClientConfig is a skeleton config to clone and use as the basis for each controller client ClientConfig *restclient.Config }
SimpleControllerClientBuilder returns a fixed client with different user agents
func (SimpleControllerClientBuilder) Client ¶
func (b SimpleControllerClientBuilder) Client(name string) (clientset.Interface, error)
Client returns a clientset.Interface built from the ClientBuilder
func (SimpleControllerClientBuilder) ClientOrDie ¶
func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interface
ClientOrDie returns a clientset.interface built from the ClientBuilder with no error. If it gets an error getting the client, it will log the error and kill the process it's running in.
func (SimpleControllerClientBuilder) Config ¶
func (b SimpleControllerClientBuilder) Config(name string) (*restclient.Config, error)
Config returns a client config for a fixed client
func (SimpleControllerClientBuilder) ConfigOrDie ¶
func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *restclient.Config
ConfigOrDie returns a client config if no error from previous config func. If it gets an error getting the client, it will log the error and kill the process it's running in.