unversioned

package
v1.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2016 License: Apache-2.0, Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package unversioned contains the implementation of the client side communication with the Kubernetes master. The Client class provides methods for reading, creating, updating, and deleting pods, replication controllers, daemons, services, and nodes.

Most consumers should use the Config object to create a Client:

import (
  client "k8s.io/kubernetes/pkg/client/unversioned"
  "k8s.io/kubernetes/pkg/api"
  "k8s.io/kubernetes/pkg/fields"
  "k8s.io/kubernetes/pkg/labels"
)

[...]

config := &client.Config{
  Host:     "http://localhost:8080",
  Username: "test",
  Password: "password",
}
client, err := client.New(config)
if err != nil {
  // handle error
}
pods, err := client.Pods(api.NamespaceDefault).List(labels.Everything(), fields.Everything())
if err != nil {
  // handle error
}

More advanced consumers may wish to provide their own transport via a http.RoundTripper:

config := &client.Config{
  Host:      "https://localhost:8080",
  Transport: oauthclient.Transport(),
}
client, err := client.New(config)

The RESTClient type implements the Kubernetes API conventions (see `docs/devel/api-conventions.md`) for a given API path and is intended for use by consumers implementing their own Kubernetes compatible APIs.

Index

Constants

View Source
const (
	ConfigMapResourceName string = "configmaps"
)

Variables

View Source
var DefaultBackoff = wait.Backoff{
	Steps:    4,
	Duration: 10 * time.Millisecond,
	Factor:   5.0,
	Jitter:   0.1,
}

DefaultBackoff is the recommended backoff for a conflict where a client may be attempting to make an unrelated modification to a resource under active management by one or more controllers.

View Source
var DefaultRetry = wait.Backoff{
	Steps:    5,
	Duration: 10 * time.Millisecond,
	Factor:   1.0,
	Jitter:   0.1,
}

DefaultRetry is the recommended retry for a conflict where multiple clients are making changes to the same resource.

Functions

func ControllerHasDesiredReplicas

func ControllerHasDesiredReplicas(c Interface, controller *api.ReplicationController) wait.ConditionFunc

ControllerHasDesiredReplicas returns a condition that will be true if and only if the desired replica count for a controller's ReplicaSelector equals the Replicas count.

func DeploymentHasDesiredReplicas added in v1.1.2

func DeploymentHasDesiredReplicas(c ExtensionsInterface, deployment *extensions.Deployment) wait.ConditionFunc

DeploymentHasDesiredReplicas returns a condition that will be true if and only if the desired replica count for a deployment equals its updated replicas count. (non-terminated pods that have the desired template spec).

func GetInvolvedObjectNameFieldLabel added in v1.1.2

func GetInvolvedObjectNameFieldLabel(version string) string

Returns the appropriate field label to use for name of the involved object as per the given API version.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout tests if this is a timeout error in the underlying transport. This is unbelievably ugly. See: http://stackoverflow.com/questions/23494950/specifically-check-for-timeout-error for details

func JobHasDesiredParallelism

func JobHasDesiredParallelism(c ExtensionsInterface, job *extensions.Job) wait.ConditionFunc

JobHasDesiredParallelism returns a condition that will be true if the desired parallelism count for a job equals the current active counts or is less by an appropriate successful/unsuccessful count.

func MatchesServerVersion

func MatchesServerVersion(client *Client, c *restclient.Config) error

MatchesServerVersion queries the server to compares the build version (git hash) of the client with the server's build version. It returns an error if it failed to contact the server or if the versions are not an exact match.

func NegotiateVersion

func NegotiateVersion(client *Client, c *restclient.Config, requestedGV *unversioned.GroupVersion, clientRegisteredGVs []unversioned.GroupVersion) (*unversioned.GroupVersion, error)

NegotiateVersion queries the server's supported api versions to find a version that both client and server support.

  • If no version is provided, try registered client versions in order of preference.
  • If version is provided, but not default config (explicitly requested via commandline flag), and is unsupported by the server, print a warning to stderr and try client's registered versions in order of preference.
  • If version is config default, and the server does not support it, return an error.

