Documentation ¶
Index ¶
- Variables
- func CheckExistingScheduledUpgrade(client *ocm.Client, cluster *cmv1.Cluster) (*cmv1.ControlPlaneUpgradePolicy, error)
- func CreateAdminUserIfNotExist(client *ocm.Client, clusterID, username, password string) error
- func CreateUserIfNotExist(client *ocm.Client, clusterID string, group, username string) (*cmv1.User, error)
- func MachinePoolSupportedVersionsRange(controlPlaneVersion string) (*semver.Version, *semver.Version, error)
- func NewOCMClient(ctx context.Context, rosaScope *scope.ROSAControlPlaneScope) (*ocm.Client, error)
- func RawVersionID(version *cmv1.Version) string
- func ScheduleControlPlaneUpgrade(client *ocm.Client, cluster *cmv1.Cluster, version string, nextRun time.Time) (*cmv1.ControlPlaneUpgradePolicy, error)
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
var MinSupportedVersion = semver.MustParse("4.14.0")
Functions ¶
func CheckExistingScheduledUpgrade ¶
func CheckExistingScheduledUpgrade(client *ocm.Client, cluster *cmv1.Cluster) (*cmv1.ControlPlaneUpgradePolicy, error)
CheckExistingScheduledUpgrade checks and returns the current upgrade schedule if any.
func CreateAdminUserIfNotExist ¶
CreateAdminUserIfNotExist creates a new admin user withe username/password in the cluster if username doesn't already exist. the user is granted admin privileges by being added to a special IDP called `cluster-admin` which will be created if it doesn't already exist.
func CreateUserIfNotExist ¶
func CreateUserIfNotExist(client *ocm.Client, clusterID string, group, username string) (*cmv1.User, error)
CreateUserIfNotExist creates a new user with `username` and adds it to the group if it doesn't already exist.
func NewOCMClient ¶
func RawVersionID ¶
RawVersionID returns the rawID from the provided OCM version object.
func ScheduleControlPlaneUpgrade ¶
func ScheduleControlPlaneUpgrade(client *ocm.Client, cluster *cmv1.Cluster, version string, nextRun time.Time) (*cmv1.ControlPlaneUpgradePolicy, error)
ScheduleControlPlaneUpgrade schedules a new control plane upgrade to the specified version at the specified time.
Types ¶
type TokenResponse ¶
func RequestToken ¶
func RequestToken(ctx context.Context, apiURL, username, password string, config *restclient.Config) (*TokenResponse, error)
RequestToken requests an OAuth access token for the specified API server using username/password credentials. returns a TokenResponse which contains the AccessToken and the ExpiresIn duration.