k8s

package
v0.4.2-RC1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientSet

func GetClientSet() (k8sClient, error)

GetClientSet generates the client-set from the config file on the host Three clients are generated by the function:

  1. Client-set from client-go which is used for operations on pods/nodes and other first-class k8s objects. While using runtime client for this operations, the podList etc retrieved were not up-to-date
  2. Client from apiextensions which is used for CRUD operations on CRDs
  3. Runtime client from the controller-runtime which will be used for CRUD operations related to custom resources

func GetClusterRole

func GetClusterRole() (rbacv1beta1.ClusterRole, error)

GetClusterRole generates the ClusterRole object from the yaml file

func GetClusterRoleBinding

func GetClusterRoleBinding() (rbacv1beta1.ClusterRoleBinding, error)

GetClusterRoleBinding generates the ClusterRoleBinding object from the yaml file

func GetConfigMap

func GetConfigMap() (v1.ConfigMap, error)

GetConfigMap generates the ConfigMap object for NDM from the yaml file

func GetCustomResourceDefinition

func GetCustomResourceDefinition(crdyaml NDMYaml) (apiextensionsv1beta1.CustomResourceDefinition, error)

GetCustomResourceDefinition generates the CustomResourceDefinition object from the specified YAML file

func GetDaemonSet

func GetDaemonSet() (v1beta1.DaemonSet, error)

GetDaemonSet generates the NDM DaemonSet object from the yaml file

func GetDeployment

func GetDeployment() (appsv1.Deployment, error)

GetDeployment generates the NDO Deployment object from the yaml file

func GetServiceAccount

func GetServiceAccount() (v1.ServiceAccount, error)

GetServiceAccount generates the ServiceAccount object from the yaml file

func NewBDC

func NewBDC(bdcName string) *apis.BlockDeviceClaim

NewBDC creates a sample device claim which can be used for claiming a block device.

func WaitForReconcilation

func WaitForReconcilation()

WaitForReconcilation sleeps the process for a fixed duration so that the reconcile loop can run and fetch the required changes

func WaitForStateChange

func WaitForStateChange()

WaitForStateChange sleeps the process for a fixed Duration so that the state changes get written in etcd and we get the updated result

Types

type NDMYaml

type NDMYaml string

NDMYaml is a string type that stores the path to the YAML files which are required to deploy NDM

const (
	ConfigMapYAML           NDMYaml = "../yamls/configmap.yaml"
	ServiceAccountYAML      NDMYaml = "../yamls/serviceaccount.yaml"
	ClusterRoleYAML         NDMYaml = "../yamls/clusterrole.yaml"
	ClusterRoleBindingYAML  NDMYaml = "../yamls/clusterrolebinding.yaml"
	DiskCRDYAML             NDMYaml = "../yamls/diskCR.yaml"
	BlockDeviceCRDYAML      NDMYaml = "../yamls/blockDeviceCR.yaml"
	BlockDeviceClaimCRDYAML NDMYaml = "../yamls/blockDeviceClaimCR.yaml"
	DaemonSetYAML           NDMYaml = "../yamls/daemonset.yaml"
	DeploymentYAML          NDMYaml = "../yamls/deployment.yaml"
)

Path to various YAMLs used for integration testing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL