k8s

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 24 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

func New

func New(conf *Config) (Client, 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"`
}

type Deploy added in v0.14.0

type Deploy interface {
	DeploySetReplicas(namespace, name string, replicas int32) error
	CreateOrUpdateDeployEnvVars(namespace, name string, evs []*app.EnvVar) error
	DeleteDeployEnvVars(namespace, name string, evNames []string) error
	CreateOrUpdateDeploy(deploySpec *deploy.DeploySpec) error
	ExposeDeploy(namespace, name, vHost string, w io.Writer) error
	ReplicaSetListByLabel(namespace, label, value string) ([]*deploy.ReplicaSetListItem, error)
	DeployRollbackToRevision(namespace, name, revision string) error
}

type Error added in v0.14.0

type Error interface {
	IsNotFound(err error) bool
	IsAlreadyExists(err error) bool
}

type Hpa added in v0.14.0

type Hpa interface {
	Autoscale(namespace string) (*app.Autoscale, error)
	CreateOrUpdateAutoscale(a *app.App) error
}

type Namespace added in v0.14.0

type Namespace interface {
	NamespaceAnnotation(namespace, annotation string) (string, error)
	NamespaceLabel(namespace, label string) (string, error)
	CreateNamespace(a *app.App, userEmail string) error
	NamespaceListByLabel(label, value string) ([]string, error)
	DeleteNamespace(namespace string) error
	SetNamespaceLabels(namespace string, labels map[string]string) error
	SetNamespaceAnnotations(namespace string, annotations map[string]string) error
	Status(namespace string) (*app.Status, error)
}

type Pod added in v0.14.0

type Pod interface {
	PodList(namespace string) ([]*app.Pod, error)
	PodLogs(namespace, podName string, lines int64, follow bool) (io.ReadCloser, error)
	DeletePod(namespace, podName string) error
	PodRun(podSpec *deploy.PodSpec) (io.ReadCloser, <-chan int, error)
}

type Quota added in v0.14.0

type Quota interface {
	CreateQuota(a *app.App) error
	Limits(namespace, name string) (*app.Limits, error)
}

type Secret added in v0.14.0

type Secret interface {
	CreateSecret(appName, secretName string, data map[string][]byte) error
}

type Service added in v0.14.0

type Service interface {
	AddressList(namespace string) ([]*app.Address, error)
}

type TeresaHealthCheck added in v0.14.0

type TeresaHealthCheck interface {
	HealthCheck() error
}

Jump to

Keyboard shortcuts

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