rosa

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func CreateAdminUserIfNotExist(client *ocm.Client, clusterID, username, password string) error

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 MachinePoolSupportedVersionsRange

func MachinePoolSupportedVersionsRange(controlPlaneVersion string) (*semver.Version, *semver.Version, error)

func NewOCMClient

func NewOCMClient(ctx context.Context, rosaScope *scope.ROSAControlPlaneScope) (*ocm.Client, error)

func RawVersionID

func RawVersionID(version *cmv1.Version) string

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

type TokenResponse struct {
	AccessToken string
	ExpiresIn   time.Duration
}

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.

Jump to

Keyboard shortcuts

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