pke

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PKEOnVsphere = "pke-on-vsphere"

Variables

This section is empty.

Functions

func GetVMName

func GetVMName(clusterName, nodePoolName string, number int) string

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error is about a resource not being found

func PipelineTags

func PipelineTags() map[string]string

PipelineTags returns resource tags for vsphere based on the pipeline uuid if available

Types

type ClusterStore

type ClusterStore interface {
	Create(params CreateParams) (PKEOnVsphereCluster, error)
	CreateNodePool(clusterID uint, nodePool NodePool) error
	Delete(clusterID uint) error
	DeleteNodePool(clusterID uint, nodePoolName string) error
	UpdateNodePoolSize(clusterID uint, nodePoolName string, size int) error
	GetByID(clusterID uint) (PKEOnVsphereCluster, error)
	SetStatus(clusterID uint, status, message string) error
	SetActiveWorkflowID(clusterID uint, workflowID string) error
	SetConfigSecretID(clusterID uint, secretID string) error
	SetSSHSecretID(clusterID uint, sshSecretID string) error
}

ClusterStore defines behaviors of PKEOnVsphereCluster persistent storage

type CreateParams

type CreateParams struct {
	Name              string
	OrganizationID    uint
	CreatedBy         uint
	SecretID          string
	StorageSecretID   string
	SSHSecretID       string
	RBAC              bool
	OIDC              bool
	KubernetesVersion string
	NodePools         []NodePool
	HTTPProxy         intPKE.HTTPProxy

	ResourcePoolName    string
	FolderName          string
	DatastoreName       string
	Kubernetes          intPKE.Kubernetes
	LoadBalancerIPRange string
}

type NodePool

type NodePool struct {
	CreatedBy     uint
	Size          int
	VCPU          int
	RAM           int // MiB
	Name          string
	Roles         []string
	AdminUsername string
	TemplateName  string
}

func (NodePool) HasRole

func (np NodePool) HasRole(role pkgPKE.Role) bool

func (NodePool) InstanceType

func (np NodePool) InstanceType() string

type PKEOnVsphereCluster

type PKEOnVsphereCluster struct {
	clusterbase.ClusterBase

	NodePools           []NodePool
	ResourcePool        string
	Datastore           string
	Folder              string
	Kubernetes          intPKE.Kubernetes
	ActiveWorkflowID    string
	HTTPProxy           intPKE.HTTPProxy
	StorageSecretID     string
	LoadBalancerIPRange string
}

func (PKEOnVsphereCluster) HasActiveWorkflow

func (c PKEOnVsphereCluster) HasActiveWorkflow() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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