Documentation ¶
Index ¶
- func BuildConfig(kubeconfig string) (*rest.Config, error)
- func NewKubeClient(kubeCfgFile string) (*k8sclient.Clientset, error)
- type Kubernetes
- func (k *Kubernetes) CreateOrUpdateDeployment(deployment *appsv1Beta1.Deployment) error
- func (k *Kubernetes) CreateOrUpdateService(service *v1.Service) error
- func (k *Kubernetes) CreateOrUpdateStatefulSet(statefulset *appsv1Beta1.StatefulSet) error
- func (k *Kubernetes) DeleteDeployment(deployment *appsv1Beta1.Deployment) error
- func (k *Kubernetes) DeleteService(service *v1.Service) error
- func (k *Kubernetes) DeleteStatefulset(statefulset *appsv1Beta1.StatefulSet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kubernetes ¶
type Kubernetes struct { Client *k8sclient.Clientset MasterHost string DefaultOption metav1.GetOptions DeleteOption metav1.DeleteOptions }
func New ¶
func New(kubeConfigFile, masterHost string) (*Kubernetes, error)
func (*Kubernetes) CreateOrUpdateDeployment ¶
func (k *Kubernetes) CreateOrUpdateDeployment(deployment *appsv1Beta1.Deployment) error
Deploys the given deployment into kubernetes, error is returned if a non recoverable error happens
func (*Kubernetes) CreateOrUpdateService ¶
func (k *Kubernetes) CreateOrUpdateService(service *v1.Service) error
Deploys the given service into kubernetes, error is returned if a non recoverable error happens
func (*Kubernetes) CreateOrUpdateStatefulSet ¶
func (k *Kubernetes) CreateOrUpdateStatefulSet(statefulset *appsv1Beta1.StatefulSet) error
Deploys the given statefulset into kubernetes, error is returned if a non recoverable error happens
func (*Kubernetes) DeleteDeployment ¶
func (k *Kubernetes) DeleteDeployment(deployment *appsv1Beta1.Deployment) error
func (*Kubernetes) DeleteService ¶
func (k *Kubernetes) DeleteService(service *v1.Service) error
func (*Kubernetes) DeleteStatefulset ¶
func (k *Kubernetes) DeleteStatefulset(statefulset *appsv1Beta1.StatefulSet) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.