cluster

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

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

	NetworkTypeSDN = "OpenShiftSDN"
	NetworkTypeOVN = "OVNKubernetes"

	AuthenticationWif = "Workload Identity Federation (WIF)"
	AuthenticationKey = "Service account"
)

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 GetClusterLimitedSupportReasons added in v0.1.65

func GetClusterLimitedSupportReasons(connection *sdk.Connection, clusterID string) ([]*lmtSprReasonItem, 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,
	gcpMarketplaceEnabled string,
	additionalFilters 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 PrintClusterWarnings added in v0.1.73

func PrintClusterWarnings(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 UpdateDeleteProtection added in v0.1.73

func UpdateDeleteProtection(client *cmv1.ClustersClient, clusterID string, enable bool) 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 ClusterWideProxy added in v0.1.61

type ClusterWideProxy struct {
	Enabled                   bool
	HTTPProxy                 *string
	HTTPSProxy                *string
	NoProxy                   *string
	AdditionalTrustBundleFile *string
	AdditionalTrustBundle     *string
}

type DefaultIngressSpec added in v0.1.68

type DefaultIngressSpec struct {
	RouteSelectors           map[string]string
	ExcludedNamespaces       []string
	WildcardPolicy           string
	NamespaceOwnershipPolicy string
}

func NewDefaultIngressSpec added in v0.1.68

func NewDefaultIngressSpec() DefaultIngressSpec

type ExistingVPC added in v0.1.61

type ExistingVPC struct {
	Enabled                                bool
	SubnetIDs                              string
	AvailabilityZones                      []string
	VPCName                                string
	VPCProjectID                           string
	ControlPlaneSubnet                     string
	ComputeSubnet                          string
	AdditionalComputeSecurityGroupIds      []string
	AdditionalInfraSecurityGroupIds        []string
	AdditionalControlPlaneSecurityGroupIds []string
}

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 GcpAuthentication added in v0.1.75

type GcpAuthentication struct {
	Type string
	Id   string
}

type GcpPrivateSvcConnect added in v0.1.76

type GcpPrivateSvcConnect struct {
	SvcAttachmentSubnet string
}

type GcpSecurity added in v0.1.72

type GcpSecurity struct {
	SecureBoot bool `json:"secure_boot,omitempty"`
}

type Spec added in v0.1.42

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

	// Scaling config
	ComputeMachineType string
	ComputeNodes       int
	Autoscaling        Autoscaling

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

	// Properties
	CustomProperties map[string]string

	// Default Ingress Attributes
	DefaultIngress DefaultIngressSpec

	// Gcp-specific settings
	GcpSecurity GcpSecurity

	// GCP Authentication settings
	GcpAuthentication GcpAuthentication

	// GCP PrivateServiceConnect settings
	GcpPrivateSvcConnect GcpPrivateSvcConnect
}

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