v1

package
v0.0.0-...-9ea1053 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClustersKind         = "Cluster"
	ClustersName         = "clusters"
	ClustersSingularName = "cluster"
)
View Source
const (
	ClusterNodesKind         = "ClusterNode"
	ClusterNodesName         = "clusternodes"
	ClusterNodesSingularName = "clusternode"
)
View Source
const (
	// ClusterConditionReady Cluster ready to serve API (healthy when true, unehalthy when false)
	ClusterConditionReady = "Ready"
	// ClusterConditionProvisioned Cluster is provisioned
	ClusterConditionProvisioned = "Provisioned"
	// ClusterConditionUpdating Cluster is being updating (upgrading, scaling up)
	ClusterConditionUpdating = "Updating"
	// ClusterConditionSufficientDisk true when all cluster nodes have sufficient disk
	ClusterConditionSufficientDisk = "SufficientDisk"
	// ClusterConditionSufficientMemory true when all cluster nodes have sufficient memory
	ClusterConditionSufficientMemory = "SufficientMemory"
	// ClusterConditionNoDiskPressure true when all cluster nodes have no disk pressure
	ClusterConditionNoDiskPressure = "NoDiskPressure"
)
View Source
const (
	Group = "rancher.com"
)

Variables

View Source
var Version = "v1"

Functions

func SetConfigDefaults

func SetConfigDefaults(config *rest.Config)

func UnstructuredFromCluster

func UnstructuredFromCluster(p *Cluster) (*unstructured.Unstructured, error)

func UnstructuredFromClusterNode

func UnstructuredFromClusterNode(p *ClusterNode) (*unstructured.Unstructured, error)

Types

type AKSConfig

type AKSConfig struct {
}

type Cluster

type Cluster struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object’s metadata. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the desired behavior of the the cluster. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
	Spec ClusterSpec `json:"spec"`
	// Most recent observed status of the cluster. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
	Status *ClusterStatus `json:"status"`
}

func ClusterFromUnstructured

func ClusterFromUnstructured(r *unstructured.Unstructured) (*Cluster, error)

type ClusterCondition

type ClusterCondition struct {
	// Type of cluster condition.
	Type ClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
}

type ClusterConditionType

type ClusterConditionType string

type ClusterInterface

