k8s

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidServiceType = errors.New("Invalid service type")
	ErrNotFound           = status.Errorf(codes.NotFound, "Resource not found")
	ErrPodRunFailed       = status.Errorf(codes.Aborted, "Pod went into failed status")
	ErrPodStillRunning    = status.Errorf(codes.Unknown, "Pod still running")
)

Functions

This section is empty.

Types

type Client

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

func New

func New(conf *Config) (*Client, error)

func (*Client) AddressList added in v0.15.0

func (k *Client) AddressList(namespace string) ([]*app.Address, error)

func (*Client) Autoscale added in v0.15.0

func (k *Client) Autoscale(namespace string) (*app.Autoscale, error)

func (*Client) CreateNamespace added in v0.15.0

func (k *Client) CreateNamespace(a *app.App, user string) error

func (*Client) CreateOrUpdateAutoscale added in v0.15.0

func (k *Client) CreateOrUpdateAutoscale(a *app.App) error

func (*Client) CreateOrUpdateDeploy added in v0.15.0

func (k *Client) CreateOrUpdateDeploy(deploySpec *spec.Deploy) error

func (*Client) CreateOrUpdateDeployEnvVars added in v0.15.0

func (k *Client) CreateOrUpdateDeployEnvVars(namespace, name string, evs []*app.EnvVar) error

func (*Client) CreateQuota added in v0.15.0

func (k *Client) CreateQuota(a *app.App) error

func (*Client) CreateSecret added in v0.15.0

func (k *Client) CreateSecret(appName, secretName string, data map[string][]byte) error

func (*Client) DeleteDeployEnvVars added in v0.15.0

func (k *Client) DeleteDeployEnvVars(namespace, name string, evNames []string) error

func (*Client) DeleteNamespace added in v0.15.0

func (k *Client) DeleteNamespace(namespace string) error

func (*Client) DeletePod added in v0.15.0

func (k *Client) DeletePod(namespace, podName string) error

func (*Client) DeployAnnotation added in v0.15.0

func (k *Client) DeployAnnotation(namespace, deployName, annotation string) (string, error)

func (*Client) DeployRollbackToRevision added in v0.15.0

func (k *Client) DeployRollbackToRevision(namespace, name, revision string) error

func (*Client) DeploySetReplicas added in v0.15.0

func (k *Client) DeploySetReplicas(namespace, name string, replicas int32) error

func (*Client) ExposeDeploy added in v0.15.0

func (k *Client) ExposeDeploy(namespace, appName, vHost string, w io.Writer) error

ExposeDeploy creates a service and/or a ingress if needed

func (*Client) HealthCheck added in v0.15.0

func (k *Client) HealthCheck() error

func (*Client) IsAlreadyExists added in v0.15.0

func (k *Client) IsAlreadyExists(err error) bool

func (*Client) IsNotFound added in v0.15.0

func (k *Client) IsNotFound(err error) bool

func (*Client) Limits added in v0.15.0

func (k *Client) Limits(namespace, name string) (*app.Limits, error)

func (*Client) NamespaceAnnotation added in v0.15.0

func (k *Client) NamespaceAnnotation(namespace, annotation string) (string, error)

func (*Client) NamespaceLabel added in v0.15.0

func (k *Client) NamespaceLabel(namespace, label string) (string, error)

func (*Client) NamespaceListByLabel added in v0.15.0

func (k *Client) NamespaceListByLabel(label, value string) ([]string, error)

func (*Client) PodList added in v0.15.0

func (k *Client) PodList(namespace string) ([]*app.Pod, error)

func (*Client) PodLogs added in v0.15.0

func (k *Client) PodLogs(namespace string, podName string, lines int64, follow bool) (io.ReadCloser, error)

func (*Client) PodRun added in v0.15.0

func (k *Client) PodRun(podSpec *spec.Pod) (io.ReadCloser, <-chan int, error)

func (*Client) ReplicaSetListByLabel added in v0.15.0

func (k *Client) ReplicaSetListByLabel(namespace, label, value string) ([]*deploy.ReplicaSetListItem, error)

func (*Client) SetNamespaceAnnotations added in v0.15.0

func (k *Client) SetNamespaceAnnotations(namespace string, annotations map[string]string) error

func (*Client) SetNamespaceLabels added in v0.15.0

func (k *Client) SetNamespaceLabels(namespace string, labels map[string]string) error

func (*Client) Status added in v0.15.0

func (k *Client) Status(namespace string) (*app.Status, error)

type Config

type Config struct {
	ConfigFile         string        `split_words:"true"`
	DefaultServiceType string        `split_words:"true" default:"LoadBalancer"`
	PodRunTimeout      time.Duration `split_words:"true" default:"30m"`
	Ingress            bool          `split_words:"true" default:"false"`
}

Jump to

Keyboard shortcuts

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