variables

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: UPL-1.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOCICPUs                 = 2
	DefaultMemoryGbs               = 16
	DefaultVolumeGbs               = 100
	DefaultNodePVTransitEncryption = true
	DefaultVMShape                 = "VM.Standard.E4.Flex"
	ProviderId                     = `oci://{{ ds["id"] }}`
)
View Source
const (
	ImagePullConfigJson = `` /* 136-byte string literal not displayed */

	DefaultVerrazzanoResource = `` /* 946-byte string literal not displayed */

)

Variables

View Source
var OCIClientGetter = func(v *Variables) (oci.Client, error) {
	return oci.NewClient(v.GetConfigurationProvider())
}

Functions

func SetupOCIAuth

func SetupOCIAuth(ctx context.Context, client kubernetes.Interface, v *Variables) error

SetupOCIAuth dynamically loads OCI authentication

Types

type NodePool

type NodePool struct {
	Name       string `json:"name"`
	Replicas   int64  `json:"replicas"`
	Memory     int64  `json:"memory"`
	Ocpus      int64  `json:"ocpus"`
	VolumeSize int64  `json:"volumeSize"`
	Shape      string `json:"shape"`
	Version    string `json:"version"`
}

type Subnet

type Subnet struct {
	Id   string
	Role string
	Name string
	CIDR string
	Type string
}

type Variables

type Variables struct {
	Name        string
	DisplayName string
	Namespace   string

	QuickCreateVCN     bool
	VCNID              string
	WorkerNodeSubnet   string
	ControlPlaneSubnet string
	LoadBalancerSubnet string
	PodSubnet          string
	// Parsed subnets
	Subnets     []Subnet `json:"subnets,omitempty"`
	PodCIDR     string
	ClusterCIDR string

	// Cluster topology and configuration
	KubernetesVersion string
	CNIType           string
	SSHPublicKey      string
	RawNodePools      []string
	ApplyYAMLS        []string
	// Parsed node pools
	NodePools []NodePool

	// ImageID is looked up by display name
	ImageDisplayName string
	ImageID          string
	ActualImage      string

	// Private registry
	PrivateRegistry string

	// Image pull secret
	CreateImagePullSecrets  bool
	DeleteImagePullSecrets  bool
	ImagePullSecretUsername string
	ImagePullSecretPassword string
	ImagePullSecretEmail    string
	DockerConfigJson        string

	// OCI Credentials
	CloudCredentialId    string
	CompartmentID        string
	Fingerprint          string
	PrivateKey           string
	PrivateKeyPassphrase string
	Region               string
	Tenancy              string
	User                 string

	// Verrazzano settings
	InstallVerrazzano bool
	// Set to true during Updates
	UninstallVerrazzano bool
	VerrazzanoResource  string
	VerrazzanoVersion   string
	VerrazzanoTag       string

	// Supplied for templating
	ProviderId string
}

Variables are parameters for cluster lifecycle operations

func NewFromOptions

func NewFromOptions(ctx context.Context, driverOptions *types.DriverOptions) (*Variables, error)

NewFromOptions creates a new Variables given *types.DriverOptions

func (*Variables) GetCAPIClusterKubeConfig

func (v *Variables) GetCAPIClusterKubeConfig(ctx context.Context) (*store.KubeConfig, error)

GetCAPIClusterKubeConfig fetches the cluster's kubeconfig

func (*Variables) GetConfigurationProvider

func (v *Variables) GetConfigurationProvider() common.ConfigurationProvider

GetConfigurationProvider creates a new configuration provider from Variables

func (*Variables) IsSingleNodeCluster

func (v *Variables) IsSingleNodeCluster() bool

func (*Variables) NodeCount

func (v *Variables) NodeCount() (*types.NodeCount, error)

NodeCount is the sum of worker nodes

func (*Variables) ParseNodePools

func (v *Variables) ParseNodePools() ([]NodePool, error)

func (*Variables) SetDockerConfigJson added in v0.3.0

func (v *Variables) SetDockerConfigJson() error

SetDockerConfigJson sets the docker configuration payload for the image pull secret

func (*Variables) SetDynamicValues

func (v *Variables) SetDynamicValues(ctx context.Context) error

SetDynamicValues sets dynamic values

func (*Variables) SetQuickCreateVCNInfo

func (v *Variables) SetQuickCreateVCNInfo(ctx context.Context, di dynamic.Interface) error

func (*Variables) SetUpdateValues

func (v *Variables) SetUpdateValues(ctx context.Context, vNew *Variables) error

SetUpdateValues are the values potentially changed during an update operation

func (*Variables) Version

func (v *Variables) Version() *types.KubernetesVersion

Version is the cluster Kubernetes version

Jump to

Keyboard shortcuts

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