kubernetes

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 72 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientForConfig = func(conf *rest.Config) (kubernetes.Interface, error) {
	return kubernetes.NewForConfig(conf)
}
View Source
var ExtensionsClientForConfig = func(conf *rest.Config) (apiextensionsclientset.Interface, error) {
	return apiextensionsclientset.NewForConfig(conf)
}
View Source
var InformerFactory = func(client *ClusterClient) (informers.SharedInformerFactory, error) {
	timeout := client.restConfig.Timeout
	restConfig := *client.restConfig
	restConfig.Timeout = 0
	cli, err := ClientForConfig(&restConfig)
	if err != nil {
		return nil, err
	}
	tweakFunc := internalinterfaces.TweakListOptionsFunc(func(opts *metav1.ListOptions) {
		if opts.TimeoutSeconds == nil {
			timeoutSec := int64(timeout.Seconds())
			opts.TimeoutSeconds = &timeoutSec
		}
	})
	return informers.NewFilteredSharedInformerFactory(cli, time.Minute, metav1.NamespaceAll, tweakFunc), nil
}
View Source
var TsuruClientForConfig = func(conf *rest.Config) (tsuruv1clientset.Interface, error) {
	return tsuruv1clientset.NewForConfig(conf)
}

Functions

func EnvsForApp

func EnvsForApp(a provision.App, process, imageName string, isDeploy bool) []bind.EnvVar

func GetProvisioner

func GetProvisioner() *kubernetesProvisioner

Types

type ClusterClient

type ClusterClient struct {
	kubernetes.Interface `json:"-" bson:"-"`
	*provTypes.Cluster
	// contains filtered or unexported fields
}

func NewClusterClient

func NewClusterClient(clust *provTypes.Cluster) (*ClusterClient, error)

func (*ClusterClient) AppNamespace

func (c *ClusterClient) AppNamespace(app provision.App) (string, error)

func (*ClusterClient) ExternalPolicyLocal

func (c *ClusterClient) ExternalPolicyLocal(pool string) (bool, error)

func (*ClusterClient) GetCluster

func (c *ClusterClient) GetCluster() *provTypes.Cluster

func (*ClusterClient) Namespace

func (c *ClusterClient) Namespace() string

Namespace returns the namespace to be used by Custom Resources

func (*ClusterClient) OvercommitFactor

func (c *ClusterClient) OvercommitFactor(pool string) (int64, error)

func (*ClusterClient) PoolNamespace

func (c *ClusterClient) PoolNamespace(pool string) string

func (*ClusterClient) RestConfig

func (c *ClusterClient) RestConfig() *rest.Config

func (*ClusterClient) RouterAddressLocal

func (c *ClusterClient) RouterAddressLocal(pool string) (bool, error)

func (*ClusterClient) SetTimeout

func (c *ClusterClient) SetTimeout(timeout time.Duration) error

type InspectData

type InspectData struct {
	Image     docker.Image
	TsuruYaml provTypes.TsuruYamlData
	Procfile  string
}

type KubeClient

type KubeClient struct{}

func (*KubeClient) BuildImage

func (c *KubeClient) BuildImage(name string, image string, inputStream io.Reader, output io.Writer, ctx context.Context) error

func (*KubeClient) BuildPod

func (c *KubeClient) BuildPod(a provision.App, evt *event.Event, archiveFile io.Reader, tag string) (string, error)

func (*KubeClient) DownloadFromContainer

func (c *KubeClient) DownloadFromContainer(app provision.App, imageName string) (io.ReadCloser, error)

func (*KubeClient) ImageTagPushAndInspect

func (c *KubeClient) ImageTagPushAndInspect(a provision.App, imageID, newImage string) (*docker.Image, string, *provTypes.TsuruYamlData, error)

Directories

Path Synopsis
pkg
apis/tsuru/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/tsuru/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/tsuru/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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