k8s

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInfo

type AuthInfo struct {
	ClientCertificate     string              `yaml:"client-certificate,omitempty"`
	ClientCertificateData string              `yaml:"client-certificate-data,omitempty"`
	ClientKey             string              `yaml:"client-key,omitempty"`
	ClientKeyData         string              `yaml:"client-key-data,omitempty"`
	Token                 string              `yaml:"token,omitempty"`
	Impersonate           string              `yaml:"as,omitempty"`
	Username              string              `yaml:"username,omitempty"`
	Password              string              `yaml:"password,omitempty"`
	AuthProvider          *AuthProviderConfig `yaml:"auth-provider,omitempty"`
	Extensions            []NamedExtension    `yaml:"extensions,omitempty"`
}

AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.

type AuthProviderConfig

type AuthProviderConfig struct {
	Name   string            `yaml:"name"`
	Config map[string]string `yaml:"config"`
}

AuthProviderConfig holds the configuration for a specified auth provider.

type Cluster

type Cluster struct {
	Server                   string           `yaml:"server"`
	APIVersion               string           `yaml:"api-version,omitempty"`
	InsecureSkipTLSVerify    bool             `yaml:"insecure-skip-tls-verify,omitempty"`
	CertificateAuthority     string           `yaml:"certificate-authority,omitempty"`
	CertificateAuthorityData string           `yaml:"certificate-authority-data,omitempty"`
	Extensions               []NamedExtension `yaml:"extensions,omitempty"`
}

Cluster contains information about how to communicate with a kubernetes cluster

type Context

type Context struct {
	Cluster    string           `yaml:"cluster"`
	AuthInfo   string           `yaml:"user"`
	Namespace  string           `yaml:"namespace,omitempty"`
	Extensions []NamedExtension `yaml:"extensions,omitempty"`
}

Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)

type FakeNamespaceDeleter

type FakeNamespaceDeleter struct {
	NsDeleted []string
	Err       error
}

FakeNamespaceDeleter is a NamespaceDeleter implementation to be used in unit tests

func (*FakeNamespaceDeleter) Delete

func (f *FakeNamespaceDeleter) Delete(name string, opts *api.DeleteOptions) error

Delete is the NamespaceDeleter interface implementation. It just returns f.Err

type FakeNamespaceLister

type FakeNamespaceLister struct {
	NsList *v1.NamespaceList
	Err    error
}

FakeNamespaceLister is a NamespaceLister implementation to be used in unit tests

func (FakeNamespaceLister) List

List is the NamespaceLister interface implementation. It just returns f.NsList, f.Err

type FakeNamespaceListerDeleter

type FakeNamespaceListerDeleter struct {
	*FakeNamespaceLister
	*FakeNamespaceDeleter
}

FakeNamespaceListerDeleter is a NamespaceListerDeleter composed of both a FakeNamespaceLister and a FakeNamespaceDeleter

type FakeServiceGetter

type FakeServiceGetter struct {
	Svc *v1.Service
	Err error
}

FakeServiceGetter is a ServiceGetter implementation to be used in unit tests

func (FakeServiceGetter) Get

func (f FakeServiceGetter) Get(name string) (*v1.Service, error)

Get is the ServiceGetter interface implementation. It just returns f.Svc, f.Err

type FakeServiceGetterUpdater

type FakeServiceGetterUpdater struct {
	*FakeServiceGetter
	*FakeServiceUpdater
}

FakeServiceGetterUpdater is a ServiceGetterUpdater composed of both a FakeServiceGetter and a FakeServiceUpdater

type FakeServiceLister

type FakeServiceLister struct {
	SvcList *v1.ServiceList
	Err     error
}

FakeServiceLister is a ServiceLister implementation to be used in unit tests

func (FakeServiceLister) List

List is the ServiceLister interface implementation. It just returns f.SvcList, f.Err

type FakeServiceUpdater

type FakeServiceUpdater struct {
	RetSvc *v1.Service
	Err    error
}

FakeServiceUpdater is a ServiceUpdater implementation to be used in unit tests

