k8s

package
v2.1.16+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseListOptions

type BaseListOptions struct {
	Limit  int    `default:"20" help:"Page limit"`
	Offset int    `default:"0" help:"Page offset"`
	Name   string `help:"Search by name"`
}

func (BaseListOptions) Params

func (o BaseListOptions) Params() *jsonutils.JSONDict

type ChartGetOptions

type ChartGetOptions struct {
	REPO    string `help:"Repo of the chart"`
	NAME    string `help:"Chart name"`
	Version string `help:"Chart version"`
}

func (ChartGetOptions) Params

func (o ChartGetOptions) Params() *jsonutils.JSONDict

type ChartListOptions

type ChartListOptions struct {
	BaseListOptions
	Name       string `help:"Chart name"`
	Repo       string `help:"Repository name"`
	RepoUrl    string `help:"Repository url"`
	AllVersion bool   `json:"Get Chart all history versions"`
	Keyword    string `json:"Chart keyword"`
}

func (ChartListOptions) Params

func (o ChartListOptions) Params() *jsonutils.JSONDict

type ClusterAddNodesOptions

type ClusterAddNodesOptions struct {
	IdentOptions
	NodeConfig []string `help:"Node spec, 'host:[roles]' e.g: --node-config host01:controlplane,etcd,worker --node-config host02:worker"`
	AutoDeploy bool     `help:"Auto deploy"`
}

func (ClusterAddNodesOptions) Params

type ClusterBaseOptions

type ClusterBaseOptions struct {
	Cluster string `default:"$K8S_CLUSTER|default" help:"Kubernetes cluster name"`
}

func (ClusterBaseOptions) Params

type ClusterCreateOptions

type ClusterCreateOptions struct {
	NAME       string `help:"Name of cluster"`
	Mode       string `help:"Cluster mode" choices:"internal"`
	K8sVersion string `help:"Cluster kubernetes components version" choices:"v1.8.10|v1.9.5|v1.10.0"`
	InfraImage string `help:"Cluster kubelet infra container image"`
	Cidr       string `help:"Cluster service CIDR, e.g. 10.43.0.0/16"`
	Domain     string `help:"Cluster pod domain, e.g. cluster.local"`
}

func (ClusterCreateOptions) Params

type ClusterDeleteOptions

type ClusterDeleteOptions struct {
	IdentsOptions
}

type ClusterDeployOptions

type ClusterDeployOptions struct {
	IdentOptions
	Force bool `help:"Force deploy"`
}

func (ClusterDeployOptions) Params

type ClusterImportOptions

type ClusterImportOptions struct {
	NAME       string `help:"Name of cluster to import"`
	KUBECONFIG string `help:"Kubernetes auth config"`
}

func (ClusterImportOptions) Params

type ClusterKubeconfigOptions

type ClusterKubeconfigOptions struct {
	IdentOptions
	Directly bool `help:"Get directly connect kubeconfig"`
}

func (ClusterKubeconfigOptions) Params

type ClusterListOptions

type ClusterListOptions struct {
	options.BaseListOptions
}

func (ClusterListOptions) Params

type ClusterUpdateOptions

type ClusterUpdateOptions struct {
	NAME       string `help:"Name of cluster"`
	K8sVersion string `help:"Cluster kubernetes components version" choices:"v1.8.10|v1.9.5|v1.10.0"`
}

func (ClusterUpdateOptions) Params

type DeploymentCreateFromFileOptions

type DeploymentCreateFromFileOptions struct {
	NamespaceResourceGetOptions
	FILE string `help:"K8s resource YAML or JSON file"`
}

func (DeploymentCreateFromFileOptions) Params

type DeploymentCreateOptions

type DeploymentCreateOptions struct {
	NamespaceWithClusterOptions
	NAME            string   `help:"Name of deployment"`
	Image           string   `help:"The image for the container to run"`
	Replicas        int64    `help:"Number of replicas for pods in this deployment"`
	RunAsPrivileged bool     `help:"Whether to run the container as privileged user"`
	Label           []string `help:"Labels to apply to the pod(s), e.g. 'env=prod'"`
	Env             []string `help:"Environment variables to set in container"`
	Port            []string `help:"Port for the service that is created, format is <protocol>:<service_port>:<container_port> e.g. tcp:80:3000"`
	Net             string   `help:"Network config, e.g. net1, net1:10.168.222.171"`
	Mem             int      `help:"Memory request MB size"`
	Cpu             float64  `help:"Cpu request cores"`
}

func (DeploymentCreateOptions) Params

type IdentOptions

type IdentOptions struct {
	ID string `help:"ID or name of the model"`
}

type IdentsOptions

type IdentsOptions struct {
	ID []string `help:"ID of models to operate"`
}

type NamespaceOptions

type NamespaceOptions struct {
	Namespace string `help:"Namespace of this resource"`
}

func (NamespaceOptions) Params

func (o NamespaceOptions) Params() *jsonutils.JSONDict

type NamespaceResourceDeleteOptions

type NamespaceResourceDeleteOptions struct {
	ResourceDeleteOptions
	NamespaceOptions
}

func (NamespaceResourceDeleteOptions) Params

type NamespaceResourceGetOptions

type NamespaceResourceGetOptions struct {
	ResourceGetOptions
	NamespaceOptions
}

func (NamespaceResourceGetOptions) Params

type NamespaceResourceListOptions

type NamespaceResourceListOptions struct {
	ResourceListOptions
	Namespace    string `help:"Namespace of this resource"`
	AllNamespace bool   `help:"Show resource in all namespace"`
}