func ReplicaSetHasDesiredReplicas added in v1.1.4

func ReplicaSetHasDesiredReplicas(c ExtensionsInterface, replicaSet *extensions.ReplicaSet) wait.ConditionFunc

ReplicaSetHasDesiredReplicas returns a condition that will be true if and only if the desired replica count for a ReplicaSet's ReplicaSelector equals the Replicas count.

func RetryOnConflict

func RetryOnConflict(backoff wait.Backoff, fn func() error) error

RetryConflict executes the provided function repeatedly, retrying if the server returns a conflicting write. Callers should preserve previous executions if they wish to retry changes. It performs an exponential backoff.

var pod *api.Pod
err := RetryOnConflict(DefaultBackoff, func() (err error) {
  pod, err = c.Pods("mynamespace").UpdateStatus(podStatus)
  return
})
if err != nil {
  // may be conflict if max retries were hit
  return err
}
...

TODO: Make Backoff an interface?

func SetKubernetesDefaults

func SetKubernetesDefaults(config *restclient.Config) error

SetKubernetesDefaults sets default values on the provided client config for accessing the Kubernetes API or returns an error if any of the defaults are impossible or invalid. TODO: this method needs to be split into one that sets defaults per group, expected to be fix in PR "Refactoring clientcache.go and helper.go #14592"

Types

type AutoscalingClient added in v1.1.5

type AutoscalingClient struct {
	*restclient.RESTClient
}

AutoscalingClient is used to interact with Kubernetes autoscaling features.

func NewAutoscaling added in v1.1.5

func NewAutoscaling(c *restclient.Config) (*AutoscalingClient, error)

func NewAutoscalingOrDie added in v1.1.5

func NewAutoscalingOrDie(c *restclient.Config) *AutoscalingClient

func (*AutoscalingClient) HorizontalPodAutoscalers added in v1.1.5

func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface

type AutoscalingInterface added in v1.1.5

type AutoscalingInterface interface {
	HorizontalPodAutoscalersNamespacer
}

type BatchClient added in v1.1.5

type BatchClient struct {
	*restclient.RESTClient
}

BatchClient is used to interact with Kubernetes batch features.

func NewBatch added in v1.1.5

func NewBatch(c *restclient.Config) (*BatchClient, error)

func NewBatchOrDie added in v1.1.5

func NewBatchOrDie(c *restclient.Config) *BatchClient

func (*BatchClient) Jobs added in v1.1.5

func (c *BatchClient) Jobs(namespace string) JobInterface

type BatchInterface added in v1.1.5

type BatchInterface interface {
	JobsNamespacer
}

type Client

Client is the implementation of a Kubernetes client.

func New

func New(c *restclient.Config) (*Client, error)

New creates a Kubernetes client for the given config. This client works with pods, replication controllers, daemons, and services. It allows operations such as list, get, update and delete on these objects. An error is returned if the provided configuration is not valid.

func NewInCluster

func NewInCluster() (*Client, error)

NewInCluster is a shortcut for calling InClusterConfig() and then New().

func NewOrDie

func NewOrDie(c *restclient.Config) *Client

NewOrDie creates a Kubernetes client and panics if the provided API version is not recognized.

func (*Client) Autoscaling added in v1.1.5

func (c *Client) Autoscaling() AutoscalingInterface

func (*Client) Batch added in v1.1.5

func (c *Client) Batch() BatchInterface

func (*Client) ComponentStatuses

func (c *Client) ComponentStatuses() ComponentStatusInterface

func (*Client) ConfigMaps added in v1.1.4

func (c *Client) ConfigMaps(namespace string) ConfigMapsInterface

func (*Client) Discovery added in v1.1.2

func (c *Client) Discovery() discovery.DiscoveryInterface

func (*Client) Endpoints

func (c *Client) Endpoints(namespace string) EndpointsInterface

func (*Client) Events

func (c *Client) Events(namespace string) EventInterface

func (*Client) Extensions

func (c *Client) Extensions() ExtensionsInterface

func (*Client) LimitRanges

