containerv1

package
v0.0.0-...-a3be206 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 25 Imported by: 47

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

View Source
const (
	// IAMHTTPtimeout -
	IAMHTTPtimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func ComputeClusterConfigDir

func ComputeClusterConfigDir(dir, name string, admin bool) string

ComputeClusterConfigDir ...

func GenerateCalicoConfig

func GenerateCalicoConfig(desiredConfigPath string) (string, error)

GenerateCalicoConfig ...

func NormalizeName

func NormalizeName(name string) (string, error)

NormalizeName -

func PanicCatch

func PanicCatch(r interface{}) error

PanicCatch - Catch panic and give error

Types

type ALBConfig

type ALBConfig struct {
	ALBID             string `json:"albID" description:"The ALB id"`
	ClusterID         string `json:"clusterID"`
	Name              string `json:"name"`
	ALBType           string `json:"albType"`
	Enable            bool   `json:"enable" description:"Enable (true) or disable(false) ALB"`
	State             string `json:"state"`
	CreatedDate       string `json:"createdDate"`
	NumOfInstances    string `json:"numOfInstances" description:"Desired number of ALB replicas"`
	Resize            bool   `json:"resize" description:"Indicate whether resizing should be done"`
	ALBIP             string `json:"albip" description:"BYOIP VIP to use for ALB. Currently supported only for private ALB"`
	Zone              string `json:"zone" description:"Zone to use for adding ALB. This is indicative of the AZ in which ALB will be deployed"`
	DisableDeployment bool   `json:"disableDeployment" description:"Indicate whether to disable deployment only on disable alb"`
	VlanID            string `json:"vlanID" description:"The VLAN ID. This VLAN must match the ALB 'type' and must be in the same 'zone' as the ALB"`
	ALBBuild          string `json:"albBuild" description:"The ALB image version"`
	Status            string `json:"status" description:"Current status of the ALB"`
}

ALBConfig config for alb configuration

type ALBSecretConfig

type ALBSecretConfig struct {
	SecretName          string `json:"secretName" description:"Name of the ALB secret"`
	ClusterID           string `json:"clusterID"`
	DomainName          string `json:"domainName" description:"Domain name of the certficate"`
	CloudCertInstanceID string `json:"cloudCertInstanceID" description:"Cloud Cert instance ID from which certficate is downloaded"`
	ClusterCrn          string `json:"clusterCrn"`
	CertCrn             string `json:"certCrn" description:"Unique CRN of the certficate which can be located in cloud cert instance"`
	IssuerName          string `json:"issuerName" description:"Issuer name of the certficate"`
	ExpiresOn           string `json:"expiresOn" description:"Expiry date of the certficate"`
	State               string `json:"state" description:"State of ALB secret"`
}

ALBSecretConfig config for alb-secret configuration

type ALBSecretsPerCRN

type ALBSecretsPerCRN struct {
	ALBSecrets []string `json:"albsecrets" description:"ALB secrets correponding to a CRN"`
}

ALBSecretsPerCRN ...

type ALBUpdatePolicy

type ALBUpdatePolicy struct {
	AutoUpdate    bool `json:"autoUpdate" binding:"required"`
	LatestVersion bool `json:"latestVersion"`
}

ALBUpdatePolicy represents the body for interacting with the update ALB APIs.

type AddOn

type AddOn struct {
	AllowedUpgradeVersion  []string    `json:"allowed_upgrade_versions,omitempty"`
	Deprecated             bool        `json:"deprecated"`
	HealthState            string      `json:"healthState,omitempty"`
	HealthStatus           string      `json:"healthStatus,omitempty"`
	MinKubeVersion         string      `json:"minKubeVersion,omitempty"`
	MinOCPVersion          string      `json:"minOCPVersion,omitempty"`
	Name                   string      `json:"name"`
	Options                interface{} `json:"options,omitempty"`
	SupportedKubeRange     string      `json:"supportedKubeRange,omitempty"`
	TargetVersion          string      `json:"targetVersion,omitempty"`
	Version                string      `json:"version,omitempty"`
	VlanSpanningRequired   bool        `json:"vlan_spanning_required"`
	InstallOptionsTemplate interface{} `json:"installOptionsTemplate,omitempty"`
}

AddOn ...

type AddOns

type AddOns interface {
	GetAddons(clusterName string, target ClusterTargetHeader) ([]AddOn, error)
	ConfigureAddons(clusterName string, params *ConfigureAddOns, target ClusterTargetHeader) (AddOnsResponse, error)
	ListAddons() ([]AddOn, error)
}

AddOns ...

type AddOnsResponse

type AddOnsResponse struct {
	MissingDeps    interface{} `json:"missingDeps,omitempty"`
	OrphanedAddons interface{} `json:"orphanedAddons,omitempty"`
}

AddOnsResponse ...

type Addon

type Addon struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

Addon ...

type AlbCreateResp

type AlbCreateResp struct {
	Alb     string `json:"alb"`
	Cluster string `json:"cluster"`
}

AlbCreateResp used to send back the albid on a create request

type Albs

type Albs interface {
	ChangeALBUpdatePolicy(clusterID string, config ALBUpdatePolicy, target ClusterTargetHeader) error
	ConfigureALB(albID string, config ALBConfig, disableDeployment bool, target ClusterTargetHeader) error
	CreateALB(alb CreateALB, clusterID string, target ClusterTargetHeader) (AlbCreateResp, error)
	DeployALBCert(config ALBSecretConfig, target ClusterTargetHeader) error
	DisableALB(albID string, target ClusterTargetHeader) error
	EnableALB(albID string, config ALBConfig, target ClusterTargetHeader) error
	GetALB(albID string, target ClusterTargetHeader) (ALBConfig, error)
	GetALBTypes(target ClusterTargetHeader) ([]string, error)
	GetALBUpdatePolicy(clusterID string, target ClusterTargetHeader) (ALBUpdatePolicy, error)
	GetClusterALBCertByCertCRN(clusterID string, certCRN string, target ClusterTargetHeader) (ALBSecretConfig, error)
	GetClusterALBCertBySecretName(clusterID string, secretName string, target ClusterTargetHeader) (ALBSecretConfig, error)
	ListALBCerts(clusterID string, target ClusterTargetHeader) ([]ALBSecretConfig, error)
	ListClusterALBs(clusterNameOrID string, target ClusterTargetHeader) ([]ALBConfig, error)
	RemoveALB(albID string, target ClusterTargetHeader) error
	RemoveALBCertByCertCRN(clusterID string, certCRN string, target ClusterTargetHeader) error
	RemoveALBCertBySecretName(clusterID string, secretName string, target ClusterTargetHeader) error
	UpdateALBCert(config ALBSecretConfig, target ClusterTargetHeader) error
	UpdateALBs(clusterID string, target ClusterTargetHeader) error
}

Clusters interface

type ApiKeyInfo

type ApiKeyInfo struct {
	ID    string
	Name  string
	Email string
}

type Apikeys

type Apikeys interface {
	GetApiKeyInfo(clusterID string, target ClusterTargetHeader) (ApiKeyInfo, error)
	ResetApiKey(target ClusterTargetHeader) error
}

Apikeys ...

type BoundService

type BoundService struct {
	ServiceName    string `json:"servicename"`
	ServiceID      string `json:"serviceid"`
	ServiceKeyName string `json:"servicekeyname"`
	Namespace      string `json:"namespace"`
}

BoundService ...

type BoundServices

type BoundServices []BoundService

BoundServices ..

type ClusterALB

type ClusterALB struct {
	ID                string      `json:"id"`
	Region            string      `json:"region"`
	DataCenter        string      `json:"dataCenter"`
	IsPaid            bool        `json:"isPaid"`
	IngressHostname   string      `json:"ingressHostname"`
	IngressSecretName string      `json:"ingressSecretName"`
	ALBs              []ALBConfig `json:"alb"`
}

type ClusterALBSecret

type ClusterALBSecret struct {
	ID         string            `json:"id"`
	Region     string            `json:"region"`
	DataCenter string            `json:"dataCenter"`
	IsPaid     bool              `json:"isPaid"`
	ALBSecrets []ALBSecretConfig `json:"albSecrets" description:"All the ALB secrets created in this cluster"`
}

ClusterALBSecret albsecret related information for cluster

type ClusterCreateRequest

type ClusterCreateRequest struct {
	GatewayEnabled               bool   `json:"GatewayEnabled" description:"true for gateway enabled cluster"`
	Datacenter                   string `json:"dataCenter" description:"The worker's data center"`
	OperatingSystem              string `json:"operatingSystem,omitempty"`
	Isolation                    string `json:"isolation" description:"Can be 'public' or 'private'"`
	MachineType                  string `json:"machineType" description:"The worker's machine type"`
	Name                         string `json:"name" binding:"required" description:"The cluster's name"`
	PrivateVlan                  string `json:"privateVlan" description:"The worker's private vlan"`
	PublicVlan                   string `json:"publicVlan" description:"The worker's public vlan"`
	WorkerNum                    int    `json:"workerNum,omitempty" binding:"required" description:"The number of workers"`
	NoSubnet                     bool   `json:"noSubnet" description:"Indicate whether portable subnet should be ordered for user"`
	MasterVersion                string `json:"masterVersion,omitempty" description:"Desired version of the requested master"`
	Prefix                       string `json:"prefix,omitempty" description:"hostname prefix for new workers"`
	DiskEncryption               bool   `json:"diskEncryption" description:"disable encryption on a worker"`
	PrivateEndpointEnabled       bool   `json:"privateSeviceEndpoint"`
	PublicEndpointEnabled        bool   `json:"publicServiceEndpoint"`
	DisableAutoUpdate            bool   `json:"disableAutoUpdate"`
	DefaultWorkerPoolName        string `json:"defaultWorkerPoolName" description:"The name of default workerpool"`
	PodSubnet                    string `json:"podSubnet"`
	ServiceSubnet                string `json:"serviceSubnet"`
	DefaultWorkerPoolEntitlement string `json:"defaultWorkerPoolEntitlement" description:"Additional licence/entitlement for the default worker pool"`
}

ClusterCreateRequest ...

type ClusterCreateResponse

type ClusterCreateResponse struct {
	ID string
}

ClusterCreateResponse ...

type ClusterHeader

type ClusterHeader struct {
	AccountID     string
	ResourceGroup string
}

ClusterHeader ...

func (ClusterHeader) CreateMap

func (c ClusterHeader) CreateMap() map[string]string

CreateMap ...

type ClusterInfo

type ClusterInfo struct {
	CreatedDate                   string   `json:"createdDate"`
	DataCenter                    string   `json:"dataCenter"`
	ID                            string   `json:"id"`
	IngressHostname               string   `json:"ingressHostname"`
	IngressSecretName             string   `json:"ingressSecretName"`
	Location                      string   `json:"location"`
	MasterKubeVersion             string   `json:"masterKubeVersion"`
	ModifiedDate                  string   `json:"modifiedDate"`
	Name                          string   `json:"name"`
	Region                        string   `json:"region"`
	ResourceGroupID               string   `json:"resourceGroup"`
	ResourceGroupName             string   `json:"resourceGroupName"`
	ServerURL                     string   `json:"serverURL"`
	MasterURL                     string   `json:"masterURL"` // vpc cluster serverURL is empty
	State                         string   `json:"state"`
	OrgID                         string   `json:"logOrg"`
	OrgName                       string   `json:"logOrgName"`
	SpaceID                       string   `json:"logSpace"`
	SpaceName                     string   `json:"logSpaceName"`
	IsPaid                        bool     `json:"isPaid"`
	IsTrusted                     bool     `json:"isTrusted"`
	WorkerCount                   int      `json:"workerCount"`
	Vlans                         []Vlan   `json:"vlans"`
	Addons                        []Addon  `json:"addons"`
	OwnerEmail                    string   `json:"ownerEmail"`
	APIUser                       string   `json:"apiUser"`
	MonitoringURL                 string   `json:"monitoringURL"`
	DisableAutoUpdate             bool     `json:"disableAutoUpdate"`
	EtcdPort                      string   `json:"etcdPort"`
	MasterStatus                  string   `json:"masterStatus"`
	MasterStatusModifiedDate      string   `json:"masterStatusModifiedDate"`
	KeyProtectEnabled             bool     `json:"keyProtectEnabled"`
	WorkerZones                   []string `json:"workerZones"`
	PullSecretApplied             bool     `json:"pullSecretApplied"`
	CRN                           string   `json:"crn"`
	PrivateServiceEndpointEnabled bool     `json:"privateServiceEndpointEnabled"`
	PrivateServiceEndpointURL     string   `json:"privateServiceEndpointURL"`
	PublicServiceEndpointEnabled  bool     `json:"publicServiceEndpointEnabled"`
	PublicServiceEndpointURL      string   `json:"publicServiceEndpointURL"`
	Type                          string   `json:"type"`
	Provider                      string   `json:"provider"`
	PodSubnet                     string   `json:"podSubnet"`
	ServiceSubnet                 string   `json:"serviceSubnet"`
	ImageSecurityEnabled          bool     `json:"imageSecurityEnabled"`
}

ClusterInfo ...

func (*ClusterInfo) IsStagingSatelliteCluster

func (r *ClusterInfo) IsStagingSatelliteCluster() bool

type ClusterKeyInfo

type ClusterKeyInfo struct {
	AdminKey             string `json:"admin-key"`
	Admin                string `json:"admin"`
	ClusterCACertificate string `json:"cluster-ca-certificate"`
	Host                 string `json:"host"`
	Token                string `json:"idtoken"`
	FilePath             string `json:"filepath"`
}

ClusterKeyInfo ...

type ClusterSoftlayerHeader

type ClusterSoftlayerHeader struct {
	SoftLayerUsername string
	SoftLayerAPIKey   string
}

ClusterSoftlayerHeader ...

func (ClusterSoftlayerHeader) ToMap

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

ToMap ...

type ClusterTargetHeader

type ClusterTargetHeader struct {
	OrgID         string
	SpaceID       string
	AccountID     string
	Region        string
	ResourceGroup string
}

ClusterTargetHeader ...

func (ClusterTargetHeader) ToMap

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

ToMap ...

type ClusterUpdateParam

type ClusterUpdateParam struct {
	Action  string `json:"action"`
	Force   bool   `json:"force"`
	Version string `json:"version"`
}

ClusterUpdateParam ...

type Clusters

type Clusters interface {
	Create(params ClusterCreateRequest, target ClusterTargetHeader) (ClusterCreateResponse, error)
	List(target ClusterTargetHeader) ([]ClusterInfo, error)
	Update(name string, params ClusterUpdateParam, target ClusterTargetHeader) error
	UpdateClusterWorker(clusterNameOrID string, workerID string, params UpdateWorkerCommand, target ClusterTargetHeader) error
	UpdateClusterWorkers(clusterNameOrID string, workerIDs []string, params UpdateWorkerCommand, target ClusterTargetHeader) error
	Delete(name string, target ClusterTargetHeader, deleteDependencies ...bool) error
	Find(name string, target ClusterTargetHeader) (ClusterInfo, error)
	FindWithOutShowResources(name string, target ClusterTargetHeader) (ClusterInfo, error)
	FindWithOutShowResourcesCompatible(name string, target ClusterTargetHeader) (ClusterInfo, error)
	GetClusterConfig(name, homeDir string, admin bool, target ClusterTargetHeader) (string, error)
	GetClusterConfigDetail(name, homeDir string, admin bool, target ClusterTargetHeader) (ClusterKeyInfo, error)
	StoreConfig(name, baseDir string, admin bool, createCalicoConfig bool, target ClusterTargetHeader) (string, string, error)
	StoreConfigDetail(name, baseDir string, admin bool, createCalicoConfig bool, target ClusterTargetHeader) (string, ClusterKeyInfo, error)
	UnsetCredentials(target ClusterTargetHeader) error
	SetCredentials(slUsername, slAPIKey string, target ClusterTargetHeader) error
	BindService(params ServiceBindRequest, target ClusterTargetHeader) (ServiceBindResponse, error)
	UnBindService(clusterNameOrID, namespaceID, serviceInstanceGUID string, target ClusterTargetHeader) error
	ListServicesBoundToCluster(clusterNameOrID, namespace string, target ClusterTargetHeader) (BoundServices, error)
	FindServiceBoundToCluster(clusterNameOrID, serviceName, namespace string, target ClusterTargetHeader) (BoundService, error)
	RefreshAPIServers(clusterNameOrID string, target ClusterTargetHeader) error
	FetchOCTokenForKubeConfig(kubeConfig []byte, clusterInfo *ClusterInfo, skipSSLVerification bool) ([]byte, error)
}

Clusters interface

type ConfigFile

type ConfigFile struct {
	Clusters []struct {
		Name    string `yaml:"name"`
		Cluster struct {
			Server string `yaml:"server"`
		} `yaml:"cluster"`
	} `yaml:"clusters"`
	Users []struct {
		Name string `yaml:"name"`
		User struct {
			AuthProvider struct {
				Config struct {
					IDToken string `yaml:"id-token"`
				} `yaml:"config"`
			} `yaml:"auth-provider"`
		} `yaml:"user"`
	} `yaml:"users"`
}

ConfigFile ...

type ConfigFileOpenshift

type ConfigFileOpenshift struct {
	Clusters []struct {
		Name    string `yaml:"name"`
		Cluster struct {
			Server string `yaml:"server"`
		} `yaml:"cluster"`
	} `yaml:"clusters"`
	Users []struct {
		Name string `yaml:"name"`
		User struct {
			Token string `yaml:"token"`
		}
	}
}

ConfigFileOpenshift Openshift .yml Structure

type ConfigureAddOns

type ConfigureAddOns struct {
	AddonsList []AddOn `json:"addons"`
	Enable     bool    `json:"enable"`
	Update     bool    `json:"update"`
}

ConfigureAddOns ...

type ContainerServiceAPI

type ContainerServiceAPI interface {
	Albs() Albs
	Clusters() Clusters
	Workers() Workers
	WorkerPools() WorkerPool
	WebHooks() Webhooks
	Subnets() Subnets
	KubeVersions() KubeVersions
	Vlans() Vlans
	Kms() Kms
	AddOns() AddOns
	Apikeys() Apikeys
}

ContainerServiceAPI is the Aramda K8s client ...

func New

New ...

type CreateALB

type CreateALB struct {
	Zone            string `json:"zone"`
	VlanID          string `json:"vlanID"`
	Type            string `json:"type"`
	EnableByDefault bool   `json:"enableByDefault"`
	IP              string `json:"ip"`
	NLBVersion      string `json:"nlbVersion"`
	IngressImage    string `json:"ingressImage,omitempty"`
}

CreateALB struct representation of ALB arriving in create requests

type DCVlan

type DCVlan struct {
	ID         string           `json:"id"`
	Properties DCVlanProperties `json:"properties"`
	Type       string           `json:"type"`
}

Vlan ...

type DCVlanProperties

type DCVlanProperties struct {
	LocalDiskStorageCapability string `json:"local_disk_storage_capability"`
	Location                   string `json:"location"`
	Name                       string `json:"name"`
	Note                       string `json:"note"`
	PrimaryRouter              string `json:"primary_router"`
	SANStorageCapability       string `json:"san_storage_capability"`
	VlanNumber                 string `json:"vlan_number"`
	VlanType                   string `json:"vlan_type"`
}

VlanProperties ...

type Frame

type Frame uintptr

Frame -

type GetAddOns

type GetAddOns struct {
	AddonsList []AddOn `json:"addons"`
}

GetAddOns ...

type Kms

type Kms interface {
	EnableKms(enableKmsReq KmsEnableReq, target ClusterHeader) error
}

Kms interface

type KmsEnableReq

type KmsEnableReq struct {
	AccountID       string `json:"account_id,omitempty"`
	Cluster         string `json:"cluster"`
	Crk             string `json:"crk_id"`
	Kms             string `json:"instance_id"`
	PrivateEndpoint bool   `json:"private_endpoint"`
}

Request body to attach a KMS to a cluster

type KubeVersion

type KubeVersion struct {
	Major   int
	Minor   int
	Patch   int
	Default bool
}

KubeVersion ...

type KubeVersions

type KubeVersions interface {
	List(target ClusterTargetHeader) ([]KubeVersion, error)
	ListV1(target ClusterTargetHeader) (V1Version, error)
}

KubeVersions interface

type MasterAPIServer

type MasterAPIServer struct {
	Action string `json:"action" binding:"required" description:"The action to perform on the API Server"`
}

MasterAPIServer describes the state to put the Master API server into swagger:model

type ServiceBindRequest

type ServiceBindRequest struct {
	ClusterNameOrID         string
	ServiceInstanceNameOrID string `json:"serviceInstanceGUID" binding:"required"`
	NamespaceID             string `json:"namespaceID" binding:"required"`
	Role                    string `json:"role"`
	ServiceKeyJSON          string `json:"serviceKeyJSON"`
	ServiceKeyGUID          string `json:"serviceKeyGUID"`
}

ServiceBindRequest ...

type ServiceBindResponse

type ServiceBindResponse struct {
	ServiceInstanceGUID string `json:"serviceInstanceGUID" binding:"required"`
	NamespaceID         string `json:"namespaceID" binding:"required"`
	SecretName          string `json:"secretName"`
	Binding             string `json:"binding"`
}

ServiceBindResponse ...

type StackTrace

type StackTrace []Frame

StackTrace -

type Subnet

type Subnet struct {
	ID          string           `json:"id"`
	Type        string           `json:"type"`
	VlanID      string           `json:"vlan_id"`
	IPAddresses []string         `json:"ip_addresses"`
	Properties  SubnetProperties `json:"properties"`
}

Subnet ...

type SubnetProperties

type SubnetProperties struct {
	CIDR              string `json:"cidr"`
	NetworkIdentifier string `json:"network_identifier"`
	Note              string `json:"note"`
	SubnetType        string `json:"subnet_type"`
	DisplayLabel      string `json:"display_label"`
	Gateway           string `json:"gateway"`
}

SubnetProperties ...

type Subnets

type Subnets interface {
	AddSubnet(clusterName string, subnetID string, target ClusterTargetHeader) error
	List(target ClusterTargetHeader, opts ...string) ([]Subnet, error)
	AddClusterUserSubnet(clusterID string, userSubnet UserSubnet, target ClusterTargetHeader) error
	ListClusterUserSubnets(clusterID string, target ClusterTargetHeader) ([]Vlan, error)
	DeleteClusterUserSubnet(clusterID string, subnetID string, vlanID string, target ClusterTargetHeader) error
}

Subnets interface

type UpdateWorkerCommand

type UpdateWorkerCommand struct {
	Action string `json:"action" binding:"required" description:"Action to perform of the worker"`
	// Setting force flag to true will ignore if the master is unavailable during 'os_reboot" and 'reload' action
	Force bool `json:"force,omitempty"`
}

UpdateWorkerCommand .... swagger:model

type UserSubnet

type UserSubnet struct {
	CIDR   string `` /* 128-byte string literal not displayed */
	VLANID string `json:"vlan_id" binding:"required" description:"The private VLAN where the CIDR exists'"`
}

type V1Version

type V1Version map[string][]KubeVersion

type Vlan

type Vlan struct {
	ID      string `json:"id"`
	Subnets []struct {
		Cidr     string   `json:"cidr"`
		ID       string   `json:"id"`
		Ips      []string `json:"ips"`
		IsByOIP  bool     `json:"is_byoip"`
		IsPublic bool     `json:"is_public"`
	}
	Zone   string `json:"zone"`
	Region string `json:"region"`
}

Vlan ...

type Vlans

type Vlans interface {
	List(datacenter string, target ClusterTargetHeader) ([]DCVlan, error)
}

Subnets interface

type WebHook

type WebHook struct {
	Level string
	Type  string
	URL   string
}

WebHook is the web hook

type Webhooks

type Webhooks interface {
	List(clusterName string, target ClusterTargetHeader) ([]WebHook, error)
	Add(clusterName string, params WebHook, target ClusterTargetHeader) error
}

Webhooks interface

type Worker

type Worker struct {
	Billing          string `json:"billing,omitempty"`
	ErrorMessage     string `json:"errorMessage"`
	ID               string `json:"id"`
	Isolation        string `json:"isolation"`
	KubeVersion      string `json:"kubeVersion"`
	MachineType      string `json:"machineType"`
	PrivateIP        string `json:"privateIP"`
	PrivateVlan      string `json:"privateVlan"`
	PublicIP         string `json:"publicIP"`
	PublicVlan       string `json:"publicVlan"`
	Location         string `json:"location"`
	PoolID           string `json:"poolid"`
	PoolName         string `json:"poolName"`
	TrustedStatus    string `json:"trustedStatus"`
	ReasonForDelete  string `json:"reasonForDelete"`
	VersionEOS       string `json:"versionEOS"`
	MasterVersionEOS string `json:"masterVersionEOS"`
	State            string `json:"state"`
	Status           string `json:"status"`
	TargetVersion    string `json:"targetVersion"`
}

Worker ...

type WorkerParam

type WorkerParam struct {
	MachineType string `json:"machineType,omitempty" description:"The worker's machine type"`
	PrivateVlan string `json:"privateVlan,omitempty" description:"The worker's private vlan"`
	PublicVlan  string `json:"publicVlan,omitempty" description:"The worker's public vlan"`
	Isolation   string `json:"isolation,omitempty" description:"Can be 'public' or 'private'"`
	WorkerNum   int    `json:"workerNum,omitempty" binding:"required" description:"The number of workers"`
	Prefix      string `json:"prefix,omitempty" description:"hostname prefix for new workers"`
	Action      string `json:"action,omitempty"`
	Count       int    `json:"count,omitempty"`
}

WorkerParam ...

type WorkerPool

type WorkerPool interface {
	CreateWorkerPool(clusterNameOrID string, workerPoolReq WorkerPoolRequest, target ClusterTargetHeader) (WorkerPoolResponse, error)
	ResizeWorkerPool(clusterNameOrID, workerPoolNameOrID string, size int, target ClusterTargetHeader) error
	UpdateLabelsWorkerPool(clusterNameOrID, workerPoolNameOrID string, labels map[string]string, target ClusterTargetHeader) error
	PatchWorkerPool(clusterNameOrID, workerPoolNameOrID, state string, target ClusterTargetHeader) error
	DeleteWorkerPool(clusterNameOrID string, workerPoolNameOrID string, target ClusterTargetHeader) error
	ListWorkerPools(clusterNameOrID string, target ClusterTargetHeader) ([]WorkerPoolResponse, error)
	GetWorkerPool(clusterNameOrID, workerPoolNameOrID string, target ClusterTargetHeader) (WorkerPoolResponse, error)
	AddZone(clusterNameOrID string, poolID string, workerPoolZone WorkerPoolZone, target ClusterTargetHeader) error
	RemoveZone(clusterNameOrID, zone, poolID string, target ClusterTargetHeader) error
	UpdateZoneNetwork(clusterNameOrID, zone, poolID, privateVlan, publicVlan string, target ClusterTargetHeader) error
}

Workers ...

type WorkerPoolConfig

type WorkerPoolConfig struct {
	Name            string            `json:"name" binding:"required"`
	Size            int               `json:"sizePerZone" binding:"required"`
	MachineType     string            `json:"machineType" binding:"required"`
	Isolation       string            `json:"isolation"`
	Labels          map[string]string `json:"labels"`
	OperatingSystem string            `json:"operatingSystem,omitempty"`
	Entitlement     string            `json:"entitlement"`
}

WorkerPoolConfig common worker pool data

type WorkerPoolPatchRequest

type WorkerPoolPatchRequest struct {
	Size            int               `json:"sizePerZone"`
	Labels          map[string]string `json:"labels"`
	ReasonForResize string            `json:"reasonForResize"`
	State           string            `json:"state"`
}

WorkerPoolPatchRequest provides attributes to patch update worker pool swagger:model

type WorkerPoolRequest

type WorkerPoolRequest struct {
	WorkerPoolConfig
	DiskEncryption bool             `json:"diskEncryption" description:"true or false to use encryption for the secondary disk"`
	Zones          []WorkerPoolZone `json:"zones"`
}

WorkerPoolRequest provides worker pool data swagger:model

type WorkerPoolResponse

type WorkerPoolResponse struct {
	WorkerPoolConfig
	ID               string                  `json:"id" binding:"required"`
	Region           string                  `json:"region" binding:"required"`
	State            string                  `json:"state"`
	ReasonForDelete  string                  `json:"reasonForDelete"`
	IsBalanced       bool                    `json:"isBalanced"`
	AutoscaleEnabled bool                    `json:"autoscaleEnabled,omitempty"`
	Zones            WorkerPoolZoneResponses `json:"zones"`
}

WorkerPoolResponse provides worker pool data swagger:model

type WorkerPoolResponses

type WorkerPoolResponses []WorkerPoolResponse

WorkerPoolResponses sorts WorkerPoolResponse by ID. swagger:model

type WorkerPoolZone

type WorkerPoolZone struct {
	WorkerPoolZoneNetwork
	ID string `json:"id" binding:"required"`
}

WorkerPoolZone provides zone data swagger:model

type WorkerPoolZoneNetwork

type WorkerPoolZoneNetwork struct {
	PrivateVLAN string `json:"privateVlan" binding:"required"`
	PublicVLAN  string `json:"publicVlan"`
}

WorkerPoolZoneNetwork holds network configuration for a zone

type WorkerPoolZonePatchRequest

type WorkerPoolZonePatchRequest struct {
	WorkerPoolZoneNetwork
}

WorkerPoolZonePatchRequest updates worker pool zone data swagger:model

type WorkerPoolZoneResponse

type WorkerPoolZoneResponse struct {
	WorkerPoolZone
	WorkerCount int `json:"workerCount"`
}

WorkerPoolZoneResponse response contents for zone swagger:model

type WorkerPoolZoneResponses

type WorkerPoolZoneResponses []WorkerPoolZoneResponse

WorkerPoolZoneResponses sorts WorkerPoolZoneResponse by ID. swagger:model

type WorkerUpdateParam

type WorkerUpdateParam struct {
	Action string `json:"action" binding:"required" description:"Action to perform of the worker"`
}

WorkerUpdateParam ...

type Workers

type Workers interface {
	List(clusterName string, target ClusterTargetHeader) ([]Worker, error)
	ListByWorkerPool(clusterIDOrName, workerPoolIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
	Get(clusterName string, target ClusterTargetHeader) (Worker, error)
	Add(clusterName string, params WorkerParam, target ClusterTargetHeader) error
	Delete(clusterName string, workerD string, target ClusterTargetHeader) error
	Update(clusterName string, workerID string, params WorkerUpdateParam, target ClusterTargetHeader) error
}

Workers ...

Jump to

Keyboard shortcuts

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