containerv2

package
v0.0.0-...-37a14a6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Addon

type Addon struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type Alb

type Alb interface {
	CreateAlb(albCreateReq AlbCreateReq, target ClusterTargetHeader) error
	DisableAlb(disableAlbReq AlbConfig, target ClusterTargetHeader) error
	EnableAlb(enableAlbReq AlbConfig, target ClusterTargetHeader) error
	GetAlb(albid string, target ClusterTargetHeader) (AlbConfig, error)
	ListClusterAlbs(clusterNameOrID string, target ClusterTargetHeader) ([]AlbConfig, error)
}

Clusters interface

type AlbConfig

type AlbConfig struct {
	AlbBuild             string `json:"albBuild"`
	AlbID                string `json:"albID"`
	AlbType              string `json:"albType"`
	AuthBuild            string `json:"authBuild"`
	Cluster              string `json:"cluster"`
	CreatedDate          string `json:"createdDate"`
	DisableDeployment    bool   `json:"disableDeployment"`
	Enable               bool   `json:"enable"`
	LoadBalancerHostname string `json:"loadBalancerHostname"`
	Name                 string `json:"name"`
	NumOfInstances       string `json:"numOfInstances"`
	Resize               bool   `json:"resize"`
	State                string `json:"state"`
	Status               string `json:"status"`
	ZoneAlb              string `json:"zone"`
}

type AlbCreateReq

type AlbCreateReq struct {
	Cluster         string `json:"cluster"`
	EnableByDefault bool   `json:"enableByDefault"`
	Type            string `json:"type"`
	ZoneAlb         string `json:"zone"`
}

type ClusterALB

type ClusterALB struct {
	ID                      string      `json:"id"`
	Region                  string      `json:"region"`
	DataCenter              string      `json:"dataCenter"`
	IsPaid                  bool        `json:"isPaid"`
	PublicIngressHostname   string      `json:"publicIngressHostname"`
	PublicIngressSecretName string      `json:"publicIngressSecretName"`
	ALBs                    []AlbConfig `json:"alb"`
}

type ClusterCreateRequest

type ClusterCreateRequest struct {
	DisablePublicServiceEndpoint bool             `json:"disablePublicServiceEndpoint"`
	KubeVersion                  string           `json:"kubeVersion" description:"kubeversion of cluster"`
	Billing                      string           `json:"billing,omitempty"`
	PodSubnet                    string           `json:"podSubnet"`
	Provider                     string           `json:"provider"`
	ServiceSubnet                string           `json:"serviceSubnet"`
	Name                         string           `json:"name" binding:"required" description:"The cluster's name"`
	DefaultWorkerPoolEntitlement string           `json:"defaultWorkerPoolEntitlement"`
	CosInstanceCRN               string           `json:"cosInstanceCRN"`
	WorkerPools                  WorkerPoolConfig `json:"workerPool"`
}

ClusterCreateRequest ...

type ClusterCreateResponse

type ClusterCreateResponse struct {
	ID string `json:"clusterID"`
}

ClusterCreateResponse ...

type ClusterInfo

type ClusterInfo struct {
	CreatedDate       string        `json:"createdDate"`
	DataCenter        string        `json:"dataCenter"`
	ID                string        `json:"id"`
	Location          string        `json:"location"`
	Entitlement       string        `json:"entitlement"`
	MasterKubeVersion string        `json:"masterKubeVersion"`
	Name              string        `json:"name"`
	Region            string        `json:"region"`
	ResourceGroupID   string        `json:"resourceGroup"`
	State             string        `json:"state"`
	IsPaid            bool          `json:"isPaid"`
	Addons            []Addon       `json:"addons"`
	OwnerEmail        string        `json:"ownerEmail"`
	Type              string        `json:"type"`
	TargetVersion     string        `json:"targetVersion"`
	ServiceSubnet     string        `json:"serviceSubnet"`
	ResourceGroupName string        `json:"resourceGroupName"`
	Provider          string        `json:"provider"`
	PodSubnet         string        `json:"podSubnet"`
	MultiAzCapable    bool          `json:"multiAzCapable"`
	APIUser           string        `json:"apiUser"`
	MasterURL         string        `json:"masterURL"`
	DisableAutoUpdate bool          `json:"disableAutoUpdate"`
	WorkerZones       []string      `json:"workerZones"`
	Vpcs              []string      `json:"vpcs"`
	CRN               string        `json:"crn"`
	VersionEOS        string        `json:"versionEOS"`
	ServiceEndpoints  Endpoints     `json:"serviceEndpoints"`
	Lifecycle         LifeCycleInfo `json:"lifecycle"`
	WorkerCount       int           `json:"workerCount"`
	Ingress           IngresInfo    `json:"ingress"`
	Features          Feat          `json:"features"`
}

