kubernetes

package
v6.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStorage

type BlockStorage struct {
	// The unique identifier for the volume
	UUID string `json:"uuid"`
	// User configurable unique identifier (max 64 chars)
	Name string `json:"name"`
	// The volume's size in gibibytes
	SizeInGiB int `json:"sizeInGib"`
	// Type of storage
	Type BlockStorageType `json:"type"`
	// AvailabilityZone where this volume is located
	AvailabilityZone string `json:"availabilityZone"`
	// Status of the volume 'attached', 'attaching', 'available', 'creating',
	// 'deleting' or 'detaching'
	Status BlockStorageStatus `json:"status,omitempty"`
	// UUID of node this volume is attached to
	NodeUUID string `json:"nodeUuid"`
	// The serial of the disk. This is a unique identifier that is visible by the node it has been attached to.
	Serial string `json:"serial"`
}

BlockStorage struct is a single block storage volume that can be used in a kubernetes cluster

type BlockStorageOrder

type BlockStorageOrder struct {
	// user adjustable unique identifier for volume (max 64 chars), when none is given, the uuid will be used.
	Name string `json:"name"`
	// amount of storage in gibibytes
	SizeInGiB int `json:"sizeInGib"`
	// type of storage
	Type BlockStorageType `json:"type"`
	// location of the volume
	AvailabilityZone string `json:"availabilityZone"`
}

BlockStorageOrder struct can be used to order a new block storage volume

type BlockStorageStatus

type BlockStorageStatus string

BlockStorageStatus is one of the following statuses 'attached', 'attaching', 'available', 'creating', 'deleting' or 'detaching'

const (
	// BlockStorageStatusAttached is the status for a volume that currently is attached to a node
	BlockStorageStatusAttached BlockStorageStatus = "attached"
	// BlockStorageStatusAttaching is the status for a volume that is being attached to a node
	BlockStorageStatusAttaching BlockStorageStatus = "attaching"
	// BlockStorageStatusAvailable is the status for a volume that is available
	BlockStorageStatusAvailable BlockStorageStatus = "available"
	// BlockStorageStatusCreating is the status for a volume that is being created
	BlockStorageStatusCreating BlockStorageStatus = "creating"
	// BlockStorageStatusDeleting is the status for a volume that is being deleted
	BlockStorageStatusDeleting BlockStorageStatus = "deleting"
	// BlockStorageStatusDetaching is the status for a volume that is being detached from a node
	BlockStorageStatusDetaching BlockStorageStatus = "detaching"
)

Definition of all of the possible block storage statuses

type BlockStorageType

type BlockStorageType string

BlockStorageType is one of the following types 'hdd'

const (
	// BlockStorageTypeHDD reflects a block storage volume of type HDD
	BlockStorageTypeHDD BlockStorageType = "hdd"
)

Description of all the possible block storage types

type Cluster

type Cluster struct {
	// The unique Cluster name
	Name string `json:"name"`
	// The name that can be set by customer
	Description string `json:"description"`
	// Version of kubernetes this cluster is running
	Version string `json:"version"`
	// URL to connect to with kubectl
	Endpoint string `json:"endpoint"`
	// Whether or not another process is already doing stuff with this cluster
	IsLocked bool `json:"isLocked,omitempty"`
	// If the cluster is administratively blocked
	IsBlocked bool `json:"isBlocked,omitempty"`
}

Cluster struct for a Kubernetes cluster

type ClusterOrder

type ClusterOrder struct {
	// The description of the cluster
	Description string `json:"description,omitempty"`
}

ClusterOrder struct can be used to order a new cluster

type IPSetup

type IPSetup string

IPSetup is one of the following strings 'both', 'noipv6', 'ipv6to4', 'ipv4to6'

