Documentation ¶
Index ¶
- func APIExtClient() (apiextensionsclient.Interface, error)
- func CanUseAPIExtV1() bool
- func CanUseAPIExtV1Beta1() bool
- func CreateConfig(apiServerURL, kubeCfgPath string) (*rest.Config, error)
- func CreateNewDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) error
- func CreateNewService(k8sClient kubernetes.Interface, namespace string, svc *corev1.Service) error
- func CreateNewStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) error
- func DeleteDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) error
- func DeleteService(k8sClient kubernetes.Interface, namespace string, svc *corev1.Service) error
- func DeleteStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) error
- func UpdateDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) (*appsv1.Deployment, error)
- func UpdateService(k8sClient kubernetes.Interface, namespace string, svc *corev1.Service) (*corev1.Service, error)
- func UpdateStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
- func UpdateVersion(client kubernetes.Interface) error
- func Version() go_version.Version
- func WaitForCRD(crdName string) error
- type ClientK8s
- type DgraphClientK8s
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIExtClient ¶
func APIExtClient() (apiextensionsclient.Interface, error)
APIExtClient creates a new k8s api extensions client
func CanUseAPIExtV1 ¶
func CanUseAPIExtV1() bool
CanUseAPIExtV1 returns true if we can use k8s apiextension/v1 else false
func CanUseAPIExtV1Beta1 ¶
func CanUseAPIExtV1Beta1() bool
CanUseAPIExtV1 returns true if we can use k8s apiextension/v1beta1 else false
func CreateConfig ¶
CreateConfig creates a rest.Config for connecting to k8s api-server.
The precedence of the configuration selection is the following: 1. kubeCfgPath 2. apiServerURL (https if specified) 3. rest.InClusterConfig().
func CreateNewDeployment ¶
func CreateNewDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) error
CreateNewDeployment creates a new Kubernetes Deployment for the provided Deployment object.
func CreateNewService ¶
CreateNewService creates a new Kubernetes service for the provided service object.
func CreateNewStatefulSet ¶
func CreateNewStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) error
CreateNewStatefulSet creates a new Kubernetes StatefulSet for the provided StatefulSet object.
func DeleteDeployment ¶
func DeleteDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) error
DeleteDeployment deletes a kubernetes Deployment from the cluster.
func DeleteService ¶
DeleteService deletes a kubernetes service from the cluster.
func DeleteStatefulSet ¶
func DeleteStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) error
DeleteStatefulSet deletes a kubernetes StatefulSet from the cluster.
func UpdateDeployment ¶
func UpdateDeployment(k8sClient kubernetes.Interface, namespace string, svc *appsv1.Deployment) (*appsv1.Deployment, error)
UpdateDeployment updates the Deployment in the kubernetes cluster.
func UpdateService ¶
func UpdateService(k8sClient kubernetes.Interface, namespace string, svc *corev1.Service) (*corev1.Service, error)
UpdateService updates the service in the kubernetes cluster.
func UpdateStatefulSet ¶
func UpdateStatefulSet(k8sClient kubernetes.Interface, namespace string, svc *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
UpdateStatefulSet updates the StatefulSet in the kubernetes cluster.
func UpdateVersion ¶
func UpdateVersion(client kubernetes.Interface) error
Update retrieves the version of the Kubernetes apiserver. This function must be called after connectivity to the apiserver has been established.
func Version ¶
func Version() go_version.Version
Version returns the version of the Kubernetes apiserver
func WaitForCRD ¶
WaitForCRD waits for a kubernetes custom resource definition to be ready.
Types ¶
type ClientK8s ¶
type ClientK8s struct { // kubernetes.Interface is the object through which interactions with // Kubernetes are performed. kubernetes.Interface }
ClientK8s is a wrapper around kubernetes.Interface.
type DgraphClientK8s ¶
DgraphClientK8s is a wrapper around clientset.Interface for dgraph operator kubernetes client.
func DgraphClient ¶
func DgraphClient() (*DgraphClientK8s, error)
DgraphClient creates a new k8s api extensions client