v1beta1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	ResourceKindCluster = "Cluster"
	ResourceNameCluster = "cluster"
	ResourceTypeCluster = "clusters"

	DefaultKubernetesBindPort = 6443

	RetryInterval      = 5 * time.Second
	RetryTimeout       = 15 * time.Minute
	ServiceAccountName = "default"
)
View Source
const (
	RoleMaster    = "master"
	RoleNode      = "node"
	RoleKeyPrefix = "node-role.kubernetes.io/"
	RoleMasterKey = RoleKeyPrefix + RoleMaster
	RoleNodeKey   = RoleKeyPrefix + RoleNode

	PharmerCluster    = "cluster.pharmer.io/cluster"
	KubeadmVersionKey = "cluster.pharmer.io/kubeadm-version"
	NodePoolKey       = "cluster.pharmer.io/pool"

	PodNetworkCalico  = "calico"
	PodNetworkFlannel = "flannel"
	PodNetworkCanal   = "canal"

	CACertName                 = kubeadmconst.CACertAndKeyBaseName
	CACertCommonName           = kubeadmconst.CACertAndKeyBaseName
	FrontProxyCACertName       = kubeadmconst.FrontProxyCACertAndKeyBaseName
	FrontProxyCACertCommonName = kubeadmconst.FrontProxyCACertAndKeyBaseName
	SAKeyName                  = kubeadmconst.ServiceAccountKeyBaseName
	SAKeyCommonName            = kubeadmconst.ServiceAccountKeyBaseName
	ETCDCACertName             = kubeadmconst.EtcdCACertAndKeyBaseName
	ETCDCACertCommonName       = "kubernetes"
)
View Source
const (
	ResourceCodeNodeGroup = "ng"
	ResourceKindNodeGroup = "NodeGroup"
	ResourceNameNodeGroup = "nodegroup"
	ResourceTypeNodeGroup = "nodegroups"
)
View Source
const (
	AWSProviderGroupName   = "awsprovider"
	AWSProviderApiVersion  = "v1alpha1"
	AWSClusterProviderKind = "AWSClusterProviderSpec"
	AWSMachineProviderKind = "AWSMachineProviderSpec"

	AzureProviderGroupName   = "azureprovider"
	AzureProviderMachineKind = "AzureMachineProviderSpec"
	AzureProviderClusterKind = "AzureClusterProviderSpec"
	AzureProviderApiVersion  = "v1alpha1"
)
View Source
const GroupName = "cluster.pharmer.io"
View Source
const (
	NodeLabelKey_Checksum = "meta.appscode.com/checksum"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var ManagedProviders = sets.NewString("aks", "gke", "eks", "dokube")
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}

Functions

func AssignTypeKind

func AssignTypeKind(v interface{}) error

func Convert_KubeConfig_To_Config

func Convert_KubeConfig_To_Config(in *KubeConfig) *clientcmdapi.Config

func ErrAlreadyExist

func ErrAlreadyExist(err error) bool

ErrAlreadyExist checks if the error occurred due to the object already present in the cluster

func ErrObjectModified

func ErrObjectModified(err error) bool

ErrObjectModified checks if the error is : Operation cannot be fulfilled on machines.cluster.k8s.io <machine>: the object has been modified; please apply your changes to the latest version and try again

Types

type API

type API struct {
	// AdvertiseAddress sets the address for the API server to advertise.
	AdvertiseAddress string `json:"advertiseAddress"`
	// BindPort sets the secure port for the API Server to bind to
	BindPort int32 `json:"bindPort"`
}

func (*API) DeepCopy

func (in *API) DeepCopy() *API

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new API.

func (*API) DeepCopyInto

func (in *API) DeepCopyInto(out *API)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSSpec

type AWSSpec struct {
	// aws:TAG KubernetesCluster => clusterid
	IAMProfileMaster  string `json:"iamProfileMaster,omitempty"`
	IAMProfileNode    string `json:"iamProfileNode,omitempty"`
	MasterSGName      string `json:"masterSGName,omitempty"`
	NodeSGName        string `json:"nodeSGName,omitempty"`
	BastionSGName     string `json:"bastionSGName,omitempty"`
	VpcCIDR           string `json:"vpcCIDR,omitempty"`
	VpcCIDRBase       string `json:"vpcCIDRBase,omitempty"`
	MasterIPSuffix    string `json:"masterIPSuffix,omitempty"`
	PrivateSubnetCIDR string `json:"privateSubnetCidr,omitempty"`
	PublicSubnetCIDR  string `json:"publicSubnetCidr,omitempty"`
}

