v1alpha1

package
v1.23.5 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.ibm.com

Index

Constants

View Source
const (
	//ScopePrivate means the operand resource can only
	//be used within the namespace.
	ScopePrivate scope = "private"
	//ScopePublic means the operand resource can only
	//be used in the cluster.
	ScopePublic scope = "public"
)
View Source
const (
	// InstallModeCluster means install the operator in all namespaces mode.
	InstallModeCluster string = "cluster"
	// InstallModeNamespace means install the operator in one namespace mode.
	InstallModeNamespace string = "namespace"
)
View Source
const (
	// RequestFinalizer is the name for the finalizer to allow for deletion.
	// when an OperandRequest is deleted.
	RequestFinalizer = "finalizer.request.ibm.com"

	ConditionCreating   ConditionType = "Creating"
	ConditionUpdating   ConditionType = "Updating"
	ConditionDeleting   ConditionType = "Deleting"
	ConditionNotFound   ConditionType = "NotFound"
	ConditionOutofScope ConditionType = "OutofScope"
	ConditionReady      ConditionType = "Ready"

	OperatorReady      OperatorPhase = "Ready for Deployment"
	OperatorRunning    OperatorPhase = "Running"
	OperatorInstalling OperatorPhase = "Installing"
	OperatorUpdating   OperatorPhase = "Updating"
	OperatorFailed     OperatorPhase = "Failed"
	OperatorInit       OperatorPhase = "Initialized"
	OperatorNotFound   OperatorPhase = "Not Found"
	OperatorNone       OperatorPhase = ""

	ClusterPhaseNone       ClusterPhase = "Pending"
	ClusterPhaseCreating   ClusterPhase = "Creating"
	ClusterPhaseInstalling ClusterPhase = "Installing"
	ClusterPhaseUpdating   ClusterPhase = "Updating"
	ClusterPhaseRunning    ClusterPhase = "Running"
	ClusterPhaseFailed     ClusterPhase = "Failed"

	ResourceTypeOperandRegistry ResourceType = "operandregistry"
	ResourceTypeCatalogSource   ResourceType = "catalogsource"
	ResourceTypeSub             ResourceType = "subscription"
	ResourceTypeCsv             ResourceType = "csv"
	ResourceTypeOperator        ResourceType = "operator"
	ResourceTypeOperand         ResourceType = "operands"
)

Constants are used for state.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "operator.ibm.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func EnsureFinalizer

func EnsureFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string) bool

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 RemoveFinalizer

func RemoveFinalizer(objectMeta *metav1.ObjectMeta, deletingFinalizer string) bool

RemoveFinalizer removes the finalizer from the object's ObjectMeta.

Types

type BindInfoPhase

type BindInfoPhase string

BindInfoPhase defines the BindInfo status.

const (
	// BindInfoFinalizer is the name for the finalizer to allow for deletion
	// when an OperandBindInfo is deleted.
	BindInfoFinalizer = "finalizer.bindinfo.ibm.com"

	BindInfoCompleted BindInfoPhase = "Completed"
	BindInfoFailed    BindInfoPhase = "Failed"
	BindInfoInit      BindInfoPhase = "Initialized"
	BindInfoUpdating  BindInfoPhase = "Updating"
	BindInfoWaiting   BindInfoPhase = "Waiting for Secret and/or Configmap from provider"
)

BindInfo status

type ClusterPhase

type ClusterPhase string

ClusterPhase is the phase of the installation.

type Condition

