oke

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName            = "oke"
	OkeBearerToken          = "OKE_BEARER_TOKEN"
	OkeBearerPrefix         = "Bearer "
	OkeAuthGroup            = "OKE_AUTH_GROUP"
	OkeDefaultCloudAuthId   = "OKE_CLOUD_AUTH_ID"
	OkeClusterEndPoint      = "/api/v1/clusters"
	OkeWorkItemEndPoint     = "/api/v1/workItems"
	OkeKubeConfigPath       = "/kubeconfig"
	OkePoolsPath            = "/pools"
	DefaultK8Version        = "v1.7.4"
	DefaultLbType           = "external"
	DefaultWorkersImageName = "Oracle-Linux-7.4"
	DefaultShape            = "VM.Standard1.1"
	DefaultWorkersPerAD     = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Oke

type Oke struct {
	// contains filtered or unexported fields
}

func NewOke

func NewOke(config *options.ClusterControllerOptions) (*Oke, error)

func (Oke) CreateKubeCluster

func (oke Oke) CreateKubeCluster(newCluster federationv1beta1.Cluster) (*util.ClusterAnnotation, error)

func (Oke) DeleteKubeCluster

func (oke Oke) DeleteKubeCluster(existingCluster federationv1beta1.Cluster) error

func (Oke) ExportKubeConfig

func (oke Oke) ExportKubeConfig(fedCluster federationv1beta1.Cluster) (*clientcmdapi.Config, error)

func (Oke) GetProviderName

func (oke Oke) GetProviderName() string

func (Oke) ScaleKubeCluster

func (oke Oke) ScaleKubeCluster(existingCluster federationv1beta1.Cluster, scaleSize int) (*util.ClusterAnnotation, error)

*

  • Scale Cluster Nodes. A positive scaleSize means it is a scale up and a negative value means it is a scale down.
  • The function returns the target node count and error value.

func (Oke) ValidateKubeCluster

func (oke Oke) ValidateKubeCluster(fedCluster federationv1beta1.Cluster) (*util.ClusterAnnotation, error)

type OkeBmcConfig

type OkeBmcConfig struct {
	Provider     string   `json:"provider,omitempty"`
	K8Version    string   `json:"k8Version,omitempty"`
	LbType       string   `json:"lbType,omitempty"`
	NodeZones    []string `json:"nodeZones,omitempty"`
	ImageName    string   `json:"imageName,omitempty"`
	Shape        string   `json:"shape,omitempty"`
	WorkersPerAD string   `json:"workersPerAD,omitempty"`
	Compartment  string   `json:"compartment,omitempty"`
	SSHPublicKey string   `json:"sshPublicKey,omitempty"`
}

Sample Data: '{ "provider": "oke", "nodeZones": "AD-1,AD-2,AD-3", "shape": "VM.Standard1.1", "workersPerAD": "1", "compartment": "CompartmentID" }'

type OkeCluster

type OkeCluster struct {
	Name    string                `json:"name"`
	Cluster *clientcmdapi.Cluster `json:"cluster"`
}

type OkeContext

type OkeContext struct {
	Name    string                `json:"name"`
	Context *clientcmdapi.Context `json:"context"`
}

type OkeKubeConfig

type OkeKubeConfig struct {
	Kind           string                   `json:"kind,omitempty"`
	APIVersion     string                   `json:"apiVersion,omitempty"`
	Preferences    clientcmdapi.Preferences `json:"preferences"`
	Clusters       []OkeCluster             `json:"clusters"`
	Users          []OkeUser                `json:"users"`
	Contexts       []OkeContext             `json:"contexts"`
	CurrentContext string                   `json:"current-context"`
	Extensions     []runtime.Object         `json:"extensions,omitempty"`
}

type OkeUser

type OkeUser struct {
	Name string                 `json:"name"`
	User *clientcmdapi.AuthInfo `json:"user"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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