func (*AWSSpec) DeepCopy

func (in *AWSSpec) DeepCopy() *AWSSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSpec.

func (*AWSSpec) DeepCopyInto

func (in *AWSSpec) DeepCopyInto(out *AWSSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSStatus

type AWSStatus struct {
	MasterSGId  string `json:"masterSGID,omitempty"`
	NodeSGId    string `json:"nodeSGID,omitempty"`
	BastionSGId string `json:"bastionSGID,omitempty"`
}

func (*AWSStatus) DeepCopy

func (in *AWSStatus) DeepCopy() *AWSStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSStatus.

func (*AWSStatus) DeepCopyInto

func (in *AWSStatus) DeepCopyInto(out *AWSStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureCloudConfig

type AzureCloudConfig struct {
	Cloud                        string  `json:"cloud"`
	TenantID                     string  `json:"tenantId,omitempty"`
	SubscriptionID               string  `json:"subscriptionId,omitempty"`
	AadClientID                  string  `json:"aadClientId,omitempty"`
	AadClientSecret              string  `json:"aadClientSecret,omitempty"`
	ResourceGroup                string  `json:"resourceGroup,omitempty"`
	Location                     string  `json:"location,omitempty"`
	VMType                       string  `json:"vmType"`
	SubnetName                   string  `json:"subnetName,omitempty"`
	SecurityGroupName            string  `json:"securityGroupName,omitempty"`
	VnetName                     string  `json:"vnetName,omitempty"`
	RouteTableName               string  `json:"routeTableName,omitempty"`
	PrimaryAvailabilitySetName   string  `json:"primaryAvailabilitySetName"`
	PrimaryScaleSetName          string  `json:"primaryScaleSetName"`
	CloudProviderBackoff         bool    `json:"cloudProviderBackoff"`
	CloudProviderBackoffRetries  int     `json:"cloudProviderBackoffRetries"`
	CloudProviderBackoffExponent float32 `json:"cloudProviderBackoffExponent"`
	CloudProviderBackoffDuration int     `json:"cloudProviderBackoffDuration"`
	CloudProviderBackoffJitter   float32 `json:"cloudProviderBackoffJitter"`
	CloudProviderRatelimit       bool    `json:"cloudProviderRatelimit"`
	CloudProviderRateLimitQPS    float32 `json:"cloudProviderRateLimitQPS"`
	CloudProviderRateLimitBucket int     `json:"cloudProviderRateLimitBucket"`
	UseManagedIdentityExtension  bool    `json:"useManagedIdentityExtension"`
	UserAssignedIdentityID       string  `json:"userAssignedIdentityID"`
	UseInstanceMetadata          bool    `json:"useInstanceMetadata"`
	LoadBalancerSku              string  `json:"loadBalancerSku"`
	ExcludeMasterFromStandardLB  bool    `json:"excludeMasterFromStandardLB"`
	ProviderVaultName            string  `json:"providerVaultName"`
	MaximumLoadBalancerRuleCount int     `json:"maximumLoadBalancerRuleCount"`
	ProviderKeyName              string  `json:"providerKeyName"`
	ProviderKeyVersion           string  `json:"providerKeyVersion"`
}

ref: https://github.com/kubernetes/kubernetes/blob/8b9f0ea5de2083589f3b9b289b90273556bc09c4/pkg/cloudprovider/providers/azure/azure.go#L56

func (*AzureCloudConfig) DeepCopy

func (in *AzureCloudConfig) DeepCopy() *AzureCloudConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureCloudConfig.

func (*AzureCloudConfig) DeepCopyInto

func (in *AzureCloudConfig) DeepCopyInto(out *AzureCloudConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureSpec

type AzureSpec struct {
	InstanceImageVersion   string `json:"instanceImageVersion,omitempty"`
	RootPassword           string `json:"rootPassword,omitempty"`
	VPCCIDR                string `json:"vpcCIDR"`
	ControlPlaneSubnetCIDR string `json:"controlPlaneSubnetCIDR"`
	NodeSubnetCIDR         string `json:"nodeSubnetCIDR"`
	InternalLBIPAddress    string `json:"internalLBIPAddress"`
	AzureDNSZone           string `json:"azureDNSZone"`
	SubnetCIDR             string `json:"subnetCidr,omitempty"`
	ResourceGroup          string `json:"resourceGroup,omitempty"`
	SubnetName             string `json:"subnetName,omitempty"`
	SecurityGroupName      string `json:"securityGroupName,omitempty"`
	VnetName               string `json:"vnetName,omitempty"`
	RouteTableName         string `json:"routeTableName,omitempty"`
	StorageAccountName     string `json:"azureStorageAccountName,omitempty"`
	SubscriptionID         string `json:"subscriptionID"`
}

func (*AzureSpec) DeepCopy

func (in *AzureSpec) DeepCopy() *AzureSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSpec.

func (*AzureSpec) DeepCopyInto

func (in *AzureSpec) DeepCopyInto(out *AzureSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureStorageSpec

type AzureStorageSpec struct {
	Container string `json:"container,omitempty"`
	Prefix    string `json:"prefix,omitempty"`
}

func (*AzureStorageSpec) DeepCopy

func (in *AzureStorageSpec) DeepCopy() *AzureStorageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStorageSpec.

func (*AzureStorageSpec) DeepCopyInto

func (in *AzureStorageSpec) DeepCopyInto(out *AzureStorageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudSpec

type CloudSpec struct {
	CloudProvider        string      `json:"cloudProvider,omitempty"`
	Project              string      `json:"project,omitempty"`
	Region               string      `json:"region,omitempty"`
	Zone                 string      `json:"zone,omitempty"` // master needs it for ossec
	InstanceImage        string      `json:"instanceImage,omitempty"`
	OS                   string      `json:"os,omitempty"`
	InstanceImageProject string      `json:"instanceImageProject,omitempty"`
	NetworkProvider      string      `json:"networkProvider,omitempty"` // kubenet, flannel, calico, opencontrail
	SSHKeyName           string      `json:"sshKeyName,omitempty"`
	AWS                  *AWSSpec    `json:"aws,omitempty"`
	GCE                  *GoogleSpec `json:"gce,omitempty"`
	Azure                *AzureSpec  `json:"azure,omitempty"`
	Linode               *LinodeSpec `json:"linode,omitempty"`
	GKE                  *GKESpec    `json:"gke,omitempty"`
	//DigitalOcean         *DigitalOceanMachineProviderConfig `json:"digitalocean,omitempty"`
	Dokube *DokubeSpec `json:"dokube,omitempty"`
}

func (*CloudSpec) DeepCopy

func (in *CloudSpec) DeepCopy() *CloudSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudSpec.

func (*CloudSpec) DeepCopyInto

func (in *CloudSpec) DeepCopyInto(out *CloudSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudStatus

type CloudStatus struct {
	SSHKeyExternalID string       `json:"sshKeyExternalID,omitempty"`
	AWS              *AWSStatus   `json:"aws,omitempty"`
	EKS              *EKSStatus   `json:"eks,omitempty"`
	LoadBalancer     LoadBalancer `json:"loadBalancer,omitempty"`
}

func (*CloudStatus) DeepCopy

func (in *CloudStatus) DeepCopy() *CloudStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudStatus.

func (*CloudStatus) DeepCopyInto

func (in *CloudStatus) DeepCopyInto(out *CloudStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PharmerClusterSpec   `json:"spec,omitempty"`
	Status            PharmerClusterStatus `json:"status,omitempty"`
}

func (*Cluster) APIServerAddress

func (c *Cluster) APIServerAddress() string

func (*Cluster) APIServerURL

func (c *Cluster) APIServerURL() string

func (*Cluster) CloudProvider

func (c *Cluster) CloudProvider() string

func (*Cluster) ClusterConfig

func (c *Cluster) ClusterConfig() ClusterConfig

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Cluster) GenSSHKeyExternalID

func (c *Cluster) GenSSHKeyExternalID() string

func (*Cluster) InitClusterAPI

func (c *Cluster) InitClusterAPI()

func (Cluster) IsLessThanVersion

func (c Cluster) IsLessThanVersion(in string) bool

func (*Cluster) MasterMachineName

func (c *Cluster) MasterMachineName(n int) string

func (*Cluster) SetClusterAPIEndpoints

func (c *Cluster) SetClusterAPIEndpoints(addresses []core.NodeAddress) error

func (*Cluster) SetNetworkingDefaults

func (c *Cluster) SetNetworkingDefaults(provider string)

type ClusterConfig

type ClusterConfig struct {
	MasterCount       int       `json:"masterCount"`
	Cloud             CloudSpec `json:"cloud"`
	KubernetesVersion string    `json:"kubernetesVersion,omitempty"`
	CredentialName    string    `json:"credentialName,omitempty"`
	SSHUserName       string    `json:"sshUserName,omitempty"`

	KubeletExtraArgs           map[string]string `json:"kubeletExtraArgs,omitempty"`
	APIServerExtraArgs         map[string]string `json:"apiServerExtraArgs,omitempty"`
	ControllerManagerExtraArgs map[string]string `json:"controllerManagerExtraArgs,omitempty"`
	SchedulerExtraArgs         map[string]string `json:"schedulerExtraArgs,omitempty"`
	AuthorizationModes         []string          `json:"authorizationModes,omitempty"`
	APIServerCertSANs          []string          `json:"apiServerCertSANs,omitempty"`
}

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfig.

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterPhase

type ClusterPhase string

ClusterPhase is a label for the condition of a Cluster at the current time.

const (
	ClusterPending   ClusterPhase = "Pending"
	ClusterReady     ClusterPhase = "Ready"
	ClusterDeleting  ClusterPhase = "Deleting"
	ClusterDeleted   ClusterPhase = "Deleted"
	ClusterUpgrading ClusterPhase = "Upgrading"
)

These are the valid statuses of Cluster.

type ClusterState

type ClusterState struct {
	// KubeVersion describes the version of the Kubernetes API Server, Controller Manager, Scheduler and Proxy.
	KubeVersion string `json:"kubeVersion"`
	// DNSVersion describes the version of the kube-dns images used and manifest version
	DNSVersion string `json:"dnsVersion"`
	// MasterKubeadmVersion describes the version of the kubeadm CLI
	KubeadmVersion string `json:"kubeadmVersion"`
	// KubeletVersions is a map with a version number linked to the amount of kubelets running that version in the cluster
	KubeletVersions map[string]uint32 `json:"kubeletVersions"`
}

ClusterState describes the state of certain versions for a cluster

func (*ClusterState) DeepCopy

func (in *ClusterState) DeepCopy() *ClusterState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterState.

func (*ClusterState) DeepCopyInto

func (in *ClusterState) DeepCopyInto(out *ClusterState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DokubeSpec

type DokubeSpec struct {
	ClusterID string `json:"clusterID,omitempty"`
}

func (*DokubeSpec) DeepCopy

func (in *DokubeSpec) DeepCopy() *DokubeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DokubeSpec.

func (*DokubeSpec) DeepCopyInto

func (in *DokubeSpec) DeepCopyInto(out *DokubeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EKSStatus

type EKSStatus struct {
	SecurityGroup string `json:"securityGroup,omitempty"`
	VpcID         string `json:"vpcID,omitempty"`
	SubnetID      string `json:"subnetID,omitempty"`
	RoleArn       string `json:"roleArn,omitempty"`
}

func (*EKSStatus) DeepCopy

func (in *EKSStatus) DeepCopy() *EKSStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSStatus.

func (*EKSStatus) DeepCopyInto

func (in *EKSStatus) DeepCopyInto(out *EKSStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecConfig

type ExecConfig struct {
	// Command to execute.
	Command string `json:"command"`
	// Arguments to pass to the command when executing it.
	// +optional
	Args []string `json:"args"`
	// Env defines additional environment variables to expose to the process. These
	// are unioned with the host's environment, as well as variables client-go uses
	// to pass argument to the plugin.
	// +optional
	Env []ExecEnvVar `json:"env"`

	// Preferred input version of the ExecInfo. The returned ExecCredentials MUST use
	// the same encoding version as the input.
	APIVersion string `json:"apiVersion,omitempty"`
}

ExecConfig specifies a command to provide client credentials. The command is exec'd and outputs structured stdout holding credentials.

See the client.authentiction.k8s.io API group for specifications of the exact input and output format

func (*ExecConfig) DeepCopy

func (in *ExecConfig) DeepCopy() *ExecConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig.

func (*ExecConfig) DeepCopyInto

func (in *ExecConfig) DeepCopyInto(out *ExecConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecEnvVar

type ExecEnvVar struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

ExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.

func (*ExecEnvVar) DeepCopy

func (in *ExecEnvVar) DeepCopy() *ExecEnvVar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar.

func (*ExecEnvVar) DeepCopyInto

func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCECloudConfig

type GCECloudConfig struct {
	TokenURL           string   `gcfg:"token-url" ini:"token-url,omitempty"`
	TokenBody          string   `gcfg:"token-body" ini:"token-body,omitempty"`
	ProjectID          string   `gcfg:"project-id" ini:"project-id,omitempty"`
	NetworkName        string   `gcfg:"network-name" ini:"network-name,omitempty"`
	NodeTags           []string `gcfg:"node-tags" ini:"node-tags,omitempty"`
	NodeInstancePrefix string   `gcfg:"node-instance-prefix" ini:"node-instance-prefix,omitempty"`
	Multizone          bool     `gcfg:"multizone" ini:"multizone,omitempty"`
}

func (*GCECloudConfig) DeepCopy

func (in *GCECloudConfig) DeepCopy() *GCECloudConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCECloudConfig.

func (*GCECloudConfig) DeepCopyInto

func (in *GCECloudConfig) DeepCopyInto(out *GCECloudConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCSSpec

type GCSSpec struct {
	Bucket string `json:"bucket,omiempty"`
	Prefix string `json:"prefix,omitempty"`
}

func (*GCSSpec) DeepCopy

func (in *GCSSpec) DeepCopy() *GCSSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCSSpec.

func (*GCSSpec) DeepCopyInto

func (in *GCSSpec) DeepCopyInto(out *GCSSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GKESpec

type GKESpec struct {
	UserName    string `json:"userName,omitempty"`
	Password    string `json:"password,omitempty"`
	NetworkName string `json:"networkName,omitempty"`
}

func (*GKESpec) DeepCopy

func (in *GKESpec) DeepCopy() *GKESpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKESpec.

func (*GKESpec) DeepCopyInto

func (in *GKESpec) DeepCopyInto(out *GKESpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GoogleSpec

type GoogleSpec struct {
	NetworkName string   `gcfg:"network-name" ini:"network-name,omitempty"`
	NodeTags    []string `gcfg:"node-tags" ini:"node-tags,omitempty"`
	// gce
	// NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
	NodeScopes []string `json:"nodeScopes,omitempty"`
}

func (*GoogleSpec) DeepCopy

func (in *GoogleSpec) DeepCopy() *GoogleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleSpec.

func (*GoogleSpec) DeepCopyInto

func (in *GoogleSpec) DeepCopyInto(out *GoogleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPType

type IPType string

type KubeConfig

type KubeConfig struct {
	metav1.TypeMeta `json:",inline"`
	// Preferences holds general information to be use for cli interactions
	Preferences Preferences `json:"preferences"`
	// Clusters is a map of referencable names to cluster configs
	Cluster NamedCluster `json:"cluster"`
	// AuthInfos is a map of referencable names to user configs
	AuthInfo NamedAuthInfo `json:"user"`
	// Contexts is a map of referencable names to context configs
	Context NamedContext `json:"context"`
}

Config holds the information needed to build connect to remote kubernetes clusters as a given user +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*KubeConfig) DeepCopy

func (in *KubeConfig) DeepCopy() *KubeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeConfig.

func (*KubeConfig) DeepCopyInto

func (in *KubeConfig) DeepCopyInto(out *KubeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KubeConfig) DeepCopyObject

func (in *KubeConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LinodeCloudConfig

type LinodeCloudConfig struct {
	Token string `json:"token,omitempty"`
	Zone  string `json:"zone,omitempty"`
}

func (*LinodeCloudConfig) DeepCopy

func (in *LinodeCloudConfig) DeepCopy() *LinodeCloudConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinodeCloudConfig.

func (*LinodeCloudConfig) DeepCopyInto

func (in *LinodeCloudConfig) DeepCopyInto(out *LinodeCloudConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LinodeSpec

type LinodeSpec struct {
	// Linode
	RootPassword string `json:"rootPassword,omitempty"`
	KernelID     string `json:"kernelId,omitempty"`
}

func (*LinodeSpec) DeepCopy

func (in *LinodeSpec) DeepCopy() *LinodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinodeSpec.

func (*LinodeSpec) DeepCopyInto

func (in *LinodeSpec) DeepCopyInto(out *LinodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancer

type LoadBalancer struct {
	DNS  string `json:"dns"`
	IP   string `json:"ip"`
	Port int    `json:"port"`
}

func (*LoadBalancer) DeepCopy

func (in *LoadBalancer) DeepCopy() *LoadBalancer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer.

func (*LoadBalancer) DeepCopyInto

func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalSpec

type LocalSpec struct {
	Path string `json:"path,omitempty"`
}

func (*LocalSpec) DeepCopy

func (in *LocalSpec) DeepCopy() *LocalSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSpec.

func (*LocalSpec) DeepCopyInto

func (in *LocalSpec) DeepCopyInto(out *LocalSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Logger

type Logger interface {
	Info(args ...interface{})
	Infoln(args ...interface{})
	Infof(format string, args ...interface{})

	Debug(args ...interface{})
	Debugln(args ...interface{})
	Debugf(format string, args ...interface{})
}

type MachineRole

type MachineRole string
const (
	MasterMachineRole MachineRole = "Master"
	NodeMachineRole   MachineRole = "Node"
)

type NamedAuthInfo

type NamedAuthInfo struct {
	// Name is the nickname for this AuthInfo
	Name string `json:"name"`
	// ClientCertificateData contains PEM-encoded data from a client cert file for TLS.
	// +optional
	ClientCertificateData []byte `json:"clientCertificateData,omitempty"`
	// ClientKeyData contains PEM-encoded data from a client key file for TLS.
	// +optional
	ClientKeyData []byte `json:"clientKeyData,omitempty"`
	// Token is the bearer token for authentication to the kubernetes cluster.
	// +optional
	Token string `json:"token,omitempty"`
	// Username is the username for basic authentication to the kubernetes cluster.
	// +optional
	Username string `json:"username,omitempty"`
	// Password is the password for basic authentication to the kubernetes cluster.
	// +optional
	Password string `json:"password,omitempty"`
	// +optional
	Exec *ExecConfig `json:"exec,omitempty"`
}

NamedAuthInfo relates nicknames to auth information

func (*NamedAuthInfo) DeepCopy

func (in *NamedAuthInfo) DeepCopy() *NamedAuthInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedAuthInfo.

func (*NamedAuthInfo) DeepCopyInto

func (in *NamedAuthInfo) DeepCopyInto(out *NamedAuthInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamedCluster

type NamedCluster struct {
	// Name is the nickname for this Cluster
	Name string `json:"name"`
	// Server is the address of the kubernetes cluster (https://hostname:port).
	Server string `json:"server"`
	// CertificateAuthorityData contains PEM-encoded CertKeyPair authority certificates. Overrides CertificateAuthorityData
	// +optional
	CertificateAuthorityData []byte `json:"certificateAuthorityData,omitempty"`
}

NamedCluster relates nicknames to cluster information

func (*NamedCluster) DeepCopy

func (in *NamedCluster) DeepCopy() *NamedCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedCluster.

func (*NamedCluster) DeepCopyInto

func (in *NamedCluster) DeepCopyInto(out *NamedCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamedContext

type NamedContext struct {
	// Name is the nickname for this Context
	Name string `json:"name"`
	// Cluster is the name of the cluster for this context
	Cluster string `json:"cluster"`
	// AuthInfo is the name of the authInfo for this context
	AuthInfo string `json:"user"`
}

NamedContext relates nicknames to context information

func (*NamedContext) DeepCopy

func (in *NamedContext) DeepCopy() *NamedContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedContext.

func (*NamedContext) DeepCopyInto

func (in *NamedContext) DeepCopyInto(out *NamedContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeInfo

type NodeInfo struct {
	metav1.TypeMeta `json:",inline"`
	Name            string `json:"name,omitempty"`
	ExternalID      string `json:"externalID,omitempty"`
	PublicIP        string `json:"publicIP,omitempty"`
	PrivateIP       string `json:"privateIP,omitempty"`
	DiskId          string `json:"diskID,omitempty"`
}

func (*NodeInfo) DeepCopy

func (in *NodeInfo) DeepCopy() *NodeInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo.

func (*NodeInfo) DeepCopyInto

func (in *NodeInfo) DeepCopyInto(out *NodeInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeInfo) DeepCopyObject

func (in *NodeInfo) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeLabels

type NodeLabels map[string]string

NodeLabels is used to parse and generate --node-label flag for kubelet. ref: http://kubernetes.io/docs/admin/kubelet/

NodeLabels also includes functionality to sign and verify appscode.com specific node labels. Verified labels will be used by cluster mutation engine to update/upgrade nodes.

func (NodeLabels) DeepCopy

func (in NodeLabels) DeepCopy() NodeLabels

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLabels.

func (NodeLabels) DeepCopyInto

func (in NodeLabels) DeepCopyInto(out *NodeLabels)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (NodeLabels) String

func (n NodeLabels) String() string

type NodeSpec

type NodeSpec struct {
	SKU              string            `json:"sku,omitempty"`
	DiskType         string            `json:"nodeDiskType,omitempty"`
	DiskSize         int64             `json:"nodeDiskSize,omitempty"`
	ExternalIPType   IPType            `json:"externalIPType,omitempty"`
	KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"`
	Type             NodeType          `json:"type,omitempty"`
	SpotPriceMax     float64           `json:"spotPriceMax,omitempty"`
}

func (*NodeSpec) DeepCopy

func (in *NodeSpec) DeepCopy() *NodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.

func (*NodeSpec) DeepCopyInto

func (in *NodeSpec) DeepCopyInto(out *NodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeType

type NodeType string
const (
	NodeTypeSpot NodeType = "spot"

	MachineSlecetor = "cluster.pharmer.io/mg"
)

type Operation

type Operation struct {
	ID        int64  `xorm:"pk autoincr 'id'"`
	UserID    int64  `xorm:"UNIQUE(s) 'user_id'"`
	ClusterID int64  `xorm:"UNIQUE(s) 'cluster_id'"`
	Code      string `xorm:"UNIQUE(s)"`
	State     OperationState
}

func (*Operation) DeepCopy

func (in *Operation) DeepCopy() *Operation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation.

func (*Operation) DeepCopyInto

func (in *Operation) DeepCopyInto(out *Operation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Operation) TableName

func (Operation) TableName() string

type OperationState

type OperationState int
const (
	OperationDone OperationState = iota // 0
	OperationPending
	OperationRunning
)

type PacketCloudConfig

type PacketCloudConfig struct {
	Project string `json:"project,omitempty"`
	APIKey  string `json:"apiKey,omitempty"`
	Zone    string `json:"zone,omitempty"`
}

func (*PacketCloudConfig) DeepCopy

func (in *PacketCloudConfig) DeepCopy() *PacketCloudConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacketCloudConfig.

func (*PacketCloudConfig) DeepCopyInto

func (in *PacketCloudConfig) DeepCopyInto(out *PacketCloudConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PharmerClusterSpec

type PharmerClusterSpec struct {
	ClusterAPI clusterapi.Cluster `json:"clusterApi,omitempty"`
	Config     ClusterConfig      `json:"config,omitempty"`
	AuditSink  bool               `json:"auditSink,omitempty"`
}

func (*PharmerClusterSpec) DeepCopy

func (in *PharmerClusterSpec) DeepCopy() *PharmerClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PharmerClusterSpec.

func (*PharmerClusterSpec) DeepCopyInto

func (in *PharmerClusterSpec) DeepCopyInto(out *PharmerClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PharmerClusterStatus

type PharmerClusterStatus struct {
	Phase  ClusterPhase `json:"phase,omitempty"`
	Reason string       `json:"reason,omitempty"`
	Cloud  CloudStatus  `json:"cloud,omitempty"`
}

func (*PharmerClusterStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PharmerClusterStatus.

func (*PharmerClusterStatus) DeepCopyInto

func (in *PharmerClusterStatus) DeepCopyInto(out *PharmerClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PharmerConfig

type PharmerConfig struct {
	metav1.TypeMeta `json:",inline"`
	Context         string                `json:"context,omitempty"`
	Credentials     []cloudapi.Credential `json:"credentials,omitempty"`
	Store           StorageBackend        `json:"store,omitempty"`
}

func (*PharmerConfig) DeepCopy

func (in *PharmerConfig) DeepCopy() *PharmerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PharmerConfig.

func (*PharmerConfig) DeepCopyInto

func (in *PharmerConfig) DeepCopyInto(out *PharmerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PharmerConfig) DeepCopyObject

func (in *PharmerConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (PharmerConfig) GetStoreType

func (pc PharmerConfig) GetStoreType() string

type PostgresSpec

type PostgresSpec struct {
	DbName   string `json:"database,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     int64  `json:"port,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*PostgresSpec) DeepCopy

func (in *PostgresSpec) DeepCopy() *PostgresSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresSpec.

func (*PostgresSpec) DeepCopyInto

func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Preferences

type Preferences struct {
	// +optional
	Colors bool `json:"colors,omitempty"`
}

func (*Preferences) DeepCopy

func (in *Preferences) DeepCopy() *Preferences

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences.

func (*Preferences) DeepCopyInto

func (in *Preferences) DeepCopyInto(out *Preferences)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReservedIP

type ReservedIP struct {
	IP   string `json:"ip,omitempty"`
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

func (*ReservedIP) DeepCopy

func (in *ReservedIP) DeepCopy() *ReservedIP

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservedIP.

func (*ReservedIP) DeepCopyInto

func (in *ReservedIP) DeepCopyInto(out *ReservedIP)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type S3Spec

type S3Spec struct {
	Endpoint string `json:"endpoint,omitempty"`
	Bucket   string `json:"bucket,omiempty"`
	Prefix   string `json:"prefix,omitempty"`
}

func (*S3Spec) DeepCopy

func (in *S3Spec) DeepCopy() *S3Spec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Spec.

func (*S3Spec) DeepCopyInto

func (in *S3Spec) DeepCopyInto(out *S3Spec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SSHConfig

type SSHConfig struct {
	PrivateKey []byte `json:"privateKey,omitempty"`
	HostIP     string `json:"hostIP,omitempty"`
	HostPort   int32  `json:"hostPort,omitempty"`
	User       string `json:"user,omitempty"`
}

func (*SSHConfig) DeepCopy

func (in *SSHConfig) DeepCopy() *SSHConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSHConfig.

func (*SSHConfig) DeepCopyInto

func (in *SSHConfig) DeepCopyInto(out *SSHConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageBackend

type StorageBackend struct {
	CredentialName string `json:"credentialName,omitempty"`

	Local    *LocalSpec        `json:"local,omitempty"`
	S3       *S3Spec           `json:"s3,omitempty"`
	GCS      *GCSSpec          `json:"gcs,omitempty"`
	Azure    *AzureStorageSpec `json:"azure,omitempty"`
	Swift    *SwiftSpec        `json:"swift,omitempty"`
	Postgres *PostgresSpec     `json:"postgres,omitempty"`
}

func (*StorageBackend) DeepCopy

func (in *StorageBackend) DeepCopy() *StorageBackend

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageBackend.

func (*StorageBackend) DeepCopyInto

func (in *StorageBackend) DeepCopyInto(out *StorageBackend)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SwiftSpec

type SwiftSpec struct {
	Container string `json:"container,omitempty"`
	Prefix    string `json:"prefix,omitempty"`
}

func (*SwiftSpec) DeepCopy

func (in *SwiftSpec) DeepCopy() *SwiftSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwiftSpec.

func (*SwiftSpec) DeepCopyInto

func (in *SwiftSpec) DeepCopyInto(out *SwiftSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Upgrade

type Upgrade struct {
	metav1.TypeMeta `json:",inline"`

	Description string       `json:"description"`
	Before      ClusterState `json:"before"`
	After       ClusterState `json:"after"`
}

https://github.com/kubernetes/kubernetes/blob/aa1dc9db3532dfbf09e45c8e3786a648cd217417/cmd/kubeadm/app/phases/upgrade/compute.go#L28

func (*Upgrade) CanUpgradeKubelets

func (u *Upgrade) CanUpgradeKubelets() bool

CanUpgradeKubelets returns whether an upgrade of any kubelet in the cluster is possible

func (*Upgrade) DeepCopy

func (in *Upgrade) DeepCopy() *Upgrade

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.

func (*Upgrade) DeepCopyInto

func (in *Upgrade) DeepCopyInto(out *Upgrade)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Upgrade) DeepCopyObject

func (in *Upgrade) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VultrCloudConfig

type VultrCloudConfig struct {
	Token string `json:"token,omitempty"`
}

func (*VultrCloudConfig) DeepCopy

func (in *VultrCloudConfig) DeepCopy() *VultrCloudConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VultrCloudConfig.

func (*VultrCloudConfig) DeepCopyInto

func (in *VultrCloudConfig) DeepCopyInto(out *VultrCloudConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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