const (
	// IPSetupBoth accept ipv4 and ipv6 and forward them to separate ipv4 and ipv6 addresses
	IPSetupBoth IPSetup = "both"
	// IPSetupNoIPv6 do not accept ipv6 traffic
	IPSetupNoIPv6 IPSetup = "noipv6"
	// IPSetupIPv6to4 forward ipv6 traffic to ipv4
	IPSetupIPv6to4 IPSetup = "ipv6to4"
	// IPSetupIPv4to6 forward ipv4 traffic to ipv6
	IPSetupIPv4to6 IPSetup = "ipv4to6"
)

Definition of all of the possible ip setup options

type LoadBalancer

type LoadBalancer struct {
	// The unique identifier for the loadbalancer
	UUID string `json:"uuid"`
	// User configurable unique identifier (max 64 chars)
	Name string `json:"name"`
	// LoadBalancer status, either ‘active’, ‘inactive’, ‘creating’
	Status LoadBalancerStatus `json:"status"`

	// HA-IP IPv4 address
	IPv4Address net.IP `json:"ipv4Address,omitempty"`
	// HA-IP IPv6 address
	IPv6Address net.IP `json:"ipv6Address,omitempty"`
}

LoadBalancer struct for a kubernetes loadbalancer

type LoadBalancerConfig

type LoadBalancerConfig struct {
	// HA-IP load balancing mode: 'roundrobin', 'cookie', 'source'
	LoadBalancingMode LoadBalancingMode `json:"loadBalancingMode,omitempty"`
	// Cookie name to pin sessions on when using cookie balancing mode
	StickyCookieName string `json:"stickyCookieName,omitempty"`
	// The interval in milliseconds at which health checks are performed. The interval may not be smaller than 2000ms.
	HealthCheckInterval int64 `json:"healthCheckInterval,omitempty"`
	// The path (URI) of the page to check HTTP status code on
	HTTPHealthCheckPath string `json:"httpHealthCheckPath,omitempty"`
	// The port to perform the HTTP check on
	HTTPHealthCheckPort int `json:"httpHealthCheckPort,omitempty"`
	// Whether to use SSL when performing the HTTP check
	HTTPHealthCheckSSL bool `json:"httpHealthCheckSsl"`
	// HA-IP IP setup: 'both', 'noipv6', 'ipv6to4', 'ipv4to6'
	IPSetup IPSetup `json:"ipSetup"`
	// The PTR record for the HA-IP
	PTRRecord string `json:"ptrRecord,omitempty"`
	// HA-IP TLS Mode: 'tls10_11_12', 'tls11_12', 'tls12'
	TLSMode TLSMode `json:"tlsMode"`
	// The IPs attached to this haip
	IPAddresses []net.IP `json:"ipAddresses,omitempty"`
	// Array with port configurations for this LoadBalancer
	PortConfigurations []PortConfiguration `json:"portConfiguration,omitempty"`
}

LoadBalancerConfig is a representation of all the options that can be configured for a Load Balancer

type LoadBalancerStatus

type LoadBalancerStatus string

LoadBalancerStatus status, either ‘active’, ‘inactive’, ‘creating’

const (
	// LoadBalancerStatusActive means the loadbalancer is active
	LoadBalancerStatusActive LoadBalancerStatus = "active"
	// LoadBalancerStatusInactive means the load balancer is inactive
	LoadBalancerStatusInactive LoadBalancerStatus = "inactive"
	// LoadBalancerStatusCreating means the load balancer is being created
	LoadBalancerStatusCreating LoadBalancerStatus = "creating"
)

Definition of all of the possible loadbalancer statuses

type LoadBalancingMode

type LoadBalancingMode string

LoadBalancingMode is one of the following strings 'roundrobin', 'cookie', 'source'

