Documentation ¶
Index ¶
- Variables
- func MakeTestUUID() string
- type Framework
- func (f *Framework) CreateClusterImagePolicy(clusterImagePolicy *policyv1.ClusterImagePolicy) error
- func (f *Framework) CreateCronJob(namespace string, job *batchv1.CronJob) error
- func (f *Framework) CreateDaemonSet(namespace string, daemonset *v1.DaemonSet) error
- func (f *Framework) CreateDeployment(namespace string, deployment *v1.Deployment) error
- func (f *Framework) CreateImagePolicy(namespace string, imagePolicy *policyv1.ImagePolicy) error
- func (f *Framework) CreateJob(namespace string, job *batchv1.Job) error
- func (f *Framework) CreateNamespace(name string) (*corev1.Namespace, error)
- func (f *Framework) CreateNamespaceWithIPS(name string) (*corev1.Namespace, error)
- func (f *Framework) CreatePod(namespace string, pod *corev1.Pod) error
- func (f *Framework) CreateReplicaSet(namespace string, replicaset *v1.ReplicaSet) error
- func (f *Framework) CreateReplicationController(namespace string, replicationcontroller *corev1.ReplicationController) error
- func (f *Framework) CreateSecret(namespace string, secret *corev1.Secret) error
- func (f *Framework) CreateStatefulSet(namespace string, statefulset *v1.StatefulSet) error
- func (f *Framework) DeleteClusterImagePolicy(name string) error
- func (f *Framework) DeleteCronJob(name, namespace string) error
- func (f *Framework) DeleteDaemonSet(name, namespace string) error
- func (f *Framework) DeleteDeployment(name, namespace string) error
- func (f *Framework) DeleteImagePolicy(name, namespace string) error
- func (f *Framework) DeleteJob(name, namespace string) error
- func (f *Framework) DeleteNamespace(name string) error
- func (f *Framework) DeletePod(name, namespace string) error
- func (f *Framework) DeleteRandomPod(namespace string) error
- func (f *Framework) DeleteReplicaSet(name, namespace string) error
- func (f *Framework) DeleteReplicationController(name, namespace string) error
- func (f *Framework) DeleteStatefulSet(name, namespace string) error
- func (f *Framework) DumpEvents(namespace string) io.Reader
- func (f *Framework) DumpPolicies(namespace string) io.Reader
- func (f *Framework) GenerateTestAnnotation() string
- func (f *Framework) GetClusterImagePolicy(name string) (*policyv1.ClusterImagePolicy, error)
- func (f *Framework) GetClusterImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
- func (f *Framework) GetCronJob(name, namespace string) (*batchv1.CronJob, error)
- func (f *Framework) GetDaemonSets(name, namespace string) (*v1.DaemonSet, error)
- func (f *Framework) GetDeployment(name, namespace string) (*v1.Deployment, error)
- func (f *Framework) GetImagePolicy(name, namespace string) (*policyv1.ImagePolicy, error)
- func (f *Framework) GetImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
- func (f *Framework) GetJob(name, namespace string) (*batchv1.Job, error)
- func (f *Framework) GetNamespace(name string) (*corev1.Namespace, error)
- func (f *Framework) GetPod(name, namespace string) (*corev1.Pod, error)
- func (f *Framework) GetReplicaSet(name, namespace string) (*v1.ReplicaSet, error)
- func (f *Framework) GetReplicationController(name, namespace string) (*corev1.ReplicationController, error)
- func (f *Framework) GetSecret(name, namespace string) (*corev1.Secret, error)
- func (f *Framework) GetStatefulSet(name, namespace string) (*v1.StatefulSet, error)
- func (f *Framework) ListClusterImagePolicies() (*policyv1.ClusterImagePolicyList, error)
- func (f *Framework) ListClusterRoleBindings() (*v1beta1.ClusterRoleBindingList, error)
- func (f *Framework) ListClusterRoles() (*v1beta1.ClusterRoleList, error)
- func (f *Framework) ListConfigMaps() (*corev1.ConfigMapList, error)
- func (f *Framework) ListCronJobs() (*batchv1.CronJobList, error)
- func (f *Framework) ListDaemonSet() (*v1.DaemonSetList, error)
- func (f *Framework) ListDeployments() (*v1.DeploymentList, error)
- func (f *Framework) ListImagePolicies(namespace string) (*policyv1.ImagePolicyList, error)
- func (f *Framework) ListJobs() (*batchv1.JobList, error)
- func (f *Framework) ListMutatingAdmissionWebhooks() (*v1.MutatingWebhookConfigurationList, error)
- func (f *Framework) ListReplicaSet() (*v1.ReplicaSetList, error)
- func (f *Framework) ListReplicationController() (*corev1.ReplicationControllerList, error)
- func (f *Framework) ListServiceAccounts() (*corev1.ServiceAccountList, error)
- func (f *Framework) ListServices() (*corev1.ServiceList, error)
- func (f *Framework) ListStatefulSet() (*v1.StatefulSetList, error)
- func (f *Framework) ListValidatingAdmissionWebhooks() (*v1.ValidatingWebhookConfigurationList, error)
- func (f *Framework) LoadClusterImagePolicyManifest(pathToManifest string) (*policyv1.ClusterImagePolicy, error)
- func (f *Framework) LoadCronJobManifest(pathToManifest string) (*batchv1.CronJob, error)
- func (f *Framework) LoadDaemonSetManifest(pathToManifest string) (*v1.DaemonSet, error)
- func (f *Framework) LoadDeploymentManifest(pathToManifest string) (*v1.Deployment, error)
- func (f *Framework) LoadImagePolicyManifest(pathToManifest string) (*policyv1.ImagePolicy, error)
- func (f *Framework) LoadJobManifest(pathToManifest string) (*batchv1.Job, error)
- func (f *Framework) LoadPodManifest(pathToManifest string) (*corev1.Pod, error)
- func (f *Framework) LoadReplicaSetManifest(pathToManifest string) (*v1.ReplicaSet, error)
- func (f *Framework) LoadReplicationControllerManifest(pathToManifest string) (*corev1.ReplicationController, error)
- func (f *Framework) LoadSecretManifest(pathToManifest string) (*corev1.Secret, error)
- func (f *Framework) LoadStatefulSetManifest(pathToManifest string) (*v1.StatefulSet, error)
- func (f *Framework) PatchDeployment(name, namespace, patch string) (*v1.Deployment, error)
- func (f *Framework) ReplaceDeployment(namespace string, deployment *v1.Deployment) (*v1.Deployment, error)
- func (f *Framework) Teardown() bool
- func (f *Framework) UpdateImagePolicy(namespace string, imagePolicy *policyv1.ImagePolicy) error
- func (f *Framework) WaitForClusterImagePolicy(name string, timeout time.Duration) error
- func (f *Framework) WaitForClusterImagePolicyDefinition(timeout time.Duration) error
- func (f *Framework) WaitForCronJob(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForDaemonSet(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForDaemonSetPods(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForDeployment(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForDeploymentPods(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForImagePolicy(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForImagePolicyDefinition(timeout time.Duration) error
- func (f *Framework) WaitForJob(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForMutatingAdmissionWebhook(name string, timeout time.Duration) error
- func (f *Framework) WaitForNamespace(name string, timeout time.Duration) error
- func (f *Framework) WaitForPod(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForPodDelete(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForReplicaSet(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForReplicaSetPods(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForReplicationController(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForReplicationControllerPods(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForSecret(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForStatefulSet(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForStatefulSetPods(name, namespace string, timeout time.Duration) error
- func (f *Framework) WaitForValidatingAdmissionWebhook(name string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
var IBMCloudSecretNames = []string{"all-icr-io", "default-icr-io"}
IBMCloudSecretNames is the secret name that is provided to enable access to the test images. https://github.com/IBM/portieris/issues/34 to remove the need for this
var IBMTestRegistry = "de.icr.io"
IBMTestRegistry is the default location of the test images that are used in the end-to-end tests.
Functions ¶
func MakeTestUUID ¶ added in v0.12.5
func MakeTestUUID() string
MakeTestUUID is a simple wrapper to return a UUID for testing purposes
Types ¶
type Framework ¶
type Framework struct { KubeClient kubernetes.Interface ImagePolicyClient policyclientset.Interface ClusterImagePolicyClient policyclientset.Interface CustomResourceDefinitionClient v1.CustomResourceDefinitionInterface HTTPClient *http.Client Namespace string HelmRelease string HelmChart string }
Framework is an end-to-end test framework that is responsible for installing and deleting the Helm chart. It also provides helper functions for talking to Kube clusters.
func (*Framework) CreateClusterImagePolicy ¶
func (f *Framework) CreateClusterImagePolicy(clusterImagePolicy *policyv1.ClusterImagePolicy) error
CreateClusterImagePolicy creates the cluster image policy (ClusterImagePolicy).
func (*Framework) CreateCronJob ¶
CreateCronJob creates a Cron Job resource and then waits for it to show.
func (*Framework) CreateDaemonSet ¶
CreateDaemonSet creates a DaemonSet resource and then waits for it to show.
func (*Framework) CreateDeployment ¶
func (f *Framework) CreateDeployment(namespace string, deployment *v1.Deployment) error
CreateDeployment creates a deployment and waits for it to show.
func (*Framework) CreateImagePolicy ¶
func (f *Framework) CreateImagePolicy(namespace string, imagePolicy *policyv1.ImagePolicy) error
CreateImagePolicy creates an image policy (ImagePolicy).
func (*Framework) CreateNamespace ¶
CreateNamespace creates a namespace.
func (*Framework) CreateNamespaceWithIPS ¶
CreateNamespaceWithIPS creates a namespace, service account, and IP addresses to pull from the Global region of IBM Cloud Container Registry. It copies the IBM Cloud secret name, imagePullSecret, from the default namespace.
func (*Framework) CreateReplicaSet ¶
func (f *Framework) CreateReplicaSet(namespace string, replicaset *v1.ReplicaSet) error
CreateReplicaSet creates a ReplicaSet and waits for it to show.
func (*Framework) CreateReplicationController ¶
func (f *Framework) CreateReplicationController(namespace string, replicationcontroller *corev1.ReplicationController) error
CreateReplicationController creates a replication controller and waits for it to show.
func (*Framework) CreateSecret ¶
CreateSecret creates a secret and waits for it to show.
func (*Framework) CreateStatefulSet ¶
func (f *Framework) CreateStatefulSet(namespace string, statefulset *v1.StatefulSet) error
CreateStatefulSet creates a StatefulSet and waits for it to show.
func (*Framework) DeleteClusterImagePolicy ¶
DeleteClusterImagePolicy deletes the specified cluster image policy (ClusterImagePolicy).
func (*Framework) DeleteCronJob ¶
DeleteCronJob deletes the specified Cron Job.
func (*Framework) DeleteDaemonSet ¶
DeleteDaemonSet deletes the specified DaemonSet.
func (*Framework) DeleteDeployment ¶
DeleteDeployment deletes the specified deployment.
func (*Framework) DeleteImagePolicy ¶
DeleteImagePolicy deletes the image policy (ImagePolicy).
func (*Framework) DeleteNamespace ¶
DeleteNamespace deletes the specified namespace.
func (*Framework) DeleteRandomPod ¶
DeleteRandomPod deletes the first pod that is returned in the list of pods for a specified namespace.
func (*Framework) DeleteReplicaSet ¶
DeleteReplicaSet deletes the specified ReplicaSet.
func (*Framework) DeleteReplicationController ¶
DeleteReplicationController deletes the specified replication controller.
func (*Framework) DeleteStatefulSet ¶
DeleteStatefulSet deletes the specified StatefulSet.
func (*Framework) DumpEvents ¶
DumpEvents returns a reader that has events that are written to a specified namespace.
func (*Framework) DumpPolicies ¶
DumpPolicies returns a reader that has all cluster and image policies present in it.
func (*Framework) GenerateTestAnnotation ¶
GenerateTestAnnotation returns a unique test annotation that is used to patch resources.
func (*Framework) GetClusterImagePolicy ¶
func (f *Framework) GetClusterImagePolicy(name string) (*policyv1.ClusterImagePolicy, error)
GetClusterImagePolicy retrieves the cluster image policy (ClusterImagePolicy).
func (*Framework) GetClusterImagePolicyDefinition ¶
func (f *Framework) GetClusterImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
GetClusterImagePolicyDefinition retrieves the cluster image policy (ClusterImagePolicy) custom resource definition (CRD).
func (*Framework) GetCronJob ¶
GetCronJob retrieves the specified Cron Job.
func (*Framework) GetDaemonSets ¶
GetDaemonSets retrieves the specified DaemonSets.
func (*Framework) GetDeployment ¶
func (f *Framework) GetDeployment(name, namespace string) (*v1.Deployment, error)
GetDeployment retrieves the specified deployment.
func (*Framework) GetImagePolicy ¶
func (f *Framework) GetImagePolicy(name, namespace string) (*policyv1.ImagePolicy, error)
GetImagePolicy retrieves the image policy (ImagePolicy).
func (*Framework) GetImagePolicyDefinition ¶
func (f *Framework) GetImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
GetImagePolicyDefinition retrieves the image policy (ImagePolicy) custom resource definition (CRD).
func (*Framework) GetNamespace ¶
GetNamespace retrieves the specified namespace.
func (*Framework) GetReplicaSet ¶
func (f *Framework) GetReplicaSet(name, namespace string) (*v1.ReplicaSet, error)
GetReplicaSet retrieves the specified ReplicaSet.
func (*Framework) GetReplicationController ¶
func (f *Framework) GetReplicationController(name, namespace string) (*corev1.ReplicationController, error)
GetReplicationController retrieves the specified replication controller.
func (*Framework) GetStatefulSet ¶
func (f *Framework) GetStatefulSet(name, namespace string) (*v1.StatefulSet, error)
GetStatefulSet retrieves the specified StatefulSet.
func (*Framework) ListClusterImagePolicies ¶
func (f *Framework) ListClusterImagePolicies() (*policyv1.ClusterImagePolicyList, error)
ListClusterImagePolicies lists the cluster image policies.
func (*Framework) ListClusterRoleBindings ¶
func (f *Framework) ListClusterRoleBindings() (*v1beta1.ClusterRoleBindingList, error)
ListClusterRoleBindings lists all the cluster role bindings that are associated with the installed Helm release.
func (*Framework) ListClusterRoles ¶
func (f *Framework) ListClusterRoles() (*v1beta1.ClusterRoleList, error)
ListClusterRoles lists all the cluster roles that are associated with the installed Helm release.
func (*Framework) ListConfigMaps ¶
func (f *Framework) ListConfigMaps() (*corev1.ConfigMapList, error)
ListConfigMaps lists all the configuration maps that are associated with the installed Helm release.
func (*Framework) ListCronJobs ¶
func (f *Framework) ListCronJobs() (*batchv1.CronJobList, error)
ListCronJobs lists all the Cron Jobs that are associated with the installed Helm release.
func (*Framework) ListDaemonSet ¶
func (f *Framework) ListDaemonSet() (*v1.DaemonSetList, error)
ListDaemonSet Lists all DaemonSets that are associated with the installed Helm release.
func (*Framework) ListDeployments ¶
func (f *Framework) ListDeployments() (*v1.DeploymentList, error)
ListDeployments lists all deployments that are associated with the installed Helm release.
func (*Framework) ListImagePolicies ¶
func (f *Framework) ListImagePolicies(namespace string) (*policyv1.ImagePolicyList, error)
ListImagePolicies lists all the image polices in a specified namespace.
func (*Framework) ListJobs ¶
ListJobs lists all jobs that are associated with the installed Helm release.
func (*Framework) ListMutatingAdmissionWebhooks ¶
func (f *Framework) ListMutatingAdmissionWebhooks() (*v1.MutatingWebhookConfigurationList, error)
ListMutatingAdmissionWebhooks lists the mutating admission webhooks that are associated with the installed Helm release.
func (*Framework) ListReplicaSet ¶
func (f *Framework) ListReplicaSet() (*v1.ReplicaSetList, error)
ListReplicaSet lists all the ReplicaSets that are associated with the installed Helm release.
func (*Framework) ListReplicationController ¶
func (f *Framework) ListReplicationController() (*corev1.ReplicationControllerList, error)
ListReplicationController lists all replication controllers that are associated with the installed Helm release.
func (*Framework) ListServiceAccounts ¶
func (f *Framework) ListServiceAccounts() (*corev1.ServiceAccountList, error)
ListServiceAccounts lists all service accounts that are associated with the installed Helm release.
func (*Framework) ListServices ¶
func (f *Framework) ListServices() (*corev1.ServiceList, error)
ListServices lists all services that are associated with the installed Helm release.
func (*Framework) ListStatefulSet ¶
func (f *Framework) ListStatefulSet() (*v1.StatefulSetList, error)
ListStatefulSet lists the StatefulSets that are associated with the installed Helm release.
func (*Framework) ListValidatingAdmissionWebhooks ¶
func (f *Framework) ListValidatingAdmissionWebhooks() (*v1.ValidatingWebhookConfigurationList, error)
ListValidatingAdmissionWebhooks lists the validating admission webhooks that are associated with the installed Helm release.
func (*Framework) LoadClusterImagePolicyManifest ¶
func (f *Framework) LoadClusterImagePolicyManifest(pathToManifest string) (*policyv1.ClusterImagePolicy, error)
LoadClusterImagePolicyManifest takes a manifest and decodes it into a cluster image policy (ClusterImagePolicy) object.
func (*Framework) LoadCronJobManifest ¶
LoadCronJobManifest takes a manifest and decodes it into a Cron Job object.
func (*Framework) LoadDaemonSetManifest ¶
LoadDaemonSetManifest takes a manifest and decodes it into a DaemonSet object.
func (*Framework) LoadDeploymentManifest ¶
func (f *Framework) LoadDeploymentManifest(pathToManifest string) (*v1.Deployment, error)
LoadDeploymentManifest takes a manifest and decodes it into a deployment object.
func (*Framework) LoadImagePolicyManifest ¶
func (f *Framework) LoadImagePolicyManifest(pathToManifest string) (*policyv1.ImagePolicy, error)
LoadImagePolicyManifest takes a manifest and decodes it into an image policy (ImagePolicy) object.
func (*Framework) LoadJobManifest ¶
LoadJobManifest takes a manifest and decodes it into a job.
func (*Framework) LoadPodManifest ¶
LoadPodManifest takes a manifest and decodes it into a pod.
func (*Framework) LoadReplicaSetManifest ¶
func (f *Framework) LoadReplicaSetManifest(pathToManifest string) (*v1.ReplicaSet, error)
LoadReplicaSetManifest takes a manifest and decodes it into a ReplicaSet object.
func (*Framework) LoadReplicationControllerManifest ¶
func (f *Framework) LoadReplicationControllerManifest(pathToManifest string) (*corev1.ReplicationController, error)
LoadReplicationControllerManifest takes a manifest and decodes it into a replication controller.
func (*Framework) LoadSecretManifest ¶
LoadSecretManifest takes a manifest and decodes it into a secret.
func (*Framework) LoadStatefulSetManifest ¶
func (f *Framework) LoadStatefulSetManifest(pathToManifest string) (*v1.StatefulSet, error)
LoadStatefulSetManifest takes a manifest and decodes it into a StatefulSet object.
func (*Framework) PatchDeployment ¶
func (f *Framework) PatchDeployment(name, namespace, patch string) (*v1.Deployment, error)
PatchDeployment patches the specified deployment.
func (*Framework) ReplaceDeployment ¶
func (f *Framework) ReplaceDeployment(namespace string, deployment *v1.Deployment) (*v1.Deployment, error)
ReplaceDeployment replaces the specified deployment.
func (*Framework) Teardown ¶
Teardown deletes the chart and then verifies that everything is cleaned up.
func (*Framework) UpdateImagePolicy ¶
func (f *Framework) UpdateImagePolicy(namespace string, imagePolicy *policyv1.ImagePolicy) error
UpdateImagePolicy updates the image policy (ImagePolicy).
func (*Framework) WaitForClusterImagePolicy ¶
WaitForClusterImagePolicy waits until the cluster image policy (ClusterImagePolicy) is created or the timeout is reached.
func (*Framework) WaitForClusterImagePolicyDefinition ¶
WaitForClusterImagePolicyDefinition waits until the cluster image policy (ClusterImagePolicy) custom resource definition (CRD) is created or the timeout is reached.
func (*Framework) WaitForCronJob ¶
WaitForCronJob waits until the Cron Job deployment is complete.
func (*Framework) WaitForDaemonSet ¶
WaitForDaemonSet waits until the specified DaemonSet is created or the timeout is reached.
func (*Framework) WaitForDaemonSetPods ¶
WaitForDaemonSetPods waits until the specified DaemonSet's pods are created or the timeout is reached.
func (*Framework) WaitForDeployment ¶
WaitForDeployment waits until the specified deployment is created or the timeout is reached.
func (*Framework) WaitForDeploymentPods ¶
WaitForDeploymentPods waits until the specified deployment's pods are created or the timeout is reached.
func (*Framework) WaitForImagePolicy ¶
WaitForImagePolicy waits until the image policy is created or the timeout is reached.
func (*Framework) WaitForImagePolicyDefinition ¶
WaitForImagePolicyDefinition waits until the image policy (ImagePolicy) customer resource definition (CRD) is created or the timeout is reached.
func (*Framework) WaitForJob ¶
WaitForJob waits until the job completes.
func (*Framework) WaitForMutatingAdmissionWebhook ¶
WaitForMutatingAdmissionWebhook waits until the specified mutating admission webhook is created or the timeout is reached.
func (*Framework) WaitForNamespace ¶
WaitForNamespace waits until the specified namespace is created or the timeout is reached.
func (*Framework) WaitForPod ¶
WaitForPod waits until the pod deployment completes.
func (*Framework) WaitForPodDelete ¶
WaitForPodDelete waits until the pod is deleted.
func (*Framework) WaitForReplicaSet ¶
WaitForReplicaSet waits until the specified ReplicaSet is created or the timeout is reached.
func (*Framework) WaitForReplicaSetPods ¶
WaitForReplicaSetPods waits until the specified ReplicaSet's pods are created or the timeout is reached.
func (*Framework) WaitForReplicationController ¶
func (f *Framework) WaitForReplicationController(name, namespace string, timeout time.Duration) error
WaitForReplicationController waits until the specified replication controller is created or the timeout is reached.
func (*Framework) WaitForReplicationControllerPods ¶
func (f *Framework) WaitForReplicationControllerPods(name, namespace string, timeout time.Duration) error
WaitForReplicationControllerPods waits until the specified replication controller's pods are created or the timeout is reached.
func (*Framework) WaitForSecret ¶
WaitForSecret waits until the specified secret is created or the timeout is reached.
func (*Framework) WaitForStatefulSet ¶
WaitForStatefulSet waits until the specified StatefulSet is created or the timeout is reached.
func (*Framework) WaitForStatefulSetPods ¶
WaitForStatefulSetPods waits until the specified StatefulSet's pods are created or the timeout is reached.
Source Files ¶
- clusterimagepolicy.go
- clusterrole.go
- clusterrolebinding.go
- configmap.go
- cronjob.go
- daemonsets.go
- debug.go
- deployment.go
- framework.go
- helm.go
- imagepolicy.go
- job.go
- mutatingadmissionwebhook.go
- namespace.go
- pod.go
- replicasets.go
- replicationcontroller.go
- secret.go
- service.go
- serviceaccount.go
- statefulsets.go
- utils.go
- validatingadmissionwebhook.go