func (c *Client) LimitRanges(namespace string) LimitRangeInterface

func (*Client) Namespaces

func (c *Client) Namespaces() NamespaceInterface

func (*Client) Nodes

func (c *Client) Nodes() NodeInterface

func (*Client) PersistentVolumeClaims

func (c *Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface

func (*Client) PersistentVolumes

func (c *Client) PersistentVolumes() PersistentVolumeInterface

func (*Client) PodTemplates

func (c *Client) PodTemplates(namespace string) PodTemplateInterface

func (*Client) Pods

func (c *Client) Pods(namespace string) PodInterface

func (*Client) ReplicationControllers

func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface

func (*Client) ResourceQuotas

func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface

func (*Client) Secrets

func (c *Client) Secrets(namespace string) SecretsInterface

func (*Client) SecurityContextConstraints

func (c *Client) SecurityContextConstraints() SecurityContextConstraintInterface

func (*Client) ServiceAccounts

func (c *Client) ServiceAccounts(namespace string) ServiceAccountsInterface

func (*Client) Services

func (c *Client) Services(namespace string) ServiceInterface

type ComponentStatusInterface

type ComponentStatusInterface interface {
	List(opts api.ListOptions) (*api.ComponentStatusList, error)
	Get(name string) (*api.ComponentStatus, error)
}

ComponentStatusInterface contains methods to retrieve ComponentStatus

type ComponentStatusesInterface

type ComponentStatusesInterface interface {
	ComponentStatuses() ComponentStatusInterface
}

type ConfigMaps added in v1.1.3

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

func (*ConfigMaps) Create added in v1.1.3

func (c *ConfigMaps) Create(cfg *api.ConfigMap) (*api.ConfigMap, error)

func (*ConfigMaps) Delete added in v1.1.3

func (c *ConfigMaps) Delete(name string) error

func (*ConfigMaps) Get added in v1.1.3

func (c *ConfigMaps) Get(name string) (*api.ConfigMap, error)

func (*ConfigMaps) List added in v1.1.3

func (c *ConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error)

func (*ConfigMaps) Update added in v1.1.3

func (c *ConfigMaps) Update(cfg *api.ConfigMap) (*api.ConfigMap, error)

func (*ConfigMaps) Watch added in v1.1.3

func (c *ConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error)

type ConfigMapsInterface added in v1.1.3

type ConfigMapsInterface interface {
	Get(string) (*api.ConfigMap, error)
	List(opts api.ListOptions) (*api.ConfigMapList, error)
	Create(*api.ConfigMap) (*api.ConfigMap, error)
	Delete(string) error
	Update(*api.ConfigMap) (*api.ConfigMap, error)
	Watch(api.ListOptions) (watch.Interface, error)
}

type ConfigMapsNamespacer added in v1.1.3

type ConfigMapsNamespacer interface {
	ConfigMaps(namespace string) ConfigMapsInterface
}

type ContainerInfoGetter

type ContainerInfoGetter interface {
	// GetContainerInfo returns information about a container.
	GetContainerInfo(host, podID, containerID string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
	// GetRootInfo returns information about the root container on a machine.
	GetRootInfo(host string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
	// GetMachineInfo returns the machine's information like number of cores, memory capacity.
	GetMachineInfo(host string) (*cadvisorapi.MachineInfo, error)
}

type DaemonSetInterface

type DaemonSetInterface interface {
	List(opts api.ListOptions) (*extensions.DaemonSetList, error)
	Get(name string) (*extensions.DaemonSet, error)
	Create(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
	Update(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
	UpdateStatus(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
	Delete(name string) error
	Watch(opts api.ListOptions) (watch.Interface, error)
}

type DaemonSetsNamespacer

type DaemonSetsNamespacer interface {
	DaemonSets(namespace string) DaemonSetInterface
}

DaemonsSetsNamespacer has methods to work with DaemonSet resources in a namespace

type DeploymentInterface

DeploymentInterface has methods to work with Deployment resources.

type DeploymentsNamespacer

type DeploymentsNamespacer interface {
	Deployments(namespace string) DeploymentInterface
}

DeploymentsNamespacer has methods to work with Deployment resources in a namespace

type EndpointsInterface

type EndpointsInterface interface {
	Create(endpoints *api.Endpoints) (*api.Endpoints, error)
	List(opts api.ListOptions) (*api.EndpointsList, error)
	Get(name string) (*api.Endpoints, error)
	Delete(name string) error
	Update(endpoints *api.Endpoints) (*api.Endpoints, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

EndpointsInterface has methods to work with Endpoints resources

type EndpointsNamespacer

type EndpointsNamespacer interface {
	Endpoints(namespace string) EndpointsInterface
}

EndpointsNamespacer has methods to work with Endpoints resources in a namespace

type EventInterface

type EventInterface interface {
	Create(event *api.Event) (*api.Event, error)
	Update(event *api.Event) (*api.Event, error)
	Patch(event *api.Event, data []byte) (*api.Event, error)
	List(opts api.ListOptions) (*api.EventList, error)
	Get(name string) (*api.Event, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
	// Search finds events about the specified object
	Search(objOrRef runtime.Object) (*api.EventList, error)
	Delete(name string) error
	// DeleteCollection deletes a collection of events.
	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
	// Returns the appropriate field selector based on the API version being used to communicate with the server.
	// The returned field selector can be used with List and Watch to filter desired events.
	GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
}

EventInterface has methods to work with Event resources

type EventNamespacer

type EventNamespacer interface {
	Events(namespace string) EventInterface
}

EventNamespacer can return an EventInterface for the given namespace.

type ExtensionsClient

type ExtensionsClient struct {
	*restclient.RESTClient
}

ExtensionsClient is used to interact with experimental Kubernetes features. Features of Extensions group are not supported and may be changed or removed in incompatible ways at any time.

func NewExtensions

func NewExtensions(c *restclient.Config) (*ExtensionsClient, error)

NewExtensions creates a new ExtensionsClient for the given config. This client provides access to experimental Kubernetes features. Features of Extensions group are not supported and may be changed or removed in incompatible ways at any time.

func NewExtensionsOrDie

func NewExtensionsOrDie(c *restclient.Config) *ExtensionsClient

NewExtensionsOrDie creates a new ExtensionsClient for the given config and panics if there is an error in the config. Features of Extensions group are not supported and may be changed or removed in incompatible ways at any time.

func (*ExtensionsClient) DaemonSets

func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface

func (*ExtensionsClient) Deployments

func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface

func (*ExtensionsClient) HorizontalPodAutoscalers

func (c *ExtensionsClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface

func (*ExtensionsClient) Ingress

func (c *ExtensionsClient) Ingress(namespace string) IngressInterface

func (*ExtensionsClient) Jobs

func (c *ExtensionsClient) Jobs(namespace string) JobInterface

func (*ExtensionsClient) PodSecurityPolicies added in v1.1.4

func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface

func (*ExtensionsClient) ReplicaSets added in v1.1.4

func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface

func (*ExtensionsClient) Scales

func (c *ExtensionsClient) Scales(namespace string) ScaleInterface

func (*ExtensionsClient) ThirdPartyResources added in v1.1.2

func (c *ExtensionsClient) ThirdPartyResources(namespace string) ThirdPartyResourceInterface

type ExtensionsInterface

Interface holds the experimental methods for clients of Kubernetes to allow mock testing. Features of Extensions group are not supported and may be changed or removed in incompatible ways at any time.

type FlagSet

type FlagSet interface {
	StringVar(p *string, name, value, usage string)
	BoolVar(p *bool, name string, value bool, usage string)
	UintVar(p *uint, name string, value uint, usage string)
	DurationVar(p *time.Duration, name string, value time.Duration, usage string)
	IntVar(p *int, name string, value int, usage string)
}

FlagSet abstracts the flag interface for compatibility with both Golang "flag" and cobra pflags (Posix style).

type HTTPContainerInfoGetter

type HTTPContainerInfoGetter struct {
	Client *http.Client
	Port   int
}

func (*HTTPContainerInfoGetter) GetContainerInfo

func (self *HTTPContainerInfoGetter) GetContainerInfo(host, podID, containerID string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)

func (*HTTPContainerInfoGetter) GetMachineInfo

func (self *HTTPContainerInfoGetter) GetMachineInfo(host string) (*cadvisorapi.MachineInfo, error)

func (*HTTPContainerInfoGetter) GetRootInfo

type HorizontalPodAutoscalerInterface

type HorizontalPodAutoscalerInterface interface {
	List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error)
	Get(name string) (*extensions.HorizontalPodAutoscaler, error)
	Delete(name string, options *api.DeleteOptions) error
	Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
	Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
	UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.

type HorizontalPodAutoscalersNamespacer

type HorizontalPodAutoscalersNamespacer interface {
	HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
}

HorizontalPodAutoscalersNamespacer has methods to work with HorizontalPodAutoscaler resources in a namespace

type IngressInterface

type IngressInterface interface {
	List(opts api.ListOptions) (*extensions.IngressList, error)
	Get(name string) (*extensions.Ingress, error)
	Create(ingress *extensions.Ingress) (*extensions.Ingress, error)
	Update(ingress *extensions.Ingress) (*extensions.Ingress, error)
	Delete(name string, options *api.DeleteOptions) error
	Watch(opts api.ListOptions) (watch.Interface, error)
	UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error)
}

IngressInterface exposes methods to work on Ingress resources.

type IngressNamespacer

type IngressNamespacer interface {
	Ingress(namespace string) IngressInterface
}

IngressNamespacer has methods to work with Ingress resources in a namespace

type JobInterface

type JobInterface interface {
	List(opts api.ListOptions) (*extensions.JobList, error)
	Get(name string) (*extensions.Job, error)
	Create(job *extensions.Job) (*extensions.Job, error)
	Update(job *extensions.Job) (*extensions.Job, error)
	Delete(name string, options *api.DeleteOptions) error
	Watch(opts api.ListOptions) (watch.Interface, error)
	UpdateStatus(job *extensions.Job) (*extensions.Job, error)
}

JobInterface exposes methods to work on Job resources.

type JobsNamespacer

type JobsNamespacer interface {
	Jobs(namespace string) JobInterface
}

JobsNamespacer has methods to work with Job resources in a namespace

type LimitRangeInterface

type LimitRangeInterface interface {
	List(opts api.ListOptions) (*api.LimitRangeList, error)
	Get(name string) (*api.LimitRange, error)
	Delete(name string) error
	Create(limitRange *api.LimitRange) (*api.LimitRange, error)
	Update(limitRange *api.LimitRange) (*api.LimitRange, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

LimitRangeInterface has methods to work with LimitRange resources.

type LimitRangesNamespacer

type LimitRangesNamespacer interface {
	LimitRanges(namespace string) LimitRangeInterface
}

LimitRangesNamespacer has methods to work with LimitRange resources in a namespace

type NamespaceInterface

type NamespaceInterface interface {
	Create(item *api.Namespace) (*api.Namespace, error)
	Get(name string) (result *api.Namespace, err error)
	List(opts api.ListOptions) (*api.NamespaceList, error)
	Delete(name string) error
	Update(item *api.Namespace) (*api.Namespace, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
	Finalize(item *api.Namespace) (*api.Namespace, error)
	Status(item *api.Namespace) (*api.Namespace, error)
}

type NamespacesInterface

type NamespacesInterface interface {
	Namespaces() NamespaceInterface
}

type NodeInterface

type NodeInterface interface {
	Get(name string) (result *api.Node, err error)
	Create(node *api.Node) (*api.Node, error)
	List(opts api.ListOptions) (*api.NodeList, error)
	Delete(name string) error
	Update(*api.Node) (*api.Node, error)
	UpdateStatus(*api.Node) (*api.Node, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

type NodesInterface

type NodesInterface interface {
	Nodes() NodeInterface
}

type PersistentVolumeClaimInterface

type PersistentVolumeClaimInterface interface {
	List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error)
	Get(name string) (*api.PersistentVolumeClaim, error)
	Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
	Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
	UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
	Delete(name string) error
	Watch(opts api.ListOptions) (watch.Interface, error)
}

PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.

type PersistentVolumeClaimsNamespacer

type PersistentVolumeClaimsNamespacer interface {
	PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
}

PersistentVolumeClaimsNamespacer has methods to work with PersistentVolumeClaim resources in a namespace

type PersistentVolumeInterface

type PersistentVolumeInterface interface {
	List(opts api.ListOptions) (*api.PersistentVolumeList, error)
	Get(name string) (*api.PersistentVolume, error)
	Create(volume *api.PersistentVolume) (*api.PersistentVolume, error)
	Update(volume *api.PersistentVolume) (*api.PersistentVolume, error)
	UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error)
	Delete(name string) error
	Watch(opts api.ListOptions) (watch.Interface, error)
}

PersistentVolumeInterface has methods to work with PersistentVolume resources.

type PersistentVolumesInterface

type PersistentVolumesInterface interface {
	PersistentVolumes() PersistentVolumeInterface
}

type PodInterface

type PodInterface interface {
	List(opts api.ListOptions) (*api.PodList, error)
	Get(name string) (*api.Pod, error)
	Delete(name string, options *api.DeleteOptions) error
	Create(pod *api.Pod) (*api.Pod, error)
	Update(pod *api.Pod) (*api.Pod, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
	Bind(binding *api.Binding) error
	UpdateStatus(pod *api.Pod) (*api.Pod, error)
	GetLogs(name string, opts *api.PodLogOptions) *restclient.Request
}

PodInterface has methods to work with Pod resources.

type PodSecurityPoliciesInterface added in v1.1.4

type PodSecurityPoliciesInterface interface {
	PodSecurityPolicies() PodSecurityPolicyInterface
}

type PodSecurityPolicyInterface added in v1.1.4

type PodSecurityPolicyInterface interface {
	Get(name string) (result *extensions.PodSecurityPolicy, err error)
	Create(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
	List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error)
	Delete(name string) error
	Update(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

type PodTemplateInterface

type PodTemplateInterface interface {
	List(opts api.ListOptions) (*api.PodTemplateList, error)
	Get(name string) (*api.PodTemplate, error)
	Delete(name string, options *api.DeleteOptions) error
	Create(podTemplate *api.PodTemplate) (*api.PodTemplate, error)
	Update(podTemplate *api.PodTemplate) (*api.PodTemplate, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

PodTemplateInterface has methods to work with PodTemplate resources.

type PodTemplatesNamespacer

type PodTemplatesNamespacer interface {
	PodTemplates(namespace string) PodTemplateInterface
}

PodTemplatesNamespacer has methods to work with PodTemplate resources in a namespace

type PodsNamespacer

type PodsNamespacer interface {
	Pods(namespace string) PodInterface
}

PodsNamespacer has methods to work with Pod resources in a namespace

type ReplicaSetInterface added in v1.1.4

type ReplicaSetInterface interface {
	List(opts api.ListOptions) (*extensions.ReplicaSetList, error)
	Get(name string) (*extensions.ReplicaSet, error)
	Create(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
	Update(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
	UpdateStatus(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
	Delete(name string, options *api.DeleteOptions) error
	Watch(opts api.ListOptions) (watch.Interface, error)
}

ReplicaSetInterface has methods to work with ReplicaSet resources.

type ReplicaSetsNamespacer added in v1.1.4

type ReplicaSetsNamespacer interface {
	ReplicaSets(namespace string) ReplicaSetInterface
}

ReplicaSetsNamespacer has methods to work with ReplicaSet resources in a namespace

type ReplicationControllerInterface

type ReplicationControllerInterface interface {
	List(opts api.ListOptions) (*api.ReplicationControllerList, error)
	Get(name string) (*api.ReplicationController, error)
	Create(ctrl *api.ReplicationController) (*api.ReplicationController, error)
	Update(ctrl *api.ReplicationController) (*api.ReplicationController, error)
	UpdateStatus(ctrl *api.ReplicationController) (*api.ReplicationController, error)
	Delete(name string) error
	Watch(opts api.ListOptions) (watch.Interface, error)
}

ReplicationControllerInterface has methods to work with ReplicationController resources.

type ReplicationControllersNamespacer

type ReplicationControllersNamespacer interface {
	ReplicationControllers(namespace string) ReplicationControllerInterface
}

ReplicationControllersNamespacer has methods to work with ReplicationController resources in a namespace

type ResourceQuotaInterface

type ResourceQuotaInterface interface {
	List(opts api.ListOptions) (*api.ResourceQuotaList, error)
	Get(name string) (*api.ResourceQuota, error)
	Delete(name string) error
	Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
	Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
	UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

ResourceQuotaInterface has methods to work with ResourceQuota resources.

type ResourceQuotasNamespacer

type ResourceQuotasNamespacer interface {
	ResourceQuotas(namespace string) ResourceQuotaInterface
}

ResourceQuotasNamespacer has methods to work with ResourceQuota resources in a namespace

type ScaleInterface

type ScaleInterface interface {
	Get(string, string) (*extensions.Scale, error)
	Update(string, *extensions.Scale) (*extensions.Scale, error)
}

ScaleInterface has methods to work with Scale (sub)resources.

type ScaleNamespacer

type ScaleNamespacer interface {
	Scales(namespace string) ScaleInterface
}

type SecretsInterface

type SecretsInterface interface {
	Create(secret *api.Secret) (*api.Secret, error)
	Update(secret *api.Secret) (*api.Secret, error)
	Delete(name string) error
	List(opts api.ListOptions) (*api.SecretList, error)
	Get(name string) (*api.Secret, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

type SecretsNamespacer

type SecretsNamespacer interface {
	Secrets(namespace string) SecretsInterface
}

type SecurityContextConstraintsInterface

type SecurityContextConstraintsInterface interface {
	SecurityContextConstraints() SecurityContextConstraintInterface
}

type ServiceAccountsInterface

type ServiceAccountsInterface interface {
	Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
	Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
	Delete(name string) error
	List(opts api.ListOptions) (*api.ServiceAccountList, error)
	Get(name string) (*api.ServiceAccount, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
}

type ServiceAccountsNamespacer

type ServiceAccountsNamespacer interface {
	ServiceAccounts(namespace string) ServiceAccountsInterface
}

type ServiceInterface

type ServiceInterface interface {
	List(opts api.ListOptions) (*api.ServiceList, error)
	Get(name string) (*api.Service, error)
	Create(srv *api.Service) (*api.Service, error)
	Update(srv *api.Service) (*api.Service, error)
	UpdateStatus(srv *api.Service) (*api.Service, error)
	Delete(name string) error
	Watch(opts api.ListOptions) (watch.Interface, error)
	ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
}

ServiceInterface has methods to work with Service resources.

type ServicesNamespacer

type ServicesNamespacer interface {
	Services(namespace string) ServiceInterface
}

ServicesNamespacer has methods to work with Service resources in a namespace

type ThirdPartyResourceNamespacer added in v1.1.2

type ThirdPartyResourceNamespacer interface {
	ThirdPartyResources(namespace string) ThirdPartyResourceInterface
}

ThirdPartyResourceNamespacer has methods to work with ThirdPartyResource resources in a namespace

Directories

Path Synopsis
Package auth defines a file format for holding authentication information needed by clients of Kubernetes.
Package auth defines a file format for holding authentication information needed by clients of Kubernetes.
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
api
This is made a separate package and should only be imported by tests, because it imports testapi
This is made a separate package and should only be imported by tests, because it imports testapi
Package portforward adds support for SSH-like port forwarding from the client's local host to remote containers.
Package portforward adds support for SSH-like port forwarding from the client's local host to remote containers.
Package remotecommand adds support for executing commands in containers, with support for separate stdin, stdout, and stderr streams, as well as TTY.
Package remotecommand adds support for executing commands in containers, with support for separate stdin, stdout, and stderr streams, as well as TTY.

Jump to

Keyboard shortcuts

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