Documentation ¶
Overview ¶
Package util helps to setup Kubernetes resource related operations. All kubernetes resource creation operation goes here. In addition, any common tests related library functions goes here.
Index ¶
- Variables
- func CheckReadyReplicas(clientset kubernetes.Interface, deploymentName string, targetNamespace string, ...) error
- func CreateDeployment(clientset kubernetes.Interface, deployment *appsv1.Deployment, ...) error
- func CreatePod(clientset kubernetes.Interface, pod *v1.Pod, targetNamespace string) error
- func DeleteDeployment(clientset kubernetes.Interface, deploymentName string, targetNamespace string) error
- func DeletePod(clientset kubernetes.Interface, podName string, targetNamespace string) error
- func GetStatusCondition(clientset kubernetes.Interface, deploymentName string) (*v1beta1.ReplicaSetList, error)
- func IsPrivilegedContainerCreated(rsList *v1beta1.ReplicaSetList, statusReason string, statusCondition string) bool
- func ReplicaSetsByLabel(clientset kubernetes.Interface, labelSelectorValue string, ...) (*v1beta1.ReplicaSetList, error)
Constants ¶
This section is empty.
Variables ¶
var TargetNamespace = getTargetNamespace()
TargetNamespace represents Kubernetes namespace to run tests
var TargetServiceAccount = getTargetServiceAccount()
TargetServiceAccount represents Kubernetes service account
Functions ¶
func CheckReadyReplicas ¶
func CheckReadyReplicas(clientset kubernetes.Interface, deploymentName string, targetNamespace string, retryCount int) error
CheckReadyReplicas will wait until the resource is fully rolled out with all replicas
func CreateDeployment ¶
func CreateDeployment(clientset kubernetes.Interface, deployment *appsv1.Deployment, targetNamespace string) error
CreateDeployment creates kubernetes deployment
func DeleteDeployment ¶
func DeleteDeployment(clientset kubernetes.Interface, deploymentName string, targetNamespace string) error
DeleteDeployment deletes kubernetes deployment
func DeletePod ¶
func DeletePod(clientset kubernetes.Interface, podName string, targetNamespace string) error
DeletePod deletes kubernetes pod
func GetStatusCondition ¶
func GetStatusCondition(clientset kubernetes.Interface, deploymentName string) (*v1beta1.ReplicaSetList, error)
GetStatusCondition waits until status conditions are availabe for a given replica set. If not found after multiple retries, return an error otherwise return the replicasetList instance.
func IsPrivilegedContainerCreated ¶
func IsPrivilegedContainerCreated(rsList *v1beta1.ReplicaSetList, statusReason string, statusCondition string) bool
IsPrivilegedContainerCreated gets the replicaset and match status failure condition and status failure reason
func ReplicaSetsByLabel ¶
func ReplicaSetsByLabel(clientset kubernetes.Interface, labelSelectorValue string, targetNamespace string) (*v1beta1.ReplicaSetList, error)
ReplicaSetsByLabel returns rs list by labelSelectorValue and targetNamespace
Types ¶
This section is empty.