ClusterInfo ...

type ClusterTargetHeader

type ClusterTargetHeader struct {
	AccountID     string
	ResourceGroup string
}

ClusterTargetHeader ...

func (ClusterTargetHeader) ToMap

func (c ClusterTargetHeader) ToMap() map[string]string

ToMap ...

type Clusters

type Clusters interface {
	Create(params ClusterCreateRequest, target ClusterTargetHeader) (ClusterCreateResponse, error)
	List(target ClusterTargetHeader) ([]ClusterInfo, error)
	Delete(name string, target ClusterTargetHeader) error
	GetCluster(name string, target ClusterTargetHeader) (*ClusterInfo, error)
}

Clusters interface

type ContainerServiceAPI

type ContainerServiceAPI interface {
	Clusters() Clusters
	WorkerPools() WorkerPool
	Albs() Alb
	Workers() Workers
}

ContainerServiceAPI is the Aramda K8s client ...

func New

New ...

type Endpoints

type Endpoints struct {
	PrivateServiceEndpointEnabled bool   `json:"privateServiceEndpointEnabled"`
	PrivateServiceEndpointURL     string `json:"privateServiceEndpointURL"`
	PublicServiceEndpointEnabled  bool   `json:"publicServiceEndpointEnabled"`
	PublicServiceEndpointURL      string `json:"publicServiceEndpointURL"`
}

type Feat

type Feat struct {
	KeyProtectEnabled bool `json:"keyProtectEnabled"`
	PullSecretApplied bool `json:"pullSecretApplied"`
}

type GetWorkerPoolResponse

type GetWorkerPoolResponse struct {
	Flavor      string            `json:"flavor"`
	ID          string            `json:"id"`
	Isolation   string            `json:"isolation"`
	Labels      map[string]string `json:"labels,omitempty"`
	Lifecycle   `json:"lifecycle"`
	VpcID       string     `json:"vpcID"`
	WorkerCount int        `json:"workerCount"`
	PoolName    string     `json:"poolName"`
	Provider    string     `json:"provider"`
	Zones       []ZoneResp `json:"zones"`
}

type HealthStatus

type HealthStatus struct {
	Message string `json:"message"`
	State   string `json:"state"`
}

type IngresInfo

type IngresInfo struct {
	HostName   string `json:"hostname"`
	SecretName string `json:"secretName"`
}

type KubeDetails

type KubeDetails struct {
	Actual    string `json:"actual"`
	Desired   string `json:"desired"`
	Eos       string `json:"eos"`
	MasterEOS string `json:"masterEos"`
	Target    string `json:"target"`
}

type LifeCycleInfo

type LifeCycleInfo struct {
	ModifiedDate             string `json:"modifiedDate"`
	MasterStatus             string `json:"masterStatus"`
	MasterStatusModifiedDate string `json:"masterStatusModifiedDate"`
	MasterHealth             string `json:"masterHealth"`
	MasterState              string `json:"masterState"`
}

type Lifecycle

type Lifecycle struct {
	ActualState  string `json:"actualState"`
	DesiredState string `json:"desiredState"`
}

type Network

type Network struct {
	Cidr      string `json:"cidr"`
	IpAddress string `json:"ipAddress"`
	Primary   bool   `json:"primary"`
	SubnetID  string `json:"subnetID"`
}

type ReplaceWorker

