Documentation ¶
Index ¶
- func CLIFlags() []cli.Flag
- type APIInterface
- type Client
- func (c *Client) CreateDeployment(deployment *v1beta1.Deployment) error
- func (c *Client) CreateOrUpdateDeployment(deployment *v1beta1.Deployment) error
- func (c *Client) CreateService(service *v1.Service) error
- func (c *Client) DeleteDeployment(deployment *v1beta1.Deployment) error
- func (c *Client) FindDeploymentByName(name, namespace string) (*v1beta1.Deployment, error)
- func (c *Client) GetPods(namespace string, options v1.ListOptions) ([]v1.Pod, error)
- func (c *Client) GetPodsForDeployment(deployment *v1beta1.Deployment) ([]v1.Pod, error)
- func (c *Client) GetService(namespace string, name string) (*v1.Service, error)
- func (c *Client) GetServices(namespace string, options v1.ListOptions) ([]v1.Service, error)
- func (c *Client) Health() error
- func (c *Client) UpdateService(service *v1.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIInterface ¶
type APIInterface interface { Health() error GetPods(string, v1.ListOptions) ([]v1.Pod, error) CreateDeployment(*v1beta1.Deployment) error CreateOrUpdateDeployment(*v1beta1.Deployment) error DeleteDeployment(*v1beta1.Deployment) error FindDeploymentByName(string, string) (*v1beta1.Deployment, error) CreateService(*v1.Service) error GetServices(string, v1.ListOptions) ([]v1.Service, error) GetService(string, string) (*v1.Service, error) UpdateService(*v1.Service) error }
APIInterface an interface for interacting with k8s cluster API
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client client for interacting with Kubernetes cluster
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(deployment *v1beta1.Deployment) error
CreateDeployment will create a new deployment in the k8s cluster using the provided deployment spec for configuration
func (*Client) CreateOrUpdateDeployment ¶
func (c *Client) CreateOrUpdateDeployment(deployment *v1beta1.Deployment) error
CreateOrUpdateDeployment will gracefully apply updates to an existing deployment or create a fresh deployment
func (*Client) CreateService ¶
CreateService will create a new service in the k8s cluster using the provided service spec
func (*Client) DeleteDeployment ¶
func (c *Client) DeleteDeployment(deployment *v1beta1.Deployment) error
DeleteDeployment will delete the provided deployment from k8s
func (*Client) FindDeploymentByName ¶
func (c *Client) FindDeploymentByName(name, namespace string) (*v1beta1.Deployment, error)
FindDeploymentByName will lookup a deployment in the k8s cluster using the provided name
func (*Client) GetPodsForDeployment ¶
GetPodsForDeployment will retrieve the pods associated to the provided deployment
func (*Client) GetService ¶
GetService retrieves specific service
func (*Client) GetServices ¶
GetServices retrieves services in the k8s cluster