func (*FakeServiceUpdater) Update

func (f *FakeServiceUpdater) Update(srv *v1.Service) (*v1.Service, error)

Update is the ServiceUpdater interface implementation. It just returns f.RetSvc, f.Err

type KubeConfig

type KubeConfig struct {
	Kind           string          `yaml:"kind,omitempty"`
	APIVersion     string          `yaml:"apiVersion,omitempty"`
	Preferences    Preferences     `yaml:"preferences"`
	Clusters       []NamedCluster  `yaml:"clusters"`
	AuthInfos      []NamedAuthInfo `yaml:"users"`
	Contexts       []NamedContext  `yaml:"contexts"`
	CurrentContext string          `yaml:"current-context"`
}

KubeConfig holds the information needed to connect to remote kubernetes clusters as a given user

type NamedAuthInfo

type NamedAuthInfo struct {
	Name     string   `yaml:"name"`
	AuthInfo AuthInfo `yaml:"user"`
}

NamedAuthInfo relates nicknames to auth information

type NamedCluster

type NamedCluster struct {
	Name    string  `yaml:"name"`
	Cluster Cluster `yaml:"cluster"`
}

NamedCluster relates nicknames to cluster information

type NamedContext

type NamedContext struct {
	Name    string  `yaml:"name"`
	Context Context `yaml:"context"`
}

NamedContext relates nicknames to context information

type NamedExtension

type NamedExtension struct {
	Name      string               `yaml:"name"`
	Extension runtime.RawExtension `yaml:"extension"`
}

NamedExtension relates nicknames to extension information

type NamespaceDeleter

type NamespaceDeleter interface {
	Delete(name string, opts *api.DeleteOptions) error
}

NamespaceDeleter is a (k8s.io/kubernetes/pkg/client/unversioned).NamespaceInterface compatible interface designed only for deleting namespaces. It should be used as a parameter to functions so that they can be more easily unit tested

type NamespaceLister

type NamespaceLister interface {
	List(opts api.ListOptions) (*v1.NamespaceList, error)
}

NamespaceLister is a (k8s.io/kubernetes/pkg/client/unversioned).NamespaceInterface compatible interface designed only for listing namespaces. It should be used as a parameter to functions so that they can be more easily unit tested

type NamespaceListerDeleter

type NamespaceListerDeleter interface {
	NamespaceLister
	NamespaceDeleter
}

NamespaceListerDeleter contains both the listing and deleting capabilities of a (k8s.io/kubernetes/pkg/client/unversioned).NamespaceInterface

type Preferences

type Preferences struct {
	Colors     bool             `yaml:"colors,omitempty"`
	Extensions []NamedExtension `yaml:"extensions,omitempty"`
}

Preferences prefs

type ServiceGetter

type ServiceGetter interface {
	Get(name string) (*v1.Service, error)
}

ServiceGetter is a (k8s.io/kubernetes/pkg/client/unversioned).ServiceInterface compatible interface designed only for getting a service. It should be used as a parameter to functions so that they can be more easily unit tested

type ServiceGetterUpdater

type ServiceGetterUpdater interface {
	ServiceGetter
	ServiceUpdater
}

ServiceGetterUpdater contains both the listing and updating capabilities of a (k8s.io/kubernetes/pkg/client/unversioned).ServiceInterface

type ServiceLister

type ServiceLister interface {
	List(opts v1.ListOptions) (*v1.ServiceList, error)
}

ServiceLister is a (k8s.io/kubernetes/pkg/client/unversioned).ServiceInterface compatible interface designed only for listing services. It should be used as a parameter to functions so that they can be more easily unit tested

type ServiceUpdater

type ServiceUpdater interface {
	Update(srv *v1.Service) (*v1.Service, error)
}

ServiceUpdater is a (k8s.io/kubernetes/pkg/client/unversioned).ServiceInterface compatible interface designed only for updating services. It should be used as a parameter to functions so that they can be more easily unit tested

Jump to

Keyboard shortcuts

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