Documentation ¶
Overview ¶
Package shared contains structs used by various API groups +k8s:deepcopy-gen=package,register +groupName=operators.coreos.com
Index ¶
- func EnsureFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string)
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func GetWatchNamespace() (string, error)
- func HasFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string) bool
- func IsObjectInOtherNamespace(namespace string) (bool, error)
- func RemoveFinalizer(objectMeta *metav1.ObjectMeta, deletingFinalizer string)
- type ObjectPhase
- type Phase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureFinalizer ¶
func EnsureFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string)
EnsureFinalizer ensures that the object's finalizer is included in the ObjectMeta Finalizers slice. If it already exists, no state change occurs. If it doesn't, the finalizer is appended to the slice.
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func GetWatchNamespace ¶
GetWatchNamespace returns the Namespace the operator should be watching for changes Note: the marketplace-operator YAML manifest deployed by the CVO specifies the $WATCH_NAMESPACE as an environment variable using the downward API. Source: https://sdk.operatorframework.io/docs/building-operators/golang/operator-scope/
func HasFinalizer ¶
func HasFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string) bool
HasFinalizer checks to see if the finalizer exists in the object's ObjectMeta.
func IsObjectInOtherNamespace ¶
IsObjectInOtherNamespace returns true if the namespace is not the watched namespace of the operator. An false, error will be returned if there was an error getting the watched namespace.
func RemoveFinalizer ¶
func RemoveFinalizer(objectMeta *metav1.ObjectMeta, deletingFinalizer string)
RemoveFinalizer removes the finalizer from the object's ObjectMeta.
Types ¶
type ObjectPhase ¶
type ObjectPhase struct { // Current phase of the object Phase `json:"phase,omitempty"` // Last time the object has transitioned from one phase to another LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` // Last time the status of the object was updated LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` }
ObjectPhase describes the phase of a Marketplace object is in along with the last time a phase transition occurred and when the object was last updated
func (*ObjectPhase) DeepCopy ¶
func (in *ObjectPhase) DeepCopy() *ObjectPhase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectPhase.
func (*ObjectPhase) DeepCopyInto ¶
func (in *ObjectPhase) DeepCopyInto(out *ObjectPhase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Phase ¶
type Phase struct { // Name of the phase Name string `json:"name,omitempty"` // A human readable message indicating why the object is in this phase Message string `json:"message,omitempty"` }
Phase describes the phase the object is in
func (*Phase) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Phase.
func (*Phase) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.