cluster

package
v0.1.55 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProviderAWS = "aws"
	ProviderGCP = "gcp"
)

Variables

This section is empty.

Functions

func CreateCluster added in v0.1.42

func CreateCluster(cmv1Client *cmv1.Client, config Spec, dryRun bool) (*cmv1.Cluster, error)

func DropOpenshiftVPrefix added in v0.1.46

func DropOpenshiftVPrefix(v string) string

func EnsureOpenshiftVPrefix added in v0.1.46

func EnsureOpenshiftVPrefix(v string) string

func GetAvailableUpgrades added in v0.1.45

func GetAvailableUpgrades(
	client *cmv1.Client, versionID string, productID string) ([]string, error)

func GetCluster added in v0.1.39

func GetCluster(connection *sdk.Connection, key string) (cluster *cmv1.Cluster, err error)

func GetClusterOauthURL added in v0.1.39

func GetClusterOauthURL(cluster *cmv1.Cluster) string

func GetEnabledVersions added in v0.1.46

func GetEnabledVersions(client *cmv1.Client, channelGroup string) (
	versions []string, defaultVersion string, err error)

GetEnabledVersions returns the versions with enabled=true, and the one that has default=true. The returned strings are the IDs without "openshift-v" prefix (e.g. "4.6.0-rc.4-candidate") sorted in approximate SemVer order (handling of text parts is somewhat arbitrary).

func GetGroups added in v0.1.39

func GetGroups(client *cmv1.ClustersClient, clusterID string) ([]*cmv1.Group, error)

func GetIdentityProviders added in v0.1.39

func GetIdentityProviders(client *cmv1.ClustersClient, clusterID string) ([]*cmv1.IdentityProvider, error)

func GetIngresses added in v0.1.39

func GetIngresses(client *cmv1.ClustersClient, clusterID string) ([]*cmv1.Ingress, error)

func GetMachinePools added in v0.1.44

func GetMachinePools(client *cmv1.ClustersClient, clusterID string) ([]*cmv1.MachinePool, error)

func GetUpgradePolicies added in v0.1.45

func GetUpgradePolicies(client *cmv1.ClustersClient, clusterID string) ([]*cmv1.UpgradePolicy, error)

func GetVersionID added in v0.1.45

func GetVersionID(cluster *cmv1.Cluster) string

func IsValidClusterKey added in v0.1.39

func IsValidClusterKey(clusterKey string) bool

func PrintClusterDescription added in v0.1.47

func PrintClusterDescription(connection *sdk.Connection, cluster *cmv1.Cluster) error

func UpdateCluster added in v0.1.43

func UpdateCluster(client *cmv1.ClustersClient, clusterID string, config Spec) error

func ValidateClusterExpiration added in v0.1.43

func ValidateClusterExpiration(
	expirationTime string,
	expirationDuration time.Duration,
) (expiration time.Time, err error)

Types

type AWSCredentials added in v0.1.42

type AWSCredentials struct {
	AccountID       string
	AccessKeyID     string
	SecretAccessKey string
}

type AddOnItem added in v0.1.40

type AddOnItem struct {
	ID        string
	Name      string
	State     string
	Available bool
}

func GetClusterAddOns added in v0.1.40

func GetClusterAddOns(connection *sdk.Connection, clusterID string) ([]*AddOnItem, error)

type Autoscaling added in v0.1.47

type Autoscaling struct {
	Enabled     bool
	MinReplicas int
	MaxReplicas int
}

type CCS added in v0.1.45

type CCS struct {
	Enabled bool
	AWS     AWSCredentials
	GCP     GCPCredentials
}

type GCPCredentials added in v0.1.46

type GCPCredentials struct {
	Type                    string `json:"type"`
	ProjectID               string `json:"project_id"`
	PrivateKeyID            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientID                string `json:"client_id"`
	AuthURI                 string `json:"auth_uri"`
	TokenURI                string `json:"token_uri"`
	AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
	ClientX509CertURL       string `json:"client_x509_cert_url"`
}

type Spec added in v0.1.42

type Spec struct {
	// Basic configs
	Name           string
	Region         string
	Provider       string
	CCS            CCS
	Flavour        string
	MultiAZ        bool
	Version        string
	ChannelGroup   string
	Expiration     time.Time
	EtcdEncryption bool

	// Scaling config
	ComputeMachineType string
	ComputeNodes       int
	Autoscaling        Autoscaling

	// Network config
	MachineCIDR net.IPNet
	ServiceCIDR net.IPNet
	PodCIDR     net.IPNet
	HostPrefix  int
	Private     *bool

	// Properties
	CustomProperties map[string]string
}

Spec is the configuration for a cluster spec.

Jump to

Keyboard shortcuts

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