variables

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: UPL-1.0 Imports: 21 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"] }}`

	DefaultCNEPath                 = "olcne"
	DefaultImagePullSecretName     = "verrazzano-container-registry"
	DefaultImagePullSecretRegistry = "ghcr.io"
	ImagePullConfigJson            = `` /* 136-byte string literal not displayed */

	DefaultVerrazzanoResource = `` /* 1052-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"`
	Hash       string `json:"-"`
}

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
	Hash             string
	ControlPlaneHash string

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

	// Cluster topology and configuration
	KubernetesVersion       string
	OCNEVersion             string
	SSHPublicKey            string
	ControlPlaneShape       string
	ControlPlaneReplicas    int64
	ControlPlaneOCPUs       int64
	ControlPlaneMemoryGbs   int64
	ControlPlaneVolumeGbs   int64
	NodePVTransitEncryption bool
	RawNodePools            []string
	ApplyYAMLS              []string
	// Parsed node pools
	NodePools []NodePool

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

	PreOCNECommands  []string
	PostOCNECommands []string
	SkipOCNEInstall  bool

	// Addons, images, and registries
	InstallVerrazzano bool
	// Set to true during Updates
	UninstallVerrazzano bool
	VerrazzanoResource  string
	VerrazzanoVersion   string
	VerrazzanoTag       string
	InstallCalico       bool
	InstallCCM          bool
	CNEPath             string
	TigeraTag           string
	ETCDImageTag        string
	CoreDNSImageTag     string

	// Private registry
	PrivateRegistry string

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

	// OCI Credentials
	CloudCredentialId    string
	CompartmentID        string
	Fingerprint          string
	PrivateKey           string
	PrivateKeyPassphrase string
	Region               string
	Tenancy              string
	User                 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 and control plane nodes

func (*Variables) ParseNodePools

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

func (*Variables) SetControlPlaneHash

func (v *Variables) SetControlPlaneHash()

func (*Variables) SetDockerConfigJson added in v0.22.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) SetHashes

func (v *Variables) SetHashes()

func (*Variables) SetNodePoolHash

func (v *Variables) SetNodePoolHash()

func (*Variables) SetQuickCreateVCNInfo added in v0.17.0

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