Documentation ¶
Overview ¶
Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type CRDClient
- type CRDWrapper
- type CRDWrapperConfig
- type Config
- type Set
- func (c *Set) APIExtensionsV1() *apiextensionsv1.ApiextensionsV1Client
- func (s *Set) CRD(cfg CRDWrapperConfig) *CRDWrapper
- func (c *Set) Dynamic() *dynamic.DynamicClient
- func (c *Set) Kubernetes() *kubernetes.Clientset
- func (c *Set) RESTConfig() *rest.Config
- func (c *Set) WithImpersonation(user string) (*Set, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRDClient ¶
type CRDClient interface { // EnsureCreated ensures a CRD exists and is ready Ensure(ctx context.Context, crd v1.CustomResourceDefinition) error // Delete removes a CRD if it exists Delete(ctx context.Context, name string) error // Get retrieves a CRD by name Get(ctx context.Context, name string) (*v1.CustomResourceDefinition, error) }
CRDClient represents operations for managing CustomResourceDefinitions
type CRDWrapper ¶
type CRDWrapper struct {
// contains filtered or unexported fields
}
CRDWrapper provides a simplified interface for CRD operations
func (*CRDWrapper) Delete ¶
func (w *CRDWrapper) Delete(ctx context.Context, name string) error
Delete removes a CRD if it exists
func (*CRDWrapper) Ensure ¶
func (w *CRDWrapper) Ensure(ctx context.Context, crd v1.CustomResourceDefinition) error
Ensure ensures a CRD exists, up-to-date, and is ready. This can be a dangerous operation as it will update the CRD if it already exists.
The caller is responsible for ensuring the CRD, isn't introducing breaking changes.
func (*CRDWrapper) Get ¶
func (w *CRDWrapper) Get(ctx context.Context, name string) (*v1.CustomResourceDefinition, error)
Get retrieves a CRD by name
type CRDWrapperConfig ¶
type CRDWrapperConfig struct { Client *apiextensionsv1.ApiextensionsV1Client Log logr.Logger PollInterval time.Duration Timeout time.Duration }
CRDWrapperConfig contains configuration for the CRD wrapper
func DefaultCRDWrapperConfig ¶
func DefaultCRDWrapperConfig() CRDWrapperConfig
DefaultConfig returns a CRDWrapperConfig with default values
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set provides a unified interface for different Kubernetes clients
func (*Set) APIExtensionsV1 ¶
func (c *Set) APIExtensionsV1() *apiextensionsv1.ApiextensionsV1Client
APIExtensionsV1 returns the API extensions client
func (*Set) CRD ¶
func (s *Set) CRD(cfg CRDWrapperConfig) *CRDWrapper
CRD returns a new CRDWrapper instance
func (*Set) Dynamic ¶
func (c *Set) Dynamic() *dynamic.DynamicClient
Dynamic returns the dynamic client
func (*Set) Kubernetes ¶
func (c *Set) Kubernetes() *kubernetes.Clientset
Kubernetes returns the standard Kubernetes clientset
func (*Set) RESTConfig ¶
RESTConfig returns a copy of the underlying REST config