Documentation ¶
Index ¶
- func Add(mgr manager.Manager) error
- func ContainsFinalizer(instance *ibmcloudv1alpha1.Service) bool
- func DeleteFinalizer(instance *ibmcloudv1alpha1.Service) []string
- func GetServiceInstance(instances []models.ServiceInstance, ID string) (models.ServiceInstance, error)
- func GetServiceInstanceFromObj(scontext rcontext.Context, obj runtime.Object) (models.ServiceInstance, error)
- func GetServiceInstanceFromObjCF(scontext rcontext.Context, obj runtime.Object) (*mccpv2.ServiceInstance, error)
- type IBMCloudInfo
- type ReconcileService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new Service Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started. USER ACTION REQUIRED: update cmd/manager/main.go to call this ibmcloud.Add(mgr) to install this Controller
func ContainsFinalizer ¶
func ContainsFinalizer(instance *ibmcloudv1alpha1.Service) bool
ContainsFinalizer checks if the instance contains service finalizer
func DeleteFinalizer ¶
func DeleteFinalizer(instance *ibmcloudv1alpha1.Service) []string
DeleteFinalizer delete service finalizer
func GetServiceInstance ¶
func GetServiceInstance(instances []models.ServiceInstance, ID string) (models.ServiceInstance, error)
GetServiceInstance gets the instance with given ID
func GetServiceInstanceFromObj ¶ added in v0.1.2
func GetServiceInstanceFromObj(scontext rcontext.Context, obj runtime.Object) (models.ServiceInstance, error)
GetServiceInstanceFromObj from bx given context and resource
func GetServiceInstanceFromObjCF ¶ added in v0.1.2
func GetServiceInstanceFromObjCF(scontext rcontext.Context, obj runtime.Object) (*mccpv2.ServiceInstance, error)
GetServiceInstanceFromObjCF from bx given context and resource in a CF context
Types ¶
type IBMCloudInfo ¶
type IBMCloudInfo struct { Session *session.Session BXClient mccpv2.MccpServiceAPI ResourceClient controller.ResourceControllerAPI CatalogClient catalog.ResourceCatalogAPI Account *accountv2.Account Org *mccpv2.Organization Region *models.Region Space *mccpv2.Space ResourceGroupID string ResourceLocation string InstanceName string InstanceID string InstanceCRN crn.CRN InstanceAlias string ServiceClass string ServiceClassType string ServicePlan string BxPlan *mccpv2.ServicePlan ServicePlanID string TargetCrn string Token string Context icv1.ResourceContext }
IBMCloudInfo kept all the needed client API resource and instance Info
func GetIBMCloudInfo ¶
func GetIBMCloudInfo(r client.Client, instance *ibmcloudv1alpha1.Service) (*IBMCloudInfo, error)
GetIBMCloudInfo initializes sessions and sets up a struct to faciliate making calls to bx
type ReconcileService ¶
ReconcileService reconciles a Service object
func (*ReconcileService) Reconcile ¶
Reconcile reads that state of the cluster for a Service object and makes changes based on the state read and what is in the Service.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=services/status,verbs=get;list;watch;create;update;patch;delete