type ReplaceWorker struct {
	ClusterIDOrName string `json:"cluster"`
	Update          bool   `json:"update"`
	WorkerID        string `json:"workerID"`
}

type Subnet

type Subnet struct {
	ID      string `json:"id"`
	Primary bool   `json:"primary"`
}

type Worker

type Worker struct {
	Billing           string `json:"billing,omitempty"`
	Flavor            string `json:"flavor"`
	ID                string `json:"id"`
	KubeVersion       KubeDetails
	Location          string          `json:"location"`
	PoolID            string          `json:"poolid"`
	PoolName          string          `json:"poolName"`
	LifeCycle         WorkerLifeCycle `json:"lifecycle"`
	Health            HealthStatus    `json:"health"`
	NetworkInterfaces []Network       `json:"networkInterfaces"`
}

Worker ...

type WorkerLifeCycle

type WorkerLifeCycle struct {
	ReasonForDelete    string `json:"reasonForDelete"`
	ActualState        string `json:"actualState"`
	DesiredState       string `json:"desiredState"`
	Message            string `json:"message"`
	MessageDate        string `json:"messageDate"`
	MessageDetails     string `json:"messageDetails"`
	MessageDetailsDate string `json:"messageDetailsDate"`
	PendingOperation   string `json:"pendingOperation"`
}

type WorkerPool

type WorkerPool interface {
	CreateWorkerPool(workerPoolReq WorkerPoolRequest, target ClusterTargetHeader) (WorkerPoolResponse, error)
	GetWorkerPool(clusterNameOrID, workerPoolNameOrID string, target ClusterTargetHeader) (GetWorkerPoolResponse, error)
	ListWorkerPools(clusterNameOrID string, target ClusterTargetHeader) ([]GetWorkerPoolResponse, error)
	CreateWorkerPoolZone(workerPoolZone WorkerPoolZone, target ClusterTargetHeader) error
	DeleteWorkerPool(clusterNameOrID string, workerPoolNameOrID string, target ClusterTargetHeader) error
}

Workers ...

type WorkerPoolConfig

type WorkerPoolConfig struct {
	DiskEncryption bool              `json:"diskEncryption,omitempty"`
	Entitlement    string            `json:"entitlement"`
	Flavor         string            `json:"flavor"`
	Isolation      string            `json:"isolation,omitempty"`
	Labels         map[string]string `json:"labels,omitempty"`
	Name           string            `json:"name" binding:"required" description:"The workerpool's name"`
	VpcID          string            `json:"vpcID"`
	WorkerCount    int               `json:"workerCount"`
	Zones          []Zone            `json:"zones"`
}

type WorkerPoolRequest

type WorkerPoolRequest struct {
	Cluster string `json:"cluster" description:"cluster name where the worker pool will be created"`
	WorkerPoolConfig
}

WorkerPoolRequest provides worker pool data swagger:model

type WorkerPoolResponse

type WorkerPoolResponse struct {
	ID string `json:"workerPoolID"`
}

WorkerPoolResponse provides worker pool data swagger:model

type WorkerPoolZone

type WorkerPoolZone struct {
	Cluster      string `json:"cluster"`
	Id           string `json:"id"`
	SubnetID     string `json:"subnetID"`
	WorkerPoolID string `json:"workerPoolID"`
}

type Workers

type Workers interface {
	ListByWorkerPool(clusterIDOrName, workerPoolIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
	ListWorkers(clusterIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
	Get(clusterIDOrName, workerID string, target ClusterTargetHeader) (Worker, error)
	ReplaceWokerNode(clusterIDOrName, workerID string, target ClusterTargetHeader) (string, error)
}

Workers ...

type Zone

type Zone struct {
	ID       string `json:"id,omitempty" description:"The id"`
	SubnetID string `json:"subnetID,omitempty"`
}

type ZoneResp

type ZoneResp struct {
	ID          string   `json:"id"`
	WorkerCount int      `json:"workerCount"`
	Subnets     []Subnet `json:"subnets"`
}

Jump to

Keyboard shortcuts

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