func (NamespaceResourceListOptions) Params

type NamespaceWithClusterOptions

type NamespaceWithClusterOptions struct {
	NamespaceOptions
	ClusterBaseOptions
}

func (NamespaceWithClusterOptions) Params

type NodeCreateOptions

type NodeCreateOptions struct {
	CLUSTER          string   `help:"Cluster id"`
	Etcd             bool     `help:"Etcd role"`
	Controlplane     bool     `help:"Controlplane role"`
	Worker           bool     `help:"Worker role"`
	AllRole          bool     `help:"All roles"`
	HostnameOverride string   `help:"Worker node overrided hostname"`
	Host             string   `help:"Yunion host server name or id"`
	Name             string   `help:"Name of node"`
	RegistryMirror   []string `help:"Docker registry mirrors, e.g. 'https://registry.docker-cn.com'"`
	InsecureRegistry []string `help:"Docker insecure registry"`
}

func (NodeCreateOptions) Params

func (o NodeCreateOptions) Params() *jsonutils.JSONDict

type NodeListOptions

type NodeListOptions struct {
	options.BaseListOptions
	Cluster string `help:"Filter by cluster"`
}

func (NodeListOptions) Params

func (o NodeListOptions) Params() (*jsonutils.JSONDict, error)

type ReleaseCreateOptions

type ReleaseCreateOptions struct {
	NamespaceWithClusterOptions
	ReleaseCreateUpdateOptions
	Name      string `help:"Release name, If unspecified, it will autogenerate one for you"`
	CHARTNAME string `help:"Helm chart name, e.g stable/etcd"`
}

func (ReleaseCreateOptions) Params

type ReleaseCreateUpdateOptions

type ReleaseCreateUpdateOptions struct {
	Values  string `help:"Specify values in a YAML file (can specify multiple)" short-token:"f"`
	Version string `help:"Specify the exact chart version to install. If not specified, latest version installed"`
	//Set     []string `help:"set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)"`
	DryRun  bool  `help:"Simulate an install"`
	Details bool  `help:"Show release deploy details, include kubernetes created resources"`
	Timeout int64 `help:"Time in seconds to wait for any individual kubernetes operation (like Jobs for hooks)" default:"600"`
}

func (ReleaseCreateUpdateOptions) Params

type ReleaseDeleteOptions

type ReleaseDeleteOptions struct {
	ClusterBaseOptions
	NAME string `help:"Release instance name"`
}

type ReleaseListOptions

type ReleaseListOptions struct {
	NamespaceResourceListOptions
	Name       string `help:"Search by name"`
	Filter     string `help:"Filter, split by space"`
	Admin      bool   `help:"Admin to show all namespace releases"`
	Deployed   bool   `help:"Show deployed status releases"`
	Deleted    bool   `help:"Show deleted status releases"`
	Deleting   bool   `help:"Show deleting status releases"`
	Failed     bool   `help:"Show failed status releases"`
	Superseded bool   `help:"Show superseded status releases"`
	Pending    bool   `help:"Show pending status releases"`
}

func (ReleaseListOptions) Params

type ReleaseUpgradeOptions

type ReleaseUpgradeOptions struct {
	ClusterBaseOptions
	ReleaseCreateUpdateOptions
	NAME        string `help:"Release instance name"`
	CHARTNAME   string `help:"Helm chart name, e.g stable/etcd"`
	ReuseValues bool   `` /* 134-byte string literal not displayed */
	ResetValues bool   `help:"When upgrading, reset the values to the ones built into the chart"`
}

func (ReleaseUpgradeOptions) Params

type RepoCreateOptions

type RepoCreateOptions struct {
	RepoGetOptions
	URL string `help:"Repository url"`
}

func (RepoCreateOptions) Params

func (o RepoCreateOptions) Params() *jsonutils.JSONDict

type RepoGetOptions

type RepoGetOptions struct {
	NAME string `help:"ID or name of the repo"`
}

type RepoListOptions

type RepoListOptions struct {
	options.BaseListOptions
}

type RepoUpdateOptions

type RepoUpdateOptions struct {
	RepoGetOptions
	Name string `help:"Repository name to change"`
	Url  string `help:"Repository url to change"`
}

func (RepoUpdateOptions) Params

func (o RepoUpdateOptions) Params() *jsonutils.JSONDict

type ResourceDeleteOptions

type ResourceDeleteOptions struct {
	ClusterBaseOptions
	NAME []string `help:"Name ident of the resources"`
}

func (ResourceDeleteOptions) Params

type ResourceGetOptions

type ResourceGetOptions struct {
	ClusterBaseOptions
	NAME string `help:"Name ident of the resource"`
}

func (ResourceGetOptions) Params

type ResourceListOptions

type ResourceListOptions struct {
	ClusterBaseOptions
	BaseListOptions
}

func (ResourceListOptions) Params

type TillerCreateOptions

type TillerCreateOptions struct {
	ClusterBaseOptions
	KubeContext string `json:"kube_context"`
	Namespace   string `json:"namespace" default:"kube-system"`
	// Upgrade if Tiller is already installed
	Upgrade bool `json:"upgrade"`
	// Name of service account
	ServiceAccount string `json:"service_account" default:"tiller"`
	// Use the canary Tiller image
	Canary bool `json:"canary_image"`

	// Override Tiller image
	Image string `json:"tiller_image" default:"yunion/tiller:v2.9.0"`
	// Limit the maximum number of revisions saved per release. Use 0 for no limit.
	MaxHistory int `json:"history_max"`
}

func (TillerCreateOptions) Params

Jump to

Keyboard shortcuts

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