Documentation ¶
Index ¶
- func ClusterScoped(config *Config)
- func OwnerReference(owner runtimeClient.Object) *metav1apply.OwnerReferenceApplyConfiguration
- type Client
- type Config
- type OperationResult
- type Runtime
- func (c *Runtime) Apply(obj interface{}) error
- func (c *Runtime) Create(obj runtimeClient.Object) error
- func (c *Runtime) Delete(name string, obj runtimeClient.Object, opts ...func(config *Config)) error
- func (c *Runtime) DeleteAllOf(set map[string]string, obj runtimeClient.Object, opts ...func(config *Config)) error
- func (c *Runtime) For(owner runtimeClient.Object) Client
- func (c *Runtime) List(set map[string]string, list runtimeClient.ObjectList, ...) error
- func (c *Runtime) Load(name string, obj runtimeClient.Object, opts ...func(config *Config)) error
- func (c *Runtime) OwnerReference() *metav1apply.OwnerReferenceApplyConfiguration
- func (c *Runtime) Update(obj runtimeClient.Object) error
- func (c *Runtime) UpdateStatus(obj runtimeClient.Object) error
- func (c *Runtime) WithNamespace(namespace string) Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterScoped ¶
func ClusterScoped(config *Config)
ClusterScoped indicates that the operation should be invoked on a cluster scoped resource
func OwnerReference ¶
func OwnerReference(owner runtimeClient.Object) *metav1apply.OwnerReferenceApplyConfiguration
Types ¶
type Client ¶
type Client interface { record.EventRecorder // Apply executes a k8s Server Side apply using the provided resource Apply(obj interface{}) error // OwnerReference returns a OwnerReferenceApplyConfiguration based upon the clients configured Owner OwnerReference() *metav1apply.OwnerReferenceApplyConfiguration // For returns a new Client implementation with the owner, used by OwnerReference, set to the provided Object For(owner client.Object) Client // WithNamespace returns a new client implementation with the specified namespace WithNamespace(namespace string) Client // Create a k8s resource Create(obj client.Object) error // Delete a k8s resource Delete(name string, obj client.Object, opts ...func(config *Config)) error // DeleteAllOf deletes all objects of the given type matching the given options. DeleteAllOf(set map[string]string, obj client.Object, opts ...func(config *Config)) error // List k8s resources with labels matching those in the provided set List(set map[string]string, list client.ObjectList, opts ...func(config *Config)) error // Load a k8s resource Load(name string, obj client.Object, opts ...func(config *Config)) error // Update a k8s resource Update(obj client.Object) error // UpdateStatus of a k8s resource UpdateStatus(obj client.Object) error }
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ClusterScoped ¶
type OperationResult ¶
type OperationResult string
OperationResult is the result of a CreateOrPatch or CreateOrUpdate call
const ( // OperationResultNone means that the resource has not been changed OperationResultNone OperationResult = "unchanged" // OperationResultCreated means that a new resource is created OperationResultCreated OperationResult = "created" // OperationResultUpdated means that an existing resource is updated OperationResultUpdated OperationResult = "updated" // OperationResultUpdatedStatus means that an existing resource and its status is updated OperationResultUpdatedStatus OperationResult = "updatedStatus" // OperationResultUpdatedStatusOnly means that only an existing status is updated OperationResultUpdatedStatusOnly OperationResult = "updatedStatusOnly" )
type Runtime ¶
type Runtime struct { record.EventRecorder Client runtimeClient.Client Ctx context.Context Namespace string Owner runtimeClient.Object Scheme *runtime.Scheme }
Runtime is a Client implementation based upon the controller-runtime client
func (*Runtime) DeleteAllOf ¶
func (*Runtime) List ¶
func (c *Runtime) List(set map[string]string, list runtimeClient.ObjectList, opts ...func(config *Config)) error
func (*Runtime) OwnerReference ¶
func (c *Runtime) OwnerReference() *metav1apply.OwnerReferenceApplyConfiguration
func (*Runtime) UpdateStatus ¶
func (c *Runtime) UpdateStatus(obj runtimeClient.Object) error
func (*Runtime) WithNamespace ¶
Click to show internal directories.
Click to hide internal directories.