k8s

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 30 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) CloudProviderName added in v0.18.0

func (c *Client) CloudProviderName() (string, error)

func (*Client) ContainerExplicitEnvVars added in v0.20.0

func (c *Client) ContainerExplicitEnvVars(namespace, deployName, containerName string) ([]*app.EnvVar, 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) CreateOrUpdateConfigMap added in v0.17.0

func (k *Client) CreateOrUpdateConfigMap(namespace, name string, data map[string]string) error

func (*Client) CreateOrUpdateCronJob added in v0.16.0

func (c *Client) CreateOrUpdateCronJob(cronJobSpec *spec.CronJob) error

func (*Client) CreateOrUpdateCronJobEnvVars added in v0.16.0

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

func (*Client) CreateOrUpdateCronJobSecretEnvVars added in v0.17.0

func (c *Client) CreateOrUpdateCronJobSecretEnvVars(namespace, name, secretName string, secrets []string) 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 (c *Client) CreateOrUpdateDeployEnvVars(namespace, name string, evs []*app.EnvVar) error

func (*Client) CreateOrUpdateDeploySecretEnvVars added in v0.17.0

func (c *Client) CreateOrUpdateDeploySecretEnvVars(namespace, name, secretName string, secrets []string) error

func (*Client) CreateOrUpdateSecret added in v0.17.0

func (c *Client) CreateOrUpdateSecret(namespace, secretName string, data map[string][]byte) error

func (*Client) CreateQuota added in v0.15.0

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

func (*Client) CreateService added in v0.20.0

func (k *Client) CreateService(svcSpec *spec.Service) error

func (*Client) DeleteConfigMap added in v0.19.0

func (k *Client) DeleteConfigMap(namespace, name string) error

func (*Client) DeleteCronJobEnvVars added in v0.16.0

func (k *Client) DeleteCronJobEnvVars(namespace, name string, evNames []string) 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) DeleteService added in v0.20.0

func (k *Client) DeleteService(namespace, name 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, svcType, portName string, w io.Writer) error

ExposeDeploy creates a service and/or a ingress if needed

func (*Client) GetSecret added in v0.17.0

func (c *Client) GetSecret(namespace, secretName string) (map[string][]byte, error)

func (*Client) HasIngress added in v0.17.0

func (k *Client) HasIngress(namespace, appName string) (bool, error)

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) IsInvalid added in v0.16.0

func (k *Client) IsInvalid(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, opts *app.PodListOptions) ([]*app.Pod, error)

func (*Client) PodLogs added in v0.15.0

func (k *Client) PodLogs(namespace string, podName string, opts *app.LogOptions) (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) ServiceAnnotations added in v0.18.0

func (c *Client) ServiceAnnotations(namespace, svcName string) (map[string]string, error)

func (*Client) ServicePorts added in v0.18.0

func (c *Client) ServicePorts(namespace, svcName string) ([]*spec.ServicePort, 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) SetServiceAnnotations added in v0.18.0

func (c *Client) SetServiceAnnotations(namespace, svcName string, annotations map[string]string) error

func (*Client) Status added in v0.15.0

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

func (*Client) UpdateServicePorts added in v0.18.0

func (c *Client) UpdateServicePorts(namespace, svcName string, ports []spec.ServicePort) error

func (*Client) WatchDeploy added in v0.20.0

func (c *Client) WatchDeploy(namespace, deployName string) error

func (*Client) WatchServiceURL added in v0.20.0

func (c *Client) WatchServiceURL(namespace, name string) ([]string, error)

type Config

type Config struct {
	ConfigFile    string        `split_words:"true"`
	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