const (
	// LoadBalancingModeRoundRobin is the LoadBalancing mode roundrobin for a Haip, forward to next address everytime
	LoadBalancingModeRoundRobin LoadBalancingMode = "roundrobin"
	// LoadBalancingModeCookie is the LoadBalancing mode cookie for a Haip, forward to a fixed server, based on the cookie
	LoadBalancingModeCookie LoadBalancingMode = "cookie"
	// LoadBalancingModeSource is the LoadBalancing mode source for a Haip, choose a server to forward based on the source address
	LoadBalancingModeSource LoadBalancingMode = "source"
)

Definition of all of the possible load balancing modes

type Node

type Node struct {
	// The unique identifier for the node
	UUID string `json:"uuid"`
	// The unique identifier for the node pool this node belongs to
	NodePoolUUID string `json:"nodePoolUUID"`
	// The name of the cluster this node belongs to
	ClusterName string `json:"clusterName"`
	// The node's status
	Status NodeStatus `json:"status,omitempty"`
	// The node's IP addresses
	IPAddresses []NodeAddress `json:"ipAddresses"`
}

Node struct is a single node in a kubernetes cluster node pool

type NodeAddress

type NodeAddress struct {
	Address net.IP          `json:"address"`
	Netmask net.IP          `json:"subnetMask"`
	Type    NodeAddressType `json:"type"`
}

NodeAddress defines the structure of 1 single node address

type NodeAddressType

type NodeAddressType string

NodeAddressType is one of the following strings 'external', 'internal'

const (
	// NodeAddressTypeExternal is an external node address
	NodeAddressTypeExternal NodeAddressType = "external"
	// NodeAddressTypeInternal is an internal node address
	NodeAddressTypeInternal NodeAddressType = "internal"
)

Definition of all of the possible node address types

type NodePool

type NodePool struct {
	// The unique identifier for the node pool
	UUID string `json:"uuid"`
	// The name of the cluster the node pool should be ordered for
	ClusterName string `json:"clusterName"`
	// The name that can be set by customer
	Description string `json:"description"`
	// Amount of desired nodes in the node pool
	DesiredNodeCount int `json:"desiredNodeCount"`
	// Specification for nodes in this node pool
	NodeSpec string `json:"nodeSpec"`
	// Availability zone of the node pool
	AvailabilityZone string `json:"availabilityZone"`
	// Nodes in this node pool
	Nodes []Node `json:"nodes,omitempty"`
}

NodePool struct for a kubernetes cluster node pool

type NodePoolOrder

type NodePoolOrder struct {
	// The name of the cluster the node pool should be ordered for
	ClusterName string `json:"clusterName"`
	// The description of the node pool
	Description string `json:"description,omitempty"`
	// Amount of desired nodes in the node pool
	DesiredNodeCount int `json:"desiredNodeCount"`
	// Specification for nodes in this node pool
	NodeSpec string `json:"nodeSpec"`
	// Availability zone of the node pool
	AvailabilityZone string `json:"availabilityZone"`
}

NodePoolOrder struct can be used to order a new node pool to a cluster

type NodeStatus

type NodeStatus string

NodeStatus is one of the following strings 'active', 'creating', 'deleting'

const (
	// NodeStatusActive is the status for an active node ready for workload
	NodeStatusActive NodeStatus = "active"
	// NodeStatusCreating is the status for a node that is being provisioned
	NodeStatusCreating NodeStatus = "creating"
	// NodeStatusDeleting is the status for a node that is being shutdown for removal
	NodeStatusDeleting NodeStatus = "deleting"
)

Definition of all of the possible node statuses

type PortConfiguration

type PortConfiguration struct {
	// A name describing the port
	Name string `json:"name"`
	// The port at which traffic arrives on your HA-IP
	SourcePort int `json:"sourcePort"`
	// The port at which traffic arrives on your attached IP address(es)
	TargetPort int `json:"targetPort"`
	// The mode determining how traffic is processed and forwarded: 'tcp', 'http', 'https', 'proxy', 'http2_https'
	Mode PortConfigurationMode `json:"mode"`
	// The mode determining how traffic between our load balancers and your attached IP address(es) is encrypted: 'off', 'on', 'strict'
	EndpointSSLMode PortConfigurationEndpointSSLMode `json:"endpointSslMode"`
}

