Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the operators v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=operator.ibm.com
Package v1alpha1 contains API Schema definitions for the operators v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=operator.ibm.com
Index ¶
- Constants
- Variables
- func EnsureFinalizer(objectMeta *metav1.ObjectMeta, expectedFinalizer string) bool
- func RemoveFinalizer(objectMeta *metav1.ObjectMeta, deletingFinalizer string) bool
- type BindInfoPhase
- type ClusterPhase
- type Condition
- type ConditionType
- type ConfigService
- type CrStatus
- type MemberPhase
- type MemberStatus
- type Operand
- type OperandBindInfo
- func (in *OperandBindInfo) DeepCopy() *OperandBindInfo
- func (in *OperandBindInfo) DeepCopyInto(out *OperandBindInfo)
- func (in *OperandBindInfo) DeepCopyObject() runtime.Object
- func (r *OperandBindInfo) EnsureFinalizer() bool
- func (r *OperandBindInfo) GeneralLabels() map[string]string
- func (r *OperandBindInfo) GetRegistryKey() types.NamespacedName
- func (r *OperandBindInfo) InitBindInfoStatus() bool
- func (r *OperandBindInfo) RemoveFinalizer() bool
- func (r *OperandBindInfo) UpdateLabels() bool
- type OperandBindInfoList
- type OperandBindInfoSpec
- type OperandBindInfoStatus
- type OperandConfig
- func (r *OperandConfig) CheckPhase() bool
- func (in *OperandConfig) DeepCopy() *OperandConfig
- func (in *OperandConfig) DeepCopyInto(out *OperandConfig)
- func (in *OperandConfig) DeepCopyObject() runtime.Object
- func (r *OperandConfig) EnsureFinalizer() bool
- func (r *OperandConfig) GetService(operandName string) *ConfigService
- func (r *OperandConfig) InitConfigServiceStatus()
- func (r *OperandConfig) InitConfigStatus() bool
- func (r *OperandConfig) RemoveFinalizer() bool
- func (r *OperandConfig) UpdateOperandPhase()
- type OperandConfigList
- type OperandConfigSpec
- type OperandConfigStatus
- type OperandRegistry
- func (in *OperandRegistry) DeepCopy() *OperandRegistry
- func (in *OperandRegistry) DeepCopyInto(out *OperandRegistry)
- func (in *OperandRegistry) DeepCopyObject() runtime.Object
- func (r *OperandRegistry) EnsureFinalizer() bool
- func (r *OperandRegistry) GetAllReconcileRequest() []reconcile.Request
- func (r *OperandRegistry) GetOperator(operandName string) *Operator
- func (r *OperandRegistry) GetReconcileRequest(name string, reconcileRequest reconcile.Request) int
- func (r *OperandRegistry) InitRegistryStatus() bool
- func (r *OperandRegistry) RemoveFinalizer() bool
- func (r *OperandRegistry) SetNotFoundCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRegistry) SetOperatorStatus(name string, phase OperatorPhase, request reconcile.Request)
- func (r *OperandRegistry) SetReadyCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRegistry) UpdateRegistryPhase(phase RegistryPhase)
- type OperandRegistryList
- type OperandRegistrySpec
- type OperandRegistryStatus
- type OperandRequest
- func (in *OperandRequest) DeepCopy() *OperandRequest
- func (in *OperandRequest) DeepCopyInto(out *OperandRequest)
- func (in *OperandRequest) DeepCopyObject() runtime.Object
- func (r *OperandRequest) EnsureFinalizer() bool
- func (r *OperandRequest) FreshMemberStatus()
- func (r *OperandRequest) GeneralLabels() map[string]string
- func (r *OperandRequest) GetAllRegistryReconcileRequest() []reconcile.Request
- func (r *OperandRequest) GetRegistryKey(req Request) types.NamespacedName
- func (r *OperandRequest) InitRequestStatus() bool
- func (r *OperandRequest) RemoveFinalizer() bool
- func (r *OperandRequest) SetClusterPhase(p ClusterPhase)
- func (r *OperandRequest) SetCreatingCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) SetDeletingCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) SetMemberStatus(name string, operatorPhase OperatorPhase, operandPhase ServicePhase)
- func (r *OperandRequest) SetNotFoundOperatorFromRegistryCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) SetOutofScopeCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) SetReadyCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) SetUpdatingCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
- func (r *OperandRequest) UpdateClusterPhase()
- func (r *OperandRequest) UpdateLabels() bool
- type OperandRequestList
- type OperandRequestSpec
- type OperandRequestStatus
- type Operator
- type OperatorPhase
- type OperatorStatus
- type ReconcileRequest
- type RegistryPhase
- type Request
- type ResourceType
- type SecretConfigmap
- type ServicePhase
Constants ¶
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" )
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" )
const ( // RequestFinalizer is the name for the finalizer to allow for deletion // reconciliation 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" OperatorNone OperatorPhase = "" ClusterPhaseNone ClusterPhase = "Pending" ClusterPhaseCreating ClusterPhase = "Creating" ClusterPhaseInstalling ClusterPhase = "Installing" ClusterPhaseUpdating ClusterPhase = "Updating" ClusterPhaseRunning ClusterPhase = "Running" ClusterPhaseFailed ClusterPhase = "Failed" ResourceTypeCatalogSource ResourceType = "catalogsource" ResourceTypeSub ResourceType = "subscription" ResourceTypeCsv ResourceType = "csv" ResourceTypeOperator ResourceType = "operator" ResourceTypeOperand ResourceType = "operands" )
Constants are used for state
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "operator.ibm.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
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 // reconciliation 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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
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"` // State is a flag to enable or disable service State string `json:"state,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 {
CrStatus map[string]ServicePhase `json:"customResourceStatus,omitempty"`
}
CrStatus defines the status of the custom resource
func (*CrStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrStatus.
func (*CrStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemberPhase ¶
type MemberPhase struct { // OperatorPhase show the deploy phase of the operator // +optional OperatorPhase OperatorPhase `json:"operatorPhase,omitempty"` // OperandPhase show the deploy phase of the operator instance // +optional OperandPhase ServicePhase `json:"operandPhase,omitempty"` }
MemberPhase show 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"` }
MemberStatus show 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"` }
Operand defines the name and binding information for one operator
func (*Operand) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operand.
func (*Operand) DeepCopyInto ¶
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 operandbindinfos 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:gen-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) GeneralLabels ¶
func (r *OperandBindInfo) GeneralLabels() map[string]string
func (*OperandBindInfo) GetRegistryKey ¶
func (r *OperandBindInfo) GetRegistryKey() types.NamespacedName
GetRegistryKey Set the default value for Request spec
func (*OperandBindInfo) InitBindInfoStatus ¶
func (r *OperandBindInfo) InitBindInfoStatus() bool
InitBindInfoStatus 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 update the labels for the OperandConfig and OperandRegistry used by this OperandRequest 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:gen-csv:customresourcedefinitions.statusDescriptors=true // +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 ¶
func (in *OperandBindInfoStatus) DeepCopy() *OperandBindInfoStatus
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 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 +k8s:openapi-gen=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:gen-csv:customresourcedefinitions.displayName="OperandConfig" +operator-sdk:gen-csv:customresourcedefinitions.resources=`Deployment,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`ReplicaSet,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Service,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Pod,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Configmap,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Installplan,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Catalogsource,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Clusterserviceversion,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operatorgroup,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Subscription,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandconfig,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandrequest,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandregistry,v1alpha1,""`
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 obtain the service definition with the operand name
func (*OperandConfig) InitConfigServiceStatus ¶
func (r *OperandConfig) InitConfigServiceStatus()
InitConfigServiceStatus service status in the OperandConfig instance
func (*OperandConfig) InitConfigStatus ¶
func (r *OperandConfig) InitConfigStatus() bool
InitConfigStatus OperandConfig status
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 // +optional // +listType=set // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Services []ConfigService `json:"services,omitempty"` }
OperandConfigSpec defines the desired state of OperandConfig +k8s:openapi-gen=true
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:gen-csv:customresourcedefinitions.statusDescriptors=true // +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 +k8s:openapi-gen=true
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 +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=operandregistries,shortName=opreg,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:gen-csv:customresourcedefinitions.displayName="OperandRegistry" +operator-sdk:gen-csv:customresourcedefinitions.resources=`Deployment,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`ReplicaSet,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Service,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Pod,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Configmap,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Installplan,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Catalogsource,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Clusterserviceversion,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operatorgroup,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Subscription,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandconfig,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandrequest,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandregistry,v1alpha1,""`
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 obtain 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) InitRegistryStatus ¶
func (r *OperandRegistry) InitRegistryStatus() bool
InitRegistryStatus Init Phase in the 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)
SetNoneCondition 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 // +optional // +listType=set // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Operators []Operator `json:"operators,omitempty"` }
OperandRegistrySpec defines the desired state of OperandRegistry +k8s:openapi-gen=true
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:gen-csv:customresourcedefinitions.statusDescriptors=true // +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 // +listType=set // +operator-sdk:gen-csv:customresourcedefinitions.statusDescriptors=true Conditions []Condition `json:"conditions,omitempty"` }
OperandRegistryStatus defines the observed state of OperandRegistry +k8s:openapi-gen=true
func (*OperandRegistryStatus) DeepCopy ¶
func (in *OperandRegistryStatus) DeepCopy() *OperandRegistryStatus
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 +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=operandrequests,shortName=opreq,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:gen-csv:customresourcedefinitions.displayName="OperandRequest" +operator-sdk:gen-csv:customresourcedefinitions.resources=`Namespace,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Deployment,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`ReplicaSet,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Service,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Pod,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Configmap,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Installplan,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Catalogsource,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Clusterserviceversion,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operatorgroup,v1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Subscription,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandconfig,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandrequest,v1alpha1,""` +operator-sdk:gen-csv:customresourcedefinitions.resources=`Operandregistry,v1alpha1,""`
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()
FreshMemberStatus cleanup Member status from the Member status list
func (*OperandRequest) GeneralLabels ¶
func (r *OperandRequest) GeneralLabels() map[string]string
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
InitConfigStatus OperandConfig status
func (*OperandRequest) RemoveFinalizer ¶
func (r *OperandRequest) RemoveFinalizer() bool
RemoveFinalizer removes the operator source finalizer from the OperatorSource ObjectMeta.
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)
SetCreatingCondition creates a new condition status
func (*OperandRequest) SetDeletingCondition ¶
func (r *OperandRequest) SetDeletingCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
SetDeletingCondition creates a deleting condition status
func (*OperandRequest) SetMemberStatus ¶
func (r *OperandRequest) SetMemberStatus(name string, operatorPhase OperatorPhase, operandPhase ServicePhase)
SetMemberStatus appends a Member status in the Member status list
func (*OperandRequest) SetNotFoundOperatorFromRegistryCondition ¶
func (r *OperandRequest) SetNotFoundOperatorFromRegistryCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
SetNotFoundOperatorFromRegistryCondition creates a NotFoundCondition
func (*OperandRequest) SetOutofScopeCondition ¶
func (r *OperandRequest) SetOutofScopeCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
SetOutofScopeCondition creates a NotFoundCondition
func (*OperandRequest) SetReadyCondition ¶
func (r *OperandRequest) SetReadyCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
SetReadyCondition creates a Condition to claim Ready
func (*OperandRequest) SetUpdatingCondition ¶
func (r *OperandRequest) SetUpdatingCondition(name string, rt ResourceType, cs corev1.ConditionStatus)
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 update the labels for the OperandConfig and OperandRegistry used by this OperandRequest 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 // +listType=set // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Requests []Request `json:"requests"` }
The OperandRequestSpec identifies one or more specific operands (from a specific Registry) that should actually be installed +k8s:openapi-gen=true
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 // +listType=set // +operator-sdk:gen-csv:customresourcedefinitions.statusDescriptors=true Conditions []Condition `json:"conditions,omitempty"` // Members represnets the current operand status of the set // +optional // +listType=set Members []MemberStatus `json:"members,omitempty"` // Phase is the cluster running phase // +operator-sdk:gen-csv:customresourcedefinitions.statusDescriptors=true // +optional Phase ClusterPhase `json:"phase,omitempty"` }
OperandRequestStatus defines the observed state of OperandRequest +k8s:openapi-gen=true
func (*OperandRequestStatus) DeepCopy ¶
func (in *OperandRequestStatus) DeepCopy() *OperandRequestStatus
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 // +optional InstallMode string `json:"installMode,omitempty"` // The namespace in which operator's operand should be deployed // +optional Namespace string `json:"namespace,omitempty"` // Name of a CatalogSource that defines where and how to find the channel SourceName string `json:"sourceName"` // The Kubernetes namespace where the CatalogSource used is located SourceNamespace string `json:"sourceNamespace"` // The target namespace of the OperatorGroup TargetNamespaces []string `json:"targetNamespaces,omitempty"` // Name of the package that defines the application 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 InstallPlanApproval string `json:"installPlanApproval,omitempty"` }
Operator defines the desired state of Operators
func (*Operator) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operator.
func (*Operator) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorStatus ¶
type OperatorStatus struct { // Phase is the state of operator // +optional Phase OperatorPhase `json:"phase,omitempty"` // RecondileRequests store 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 // reconciliation 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" RegistryInit RegistryPhase = "Initialized" RegistryNone RegistryPhase = "" )
Registry phase
type Request ¶
type Request struct { // Operands deines 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Request.
func (*Request) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretConfigmap ¶
type SecretConfigmap struct { // The secret field names an existing secret, if any, that has been created and holds information that is to be shared with the adopter. // +optional Secret string `json:"secret,omitempty"` // The configmap field identifies a configmap object, if any, that should be shared with the adopter/requestor // +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 // reconciliation when an OperandConfig is deleted. ConfigFinalizer = "finalizer.config.ibm.com" ServiceNotReady ServicePhase = "NotReady" ServiceRunning ServicePhase = "Running" ServiceFailed ServicePhase = "Failed" ServiceInit ServicePhase = "Initialized" ServiceNone ServicePhase = "" )
Service status