type ClusterInterface interface {
	Create(*Cluster) (*Cluster, error)
	Get(name string, opts metav1.GetOptions) (*Cluster, error)
	Update(*Cluster) (*Cluster, error)
	Delete(name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (runtime.Object, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(dopts *metav1.DeleteOptions, lopts metav1.ListOptions) error
}

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of Clusters
	Items []*Cluster `json:"items"`
}

type ClusterNode

type ClusterNode struct {
	v1.Node
}

func ClusterNodeFromUnstructured

func ClusterNodeFromUnstructured(r *unstructured.Unstructured) (*ClusterNode, error)

type ClusterNodeInterface

type ClusterNodeInterface interface {
	Create(*ClusterNode) (*ClusterNode, error)
	Get(name string, opts metav1.GetOptions) (*ClusterNode, error)
	Update(*ClusterNode) (*ClusterNode, error)
	Delete(name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (runtime.Object, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(dopts *metav1.DeleteOptions, lopts metav1.ListOptions) error
}

type ClusterNodeList

type ClusterNodeList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of Clusters
	Items []*Cluster `json:"items"`
}

type ClusterNodeMetadata

type ClusterNodeMetadata struct {
	// Standard object’s metadata. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`
	ClusterName       string `json:"clusterName,omitempty"`
}

type ClusterNodesGetter

type ClusterNodesGetter interface {
	ClusterNodes(namespace string) ClusterNodeInterface
}

type ClusterSpec

type ClusterSpec struct {
	GKEConfig *GKEConfig `json:"gkeConfig,omitempty"`
	AKSConfig *AKSConfig `json:"aksConfig,omitempty"`
	RKEConfig *RKEConfig `json:"rkeConfig,omitempty"`
}

type ClusterStatus

type ClusterStatus struct {
	//Conditions represent the latest available observations of an object's current state:
	//More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#typical-status-properties
	Conditions []ClusterCondition `json:"conditions,omitempty"`
	//Component statuses will represent cluster's components (etcd/controller/scheduler) health
	// https://kubernetes.io/docs/api-reference/v1.8/#componentstatus-v1-core
	ComponentStatuses   v1.ComponentStatusList
	APIEndpoint         string          `json:"apiEndpoint,omitempty"`
	ServiceAccountToken string          `json:"serviceAccountToken,omitempty"`
	CACert              string          `json:"caCert,omitempty"`
	Capacity            v1.ResourceList `json:"capacity,omitempty"`
	Allocatable         v1.ResourceList `json:"allocatable,omitempty"`
}

type ClustersGetter

type ClustersGetter interface {
	Clusters(namespace string) ClusterInterface
}

type ClustersManagerV1Client

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

func NewForConfig

func NewForConfig(c *rest.Config) (*ClustersManagerV1Client, error)

func (*ClustersManagerV1Client) ClusterNodes

func (*ClustersManagerV1Client) Clusters

func (*ClustersManagerV1Client) RESTClient

func (c *ClustersManagerV1Client) RESTClient() rest.Interface

type ClustersManagerV1Interface

type ClustersManagerV1Interface interface {
	RESTClient() rest.Interface
	ClustersGetter
	ClusterNodesGetter
}

type ETCDService

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

type GKEConfig

type GKEConfig struct {
	// ProjectID is the ID of your project to use when creating a cluster
	ProjectID string `json:"projectId,omitempty"`
	// The zone to launch the cluster
	Zone string `json:"zone,omitempty"`
	// The IP address range of the container pods
	ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
	// An optional description of this cluster
	Description string `json:"description,omitempty"`
	// The number of nodes to create in this cluster
	InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
	// Size of the disk attached to each node
	DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
	// The name of a Google Compute Engine
	MachineType string `json:"machineType,omitempty"`
	// the initial kubernetes version
	InitialClusterVersion string `json:"initialClusterVersion,omitempty"`
	// The map of Kubernetes labels (key/value pairs) to be applied
	// to each node.
	Labels map[string]string `json:"labels,omitempty"`
	// The path to the credential file(key.json)
	CredentialPath string `json:"credentialPath,omitempty"`
	// Enable alpha feature
	EnableAlphaFeature bool `json:"enableAlphaFeature,omitempty"`
	// NodePool id
	NodePoolID string `json:"nodePoolId,omitempty"`

	// Update Config
	UpdateConfig gkeUpdateConfig `json:"updateConfig,omitempty"`
}

type KubeAPIService

type KubeAPIService struct {

	// Virtual IP range that will be used by Kubernetes services
	ServiceClusterIPRange string `yaml:"service_cluster_ip_range"`
	// contains filtered or unexported fields
}

type KubeControllerService

type KubeControllerService struct {

	// CIDR Range for Pods in cluster
	ClusterCIDR string `yaml:"cluster_cidr"`
	// Virtual IP range that will be used by Kubernetes services
	ServiceClusterIPRange string `yaml:"service_cluster_ip_range"`
	// contains filtered or unexported fields
}

type KubeletService

type KubeletService struct {

	// Domain of the cluster (default: "cluster.local")
	ClusterDomain string `yaml:"cluster_domain"`
	// The image whose network/ipc namespaces containers in each pod will use
	InfraContainerImage string `yaml:"infra_container_image"`
	// Cluster DNS service ip
	ClusterDNSServer string `yaml:"cluster_dns_server"`
	// contains filtered or unexported fields
}

type KubeproxyService

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

type RKEConfig

type RKEConfig struct {
	// Kubernetes nodes
	Hosts []RKEConfigHost `yaml:"hosts"`
	// Kubernetes components
	Services RKEConfigServices `yaml:"services"`
	// Network plugin used in the kubernetes cluster (flannel, calico)
	NetworkPlugin string `yaml:"network_plugin"`
	// Authentication type used in the cluster (default: x509)
	AuthType string `yaml:"auth_type"`
}

type RKEConfigHost

type RKEConfigHost struct {
	// SSH IP address of the host
	IP string `yaml:"ip"`
	// Advertised address that will be used for components communication
	AdvertiseAddress string `yaml:"advertise_address"`
	// Host role in kubernetes cluster (controlplane, worker, or etcd)
	Role []string `yaml:"role"`
	// Hostname of the host
	Hostname string `yaml:"hostname"`
	// SSH usesr that will be used by RKE
	User string `yaml:"user"`
	// Docker socket on the host that will be used in tunneling
	DockerSocket string `yaml:"docker_socket"`
}

type RKEConfigServices

type RKEConfigServices struct {
	// Etcd Service
	Etcd ETCDService `yaml:"etcd"`
	// KubeAPI Service
	KubeAPI KubeAPIService `yaml:"kube-api"`
	// KubeController Service
	KubeController KubeControllerService `yaml:"kube-controller"`
	// Scheduler Service
	Scheduler SchedulerService `yaml:"scheduler"`
	// Kubelet Service
	Kubelet KubeletService `yaml:"kubelet"`
	// KubeProxy Service
	Kubeproxy KubeproxyService `yaml:"kubeproxy"`
}

type SchedulerService

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

Jump to

Keyboard shortcuts

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