runtime

package
v0.0.0-...-600dc1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Operator = "operator.clusteroverride.openshift.io"
)

Variables

This section is empty.

Functions

func GetMetaObject

func GetMetaObject(obj interface{}) (object metav1.Object, err error)

func IsOwner

func IsOwner(owned metav1.Object, owner metav1.OwnerReference) bool

func NonBlockingOwner

func NonBlockingOwner(owner Object) metav1.OwnerReference

NonBlockingOwner returns an owner reference to be added.

func SetController

func SetController(owned metav1.Object, owner Object)

Types

type Client

type Client struct {
	Operator        versioned.Interface
	Kubernetes      kubernetes.Interface
	APIRegistration apiregistrationclientset.Interface
	APIExtension    apiextensionsclientset.Interface
	Dynamic         dynamicclient.Ensurer
}

func NewClient

func NewClient(config *rest.Config) (clients *Client, err error)

type Enqueuer

type Enqueuer interface {
	Enqueue(owned interface{}) error
}

Enqueuer is an interface that wraps the Enqueue method.

Enqueue looks up the owner from the given object (owned) and then enqueues the owner for reconciliation.

type Object

type Object interface {
	metav1.Object
	runtime.Object
}

Object is used to build an OwnerReference, and we need type and object metadata

type OperandContext

type OperandContext interface {
	// Name is the name of the RunOnceDurationOverride admission webhook server.
	// This name will be used to create kube resources.
	// // More info: http://kubernetes.io/docs/user-guide/identifiers#names.
	WebhookName() string

	// Namespace is the namespace where the RunOnceDurationOverride admission
	// webhook server is installed.
	WebhookNamespace() string

	// OperandImage points to the operand (RunOnceDurationOverride admission webhook) image.
	OperandImage() string

	// OperandVersion is the version of the operand (RunOnceDurationOverride admission webhook).
	OperandVersion() string

	// ResourceName is the name of the CustomResource that will manage this operand.
	ResourceName() string
}

func NewOperandContext

func NewOperandContext(name, namespace, resource, image, version string) OperandContext

type SetControllerFunc

type SetControllerFunc func(owned metav1.Object, owner Object)

SetControllerFunc sets ownership given an owner and an owned object.

func (SetControllerFunc) Set

func (s SetControllerFunc) Set(owned metav1.Object, owner Object)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL