Documentation ¶
Index ¶
- func AddLabelToDeployment(clientset kubernetes.Interface, origDeployment *v1.Deployment, ...) error
- func AddLabelToPod(clientset kubernetes.Interface, origPod *v1.Pod, key, value, namespace string) error
- func ExecToPodThroughAPI(config *rest.Config, clientset kubernetes.Interface, command []string, ...) (string, string, error)
- func FindOrAppendVolume(volumes *[]v1.Volume, name string) *v1.Volume
- func FindOrAppendVolumeMount(mounts *[]v1.VolumeMount, name string) *v1.VolumeMount
- func IsAlreadyExists(err error) bool
- func IsNotFound(err error) bool
- type Client
- type GetEndpointRequest
- type GetEndpointResponse
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLabelToDeployment ¶
func AddLabelToDeployment(clientset kubernetes.Interface, origDeployment *v1.Deployment, key, value, namespace string) error
func AddLabelToPod ¶
func ExecToPodThroughAPI ¶
func ExecToPodThroughAPI(config *rest.Config, clientset kubernetes.Interface, command []string, containerName, podName, namespace string, stdin io.Reader) (string, string, error)
ExecToPodThroughAPI uninterractively exec to the pod with the command specified. :param string command: list of the str which specify the command. :param string pod_name: Pod name :param string namespace: namespace of the Pod. :param io.Reader stdin: Standerd Input if necessary, otherwise `nil` :return: string: Output of the command. (STDOUT)
string: Errors. (STDERR) error: If any error has occurred otherwise `nil`
func FindOrAppendVolume ¶
FindOrAppendVolume returns a pointer to the Volume in volumes named name. If no such Volume exists, it creates one with that name and returns it.
func FindOrAppendVolumeMount ¶
func FindOrAppendVolumeMount(mounts *[]v1.VolumeMount, name string) *v1.VolumeMount
FindOrAppendVolumeMount returns a pointer to the VolumeMount in mounts named name. If no such VolumeMount exists, it creates one with that name and returns it.
func IsAlreadyExists ¶
IsAlreadyExists returns true if the err indicates that a resource already exists.
func IsNotFound ¶
IsNotFound returns true if err indicates that a resource was not found.
Types ¶
type Client ¶
type Client struct { *rest.Config *kubernetes.Clientset // contains filtered or unexported fields }
Client provides methods for interacting with Kubernetes resources. It implements both kubernetes and crunchydata clientset Interfaces.
func (*Client) CrunchydataV1 ¶
func (c *Client) CrunchydataV1() crunchydatav1.CrunchydataV1Interface
CrunchydataV1 retrieves the CrunchydataV1Client
type GetEndpointRequest ¶
type GetEndpointRequest struct { Clientset kubernetes.Interface // Kubernetes Clientset that interfaces with the Kubernetes cluster Name string // Name of the endpoint that is being queried Namespace string // Namespace the endpoint being queried resides in }
GetEndpointRequest is used for the GetEndpoint function, which includes the current Kubernetes request context, as well as the namespace / endpoint name being requested
type GetEndpointResponse ¶
type GetEndpointResponse struct { Endpoint *v1.Endpoints // Kubernetes Endpoint object that specifics about the endpoint Name string // Name of the endpoint Namespace string // Namespace that the endpoint is in }
GetEndpointResponse contains the results from a successful request to the endpoint API, including the Kubernetes Endpoint as well as the original request data
func GetEndpoint ¶
func GetEndpoint(request *GetEndpointRequest) (*GetEndpointResponse, error)
GetEndpoint tries to find an individual endpoint in a namespace. Returns the endpoint object if it can be IsNotFound If no endpoint can be found, then an error is returned
type Interface ¶
type Interface interface { kubernetes.Interface CrunchydataV1() crunchydatav1.CrunchydataV1Interface }