func (f *Framework) ListReplicationController() (*corev1.ReplicationControllerList, error) {
	opts := f.getHelmReleaseSelectorListOptions()
	return f.KubeClient.CoreV1().ReplicationControllers(corev1.NamespaceAll).List(context.TODO(), opts)
}
ListReplicationController lists all replication controllers that are associated with the installed Helm release.
package framework
import (
	"context"
	"fmt"
	"time"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/util/yaml"
)
func (f *Framework) LoadReplicationControllerManifest(pathToManifest string) (*corev1.ReplicationController, error) {
	manifest, err := openFile(pathToManifest)
	if err != nil {
		return nil, fmt.Errorf("Unable to open file %q: %v", pathToManifest, err)
	}
	replicationcontroller := corev1.ReplicationController{}
	if err := yaml.NewYAMLOrJSONDecoder(manifest, 100).Decode(&replicationcontroller); err != nil {
		return nil, fmt.Errorf("Unable to decode file %q: %v", pathToManifest, err)
	}
	return &replicationcontroller, nil
}
func (f *Framework) CreateReplicationController(namespace string, replicationcontroller *corev1.ReplicationController) error {
	if _, err := f.KubeClient.CoreV1().ReplicationControllers(namespace).Create(context.TODO(), replicationcontroller, metav1.CreateOptions{}); err != nil {
		return err
	}
	if err := f.WaitForReplicationController(replicationcontroller.Name, namespace, time.Minute); err != nil {
		return err
	}
	f.WaitForReplicationControllerPods(replicationcontroller.Name, namespace, time.Second*45)
	return nil
}
func (f *Framework) GetReplicationController(name, namespace string) (*corev1.ReplicationController, error) {
	return f.KubeClient.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), name, metav1.GetOptions{})
}
func (f *Framework) DeleteReplicationController(name, namespace string) error {
	return f.KubeClient.CoreV1().ReplicationControllers(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
}
func (f *Framework) WaitForReplicationController(name, namespace string, timeout time.Duration) error {
	return wait.Poll(time.Second*5, timeout, func() (bool, error) {
		if _, err := f.GetReplicationController(name, namespace); err != nil {
			return false, nil
		}
		return true, nil
	})
}
func (f *Framework) WaitForReplicationControllerPods(name, namespace string, timeout time.Duration) error {
	return wait.Poll(time.Second*5, timeout, func() (bool, error) {
		replicationcontroller, err := f.GetReplicationController(name, namespace)
		if err != nil {
			return false, err
		}
		if *replicationcontroller.Spec.Replicas != replicationcontroller.Status.AvailableReplicas {
			return false, nil
		}
		return true, nil
	})
}