Documentation ¶
Index ¶
- Constants
- type DefaultOCMInterfaceImpl
- func (*DefaultOCMInterfaceImpl) GetClusterInfoByID(clusterID string) (*cmv1.Cluster, error)
- func (o *DefaultOCMInterfaceImpl) GetManagingCluster(targetClusterID string) (clusterID, clusterName string, isHostedControlPlane bool, err error)
- func (*DefaultOCMInterfaceImpl) GetOCMAccessToken() (*string, error)
- func (*DefaultOCMInterfaceImpl) GetOCMEnvironment() (*cmv1.Environment, error)
- func (*DefaultOCMInterfaceImpl) GetPullSecret() (string, error)
- func (*DefaultOCMInterfaceImpl) GetServiceCluster(targetClusterID string) (clusterID, clusterName string, err error)
- func (*DefaultOCMInterfaceImpl) GetStsSupportJumpRoleARN(ocmConnection *ocmsdk.Connection, clusterID string) (string, error)
- func (*DefaultOCMInterfaceImpl) GetTargetCluster(clusterKey string) (clusterID, clusterName string, err error)
- func (*DefaultOCMInterfaceImpl) IsClusterHibernating(clusterID string) (bool, error)
- func (*DefaultOCMInterfaceImpl) IsProduction() (bool, error)
- type OCMInterface
Constants ¶
const (
ClustersPageSize = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultOCMInterfaceImpl ¶
type DefaultOCMInterfaceImpl struct{}
func (*DefaultOCMInterfaceImpl) GetClusterInfoByID ¶
func (*DefaultOCMInterfaceImpl) GetClusterInfoByID(clusterID string) (*cmv1.Cluster, error)
GetClusterInfoByID calls the OCM to retrieve the cluster info for a given internal cluster id.
func (*DefaultOCMInterfaceImpl) GetManagingCluster ¶
func (o *DefaultOCMInterfaceImpl) GetManagingCluster(targetClusterID string) (clusterID, clusterName string, isHostedControlPlane bool, err error)
GetManagingCluster returns the managing cluster (hive shard or hypershift management cluster) for the given clusterID
func (*DefaultOCMInterfaceImpl) GetOCMAccessToken ¶
func (*DefaultOCMInterfaceImpl) GetOCMAccessToken() (*string, error)
GetOCMAccessToken initiates the OCM connection and returns the access token
func (*DefaultOCMInterfaceImpl) GetOCMEnvironment ¶ added in v0.1.21
func (*DefaultOCMInterfaceImpl) GetOCMEnvironment() (*cmv1.Environment, error)
GetBackplaneURL returns the Backplane API URL based on the OCM env
func (*DefaultOCMInterfaceImpl) GetPullSecret ¶
func (*DefaultOCMInterfaceImpl) GetPullSecret() (string, error)
GetPullSecret returns pull secret from OCM
func (*DefaultOCMInterfaceImpl) GetServiceCluster ¶
func (*DefaultOCMInterfaceImpl) GetServiceCluster(targetClusterID string) (clusterID, clusterName string, err error)
GetServiceCluster gets the service cluster for a given hpyershift hosted cluster
func (*DefaultOCMInterfaceImpl) GetStsSupportJumpRoleARN ¶
func (*DefaultOCMInterfaceImpl) GetStsSupportJumpRoleARN(ocmConnection *ocmsdk.Connection, clusterID string) (string, error)
func (*DefaultOCMInterfaceImpl) GetTargetCluster ¶
func (*DefaultOCMInterfaceImpl) GetTargetCluster(clusterKey string) (clusterID, clusterName string, err error)
GetTargetCluster returns one single cluster based on the search key and survery.
func (*DefaultOCMInterfaceImpl) IsClusterHibernating ¶
func (*DefaultOCMInterfaceImpl) IsClusterHibernating(clusterID string) (bool, error)
IsClusterHibernating returns a boolean to indicate whether the cluster is hibernating
func (*DefaultOCMInterfaceImpl) IsProduction ¶
func (*DefaultOCMInterfaceImpl) IsProduction() (bool, error)
IsProduction checks if OCM is currently in production env
type OCMInterface ¶
type OCMInterface interface { IsClusterHibernating(clusterID string) (bool, error) GetTargetCluster(clusterKey string) (clusterID, clusterName string, err error) GetManagingCluster(clusterKey string) (clusterID, clusterName string, isHostedControlPlane bool, err error) GetOCMAccessToken() (*string, error) GetServiceCluster(clusterKey string) (clusterID, clusterName string, err error) GetClusterInfoByID(clusterID string) (*cmv1.Cluster, error) IsProduction() (bool, error) GetPullSecret() (string, error) GetStsSupportJumpRoleARN(ocmConnection *ocmsdk.Connection, clusterID string) (string, error) GetOCMEnvironment() (*cmv1.Environment, error) }
var DefaultOCMInterface OCMInterface = &DefaultOCMInterfaceImpl{}