Documentation ¶
Index ¶
- type Kubernetes
- func (k *Kubernetes) ClusterCrids(podCIDR string) (cidrs []string, err error)
- func (k *Kubernetes) CreateService(name, namespace string, port int, labels map[string]string) (*v1.Service, error)
- func (k *Kubernetes) DecreaseRef(namespace string, app string) (cleanup bool, err error)
- func (k *Kubernetes) Deployment(name, namespace string) (*appv1.Deployment, error)
- func (k *Kubernetes) GetDeployment(name string, namespace string) (*appv1.Deployment, error)
- func (k *Kubernetes) GetOrCreateShadow(name, namespace, image string, labels map[string]string, ...) (podIP, podName, sshcm string, credential *util.SSHCredential, err error)
- func (k *Kubernetes) RemoveConfigMap(name, namespace string) (err error)
- func (k *Kubernetes) RemoveDeployment(name, namespace string) (err error)
- func (k *Kubernetes) RemoveService(name, namespace string) (err error)
- func (k *Kubernetes) Scale(deployment *appv1.Deployment, replicas *int32) (err error)
- func (k *Kubernetes) ScaleTo(deployment, namespace string, replicas *int32) (err error)
- func (k *Kubernetes) ServiceHosts(namespace string) (hosts map[string]string)
- func (k *Kubernetes) UpdateDeployment(namespace string, deployment *appv1.Deployment) (*appv1.Deployment, error)
- type KubernetesInterface
- type ResourceMeta
- type SSHkeyMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kubernetes ¶
type Kubernetes struct { KubeConfig string Clientset kubernetes.Interface }
Kubernetes implements KubernetesInterface
func (*Kubernetes) ClusterCrids ¶
func (k *Kubernetes) ClusterCrids(podCIDR string) (cidrs []string, err error)
ClusterCrids get cluster cirds
func (*Kubernetes) CreateService ¶ added in v0.1.0
func (k *Kubernetes) CreateService(name, namespace string, port int, labels map[string]string) (*v1.Service, error)
CreateService create kubernetes service
func (*Kubernetes) DecreaseRef ¶ added in v0.1.0
func (k *Kubernetes) DecreaseRef(namespace string, app string) (cleanup bool, err error)
DecreaseRef ...
func (*Kubernetes) Deployment ¶
func (k *Kubernetes) Deployment(name, namespace string) (*appv1.Deployment, error)
Deployment get deployment
func (*Kubernetes) GetDeployment ¶ added in v0.1.0
func (k *Kubernetes) GetDeployment(name string, namespace string) (*appv1.Deployment, error)
GetDeployment ...
func (*Kubernetes) GetOrCreateShadow ¶ added in v0.1.0
func (k *Kubernetes) GetOrCreateShadow(name, namespace, image string, labels map[string]string, debug, reuseShadow bool) (podIP, podName, sshcm string, credential *util.SSHCredential, err error)
GetOrCreateShadow create shadow
func (*Kubernetes) RemoveConfigMap ¶ added in v0.1.0
func (k *Kubernetes) RemoveConfigMap(name, namespace string) (err error)
RemoveConfigMap remove ConfigMap instance
func (*Kubernetes) RemoveDeployment ¶ added in v0.1.0
func (k *Kubernetes) RemoveDeployment(name, namespace string) (err error)
RemoveDeployment remove deployment instances
func (*Kubernetes) RemoveService ¶ added in v0.1.0
func (k *Kubernetes) RemoveService(name, namespace string) (err error)
RemoveService remove sevice
func (*Kubernetes) Scale ¶
func (k *Kubernetes) Scale(deployment *appv1.Deployment, replicas *int32) (err error)
Scale scale deployment to
func (*Kubernetes) ScaleTo ¶ added in v0.1.0
func (k *Kubernetes) ScaleTo(deployment, namespace string, replicas *int32) (err error)
ScaleTo scale deployment to
func (*Kubernetes) ServiceHosts ¶
func (k *Kubernetes) ServiceHosts(namespace string) (hosts map[string]string)
ServiceHosts get service dns map
func (*Kubernetes) UpdateDeployment ¶ added in v0.1.0
func (k *Kubernetes) UpdateDeployment(namespace string, deployment *appv1.Deployment) (*appv1.Deployment, error)
UpdateDeployment ...
type KubernetesInterface ¶
type KubernetesInterface interface { RemoveDeployment(name, namespace string) (err error) RemoveConfigMap(name, namespace string) (err error) RemoveService(name, namespace string) (err error) Deployment(name, namespace string) (deployment *appV1.Deployment, err error) Scale(deployment *appV1.Deployment, replicas *int32) (err error) ScaleTo(deployment, namespace string, replicas *int32) (err error) ServiceHosts(namespace string) (hosts map[string]string) ClusterCrids(podCIDR string) (cidrs []string, err error) GetOrCreateShadow(name, namespace, image string, labels map[string]string, debug, reuseShadow bool) (podIP, podName, sshcm string, credential *util.SSHCredential, err error) CreateService(name, namespace string, port int, labels map[string]string) (*coreV1.Service, error) GetDeployment(name string, namespace string) (*appV1.Deployment, error) UpdateDeployment(namespace string, deployment *appV1.Deployment) (*appV1.Deployment, error) DecreaseRef(namespace string, deployment string) (cleanup bool, err error) }
KubernetesInterface kubernetes interface
func Create ¶
func Create(kubeConfig string) (kubernetes KubernetesInterface, err error)
Create kubernetes instance
func CreateFromClientSet ¶ added in v0.1.0
func CreateFromClientSet(clientSet kubernetes.Interface) (kubernetes KubernetesInterface, err error)
CreateFromClientSet kubernetes instance
type ResourceMeta ¶ added in v0.1.0
ResourceMeta ...
type SSHkeyMeta ¶ added in v0.1.0
SSHkeyMeta ...
Click to show internal directories.
Click to hide internal directories.