PortConfiguration struct for a PortConfiguration

type PortConfigurationEndpointSSLMode

type PortConfigurationEndpointSSLMode string

PortConfigurationEndpointSSLMode is one of the following values 'off', 'on', 'strict'

const (
	// PortConfigurationEndpointSSLModeOff means the traffic to the backends is unencrypted
	PortConfigurationEndpointSSLModeOff PortConfigurationEndpointSSLMode = "off"
	// PortConfigurationEndpointSSLModeOn means the traffic to the backends is encrypted but not verified
	PortConfigurationEndpointSSLModeOn PortConfigurationEndpointSSLMode = "on"
	// PortConfigurationEndpointSSLModeStrict means the traffic to the backends is encrypted and verified
	PortConfigurationEndpointSSLModeStrict PortConfigurationEndpointSSLMode = "strict"
)

Definition of all the possible port configuration endpoint SSL modes

type PortConfigurationMode

type PortConfigurationMode string

PortConfigurationMode is one of the following strings 'tcp', 'http', 'https', 'proxy', 'http2_https'

const (
	// PortConfigurationModeTCP plain TCP forward to your VPS
	PortConfigurationModeTCP PortConfigurationMode = "tcp"
	// PortConfigurationModeHTTP appends a X-Forwarded-For header to HTTP requests with the original remote IP
	PortConfigurationModeHTTP PortConfigurationMode = "http"
	// PortConfigurationModeHTTPS same as HTTP, with SSL Certificate offloading
	PortConfigurationModeHTTPS PortConfigurationMode = "https"
	// PortConfigurationModePROXY proxy protocol is also a way to retain the original remote IP,
	// but also works for non HTTP traffic (note: the receiving application has to support this)
	PortConfigurationModePROXY PortConfigurationMode = "proxy"
	// PortConfigurationModeHTTP2HTTPS same as HTTPS, with http/2 support
	PortConfigurationModeHTTP2HTTPS PortConfigurationMode = "http2_https"
)

Definition of all of the possible port configuration modes

type Repository

type Repository repository.RestRepository

Repository is the kubernetes repository this repository allows you to manage all Kubernetes services for your TransIP account

func (*Repository) AddBlockStorageVolume

func (r *Repository) AddBlockStorageVolume(order BlockStorageOrder) error

AddBlockStorageVolume creates a block storage volume

func (*Repository) AddNodePool

func (r *Repository) AddNodePool(nodePoolOrder NodePoolOrder) error

AddNodePool allows you to order a new node pool to a cluster

func (*Repository) CreateCluster

func (r *Repository) CreateCluster(clusterOrder ClusterOrder) error

CreateCluster allows you to order a new cluster

func (*Repository) CreateLoadBalancer

func (r *Repository) CreateLoadBalancer(name string) error

CreateLoadBalancer creates a new load balancer

func (*Repository) GetBlockStorageVolume

func (r *Repository) GetBlockStorageVolume(name string) (BlockStorage, error)

GetBlockStorageVolume returns a specific block storage volume

func (*Repository) GetBlockStorageVolumes

func (r *Repository) GetBlockStorageVolumes() ([]BlockStorage, error)

GetBlockStorageVolumes returns all block storage volumes

func (*Repository) GetClusterByName

func (r *Repository) GetClusterByName(clusterName string) (Cluster, error)

GetClusterByName returns information on a specific cluster by name

func (*Repository) GetClusters

func (r *Repository) GetClusters() ([]Cluster, error)

GetClusters returns a list of all your VPSs

func (*Repository) GetKubeConfig

func (r *Repository) GetKubeConfig(clusterName string) (string, error)

GetKubeConfig returns the Config YAML with admin credentials for given cluster

func (*Repository) GetLoadBalancer

