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" ) [...] 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(api.ListOptions{}) 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
- Variables
- func ControllerHasDesiredReplicas(c Interface, controller *api.ReplicationController) wait.ConditionFunc
- func DeploymentHasDesiredReplicas(c ExtensionsInterface, deployment *extensions.Deployment) wait.ConditionFunc
- func GetInvolvedObjectNameFieldLabel(version string) string
- func IsTimeout(err error) bool
- func JobHasDesiredParallelism(c BatchInterface, job *batch.Job) wait.ConditionFunc
- func MatchesServerVersion(client *Client, c *restclient.Config) error
- func NegotiateVersion(client *Client, c *restclient.Config, requestedGV *unversioned.GroupVersion, ...) (*unversioned.GroupVersion, error)
- func PetSetHasDesiredPets(c AppsInterface, petset *apps.PetSet) wait.ConditionFunc
- func PodCompleted(event watch.Event) (bool, error)
- func PodContainerRunning(containerName string) watch.ConditionFunc
- func PodNotPending(event watch.Event) (bool, error)
- func PodRunning(event watch.Event) (bool, error)
- func PodRunningAndReady(event watch.Event) (bool, error)
- func ReplicaSetHasDesiredReplicas(c ExtensionsInterface, replicaSet *extensions.ReplicaSet) wait.ConditionFunc
- func RetryOnConflict(backoff wait.Backoff, fn func() error) error
- func ServiceAccountHasSecrets(event watch.Event) (bool, error)
- func SetKubernetesDefaults(config *restclient.Config) error
- type AppsClient
- type AppsInterface
- type AuthenticationClient
- type AuthenticationInterface
- type AuthorizationClient
- type AuthorizationInterface
- type AutoscalingClient
- type AutoscalingInterface
- type BatchClient
- type BatchInterface
- type CertificateSigningRequestInterface
- type CertificatesClient
- type CertificatesInterface
- type Client
- func (c *Client) Apps() AppsInterface
- func (c *Client) Authentication() AuthenticationInterface
- func (c *Client) Authorization() AuthorizationInterface
- func (c *Client) Autoscaling() AutoscalingInterface
- func (c *Client) Batch() BatchInterface
- func (c *Client) Certificates() CertificatesInterface
- func (c *Client) ComponentStatuses() ComponentStatusInterface
- func (c *Client) ConfigMaps(namespace string) ConfigMapsInterface
- func (c *Client) Discovery() discovery.DiscoveryInterface
- func (c *Client) Endpoints(namespace string) EndpointsInterface
- func (c *Client) Events(namespace string) EventInterface
- func (c *Client) Extensions() ExtensionsInterface
- func (c *Client) LimitRanges(namespace string) LimitRangeInterface
- func (c *Client) Namespaces() NamespaceInterface
- func (c *Client) Nodes() NodeInterface
- func (c *Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
- func (c *Client) PersistentVolumes() PersistentVolumeInterface
- func (c *Client) PodTemplates(namespace string) PodTemplateInterface
- func (c *Client) Pods(namespace string) PodInterface
- func (c *Client) Policy() PolicyInterface
- func (c *Client) Rbac() RbacInterface
- func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface
- func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface
- func (c *Client) Secrets(namespace string) SecretsInterface
- func (c *Client) ServiceAccounts(namespace string) ServiceAccountsInterface
- func (c *Client) Services(namespace string) ServiceInterface
- func (c *Client) Storage() StorageInterface
- type ClusterRoleBindingInterface
- type ClusterRoleBindings
- type ClusterRoleInterface
- type ClusterRoles
- type ComponentStatusInterface
- type ComponentStatusesInterface
- type ConfigMaps
- func (c *ConfigMaps) Create(cfg *api.ConfigMap) (*api.ConfigMap, error)
- func (c *ConfigMaps) Delete(name string) error
- func (c *ConfigMaps) Get(name string) (*api.ConfigMap, error)
- func (c *ConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error)
- func (c *ConfigMaps) Update(cfg *api.ConfigMap) (*api.ConfigMap, error)
- func (c *ConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error)
- type ConfigMapsInterface
- type ConfigMapsNamespacer
- type ContainerInfoGetter
- type DaemonSetInterface
- type DaemonSetsNamespacer
- type DeploymentInterface
- type DeploymentsNamespacer
- type EndpointsInterface
- type EndpointsNamespacer
- type EventInterface
- type EventNamespacer
- type ExtensionsClient
- func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface
- func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface
- func (c *ExtensionsClient) Ingress(namespace string) IngressInterface
- func (c *ExtensionsClient) Jobs(namespace string) JobInterface
- func (c *ExtensionsClient) NetworkPolicies(namespace string) NetworkPolicyInterface
- func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface
- func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface
- func (c *ExtensionsClient) Scales(namespace string) ScaleInterface
- func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface
- type ExtensionsInterface
- type FlagSet
- type HTTPContainerInfoGetter
- func (self *HTTPContainerInfoGetter) GetContainerInfo(host, podID, containerID string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- func (self *HTTPContainerInfoGetter) GetMachineInfo(host string) (*cadvisorapi.MachineInfo, error)
- func (self *HTTPContainerInfoGetter) GetRootInfo(host string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- type HorizontalPodAutoscalerInterface
- type HorizontalPodAutoscalersNamespacer
- type IngressInterface
- type IngressNamespacer
- type Interface
- type JobInterface
- type JobsNamespacer
- type LimitRangeInterface
- type LimitRangesNamespacer
- type NamespaceInterface
- type NamespacesInterface
- type NetworkPolicies
- func (c *NetworkPolicies) Create(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error)
- func (c *NetworkPolicies) Delete(name string, options *api.DeleteOptions) (err error)
- func (c *NetworkPolicies) Get(name string) (result *extensions.NetworkPolicy, err error)
- func (c *NetworkPolicies) List(opts api.ListOptions) (result *extensions.NetworkPolicyList, err error)
- func (c *NetworkPolicies) Update(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error)
- func (c *NetworkPolicies) Watch(opts api.ListOptions) (watch.Interface, error)
- type NetworkPolicyInterface
- type NetworkPolicyNamespacer
- type NodeInterface
- type NodesInterface
- type PersistentVolumeClaimInterface
- type PersistentVolumeClaimsNamespacer
- type PersistentVolumeInterface
- type PersistentVolumesInterface
- type PetSetInterface
- type PetSetNamespacer
- type PodDisruptionBudgetInterface
- type PodDisruptionBudgetNamespacer
- type PodInterface
- type PodSecurityPoliciesInterface
- type PodSecurityPolicyInterface
- type PodTemplateInterface
- type PodTemplatesNamespacer
- type PodsNamespacer
- type PolicyClient
- type PolicyInterface
- type RbacClient
- type RbacInterface
- type ReplicaSetInterface
- type ReplicaSetsNamespacer
- type ReplicationControllerInterface
- type ReplicationControllersNamespacer
- type ResourceQuotaInterface
- type ResourceQuotasNamespacer
- type RoleBindingInterface
- type RoleBindingsNamespacer
- type RoleInterface
- type RolesNamespacer
- type ScaleInterface
- type ScaleNamespacer
- type ScheduledJobInterface
- type ScheduledJobsNamespacer
- type SecretsInterface
- type SecretsNamespacer
- type ServiceAccountsInterface
- type ServiceAccountsNamespacer
- type ServiceInterface
- type ServicesNamespacer
- type StorageClassInterface
- type StorageClassesInterface
- type StorageClient
- type StorageInterface
- type SubjectAccessReviewInterface
- type SubjectAccessReviewsInterface
- type ThirdPartyResourceInterface
- type ThirdPartyResourceNamespacer
- type TokenReviewInterface
- type TokenReviewsInterface
Constants ¶
const (
ConfigMapResourceName string = "configmaps"
)
Variables ¶
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.
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.
var ErrContainerTerminated = fmt.Errorf("container terminated")
ErrContainerTerminated is returned by PodContainerRunning in the intermediate state where the pod indicates it's still running, but its container is already terminated
var ErrPodCompleted = fmt.Errorf("pod ran to completion")
ErrPodCompleted is returned by PodRunning or PodContainerRunning to indicate that the pod has already reached completed state.
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.2.0
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.2.0
Returns the appropriate field label to use for name of the involved object as per the given API version.
func IsTimeout ¶
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 BatchInterface, job *batch.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 PetSetHasDesiredPets ¶ added in v1.4.0
func PetSetHasDesiredPets(c AppsInterface, petset *apps.PetSet) wait.ConditionFunc
func PodCompleted ¶ added in v1.3.0
PodCompleted returns true if the pod has run to completion, false if the pod has not yet reached running state, or an error in any other case.
func PodContainerRunning ¶ added in v1.3.0
func PodContainerRunning(containerName string) watch.ConditionFunc
PodContainerRunning returns false until the named container has ContainerStatus running (at least once), and will return an error if the pod is deleted, runs to completion, or the container pod is not available.
func PodNotPending ¶ added in v1.3.0
PodNotPending returns true if the pod has left the pending state, false if it has not, or an error in any other case (such as if the pod was deleted).
func PodRunning ¶ added in v1.3.0
PodRunning returns true if the pod is running, false if the pod has not yet reached running state, returns ErrPodCompleted if the pod has run to completion, or an error in any other case.
func PodRunningAndReady ¶ added in v1.3.0
PodRunningAndReady returns true if the pod is running and ready, false if the pod has not yet reached those states, returns ErrPodCompleted if the pod has run to completion, or an error in any other case.
func ReplicaSetHasDesiredReplicas ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ServiceAccountHasSecrets ¶ added in v1.3.0
ServiceAccountHasSecrets returns true if the service account has at least one secret, false if it does not, or an error.
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 AppsClient ¶ added in v1.3.0
type AppsClient struct {
*restclient.RESTClient
}
AppsClient is used to interact with Kubernetes batch features.
func NewApps ¶ added in v1.3.0
func NewApps(c *restclient.Config) (*AppsClient, error)
func NewAppsOrDie ¶ added in v1.3.0
func NewAppsOrDie(c *restclient.Config) *AppsClient
func (*AppsClient) PetSets ¶ added in v1.3.0
func (c *AppsClient) PetSets(namespace string) PetSetInterface
type AppsInterface ¶ added in v1.3.0
type AppsInterface interface { PetSetNamespacer }
type AuthenticationClient ¶ added in v1.4.0
type AuthenticationClient struct {
*restclient.RESTClient
}
AuthenticationClient is used to interact with Kubernetes authentication features.
func NewAuthentication ¶ added in v1.4.0
func NewAuthentication(c *restclient.Config) (*AuthenticationClient, error)
func NewAuthenticationOrDie ¶ added in v1.4.0
func NewAuthenticationOrDie(c *restclient.Config) *AuthenticationClient
func (*AuthenticationClient) TokenReviews ¶ added in v1.4.0
func (c *AuthenticationClient) TokenReviews() TokenReviewInterface
type AuthenticationInterface ¶ added in v1.4.0
type AuthenticationInterface interface { TokenReviewsInterface }
type AuthorizationClient ¶ added in v1.4.0
type AuthorizationClient struct {
*restclient.RESTClient
}
AuthorizationClient is used to interact with Kubernetes authorization features.
func NewAuthorization ¶ added in v1.4.0
func NewAuthorization(c *restclient.Config) (*AuthorizationClient, error)
func NewAuthorizationOrDie ¶ added in v1.4.0
func NewAuthorizationOrDie(c *restclient.Config) *AuthorizationClient
func (*AuthorizationClient) SubjectAccessReviews ¶ added in v1.4.0
func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface
type AuthorizationInterface ¶ added in v1.4.0
type AuthorizationInterface interface { SubjectAccessReviewsInterface }
type AutoscalingClient ¶ added in v1.2.0
type AutoscalingClient struct {
*restclient.RESTClient
}
AutoscalingClient is used to interact with Kubernetes autoscaling features.
func NewAutoscaling ¶ added in v1.2.0
func NewAutoscaling(c *restclient.Config) (*AutoscalingClient, error)
func NewAutoscalingOrDie ¶ added in v1.2.0
func NewAutoscalingOrDie(c *restclient.Config) *AutoscalingClient
func (*AutoscalingClient) HorizontalPodAutoscalers ¶ added in v1.2.0
func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
type AutoscalingInterface ¶ added in v1.2.0
type AutoscalingInterface interface { HorizontalPodAutoscalersNamespacer }
type BatchClient ¶ added in v1.2.0
type BatchClient struct {
*restclient.RESTClient
}
BatchClient is used to interact with Kubernetes batch features.
func NewBatch ¶ added in v1.2.0
func NewBatch(c *restclient.Config) (*BatchClient, error)
func NewBatchOrDie ¶ added in v1.2.0
func NewBatchOrDie(c *restclient.Config) *BatchClient
func (*BatchClient) Jobs ¶ added in v1.2.0
func (c *BatchClient) Jobs(namespace string) JobInterface
func (*BatchClient) ScheduledJobs ¶ added in v1.3.0
func (c *BatchClient) ScheduledJobs(namespace string) ScheduledJobInterface
type BatchInterface ¶ added in v1.2.0
type BatchInterface interface { JobsNamespacer ScheduledJobsNamespacer }
type CertificateSigningRequestInterface ¶ added in v1.4.0
type CertificateSigningRequestInterface interface { List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error) Get(name string) (*certificates.CertificateSigningRequest, error) Delete(name string, options *api.DeleteOptions) error Create(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) Watch(opts api.ListOptions) (watch.Interface, error) }
CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
type CertificatesClient ¶ added in v1.4.0
type CertificatesClient struct {
*restclient.RESTClient
}
func NewCertificates ¶ added in v1.4.0
func NewCertificates(c *restclient.Config) (*CertificatesClient, error)
NewCertificates creates a new CertificatesClient for the given config.
func NewCertificatesOrDie ¶ added in v1.4.0
func NewCertificatesOrDie(c *restclient.Config) *CertificatesClient
NewCertificatesOrDie creates a new CertificatesClient for the given config and panics if there is an error in the config.
func (*CertificatesClient) CertificateSigningRequests ¶ added in v1.4.0
func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface
type CertificatesInterface ¶ added in v1.4.0
type CertificatesInterface interface {
CertificateSigningRequests() CertificateSigningRequestInterface
}
Interface holds the methods for clients of Kubernetes to allow mock testing.
type Client ¶
type Client struct { *restclient.RESTClient *AuthorizationClient *AutoscalingClient *AuthenticationClient *BatchClient *ExtensionsClient *AppsClient *PolicyClient *RbacClient *discovery.DiscoveryClient *CertificatesClient *StorageClient }
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 ¶
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) Apps ¶ added in v1.3.0
func (c *Client) Apps() AppsInterface
func (*Client) Authentication ¶ added in v1.4.0
func (c *Client) Authentication() AuthenticationInterface
func (*Client) Authorization ¶ added in v1.4.0
func (c *Client) Authorization() AuthorizationInterface
func (*Client) Autoscaling ¶ added in v1.2.0
func (c *Client) Autoscaling() AutoscalingInterface
func (*Client) Batch ¶ added in v1.2.0
func (c *Client) Batch() BatchInterface
func (*Client) Certificates ¶ added in v1.4.0
func (c *Client) Certificates() CertificatesInterface
func (*Client) ComponentStatuses ¶
func (c *Client) ComponentStatuses() ComponentStatusInterface
func (*Client) ConfigMaps ¶ added in v1.2.0
func (c *Client) ConfigMaps(namespace string) ConfigMapsInterface
func (*Client) Discovery ¶ added in v1.2.0
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 ¶ added in v1.2.0
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) Policy ¶ added in v1.4.0
func (c *Client) Policy() PolicyInterface
func (*Client) Rbac ¶ added in v1.3.0
func (c *Client) Rbac() RbacInterface
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) ServiceAccounts ¶
func (c *Client) ServiceAccounts(namespace string) ServiceAccountsInterface
func (*Client) Services ¶
func (c *Client) Services(namespace string) ServiceInterface
func (*Client) Storage ¶ added in v1.4.0
func (c *Client) Storage() StorageInterface
type ClusterRoleBindingInterface ¶ added in v1.3.0
type ClusterRoleBindingInterface interface { List(opts api.ListOptions) (*rbac.ClusterRoleBindingList, error) Get(name string) (*rbac.ClusterRoleBinding, error) Delete(name string, options *api.DeleteOptions) error Create(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) Update(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) Watch(opts api.ListOptions) (watch.Interface, error) }
ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
type ClusterRoleBindings ¶ added in v1.3.0
type ClusterRoleBindings interface {
ClusterRoleBindings() ClusterRoleBindingInterface
}
ClusterRoleBindings has methods to work with ClusterRoleBinding resources in a namespace
type ClusterRoleInterface ¶ added in v1.3.0
type ClusterRoleInterface interface { List(opts api.ListOptions) (*rbac.ClusterRoleList, error) Get(name string) (*rbac.ClusterRole, error) Delete(name string, options *api.DeleteOptions) error Create(clusterRole *rbac.ClusterRole) (*rbac.ClusterRole, error) Update(clusterRole *rbac.ClusterRole) (*rbac.ClusterRole, error) Watch(opts api.ListOptions) (watch.Interface, error) }
ClusterRoleInterface has methods to work with ClusterRole resources.
type ClusterRoles ¶ added in v1.3.0
type ClusterRoles interface {
ClusterRoles() ClusterRoleInterface
}
ClusterRoles has methods to work with ClusterRole resources in a namespace
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.2.0
type ConfigMaps struct {
// contains filtered or unexported fields
}
func (*ConfigMaps) Delete ¶ added in v1.2.0
func (c *ConfigMaps) Delete(name string) error
func (*ConfigMaps) Get ¶ added in v1.2.0
func (c *ConfigMaps) Get(name string) (*api.ConfigMap, error)
func (*ConfigMaps) List ¶ added in v1.2.0
func (c *ConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error)
func (*ConfigMaps) Watch ¶ added in v1.2.0
func (c *ConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error)
type ConfigMapsInterface ¶ added in v1.2.0
type ConfigMapsNamespacer ¶ added in v1.2.0
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 ¶
type DeploymentInterface interface { List(opts api.ListOptions) (*extensions.DeploymentList, error) Get(name string) (*extensions.Deployment, error) Delete(name string, options *api.DeleteOptions) error Create(*extensions.Deployment) (*extensions.Deployment, error) Update(*extensions.Deployment) (*extensions.Deployment, error) UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error) Watch(opts api.ListOptions) (watch.Interface, error) Rollback(*extensions.DeploymentRollback) error }
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface
func (*ExtensionsClient) Deployments ¶ added in v1.2.0
func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface
func (*ExtensionsClient) Ingress ¶ added in v1.2.0
func (c *ExtensionsClient) Ingress(namespace string) IngressInterface
func (*ExtensionsClient) Jobs ¶ added in v1.2.0
func (c *ExtensionsClient) Jobs(namespace string) JobInterface
func (*ExtensionsClient) NetworkPolicies ¶ added in v1.3.0
func (c *ExtensionsClient) NetworkPolicies(namespace string) NetworkPolicyInterface
func (*ExtensionsClient) PodSecurityPolicies ¶ added in v1.2.0
func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface
func (*ExtensionsClient) ReplicaSets ¶ added in v1.2.0
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface
func (*ExtensionsClient) Scales ¶ added in v1.2.0
func (c *ExtensionsClient) Scales(namespace string) ScaleInterface
func (*ExtensionsClient) ThirdPartyResources ¶ added in v1.2.0
func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface
type ExtensionsInterface ¶ added in v1.2.0
type ExtensionsInterface interface { ScaleNamespacer DaemonSetsNamespacer DeploymentsNamespacer JobsNamespacer IngressNamespacer NetworkPolicyNamespacer ThirdPartyResourceNamespacer ReplicaSetsNamespacer PodSecurityPoliciesInterface }
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 ¶
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 ¶
func (self *HTTPContainerInfoGetter) GetRootInfo(host string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
type HorizontalPodAutoscalerInterface ¶
type HorizontalPodAutoscalerInterface interface { List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) Get(name string) (*autoscaling.HorizontalPodAutoscaler, error) Delete(name string, options *api.DeleteOptions) error Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
type IngressNamespacer interface {
Ingress(namespace string) IngressInterface
}
IngressNamespacer has methods to work with Ingress resources in a namespace
type Interface ¶
type Interface interface { PodsNamespacer PodTemplatesNamespacer ReplicationControllersNamespacer ServicesNamespacer EndpointsNamespacer NodesInterface EventNamespacer LimitRangesNamespacer ResourceQuotasNamespacer ServiceAccountsNamespacer SecretsNamespacer NamespacesInterface PersistentVolumesInterface PersistentVolumeClaimsNamespacer ComponentStatusesInterface ConfigMapsNamespacer Apps() AppsInterface Authorization() AuthorizationInterface Autoscaling() AutoscalingInterface Authentication() AuthenticationInterface Batch() BatchInterface Extensions() ExtensionsInterface Rbac() RbacInterface Discovery() discovery.DiscoveryInterface Certificates() CertificatesInterface Storage() StorageInterface }
Interface holds the methods for clients of Kubernetes, an interface to allow mock testing.
type JobInterface ¶
type JobInterface interface { List(opts api.ListOptions) (*batch.JobList, error) Get(name string) (*batch.Job, error) Create(job *batch.Job) (*batch.Job, error) Update(job *batch.Job) (*batch.Job, error) Delete(name string, options *api.DeleteOptions) error Watch(opts api.ListOptions) (watch.Interface, error) UpdateStatus(job *batch.Job) (*batch.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 NetworkPolicies ¶ added in v1.3.0
type NetworkPolicies struct {
// contains filtered or unexported fields
}
NetworkPolicies implements NetworkPolicyNamespacer interface
func (*NetworkPolicies) Create ¶ added in v1.3.0
func (c *NetworkPolicies) Create(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error)
Create creates a new networkPolicy.
func (*NetworkPolicies) Delete ¶ added in v1.3.0
func (c *NetworkPolicies) Delete(name string, options *api.DeleteOptions) (err error)
Delete deletes a networkPolicy, returns error if one occurs.
func (*NetworkPolicies) Get ¶ added in v1.3.0
func (c *NetworkPolicies) Get(name string) (result *extensions.NetworkPolicy, err error)
Get returns information about a particular networkPolicy.
func (*NetworkPolicies) List ¶ added in v1.3.0
func (c *NetworkPolicies) List(opts api.ListOptions) (result *extensions.NetworkPolicyList, err error)
List returns a list of networkPolicy that match the label and field selectors.
func (*NetworkPolicies) Update ¶ added in v1.3.0
func (c *NetworkPolicies) Update(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error)
Update updates an existing networkPolicy.
func (*NetworkPolicies) Watch ¶ added in v1.3.0
func (c *NetworkPolicies) Watch(opts api.ListOptions) (watch.Interface, error)
Watch returns a watch.Interface that watches the requested networkPolicy.
type NetworkPolicyInterface ¶ added in v1.3.0
type NetworkPolicyInterface interface { List(opts api.ListOptions) (*extensions.NetworkPolicyList, error) Get(name string) (*extensions.NetworkPolicy, error) Create(networkPolicy *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) Update(networkPolicy *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) Delete(name string, options *api.DeleteOptions) error Watch(opts api.ListOptions) (watch.Interface, error) }
NetworkPolicyInterface exposes methods to work on NetworkPolicy resources.
type NetworkPolicyNamespacer ¶ added in v1.3.0
type NetworkPolicyNamespacer interface {
NetworkPolicies(namespace string) NetworkPolicyInterface
}
NetworkPolicyNamespacer has methods to work with NetworkPolicy resources in a namespace
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 DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) 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 PetSetInterface ¶ added in v1.3.0
type PetSetInterface interface { List(opts api.ListOptions) (*apps.PetSetList, error) Get(name string) (*apps.PetSet, error) Create(petSet *apps.PetSet) (*apps.PetSet, error) Update(petSet *apps.PetSet) (*apps.PetSet, error) Delete(name string, options *api.DeleteOptions) error Watch(opts api.ListOptions) (watch.Interface, error) UpdateStatus(petSet *apps.PetSet) (*apps.PetSet, error) }
PetSetInterface exposes methods to work on PetSet resources.
type PetSetNamespacer ¶ added in v1.3.0
type PetSetNamespacer interface {
PetSets(namespace string) PetSetInterface
}
PetSetNamespacer has methods to work with PetSet resources in a namespace
type PodDisruptionBudgetInterface ¶ added in v1.3.0
type PodDisruptionBudgetInterface interface { List(opts api.ListOptions) (*policy.PodDisruptionBudgetList, error) Get(name string) (*policy.PodDisruptionBudget, error) Create(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) Update(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) Delete(name string, options *api.DeleteOptions) error Watch(opts api.ListOptions) (watch.Interface, error) UpdateStatus(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) }
PodDisruptionBudgetInterface exposes methods to work on PodDisruptionBudget resources.
type PodDisruptionBudgetNamespacer ¶ added in v1.3.0
type PodDisruptionBudgetNamespacer interface {
PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
}
PodDisruptionBudgetNamespacer has methods to work with PodDisruptionBudget resources in a namespace
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.2.0
type PodSecurityPoliciesInterface interface {
PodSecurityPolicies() PodSecurityPolicyInterface
}
type PodSecurityPolicyInterface ¶ added in v1.2.0
type PodSecurityPolicyInterface interface { Get(name string) (result *extensions.PodSecurityPolicy, err error) Create(psp *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 PolicyClient ¶ added in v1.3.0
type PolicyClient struct {
*restclient.RESTClient
}
PolicyClient is used to interact with Kubernetes batch features.
func NewPolicy ¶ added in v1.3.0
func NewPolicy(c *restclient.Config) (*PolicyClient, error)
func NewPolicyOrDie ¶ added in v1.3.0
func NewPolicyOrDie(c *restclient.Config) *PolicyClient
func (*PolicyClient) PodDisruptionBudgets ¶ added in v1.3.0
func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
type PolicyInterface ¶ added in v1.3.0
type PolicyInterface interface { PodDisruptionBudgetNamespacer }
type RbacClient ¶ added in v1.3.0
type RbacClient struct {
*restclient.RESTClient
}
func NewRbac ¶ added in v1.3.0
func NewRbac(c *restclient.Config) (*RbacClient, error)
NewRbac creates a new RbacClient for the given config.
func NewRbacOrDie ¶ added in v1.3.0
func NewRbacOrDie(c *restclient.Config) *RbacClient
NewRbacOrDie creates a new RbacClient for the given config and panics if there is an error in the config.
func (*RbacClient) ClusterRoleBindings ¶ added in v1.3.0
func (c *RbacClient) ClusterRoleBindings() ClusterRoleBindingInterface
func (*RbacClient) ClusterRoles ¶ added in v1.3.0
func (c *RbacClient) ClusterRoles() ClusterRoleInterface
func (*RbacClient) RoleBindings ¶ added in v1.3.0
func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface
func (*RbacClient) Roles ¶ added in v1.3.0
func (c *RbacClient) Roles(namespace string) RoleInterface
type RbacInterface ¶ added in v1.3.0
type RbacInterface interface { RoleBindingsNamespacer RolesNamespacer ClusterRoleBindings ClusterRoles }
Interface holds the methods for clients of Kubernetes to allow mock testing.
type ReplicaSetInterface ¶ added in v1.2.0
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.2.0
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, options *api.DeleteOptions) 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 RoleBindingInterface ¶ added in v1.3.0
type RoleBindingInterface interface { List(opts api.ListOptions) (*rbac.RoleBindingList, error) Get(name string) (*rbac.RoleBinding, error) Delete(name string, options *api.DeleteOptions) error Create(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error) Update(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error) Watch(opts api.ListOptions) (watch.Interface, error) }
RoleBindingInterface has methods to work with RoleBinding resources.
type RoleBindingsNamespacer ¶ added in v1.3.0
type RoleBindingsNamespacer interface {
RoleBindings(namespace string) RoleBindingInterface
}
RoleBindingsNamespacer has methods to work with RoleBinding resources in a namespace
type RoleInterface ¶ added in v1.3.0
type RoleInterface interface { List(opts api.ListOptions) (*rbac.RoleList, error) Get(name string) (*rbac.Role, error) Delete(name string, options *api.DeleteOptions) error Create(role *rbac.Role) (*rbac.Role, error) Update(role *rbac.Role) (*rbac.Role, error) Watch(opts api.ListOptions) (watch.Interface, error) }
RoleInterface has methods to work with Role resources.
type RolesNamespacer ¶ added in v1.3.0
type RolesNamespacer interface {
Roles(namespace string) RoleInterface
}
RolesNamespacer has methods to work with Role 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 ScheduledJobInterface ¶ added in v1.3.0
type ScheduledJobInterface interface { List(opts api.ListOptions) (*batch.ScheduledJobList, error) Get(name string) (*batch.ScheduledJob, error) Create(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error) Update(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error) Delete(name string, options *api.DeleteOptions) error Watch(opts api.ListOptions) (watch.Interface, error) UpdateStatus(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error) }
ScheduledJobInterface exposes methods to work on ScheduledJob resources.
type ScheduledJobsNamespacer ¶ added in v1.3.0
type ScheduledJobsNamespacer interface {
ScheduledJobs(namespace string) ScheduledJobInterface
}
ScheduledJobsNamespacer has methods to work with ScheduledJob resources in a namespace
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 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 StorageClassInterface ¶ added in v1.4.0
type StorageClassInterface interface { List(opts api.ListOptions) (*storage.StorageClassList, error) Get(name string) (*storage.StorageClass, error) Create(storageClass *storage.StorageClass) (*storage.StorageClass, error) Update(storageClass *storage.StorageClass) (*storage.StorageClass, error) Delete(name string) error Watch(opts api.ListOptions) (watch.Interface, error) }
StorageClassInterface has methods to work with StorageClass resources.
type StorageClassesInterface ¶ added in v1.4.0
type StorageClassesInterface interface {
StorageClasses() StorageClassInterface
}
type StorageClient ¶ added in v1.4.0
type StorageClient struct {
*restclient.RESTClient
}
StorageClient is used to interact with Kubernetes storage features.
func NewStorage ¶ added in v1.4.0
func NewStorage(c *restclient.Config) (*StorageClient, error)
func NewStorageOrDie ¶ added in v1.4.0
func NewStorageOrDie(c *restclient.Config) *StorageClient
func (*StorageClient) StorageClasses ¶ added in v1.4.0
func (c *StorageClient) StorageClasses() StorageClassInterface
type StorageInterface ¶ added in v1.4.0
type StorageInterface interface { StorageClassesInterface }
type SubjectAccessReviewInterface ¶ added in v1.4.0
type SubjectAccessReviewInterface interface {
Create(subjectAccessReview *authorization.SubjectAccessReview) (*authorization.SubjectAccessReview, error)
}
type SubjectAccessReviewsInterface ¶ added in v1.4.0
type SubjectAccessReviewsInterface interface {
SubjectAccessReviews() SubjectAccessReviewInterface
}
type ThirdPartyResourceInterface ¶ added in v1.2.0
type ThirdPartyResourceInterface interface { List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error) Get(name string) (*extensions.ThirdPartyResource, error) Create(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) Update(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) UpdateStatus(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) Delete(name string) error Watch(opts api.ListOptions) (watch.Interface, error) }
type ThirdPartyResourceNamespacer ¶ added in v1.2.0
type ThirdPartyResourceNamespacer interface {
ThirdPartyResources() ThirdPartyResourceInterface
}
ThirdPartyResourceNamespacer has methods to work with ThirdPartyResource resources in a namespace
type TokenReviewInterface ¶ added in v1.4.0
type TokenReviewInterface interface {
Create(tokenReview *authentication.TokenReview) (*authentication.TokenReview, error)
}
TokenReviewInterface has methods to work with TokenReview resources.
type TokenReviewsInterface ¶ added in v1.4.0
type TokenReviewsInterface interface {
TokenReviews() TokenReviewInterface
}
TokenReviews has methods to work with TokenReview resources in a namespace
Source Files ¶
- apps.go
- authentication.go
- authorization.go
- autoscaling.go
- batch.go
- certificates.go
- certificatesigningrequests.go
- client.go
- clusterrolebindings.go
- clusterroles.go
- componentstatuses.go
- conditions.go
- configmap.go
- containerinfo.go
- daemon_sets.go
- deployment.go
- doc.go
- endpoints.go
- events.go
- extensions.go
- flags.go
- helper.go
- horizontalpodautoscaler.go
- import_known_versions.go
- ingress.go
- jobs.go
- limit_ranges.go
- namespaces.go
- network_policys.go
- nodes.go
- persistentvolumeclaim.go
- persistentvolumes.go
- pet_sets.go
- pod_disruption_budgets.go
- pod_templates.go
- pods.go
- podsecuritypolicy.go
- policy.go
- rbac.go
- replica_sets.go
- replication_controllers.go
- resource_quotas.go
- rolebindings.go
- roles.go
- scale.go
- scheduledjobs.go
- secrets.go
- service_accounts.go
- services.go
- storage.go
- storageclasses.go
- subjectaccessreview.go
- thirdpartyresources.go
- tokenreviews.go
- util.go
Directories ¶
Path | Synopsis |
---|---|
adapters
|
|
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. |
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. |