Documentation ¶
Index ¶
- func IsInvalidConfig(err error) bool
- func IsUnexpectedStatusPhase(err error) bool
- type Clients
- func (c *Clients) CRDClient() k8scrdclient.Interface
- func (c *Clients) CtrlClient() client.Client
- func (c *Clients) DynClient() dynamic.Interface
- func (c *Clients) ExtClient() apiextensionsclient.Interface
- func (c *Clients) G8sClient() versioned.Interface
- func (c *Clients) K8sClient() kubernetes.Interface
- func (c *Clients) RESTClient() rest.Interface
- func (c *Clients) RESTConfig() *rest.Config
- func (c *Clients) Scheme() *runtime.Scheme
- type ClientsConfig
- type Interface
- type SchemeBuilder
- type Setup
- func (s *Setup) EnsureCRDCreated(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) error
- func (s *Setup) EnsureCRDDeleted(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) error
- func (s *Setup) EnsureNamespaceCreated(ctx context.Context, namespace string) error
- func (s *Setup) EnsureNamespaceDeleted(ctx context.Context, namespace string) error
- type SetupConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsUnexpectedStatusPhase ¶
IsUnexpectedStatusPhase asserts notFoundError.
Types ¶
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
func NewClients ¶
func NewClients(config ClientsConfig) (*Clients, error)
func (*Clients) CRDClient ¶
func (c *Clients) CRDClient() k8scrdclient.Interface
func (*Clients) CtrlClient ¶
func (*Clients) ExtClient ¶
func (c *Clients) ExtClient() apiextensionsclient.Interface
func (*Clients) K8sClient ¶
func (c *Clients) K8sClient() kubernetes.Interface
func (*Clients) RESTClient ¶
func (*Clients) RESTConfig ¶
type ClientsConfig ¶
type ClientsConfig struct { Logger micrologger.Logger // SchemeBuilder is an optional way to extend the known types to the global // client-go scheme. Make use of it for custom CRs. SchemeBuilder SchemeBuilder // KubeConfigPath and RestConfig are mutually exclusive. KubeConfigPath string // RestConfig and KubeConfigPath are mutually exclusive. RestConfig *rest.Config }
type Interface ¶
type Interface interface { CRDClient() k8scrdclient.Interface CtrlClient() client.Client DynClient() dynamic.Interface ExtClient() apiextensionsclient.Interface G8sClient() versioned.Interface K8sClient() kubernetes.Interface RESTClient() rest.Interface RESTConfig() *rest.Config Scheme() *runtime.Scheme }
type SchemeBuilder ¶
SchemeBuilder is an optional way to extend the known types to the global client-go scheme. Make use of it for custom CRs.
Typical usage:
k8sclient.SchemeBuilder{ myapiversion.AddToShcheme, }
type Setup ¶
type Setup struct {
// contains filtered or unexported fields
}
func NewSetup ¶
func NewSetup(config SetupConfig) (*Setup, error)
func (*Setup) EnsureCRDCreated ¶
func (s *Setup) EnsureCRDCreated(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) error
func (*Setup) EnsureCRDDeleted ¶
func (s *Setup) EnsureCRDDeleted(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) error
func (*Setup) EnsureNamespaceCreated ¶
type SetupConfig ¶
type SetupConfig struct { Clients *Clients Logger micrologger.Logger }
Directories ¶
Path | Synopsis |
---|---|
Package k8srestconfig provides interface to create client-go rest config which can be used to construct various clients.
|
Package k8srestconfig provides interface to create client-go rest config which can be used to construct various clients. |
Click to show internal directories.
Click to hide internal directories.