func (r *Repository) GetLoadBalancer(name string) (LoadBalancer, error)

GetLoadBalancer returns a load balancer

func (*Repository) GetLoadBalancers

func (r *Repository) GetLoadBalancers() ([]LoadBalancer, error)

GetLoadBalancers returns all load balancers

func (*Repository) GetNode

func (r *Repository) GetNode(nodeUUID string) (Node, error)

GetNode return a node

func (*Repository) GetNodePool

func (r *Repository) GetNodePool(nodePoolUUID string) (NodePool, error)

GetNodePool returns the NodePool for given nodePoolUUID

func (*Repository) GetNodePools

func (r *Repository) GetNodePools() ([]NodePool, error)

GetNodePools returns all node pools

func (*Repository) GetNodePoolsByClusterName

func (r *Repository) GetNodePoolsByClusterName(clusterName string) ([]NodePool, error)

GetNodePoolsByClusterName returns all node pools for a given clusterName

func (*Repository) GetNodes

func (r *Repository) GetNodes() ([]Node, error)

GetNodes returns all nodes

func (*Repository) GetNodesByClusterName

func (r *Repository) GetNodesByClusterName(clusterName string) ([]Node, error)

GetNodesByClusterName returns all nodes for a cluster

func (*Repository) GetNodesByNodePoolUUID

func (r *Repository) GetNodesByNodePoolUUID(nodePoolUUID string) ([]Node, error)

GetNodesByNodePoolUUID returns all nodes for a node pool

func (*Repository) HandoverCluster

func (r *Repository) HandoverCluster(clusterName string, targetCustomerName string) error

HandoverCluster will handover a cluster to another TransIP Account. This call will initiate the handover process. The actual handover will be done when the target customer accepts the handover

func (*Repository) RemoveBlockStorageVolume

func (r *Repository) RemoveBlockStorageVolume(name string) error

RemoveBlockStorageVolume will remove a block storage volume

func (*Repository) RemoveCluster

func (r *Repository) RemoveCluster(clusterName string) error

RemoveCluster will cancel the cluster, thus deleting it

func (*Repository) RemoveLoadBalancer

func (r *Repository) RemoveLoadBalancer(name string) error

RemoveLoadBalancer will remove a load balancer

func (*Repository) RemoveNodePool

func (r *Repository) RemoveNodePool(nodePoolUUID string) error

RemoveNodePool will cancel the node pool, thus deleting it

func (*Repository) UpdateBlockStorageVolume

func (r *Repository) UpdateBlockStorageVolume(volume BlockStorage) error

UpdateBlockStorageVolume allows you to update the name and attached node for a block storage volumes

func (*Repository) UpdateCluster

func (r *Repository) UpdateCluster(cluster Cluster) error

UpdateCluster allows you to updated the description of a cluster

func (*Repository) UpdateLoadBalancer

func (r *Repository) UpdateLoadBalancer(name string, config LoadBalancerConfig) error

UpdateLoadBalancer updates the entire state of the load balancer

func (*Repository) UpdateNodePool

func (r *Repository) UpdateNodePool(nodePool NodePool) error

UpdateNodePool allows you to update the description and desired node count of a node pool

type TLSMode

type TLSMode string

TLSMode is one of the following strings 'tls10_11_12', 'tls11_12', 'tls12'

const (
	// TLSModeMinTLS10 only allow incoming tls traffic with versions 1.0, 1.1 and 1.2
	TLSModeMinTLS10 TLSMode = "tls10_11_12"
	// TLSModeMinTLS11 only allow incoming tls traffic with version 1.1 or 1.2
	TLSModeMinTLS11 TLSMode = "tls11_12"
	// TLSModeMinTLS12 only allow incoming traffic with tls version 1.2
	TLSModeMinTLS12 TLSMode = "tls12"
)

Definition of all of the possible tls mode options

Jump to

Keyboard shortcuts

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