type Condition struct {
	// Type of condition.
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	// +optional
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

Condition represents the current state of the Request Service. A condition might not show up if it is not happening.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionType

type ConditionType string

ConditionType is the condition of a service.

type ConfigResource added in v1.10.0

type ConfigResource struct {
	// Name is the resource name.
	Name string `json:"name"`
	// Kind identifies the kind of the kubernetes resource.
	Kind string `json:"kind"`
	// APIVersion defines the versioned schema of this representation of an object.
	APIVersion string `json:"apiVersion"`
	// Namespace is the namespace of the resource.
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// Labels are the labels used in the resource.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations are the annotations used in the resource.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// Force is used to determine whether the existing kubernetes resource should be overwritten.
	// +kubebuilder:default:=true
	// +optional
	Force bool `json:"force,omitempty"`
	// Data is the configuration map of kubernetes resource.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Data *runtime.RawExtension `json:"data,omitempty"`
}

ConfigResource defines the resource needed for the service

func (*ConfigResource) DeepCopy added in v1.13.0

func (in *ConfigResource) DeepCopy() *ConfigResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigResource.

func (*ConfigResource) DeepCopyInto added in v1.13.0

func (in *ConfigResource) DeepCopyInto(out *ConfigResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigService

type ConfigService struct {
	// Name is the subscription name.
	Name string `json:"name"`
	// Spec is the configuration map of custom resource.
	Spec map[string]runtime.RawExtension `json:"spec,omitempty"`
	// State is a flag to enable or disable service.
	State string `json:"state,omitempty"`
	// Resources is used to specify the kubernetes resources that are needed for the service.
	// +optional
	Resources []ConfigResource `json:"resources,omitempty"`
}

ConfigService defines the configuration of the service.

func (*ConfigService) DeepCopy

func (in *ConfigService) DeepCopy() *ConfigService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigService.

func (*ConfigService) DeepCopyInto

func (in *ConfigService) DeepCopyInto(out *ConfigService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrStatus

type CrStatus struct {
	// +optional
	CrStatus map[string]ServicePhase `json:"customResourceStatus,omitempty"`
}

CrStatus defines the status of the custom resource.

func (*CrStatus) DeepCopy

func (in *CrStatus) DeepCopy() *CrStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrStatus.

func (*CrStatus) DeepCopyInto

func (in *CrStatus) DeepCopyInto(out *CrStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemberPhase

type MemberPhase struct {
	// OperatorPhase shows the deploy phase of the operator.
	// +optional
	OperatorPhase OperatorPhase `json:"operatorPhase,omitempty"`
	// OperandPhase shows the deploy phase of the operator instance.
	// +optional
	OperandPhase ServicePhase `json:"operandPhase,omitempty"`
}

MemberPhase shows the phase of the operator and operator instance.

func (*MemberPhase) DeepCopy

func (in *MemberPhase) DeepCopy() *MemberPhase

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberPhase.

func (*MemberPhase) DeepCopyInto

func (in *MemberPhase) DeepCopyInto(out *MemberPhase)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemberStatus

type MemberStatus struct {
	// The member name are the same as the subscription name.
	Name string `json:"name"`
	// The operand phase include None, Creating, Running, Failed.
	// +optional
	Phase MemberPhase `json:"phase,omitempty"`
	// OperandCRList shows the list of custom resource created by OperandRequest.
	// +optional
	OperandCRList []OperandCRMember `json:"operandCRList,omitempty"`
}

MemberStatus shows if the Operator is ready.

func (*MemberStatus) DeepCopy

func (in *MemberStatus) DeepCopy() *MemberStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberStatus.

func (*MemberStatus) DeepCopyInto

func (in *MemberStatus) DeepCopyInto(out *MemberStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Operand

type Operand struct {
	// Name of the operand to be deployed.
	Name string `json:"name"`
	// The bindings section is used to specify names of secret and/or configmap.
	// +optional
	Bindings map[string]SecretConfigmap `json:"bindings,omitempty"`
	// Kind is used when users want to deploy multiple custom resources.
	// Kind identifies the kind of the custom resource.
	// +optional
	Kind string `json:"kind,omitempty"`
	// APIVersion defines the versioned schema of this representation of an object.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// InstanceName is used when users want to deploy multiple custom resources.
	// It is the name of the custom resource.
	// +optional
	InstanceName string `json:"instanceName,omitempty"`
	// Spec is used when users want to deploy multiple custom resources.
	// It is the configuration map of custom resource.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Spec *runtime.RawExtension `json:"spec,omitempty"`
}

Operand defines the name and binding information for one operator.

func (*Operand) DeepCopy

func (in *Operand) DeepCopy() *Operand

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operand.

func (*Operand) DeepCopyInto

func (in *Operand) DeepCopyInto(out *Operand)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandBindInfo

type OperandBindInfo struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OperandBindInfoSpec   `json:"spec,omitempty"`
	Status OperandBindInfoStatus `json:"status,omitempty"`
}

OperandBindInfo is the Schema for the operandbindinfoes API. +kubebuilder:subresource:status +kubebuilder:resource:path=operandbindinfos,shortName=opbi,scope=Namespaced +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=.status.phase,description="Current Phase" +kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp +operator-sdk:csv:customresourcedefinitions:displayName="OperandBindInfo"

func (*OperandBindInfo) DeepCopy

func (in *OperandBindInfo) DeepCopy() *OperandBindInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandBindInfo.

func (*OperandBindInfo) DeepCopyInto

func (in *OperandBindInfo) DeepCopyInto(out *OperandBindInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandBindInfo) DeepCopyObject

func (in *OperandBindInfo) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*OperandBindInfo) EnsureFinalizer

func (r *OperandBindInfo) EnsureFinalizer() bool

EnsureFinalizer ensures that the operator source finalizer is included in the ObjectMeta.Finalizer slice. If it already exists, no state change occurs. If it doesn't, the finalizer is appended to the slice.

func (*OperandBindInfo) GenerateLabels added in v1.4.1

func (r *OperandBindInfo) GenerateLabels() map[string]string

GenerateLabels generates the labels for the OperandBindInfo to include information about the OperandRegistry it uses.

func (*OperandBindInfo) GetRegistryKey

func (r *OperandBindInfo) GetRegistryKey() types.NamespacedName

GetRegistryKey sets the default value for Request spec.

func (*OperandBindInfo) InitBindInfoStatus

func (r *OperandBindInfo) InitBindInfoStatus() bool

InitBindInfoStatus initializes OperandConfig status.

func (*OperandBindInfo) RemoveFinalizer

func (r *OperandBindInfo) RemoveFinalizer() bool

RemoveFinalizer removes the operator source finalizer from the OperatorSource ObjectMeta.

func (*OperandBindInfo) UpdateLabels

func (r *OperandBindInfo) UpdateLabels() bool

UpdateLabels generates the labels for the OperandBindInfo to include information about the OperandRegistry it uses. It will return true if label changed, otherwise return false.

type OperandBindInfoList

type OperandBindInfoList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OperandBindInfo `json:"items"`
}

OperandBindInfoList contains a list of OperandBindInfo.

func (*OperandBindInfoList) DeepCopy

func (in *OperandBindInfoList) DeepCopy() *OperandBindInfoList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandBindInfoList.

func (*OperandBindInfoList) DeepCopyInto

func (in *OperandBindInfoList) DeepCopyInto(out *OperandBindInfoList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandBindInfoList) DeepCopyObject

func (in *OperandBindInfoList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperandBindInfoSpec

type OperandBindInfoSpec struct {
	// The deployed service identifies itself with its operand.
	// This must match the name in the OperandRegistry in the current namespace.
	Operand string `json:"operand"`
	// The registry identifies the name of the name of the OperandRegistry CR from which this operand deployment is being requested.
	Registry string `json:"registry"`
	// Specifies the namespace in which the OperandRegistry reside.
	// The default is the current namespace in which the request is defined.
	// +optional
	RegistryNamespace string `json:"registryNamespace,omitempty"`
	// +optional
	Description string `json:"description,omitempty"`
	// The bindings section is used to specify information about the access/configuration data that is to be shared.
	// +optional
	Bindings map[string]SecretConfigmap `json:"bindings,omitempty"`
}

OperandBindInfoSpec defines the desired state of OperandBindInfo.

func (*OperandBindInfoSpec) DeepCopy

func (in *OperandBindInfoSpec) DeepCopy() *OperandBindInfoSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandBindInfoSpec.

func (*OperandBindInfoSpec) DeepCopyInto

func (in *OperandBindInfoSpec) DeepCopyInto(out *OperandBindInfoSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandBindInfoStatus

type OperandBindInfoStatus struct {
	// Phase describes the overall phase of OperandBindInfo.
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Phase",xDescriptors="urn:alm:descriptor:io.kubernetes.phase"
	// +optional
	Phase BindInfoPhase `json:"phase,omitempty"`
	// RequestNamespaces defines the namespaces of OperandRequest.
	// +optional
	RequestNamespaces []string `json:"requestNamespaces,omitempty"`
}

OperandBindInfoStatus defines the observed state of OperandBindInfo.

func (*OperandBindInfoStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandBindInfoStatus.

func (*OperandBindInfoStatus) DeepCopyInto

func (in *OperandBindInfoStatus) DeepCopyInto(out *OperandBindInfoStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandCRMember added in v1.4.1

type OperandCRMember struct {
	// Name is the name of the custom resource.
	// +optional
	Name string `json:"name,omitempty"`
	// Kind is the kind of the custom resource.
	// +optional
	Kind string `json:"kind,omitempty"`
	// APIVersion is the APIVersion of the custom resource.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

OperandCRMember defines a custom resource created by OperandRequest.

func (*OperandCRMember) DeepCopy added in v1.4.1

func (in *OperandCRMember) DeepCopy() *OperandCRMember

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandCRMember.

func (*OperandCRMember) DeepCopyInto added in v1.4.1

func (in *OperandCRMember) DeepCopyInto(out *OperandCRMember)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandConfig

type OperandConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OperandConfigSpec   `json:"spec,omitempty"`
	Status OperandConfigStatus `json:"status,omitempty"`
}

OperandConfig is the Schema for the operandconfigs API. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=operandconfigs,shortName=opcon,scope=Namespaced +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=.status.phase,description="Current Phase" +kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp +operator-sdk:csv:customresourcedefinitions:displayName="OperandConfig"

func (*OperandConfig) CheckPhase

func (r *OperandConfig) CheckPhase() bool

CheckPhase checks if the OperandConfig phase are running.

func (*OperandConfig) DeepCopy

func (in *OperandConfig) DeepCopy() *OperandConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandConfig.

func (*OperandConfig) DeepCopyInto

func (in *OperandConfig) DeepCopyInto(out *OperandConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandConfig) DeepCopyObject

func (in *OperandConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*OperandConfig) EnsureFinalizer

func (r *OperandConfig) EnsureFinalizer() bool

EnsureFinalizer ensures that the operator source finalizer is included in the ObjectMeta.Finalizer slice. If it already exists, no state change occurs. If it doesn't, the finalizer is appended to the slice.

func (*OperandConfig) GetService

func (r *OperandConfig) GetService(operandName string) *ConfigService

GetService obtains the service definition with the operand name.

func (*OperandConfig) InitConfigServiceStatus

func (r *OperandConfig) InitConfigServiceStatus()

InitConfigServiceStatus initializes service status in the OperandConfig instance.

func (*OperandConfig) RemoveFinalizer

func (r *OperandConfig) RemoveFinalizer() bool

RemoveFinalizer removes the operator source finalizer from the OperatorSource ObjectMeta.

func (*OperandConfig) UpdateOperandPhase

func (r *OperandConfig) UpdateOperandPhase()

UpdateOperandPhase sets the current Phase status.

type OperandConfigList

type OperandConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OperandConfig `json:"items"`
}

OperandConfigList contains a list of OperandConfig.

func (*OperandConfigList) DeepCopy

func (in *OperandConfigList) DeepCopy() *OperandConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandConfigList.

func (*OperandConfigList) DeepCopyInto

func (in *OperandConfigList) DeepCopyInto(out *OperandConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandConfigList) DeepCopyObject

func (in *OperandConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperandConfigSpec

type OperandConfigSpec struct {
	// Services is a list of configuration of service.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Operand Services Config List"
	// +optional
	Services []ConfigService `json:"services,omitempty"`
}

OperandConfigSpec defines the desired state of OperandConfig.

func (*OperandConfigSpec) DeepCopy

func (in *OperandConfigSpec) DeepCopy() *OperandConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandConfigSpec.

func (*OperandConfigSpec) DeepCopyInto

func (in *OperandConfigSpec) DeepCopyInto(out *OperandConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandConfigStatus

type OperandConfigStatus struct {
	// Phase describes the overall phase of operands in the OperandConfig.
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Phase",xDescriptors="urn:alm:descriptor:io.kubernetes.phase"
	// +optional
	Phase ServicePhase `json:"phase,omitempty"`
	// ServiceStatus defines all the status of a operator.
	// +optional
	ServiceStatus map[string]CrStatus `json:"serviceStatus,omitempty"`
}

OperandConfigStatus defines the observed state of OperandConfig.

func (*OperandConfigStatus) DeepCopy

func (in *OperandConfigStatus) DeepCopy() *OperandConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandConfigStatus.

func (*OperandConfigStatus) DeepCopyInto

func (in *OperandConfigStatus) DeepCopyInto(out *OperandConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandRegistry

type OperandRegistry struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OperandRegistrySpec   `json:"spec,omitempty"`
	Status OperandRegistryStatus `json:"status,omitempty"`
}

OperandRegistry is the Schema for the operandregistries API.

func (*OperandRegistry) DeepCopy

func (in *OperandRegistry) DeepCopy() *OperandRegistry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRegistry.

func (*OperandRegistry) DeepCopyInto

func (in *OperandRegistry) DeepCopyInto(out *OperandRegistry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandRegistry) DeepCopyObject

func (in *OperandRegistry) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*OperandRegistry) EnsureFinalizer

func (r *OperandRegistry) EnsureFinalizer() bool

EnsureFinalizer ensures that the operator source finalizer is included in the ObjectMeta.Finalizer slice. If it already exists, no state change occurs. If it doesn't, the finalizer is appended to the slice.

func (*OperandRegistry) GetAllReconcileRequest

func (r *OperandRegistry) GetAllReconcileRequest() []reconcile.Request

GetAllReconcileRequest gets all the ReconcileRequest from OperandRegistry status.

func (*OperandRegistry) GetOperator

func (r *OperandRegistry) GetOperator(operandName string) *Operator

GetOperator obtains the operator definition with the operand name.

func (*OperandRegistry) GetReconcileRequest

func (r *OperandRegistry) GetReconcileRequest(name string, reconcileRequest reconcile.Request) int

GetReconcileRequest gets the position of request from OperandRegistry status.

func (*OperandRegistry) RemoveFinalizer

func (r *OperandRegistry) RemoveFinalizer() bool

RemoveFinalizer removes the operator source finalizer from the OperatorSource ObjectMeta.

func (*OperandRegistry) SetNotFoundCondition

func (r *OperandRegistry) SetNotFoundCondition(name string, rt ResourceType, cs corev1.ConditionStatus)

SetNotFoundCondition creates a Condition to claim NotFound.

func (*OperandRegistry) SetOperatorStatus

func (r *OperandRegistry) SetOperatorStatus(name string, phase OperatorPhase, request reconcile.Request)

SetOperatorStatus sets the operator status in the OperandRegistry.

func (*OperandRegistry) SetReadyCondition

func (r *OperandRegistry) SetReadyCondition(name string, rt ResourceType, cs corev1.ConditionStatus)

SetReadyCondition creates a Condition to claim Ready.

func (*OperandRegistry) UpdateRegistryPhase

func (r *OperandRegistry) UpdateRegistryPhase(phase RegistryPhase)

UpdateRegistryPhase sets the current Phase status.

type OperandRegistryList

type OperandRegistryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OperandRegistry `json:"items"`
}

OperandRegistryList contains a list of OperandRegistry.

func (*OperandRegistryList) DeepCopy

func (in *OperandRegistryList) DeepCopy() *OperandRegistryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRegistryList.

func (*OperandRegistryList) DeepCopyInto

func (in *OperandRegistryList) DeepCopyInto(out *OperandRegistryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandRegistryList) DeepCopyObject

func (in *OperandRegistryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperandRegistrySpec

type OperandRegistrySpec struct {
	// Operators is a list of operator OLM definition.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Operators Registry List"
	// +optional
	Operators []Operator `json:"operators,omitempty"`
}

OperandRegistrySpec defines the desired state of OperandRegistry.

func (*OperandRegistrySpec) DeepCopy

func (in *OperandRegistrySpec) DeepCopy() *OperandRegistrySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRegistrySpec.

func (*OperandRegistrySpec) DeepCopyInto

func (in *OperandRegistrySpec) DeepCopyInto(out *OperandRegistrySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandRegistryStatus

type OperandRegistryStatus struct {
	// Phase describes the overall phase of operators in the OperandRegistry.
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Phase",xDescriptors="urn:alm:descriptor:io.kubernetes.phase"
	// +optional
	Phase RegistryPhase `json:"phase,omitempty"`
	// OperatorsStatus defines operators status and the number of reconcile request.
	// +optional
	OperatorsStatus map[string]OperatorStatus `json:"operatorsStatus,omitempty"`
	// Conditions represents the current state of the Request Service.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Conditions",xDescriptors="urn:alm:descriptor:io.kubernetes.conditions"
	Conditions []Condition `json:"conditions,omitempty"`
}

OperandRegistryStatus defines the observed state of OperandRegistry.

func (*OperandRegistryStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRegistryStatus.

func (*OperandRegistryStatus) DeepCopyInto

func (in *OperandRegistryStatus) DeepCopyInto(out *OperandRegistryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandRequest

type OperandRequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OperandRequestSpec   `json:"spec,omitempty"`
	Status OperandRequestStatus `json:"status,omitempty"`
}

OperandRequest is the Schema for the operandrequests API.

func (*OperandRequest) DeepCopy

func (in *OperandRequest) DeepCopy() *OperandRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRequest.

func (*OperandRequest) DeepCopyInto

func (in *OperandRequest) DeepCopyInto(out *OperandRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandRequest) DeepCopyObject

func (in *OperandRequest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*OperandRequest) EnsureFinalizer

func (r *OperandRequest) EnsureFinalizer() bool

EnsureFinalizer ensures that the operator source finalizer is included in the ObjectMeta.Finalizer slice. If it already exists, no state change occurs. If it doesn't, the finalizer is appended to the slice.

func (*OperandRequest) FreshMemberStatus

func (r *OperandRequest) FreshMemberStatus(failedDeletedOperands *gset.Set)

FreshMemberStatus cleanup Member status from the Member status list.

func (*OperandRequest) GenerateLabels added in v1.4.1

func (r *OperandRequest) GenerateLabels() map[string]string

GenerateLabels generates the labels for the OperandRequest to include information about the OperandConfig and OperandRegistry it uses.

func (*OperandRequest) GetAllRegistryReconcileRequest

func (r *OperandRequest) GetAllRegistryReconcileRequest() []reconcile.Request

GetAllRegistryReconcileRequest gets all the Registry ReconcileRequest.

func (*OperandRequest) GetRegistryKey

func (r *OperandRequest) GetRegistryKey(req Request) types.NamespacedName

GetRegistryKey Set the default value for Request spec.

func (*OperandRequest) InitRequestStatus

func (r *OperandRequest) InitRequestStatus() bool

InitRequestStatus OperandConfig status.

func (*OperandRequest) RemoveFinalizer

func (r *OperandRequest) RemoveFinalizer() bool

RemoveFinalizer removes the operator source finalizer from the OperatorSource ObjectMeta.

func (*OperandRequest) RemoveMemberCRStatus added in v1.4.1

func (r *OperandRequest) RemoveMemberCRStatus(name, CRName, CRKind string, mu sync.Locker)

RemoveMemberCRStatus removes a Member CR in the Member status list.

func (*OperandRequest) SetClusterPhase

func (r *OperandRequest) SetClusterPhase(p ClusterPhase)

SetClusterPhase sets the current Phase status

func (*OperandRequest) SetCreatingCondition

func (r *OperandRequest) SetCreatingCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetCreatingCondition creates a new condition status.

func (*OperandRequest) SetDeletingCondition

func (r *OperandRequest) SetDeletingCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetDeletingCondition creates a deleting condition status.

func (*OperandRequest) SetMemberCRStatus added in v1.4.1

func (r *OperandRequest) SetMemberCRStatus(name, CRName, CRKind, CRAPIVersion string, mu sync.Locker)

SetMemberCRStatus appends a Member CR in the Member status list.

func (*OperandRequest) SetMemberStatus

func (r *OperandRequest) SetMemberStatus(name string, operatorPhase OperatorPhase, operandPhase ServicePhase, mu sync.Locker)

SetMemberStatus appends a Member status in the Member status list.

func (*OperandRequest) SetNoSuitableRegistryCondition added in v1.6.0

func (r *OperandRequest) SetNoSuitableRegistryCondition(name, message string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetNoSuitableRegistryCondition creates a NotFoundCondition when an operator is not found.

func (*OperandRequest) SetNotFoundOperandRegistryCondition added in v1.5.0

func (r *OperandRequest) SetNotFoundOperandRegistryCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetNotFoundOperandRegistryCondition creates a NotFoundCondition when an operandRegistry is not found.

func (*OperandRequest) SetNotFoundOperatorFromRegistryCondition

func (r *OperandRequest) SetNotFoundOperatorFromRegistryCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetNotFoundOperatorFromRegistryCondition creates a NotFoundCondition when an operator is not found.

func (*OperandRequest) SetOutofScopeCondition

func (r *OperandRequest) SetOutofScopeCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetOutofScopeCondition creates a NotFoundCondition.

func (*OperandRequest) SetUpdatingCondition

func (r *OperandRequest) SetUpdatingCondition(name string, rt ResourceType, cs corev1.ConditionStatus, mu sync.Locker)

SetUpdatingCondition creates an updating condition status.

func (*OperandRequest) UpdateClusterPhase

func (r *OperandRequest) UpdateClusterPhase()

UpdateClusterPhase will collect the phase of all the operators and operands. Then summarize the cluster phase of the OperandRequest.

func (*OperandRequest) UpdateLabels

func (r *OperandRequest) UpdateLabels() bool

UpdateLabels updates the labels for the OperandRequest to include information about the OperandConfig and OperandRegistry it uses. It will return true if label changed, otherwise return false.

type OperandRequestList

type OperandRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OperandRequest `json:"items"`
}

OperandRequestList contains a list of OperandRequest.

func (*OperandRequestList) DeepCopy

func (in *OperandRequestList) DeepCopy() *OperandRequestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRequestList.

func (*OperandRequestList) DeepCopyInto

func (in *OperandRequestList) DeepCopyInto(out *OperandRequestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperandRequestList) DeepCopyObject

func (in *OperandRequestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperandRequestSpec

type OperandRequestSpec struct {
	// Requests defines a list of operands installation.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Operators Request List"
	Requests []Request `json:"requests"`
}

The OperandRequestSpec identifies one or more specific operands (from a specific Registry) that should actually be installed.

func (*OperandRequestSpec) DeepCopy

func (in *OperandRequestSpec) DeepCopy() *OperandRequestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRequestSpec.

func (*OperandRequestSpec) DeepCopyInto

func (in *OperandRequestSpec) DeepCopyInto(out *OperandRequestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperandRequestStatus

type OperandRequestStatus struct {
	// Conditions represents the current state of the Request Service.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Conditions",xDescriptors="urn:alm:descriptor:io.kubernetes.conditions"
	Conditions []Condition `json:"conditions,omitempty"`
	// Members represnets the current operand status of the set.
	// +optional
	Members []MemberStatus `json:"members,omitempty"`
	// Phase is the cluster running phase.
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Phase",xDescriptors="urn:alm:descriptor:io.kubernetes.phase"
	// +optional
	Phase ClusterPhase `json:"phase,omitempty"`
}

OperandRequestStatus defines the observed state of OperandRequest.

func (*OperandRequestStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandRequestStatus.

func (*OperandRequestStatus) DeepCopyInto

func (in *OperandRequestStatus) DeepCopyInto(out *OperandRequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Operator

type Operator struct {
	// A unique name for the operator whose operand may be deployed.
	Name string `json:"name"`
	// A scope indicator, either public or private.
	// Valid values are:
	// - "private" (default): deployment only request from the containing names;
	// - "public": deployment can be requested from other namespaces;
	// +optional
	Scope scope `json:"scope,omitempty"`
	// The install mode of an operator, either namespace or cluster.
	// Valid values are:
	// - "namespace" (default): operator is deployed in namespace of OperandRegistry;
	// - "cluster": operator is deployed in "openshift-operators" namespace;
	// +optional
	InstallMode string `json:"installMode,omitempty"`
	// The namespace in which operator CR should be deployed.
	// Also the namespace in which operator should be deployed when InstallMode is empty or set to "namespace".
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// Name of a CatalogSource that defines where and how to find the channel.
	SourceName string `json:"sourceName,omitempty"`
	// The Kubernetes namespace where the CatalogSource used is located.
	SourceNamespace string `json:"sourceNamespace,omitempty"`
	// The target namespace of the OperatorGroups.
	TargetNamespaces []string `json:"targetNamespaces,omitempty"`
	// Name of the package that defines the applications.
	PackageName string `json:"packageName"`
	// Name of the channel to track.
	Channel string `json:"channel"`
	// Description of a common service.
	// +optional
	Description string `json:"description,omitempty"`
	// Approval mode for emitted InstallPlans.
	// +optional
	// Valid values are:
	// - "Automatic" (default): operator will be installed automatically;
	// - "Manual": operator installation will be pending until users approve it;
	InstallPlanApproval olmv1alpha1.Approval `json:"installPlanApproval,omitempty"`
	// StartingCSV of the installation.
	// +optional
	StartingCSV string `json:"startingCSV,omitempty"`
	// SubscriptionConfig is used to override operator configuration.
	// +optional
	SubscriptionConfig *olmv1alpha1.SubscriptionConfig `json:"subscriptionConfig,omitempty"`
}

Operator defines the desired state of Operators.

func (*Operator) DeepCopy

func (in *Operator) DeepCopy() *Operator

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operator.

func (*Operator) DeepCopyInto

func (in *Operator) DeepCopyInto(out *Operator)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatorPhase

type OperatorPhase string

OperatorPhase defines the operator status.

type OperatorStatus

type OperatorStatus struct {
	// Phase is the state of operator.
	// +optional
	Phase OperatorPhase `json:"phase,omitempty"`
	// ReconcileRequests stores the namespace/name of all the requests.
	// +optional
	ReconcileRequests []ReconcileRequest `json:"reconcileRequests,omitempty"`
}

OperatorStatus defines operators status and the number of reconcile request.

func (*OperatorStatus) DeepCopy

func (in *OperatorStatus) DeepCopy() *OperatorStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus.

func (*OperatorStatus) DeepCopyInto

func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReconcileRequest

type ReconcileRequest struct {
	// Name defines the name of request.
	Name string `json:"name"`
	// Namespace defines the namespace of request.
	Namespace string `json:"namespace"`
}

ReconcileRequest records the information of the operandRequest.

func (*ReconcileRequest) DeepCopy

func (in *ReconcileRequest) DeepCopy() *ReconcileRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconcileRequest.

func (*ReconcileRequest) DeepCopyInto

func (in *ReconcileRequest) DeepCopyInto(out *ReconcileRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RegistryPhase

type RegistryPhase string

RegistryPhase defines the operator status.

const (
	// RegistryFinalizer is the name for the finalizer to allow for deletion
	// when an OperandRegistry is deleted.
	RegistryFinalizer = "finalizer.registry.ibm.com"

	RegistryReady    RegistryPhase = "Ready for Deployment"
	RegistryRunning  RegistryPhase = "Running"
	RegistryPending  RegistryPhase = "Pending"
	RegistryUpdating RegistryPhase = "Updating"
	RegistryFailed   RegistryPhase = "Failed"
	RegistryWaiting  RegistryPhase = "Waiting for CatalogSource being ready"
	RegistryInit     RegistryPhase = "Initialized"
	RegistryNone     RegistryPhase = ""
)

Registry phase

type Request

type Request struct {
	// Operands defines a list of the OperandRegistry entry for the operand to be deployed.
	Operands []Operand `json:"operands"`
	// Specifies the name in which the OperandRegistry reside.
	Registry string `json:"registry"`
	// Specifies the namespace in which the OperandRegistry reside.
	// The default is the current namespace in which the request is defined.
	// +optional
	RegistryNamespace string `json:"registryNamespace,omitempty"`
	// Description is an optional description for the request.
	// +optional
	Description string `json:"description,omitempty"`
}

Request identifies a operand detail.

func (*Request) DeepCopy

func (in *Request) DeepCopy() *Request

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Request.

func (*Request) DeepCopyInto

func (in *Request) DeepCopyInto(out *Request)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceType

type ResourceType string

ResourceType is the type of condition use.

type SecretConfigmap

type SecretConfigmap struct {
	// The secret identifies an existing secret. if it exists, the ODLM will share to the namespace of the OperandRequest.
	// +optional
	Secret string `json:"secret,omitempty"`
	// The configmap identifies an existing configmap object. if it exists, the ODLM will share to the namespace of the OperandRequest.
	// +optional
	Configmap string `json:"configmap,omitempty"`
}

SecretConfigmap is a pair of Secret and/or Configmap.

func (*SecretConfigmap) DeepCopy

func (in *SecretConfigmap) DeepCopy() *SecretConfigmap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretConfigmap.

func (*SecretConfigmap) DeepCopyInto

func (in *SecretConfigmap) DeepCopyInto(out *SecretConfigmap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServicePhase

type ServicePhase string

ServicePhase defines the service status.

const (
	// ConfigFinalizer is the name for the finalizer to allow for deletion
	// when an OperandConfig is deleted.
	ConfigFinalizer = "finalizer.config.ibm.com"

	ServiceRunning  ServicePhase = "Running"
	ServiceFailed   ServicePhase = "Failed"
	ServiceInit     ServicePhase = "Initialized"
	ServiceCreating ServicePhase = "Creating"
	ServiceNotFound ServicePhase = "Not Found"
	ServiceNone     ServicePhase = ""
)

Service status.

Jump to

Keyboard shortcuts

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