Documentation ¶
Index ¶
- func GetClientSet() (k8sClient, error)
- func GetClusterRole() (rbacv1beta1.ClusterRole, error)
- func GetClusterRoleBinding() (rbacv1beta1.ClusterRoleBinding, error)
- func GetConfigMap() (v1.ConfigMap, error)
- func GetCustomResourceDefinition(crdyaml NDMYaml) (apiextensionsv1beta1.CustomResourceDefinition, error)
- func GetDaemonSet() (v1beta1.DaemonSet, error)
- func GetDeployment() (appsv1.Deployment, error)
- func GetServiceAccount() (v1.ServiceAccount, error)
- func NewBDC(bdcName string) *apis.BlockDeviceClaim
- func WaitForReconcilation()
- func WaitForStateChange()
- type NDMYaml
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:
- 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
- Client from apiextensions which is used for CRUD operations on CRDs
- 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 ¶
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 ¶
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