Documentation ¶
Index ¶
- Variables
- type Framework
- func (f *Framework) CreateClusterImagePolicy(clusterImagePolicy *v1beta1.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 *v1beta1.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) (*v1beta1.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) (*v1beta1.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() (*v1beta1.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) (*v1beta1.ImagePolicyList, error)
- func (f *Framework) ListJobs() (*batchv1.JobList, error)
- func (f *Framework) ListMutatingAdmissionWebhooks() (*v1beta1.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() (*v1beta1.ValidatingWebhookConfigurationList, error)
- func (f *Framework) LoadClusterImagePolicyManifest(pathToManifest string) (*v1beta1.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) (*v1beta1.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 *v1beta1.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"}
IBMCloudSecretName secret provided to enable access to test images https://github.com/IBM/portieris/issues/34 to remove the need for this
var IBMGlobalRegistry = "icr.io"
IBMGlobalRegistry is the default location of the test images used in these e2e tests
Functions ¶
This section is empty.
Types ¶
type Framework ¶
type Framework struct { KubeClient kubernetes.Interface ImagePolicyClient securityenforcementclientset.Interface ClusterImagePolicyClient securityenforcementclientset.Interface CustomResourceDefinitionClient customResourceDefinitionClientSet.CustomResourceDefinitionInterface HTTPClient *http.Client Namespace string HelmRelease string HelmChart string }
Framework is an e2e test framework esponsible for installing and deleting of the helm chart It also providers helper functions for talking to Kube clusters
func (*Framework) CreateClusterImagePolicy ¶
func (f *Framework) CreateClusterImagePolicy(clusterImagePolicy *v1beta1.ClusterImagePolicy) error
CreateClusterImagePolicy creates the ClusterImagePolicy
func (*Framework) CreateCronJob ¶
CreateCronJob creates a CronJob resource and then waits for it to appear
func (*Framework) CreateDaemonSet ¶
CreateDaemonSet creates a daemonset resource and then waits for it to appear
func (*Framework) CreateDeployment ¶
func (f *Framework) CreateDeployment(namespace string, deployment *v1.Deployment) error
CreateDeployment creates a deployment resource and then waits for it to appear
func (*Framework) CreateImagePolicy ¶
func (f *Framework) CreateImagePolicy(namespace string, imagePolicy *v1beta1.ImagePolicy) error
CreateImagePolicy creates the ImagePolicy
func (*Framework) CreateNamespace ¶
CreateNamespace creates a namespace
func (*Framework) CreateNamespaceWithIPS ¶
CreateNamespaceWithIPS creates a namespace, service account and IPS to pull from the IBM Cloud Container Registry Global region It copies the `IBMCloudSecretName` imagePullSecret from the default namespace
func (*Framework) CreatePod ¶
CreatePod creates a Replicaset resource and then waits for it to appear
func (*Framework) CreateReplicaSet ¶
func (f *Framework) CreateReplicaSet(namespace string, replicaset *v1.ReplicaSet) error
CreateReplicaSet creates a Replicaset resource and then waits for it to appear
func (*Framework) CreateReplicationController ¶
func (f *Framework) CreateReplicationController(namespace string, replicationcontroller *corev1.ReplicationController) error
CreateReplicationController creates a Replicaset resource and then waits for it to appear
func (*Framework) CreateSecret ¶
CreateSecret creates a secret resource and then waits for it to appear
func (*Framework) CreateStatefulSet ¶
func (f *Framework) CreateStatefulSet(namespace string, statefulset *v1.StatefulSet) error
CreateStatefulSet creates a StatefulSet resource and then waits for it to appear
func (*Framework) DeleteClusterImagePolicy ¶
DeleteClusterImagePolicy deletes the specified ClusterImagePolicy
func (*Framework) DeleteCronJob ¶
DeleteCronJob deletes the specified deployment
func (*Framework) DeleteDaemonSet ¶
DeleteDaemonSet deletes the specified deployment
func (*Framework) DeleteDeployment ¶
DeleteDeployment deletes the specified deployment
func (*Framework) DeleteImagePolicy ¶
DeleteImagePolicy deletes the ImagePolicy
func (*Framework) DeleteNamespace ¶
DeleteNamespace deletes the specified namespace
func (*Framework) DeleteRandomPod ¶
DeleteRandomPod deletes first pod returned in pod list for a given namespace
func (*Framework) DeleteReplicaSet ¶
DeleteReplicaSet deletes the specified deployment
func (*Framework) DeleteReplicationController ¶
DeleteReplicationController deletes the specified deployment
func (*Framework) DeleteStatefulSet ¶
DeleteStatefulSet deletes the specified deployment
func (*Framework) DumpEvents ¶
DumpEvents returns a reader that will have events for a given namespace written to
func (*Framework) DumpPolicies ¶
DumpPolicies returns a reader that will have all cluster and image policies present in it
func (*Framework) GenerateTestAnnotation ¶
GenerateTestAnnotation returns a unique test annotation for patching resources
func (*Framework) GetClusterImagePolicy ¶
func (f *Framework) GetClusterImagePolicy(name string) (*v1beta1.ClusterImagePolicy, error)
GetClusterImagePolicy retrieves the ClusterImagePolicy
func (*Framework) GetClusterImagePolicyDefinition ¶
func (f *Framework) GetClusterImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
GetClusterImagePolicyDefinition retrieves the ClusterImagePolicy CRD
func (*Framework) GetCronJob ¶
GetCronJob retrieves the specified deployment
func (*Framework) GetDaemonSets ¶
GetDaemonSets retrieves the specified deployment
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) (*v1beta1.ImagePolicy, error)
GetImagePolicy retrieves the ImagePolicy
func (*Framework) GetImagePolicyDefinition ¶
func (f *Framework) GetImagePolicyDefinition() (*apiextensions.CustomResourceDefinition, error)
GetImagePolicyDefinition retrieves the ImagePolicy 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 deployment
func (*Framework) GetReplicationController ¶
func (f *Framework) GetReplicationController(name, namespace string) (*corev1.ReplicationController, error)
GetReplicationController retrieves the specified deployment
func (*Framework) GetStatefulSet ¶
func (f *Framework) GetStatefulSet(name, namespace string) (*v1.StatefulSet, error)
GetStatefulSet retrieves the specified deployment
func (*Framework) ListClusterImagePolicies ¶
func (f *Framework) ListClusterImagePolicies() (*v1beta1.ClusterImagePolicyList, error)
ListClusterImagePolicies creates the ClusterImagePolicy
func (*Framework) ListClusterRoleBindings ¶
func (f *Framework) ListClusterRoleBindings() (*v1beta1.ClusterRoleBindingList, error)
ListClusterRoleBindings retrieves all cluster role bindings associated with the installed Helm release
func (*Framework) ListClusterRoles ¶
func (f *Framework) ListClusterRoles() (*v1beta1.ClusterRoleList, error)
ListClusterRoles retrieves all cluster roles associated with the installed Helm release
func (*Framework) ListConfigMaps ¶
func (f *Framework) ListConfigMaps() (*corev1.ConfigMapList, error)
ListConfigMaps retrieves all config maps associated with the installed Helm release
func (*Framework) ListCronJobs ¶
func (f *Framework) ListCronJobs() (*batchv1.CronJobList, error)
ListCronJobs retrieves all jobs associated with the installed Helm release
func (*Framework) ListDaemonSet ¶
func (f *Framework) ListDaemonSet() (*v1.DaemonSetList, error)
ListDaemonSet retrieves all daemonset associated with the installed Helm release
func (*Framework) ListDeployments ¶
func (f *Framework) ListDeployments() (*v1.DeploymentList, error)
ListDeployments retrieves all deployments associated with the installed Helm release
func (*Framework) ListImagePolicies ¶
func (f *Framework) ListImagePolicies(namespace string) (*v1beta1.ImagePolicyList, error)
ListImagePolicies lists all ImagePolicies in a given namespace
func (*Framework) ListMutatingAdmissionWebhooks ¶
func (f *Framework) ListMutatingAdmissionWebhooks() (*v1beta1.MutatingWebhookConfigurationList, error)
ListMutatingAdmissionWebhooks retrieves all Mutating Admission Webhooks associated with the installed Helm release
func (*Framework) ListReplicaSet ¶
func (f *Framework) ListReplicaSet() (*v1.ReplicaSetList, error)
ListReplicaSet retrieves all Replicaset associated with the installed Helm release
func (*Framework) ListReplicationController ¶
func (f *Framework) ListReplicationController() (*corev1.ReplicationControllerList, error)
ListReplicationController retrieves all Replicaset associated with the installed Helm release
func (*Framework) ListServiceAccounts ¶
func (f *Framework) ListServiceAccounts() (*corev1.ServiceAccountList, error)
ListServiceAccounts retrieves all service accounts associated with the installed Helm release
func (*Framework) ListServices ¶
func (f *Framework) ListServices() (*corev1.ServiceList, error)
ListServices retrieves all services associated with the installed Helm release
func (*Framework) ListStatefulSet ¶
func (f *Framework) ListStatefulSet() (*v1.StatefulSetList, error)
ListStatefulSet retrieves all StatefulSet associated with the installed Helm release
func (*Framework) ListValidatingAdmissionWebhooks ¶
func (f *Framework) ListValidatingAdmissionWebhooks() (*v1beta1.ValidatingWebhookConfigurationList, error)
ListValidatingAdmissionWebhooks retrieves all ValidatingAdmissionWebhooks associated with the installed Helm release
func (*Framework) LoadClusterImagePolicyManifest ¶
func (f *Framework) LoadClusterImagePolicyManifest(pathToManifest string) (*v1beta1.ClusterImagePolicy, error)
LoadClusterImagePolicyManifest takes a manifest and decodes it into a ImagePolicy object
func (*Framework) LoadCronJobManifest ¶
LoadCronJobManifest takes a manifest and decodes it into a CronJob 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) (*v1beta1.ImagePolicy, error)
LoadImagePolicyManifest takes a manifest and decodes it into a ImagePolicy object
func (*Framework) LoadJobManifest ¶
LoadJobManifest takes a manifest and decodes it into a Job object
func (*Framework) LoadPodManifest ¶
LoadPodManifest takes a manifest and decodes it into a Replicaset object
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 Replicaset object
func (*Framework) LoadSecretManifest ¶
LoadSecretManifest takes a manifest and decodes it into a deployment object
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 patches the specified deployment
func (*Framework) Teardown ¶
Teardown deletes the chart and then verifies everything has been cleaned up
func (*Framework) UpdateImagePolicy ¶
func (f *Framework) UpdateImagePolicy(namespace string, imagePolicy *v1beta1.ImagePolicy) error
UpdateImagePolicy creates the ImagePolicy
func (*Framework) WaitForClusterImagePolicy ¶
WaitForClusterImagePolicy waits until the ClusterImagePolicy is created or the timeout is reached
func (*Framework) WaitForClusterImagePolicyDefinition ¶
WaitForClusterImagePolicyDefinition waits until the ClusterImagePolicy CRD is created or the timeout is reached
func (*Framework) WaitForCronJob ¶
WaitForCronJob waits until job deployment has completed
func (*Framework) WaitForDaemonSet ¶
WaitForDaemonSet waits until the specified daemonset is created or the timeout is reached
func (*Framework) WaitForDaemonSetPods ¶
WaitForDaemonSetPods waits until the specified deployment'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 ImagePolicy is created or the timeout is reached
func (*Framework) WaitForImagePolicyDefinition ¶
WaitForImagePolicyDefinition waits until the ImagePolicy CRD is created or the timeout is reached
func (*Framework) WaitForJob ¶
WaitForJob waits until job deployment has completed
func (*Framework) WaitForMutatingAdmissionWebhook ¶
WaitForMutatingAdmissionWebhook waits until the specified MutatingAdmissionWebhook 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 pod deployment has completed
func (*Framework) WaitForPodDelete ¶
WaitForPodDelete waits until pod has been 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 deployment'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 Replicaset 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 deployment's pods are created or the timeout is reached
func (*Framework) WaitForSecret ¶
WaitForSecret waits until the specified deployment 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 deployment'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