k8s

package
v1.2.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VethNameForWorkload

func VethNameForWorkload(workload string) string

VethNameForWorkload returns a deterministic veth name for the given Kubernetes workload.

Types

type KubeClient

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

func NewKubeClient

func NewKubeClient(kc *KubeConfig) (*KubeClient, error)

func (*KubeClient) Apply

func (c *KubeClient) Apply(d *model.KVPair) (*model.KVPair, error)

Set an existing entry in the datastore. This ignores whether an entry already exists.

func (*KubeClient) Create

func (c *KubeClient) Create(d *model.KVPair) (*model.KVPair, error)

Create an entry in the datastore. This errors if the entry already exists.

func (*KubeClient) Delete

func (c *KubeClient) Delete(d *model.KVPair) error

Delete an entry in the datastore. This is a no-op when using the k8s backend.

func (*KubeClient) EnsureCalicoNodeInitialized added in v1.0.1

func (c *KubeClient) EnsureCalicoNodeInitialized(node string) error

func (*KubeClient) EnsureInitialized

func (c *KubeClient) EnsureInitialized() error

func (*KubeClient) Get

func (c *KubeClient) Get(k model.Key) (*model.KVPair, error)

Get an entry from the datastore. This errors if the entry does not exist.

func (*KubeClient) List

func (c *KubeClient) List(l model.ListInterface) ([]*model.KVPair, error)

List entries in the datastore. This may return an empty list of there are no entries matching the request in the ListInterface.

func (*KubeClient) Syncer

func (c *KubeClient) Syncer(callbacks api.SyncerCallbacks) api.Syncer

func (*KubeClient) Update

func (c *KubeClient) Update(d *model.KVPair) (*model.KVPair, error)

Update an existing entry in the datastore. This errors if the entry does not exist.

type KubeConfig

type KubeConfig struct {
	Kubeconfig               string `json:"kubeconfig" envconfig:"KUBECONFIG" default:""`
	K8sAPIEndpoint           string `json:"k8sAPIEndpoint" envconfig:"K8S_API_ENDPOINT" default:""`
	K8sKeyFile               string `json:"k8sKeyFile" envconfig:"K8S_KEY_FILE" default:""`
	K8sCertFile              string `json:"k8sCertFile" envconfig:"K8S_CERT_FILE" default:""`
	K8sCAFile                string `json:"k8sCAFile" envconfig:"K8S_CA_FILE" default:""`
	K8sAPIToken              string `json:"k8sAPIToken" envconfig:"K8S_API_TOKEN" default:""`
	K8sInsecureSkipTLSVerify bool   `json:"k8sInsecureSkipTLSVerify" envconfig:"K8S_INSECURE_SKIP_TLS_VERIFY" default:""`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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