Documentation
¶
Index ¶
- Constants
- Variables
- func AllCapabilitiesEnabled(oc *CLI, caps ...configv1.ClusterVersionCapability) (bool, error)
- func ArtifactDirPath() string
- func ArtifactPath(elem ...string) string
- func AssertPodToBeReady(oc *CLI, podName string, namespace string) error
- func BestStartTime() time.Time
- func CalculatePodMetrics(adminClient kubernetes.Interface, adminConfig *restclient.Config) error
- func CheckBuildCancelled(b *buildv1.Build) bool
- func CheckBuildFailed(b *buildv1.Build) bool
- func CheckBuildSuccess(b *buildv1.Build) bool
- func CheckForBuildEvent(client corev1client.CoreV1Interface, build *buildv1.Build, ...)
- func CheckImageStreamLatestTagPopulated(i *imagev1.ImageStream) bool
- func CheckImageStreamTagNotFound(i *imagev1.ImageStream) bool
- func CheckPodIsPending(pod corev1.Pod) bool
- func CheckPodIsReady(pod corev1.Pod) bool
- func CheckPodIsRunning(pod corev1.Pod) bool
- func CheckPodIsSucceeded(pod corev1.Pod) bool
- func CheckPodNoOp(pod corev1.Pod) bool
- func ClientCurl(oc *CLI, method string, tokenValue string, targetURL string) (string, error)
- func CreateExecPodOrFail(client kubernetes.Interface, ns, name string, tweak ...func(*v1.Pod)) *v1.Pod
- func CreateLDAPTestServer(oc *CLI) (svcNs, svcName, svcHostname string, caPem []byte, err error)
- func CreateResource(jsonFilePath string, oc *CLI) error
- func CustomImageStream(oc *CLI, imageStream *imagev1.ImageStream) error
- func DebugAllNodesRetryWithOptionsAndChroot(oc *CLI, debugNodeNamespace string, cmd ...string) (map[string]string, error)
- func DebugNodeRetryWithOptionsAndChroot(oc *CLI, nodeName string, debugNodeNamespace string, cmd ...string) (string, error)
- func DebugSelectedNodesRetryWithOptionsAndChroot(oc *CLI, selector string, debugNodeNamespace string, cmd ...string) (map[string]string, error)
- func DeletePVCsForDeployment(client clientset.Interface, oc *CLI, deploymentPrefix string)
- func DetermineImageFromRelease(ctx context.Context, oc *CLI, imageTagName string) (string, error)
- func DoesApiResourceExist(config *rest.Config, apiResourceName, group string) (bool, error)
- func DumpAndReturnTagging(tags []string) ([]string, error)
- func DumpApplicationPodLogs(dcName string, oc *CLI)
- func DumpBuildConfigs(oc *CLI)
- func DumpBuildLogs(bc string, oc *CLI)
- func DumpBuilds(oc *CLI)
- func DumpConfigMapStates(oc *CLI)
- func DumpDeploymentLogs(dcName string, version int64, oc *CLI)
- func DumpDeploymentPodsLogs(oc *CLI, deployName, namespace, labelSelector string)
- func DumpImageStream(oc *CLI, namespace string, imagestream string) error
- func DumpImageStreams(oc *CLI)
- func DumpPersistentVolumeInfo(oc *CLI)
- func DumpPodLogs(pods []corev1.Pod, oc *CLI)
- func DumpPodLogsStartingWith(prefix string, oc *CLI)
- func DumpPodLogsStartingWithInNamespace(prefix, namespace string, oc *CLI)
- func DumpPodStates(oc *CLI)
- func DumpPodStatesInNamespace(namespace string, oc *CLI)
- func DumpPodsCommand(c kubernetes.Interface, ns string, selector labels.Selector, cmd string)
- func DumpSampleOperator(oc *CLI)
- func DurationSinceStartInSeconds() time.Duration
- func ExamineDiskUsage()
- func ExaminePodDiskUsage(oc *CLI)
- func ExecCommandOnMachineConfigDaemon(c clientset.Interface, oc *CLI, node *corev1.Node, command []string) (string, error)
- func ExecInPodWithResult(podClient coreclientset.CoreV1Interface, podRESTConfig *rest.Config, ...) (string, error)
- func FatalErr(msg interface{})
- func FetchURL(oc *CLI, url string, retryTimeout time.Duration) (string, error)
- func FindRouterImage(oc *CLI) (string, error)
- func FixturePath(elem ...string) string
- func FixturePaths(elem ...string) []string
- func GenerateOAuthTokenPair() (privToken, pubToken string)
- func GetAllClusterNodes(oc *CLI) ([]corev1.Node, error)
- func GetApplicationPods(oc *CLI, dcName string) (*corev1.PodList, error)
- func GetAwsCredentialFromCluster(oc *CLI)
- func GetClientConfig(kubeConfigFile string) (*rest.Config, error)
- func GetClusterNodesByRole(oc *CLI, role string) ([]string, error)
- func GetClusterNodesBySelector(oc *CLI, selector string) ([]corev1.Node, error)
- func GetClusterRegion(oc *CLI) string
- func GetClusterVersion(ctx context.Context, config *restclient.Config) (*configv1.ClusterVersion, error)
- func GetControlPlaneTopology(ocClient *CLI) (*configv1.TopologyMode, error)
- func GetControlPlaneTopologyFromConfigClient(client *configclient.ConfigV1Client) (*configv1.TopologyMode, error)
- func GetCurrentVersion(ctx context.Context, config *restclient.Config) (string, error)
- func GetDeploymentConfigPods(oc *CLI, dcName string, version int64) (*corev1.PodList, error)
- func GetDeploymentPods(oc *CLI, deployName, namespace, labelSelector string) (*corev1.PodList, error)
- func GetDeploymentRSPodTemplateHash(oc *CLI, deployName, namespace string, revision int64) (string, error)
- func GetDeploymentTemplateAnnotations(oc *CLI, deployName, namespace string) map[string]string
- func GetDockerImageReference(c imagev1typedclient.ImageStreamInterface, name, tag string) (string, error)
- func GetEndpointAddress(oc *CLI, name string) (string, error)
- func GetFirstCoreOsWorkerNode(oc *CLI) (string, error)
- func GetGlobalProxy(oc *CLI) (string, string, string, error)
- func GetHypershiftManagementClusterConfigAndNamespace() (string, string, error)
- func GetHypervisorConfig() ...
- func GetImageIDForTags(comps []string) ([]string, error)
- func GetMachineConfigDaemonByNode(c clientset.Interface, node *corev1.Node) (*corev1.Pod, error)
- func GetMasterThreadDump(oc *CLI)
- func GetPodForContainer(container corev1.Container) *corev1.Pod
- func GetPodNamesByFilter(c corev1client.PodInterface, label labels.Selector, ...) (podNames []string, err error)
- func GetPodsList(oc *CLI, namespace string) ([]string, error)
- func GetPodsListByLabel(oc *CLI, namespace string, selectorLabel string) ([]string, error)
- func GetReadySchedulableWorkerNodes(ctx context.Context, client kubernetes.Interface) ([]v1.Node, error)
- func GetReleaseImage(ctx context.Context, config *restclient.Config) (string, error)
- func GetRouterPodTemplate(oc *CLI) (*corev1.PodTemplateSpec, string, error)
- func GetStatefulSetPods(oc *CLI, setName string) (*corev1.PodList, error)
- func HasEnvVar(container *corev1.Container, name, expectedValue string) bool
- func HasHypervisorConfig() bool
- func IPUrl(host string) string
- func IndexByteString(s string, c byte) int
- func InitAwsConfig(region string) aws.Config
- func InitAwsSession(region string) *session.Session
- func InitDefaultEnvironmentVariables()
- func InitStandardFlags()
- func InitTest(dryRun bool) error
- func IsAroHCP(ctx context.Context, namespace string, kubeClient kubernetes.Interface) (bool, error)
- func IsBareMetalHyperShiftCluster(ctx context.Context, managementOC *CLI) (bool, error)
- func IsCapabilityEnabled(oc *CLI, cap configv1.ClusterVersionCapability) (bool, error)
- func IsClusterOperated(oc *CLI) bool
- func IsClusterProxyEnabled(oc *CLI) (bool, error)
- func IsFIPS(client clientcorev1.ConfigMapsGetter) (bool, error)
- func IsHypershift(ctx context.Context, configClient clientconfigv1.Interface) (bool, error)
- func IsManagedServiceCluster(ctx context.Context, adminClient kubernetes.Interface) (bool, error)
- func IsMicroShiftCluster(kubeClient k8sclient.Interface) (bool, error)
- func IsNamespaceExist(kubeClient *kubernetes.Clientset, namespace string) (bool, error)
- func IsNoUpgradeFeatureSet(oc *CLI) bool
- func IsRosaCluster(oc *CLI) (bool, error)
- func IsSelfManagedHA(ctx context.Context, configClient clientconfigv1.Interface) (bool, error)
- func IsSingleNode(ctx context.Context, configClient clientconfigv1.Interface) (bool, error)
- func IsTechPreviewNoUpgrade(ctx context.Context, configClient configv1client.Interface) bool
- func IsTwoNodeFencing(ctx context.Context, configClient clientconfigv1.Interface) bool
- func KubeConfigPath() string
- func LDAPClientMounts() ([]corev1.VolumeMount, []corev1.Volume)
- func LaunchWebserverPod(client k8sclient.Interface, namespace, podName, nodeName string) (ip string)
- func LimitTestsToStartTime() time.Time
- func ListImages() ([]string, error)
- func NewRuleResolver(informers rbacinformers.Interface) rbacregistryvalidation.AuthorizationRuleResolver
- func ParseLabelsOrDie(str string) labels.Selector
- func PreTestDump()
- func PrepareImagePullSecretAndCABundle(oc *CLI) (func(), []string, error)
- func ReadLDAPServerTestData() (*app.Deployment, *corev1.Service, *corev1.ConfigMap, *corev1.ConfigMap)
- func RedactBearerToken(args string) string
- func RemoveDeploymentConfigs(oc *CLI, dcs ...string) error
- func RemovePodsWithPrefixes(oc *CLI, prefixes ...string) error
- func RemoveStatefulSets(oc *CLI, sets ...string) error
- func RunOneShotCommandPod(oc *CLI, name, image, command string, volumeMounts []corev1.VolumeMount, ...) (string, []error)
- func SearchLatestImage(oc *CLI, imageName string) (string, error)
- func SetupK8SNFSServerAndVolume(oc *CLI, count int) (*kapiv1.Pod, []*kapiv1.PersistentVolume, error)
- func SkipIfExternalControlplaneTopology(oc *CLI, reason string)
- func SkipIfMissingCapabilities(oc *CLI, caps ...configv1.ClusterVersionCapability)
- func SkipIfNotPlatform(oc *CLI, platforms ...configv1.PlatformType)
- func StartBuild(oc *CLI, args ...string) (stdout, stderr string, err error)
- func StaticConfigManifestDir() string
- func SuiteStartTime() time.Time
- func TriggerKernelPanic(kubeClient kubernetes.Interface, nodeName string) error
- func TriggerNetworkDisruption(kubeClient kubernetes.Interface, target, peer *corev1.Node, ...) (string, error)
- func TriggerNodeRebootGraceful(kubeClient kubernetes.Interface, nodeName string) error
- func TriggerNodeRebootUngraceful(kubeClient kubernetes.Interface, nodeName string) error
- func VarSubOnFile(srcFile string, destFile string, vars map[string]string) error
- func WaitForABuild(c buildv1clienttyped.BuildInterface, name string, ...) error
- func WaitForABuildWithTimeout(c buildv1clienttyped.BuildInterface, name string, ...) error
- func WaitForAJob(c batchv1client.JobInterface, name string, timeout time.Duration) error
- func WaitForAccess(c kubernetes.Interface, allowed bool, ...) error
- func WaitForAnImageStream(client imagev1typedclient.ImageStreamInterface, name string, ...) error
- func WaitForAnImageStreamTag(oc *CLI, namespace, name, tag string) error
- func WaitForBuildResult(c buildv1clienttyped.BuildInterface, result *BuildResult) error
- func WaitForCMState(ctx context.Context, client corev1client.CoreV1Interface, namespace string, ...) (*corev1.ConfigMap, error)
- func WaitForDeploymentConfig(kc kubernetes.Interface, dcClient appsv1clienttyped.DeploymentConfigsGetter, ...) error
- func WaitForDeploymentReady(oc *CLI, deployName, namespace string, revision int64) error
- func WaitForDeploymentReadyWithTimeout(oc *CLI, deployName, namespace string, revision int64, timeout time.Duration) error
- func WaitForEndpoint(c kubernetes.Interface, ns, name string) error
- func WaitForEndpointsAvailable(oc *CLI, serviceName string) error
- func WaitForImageStreamImport(oc *CLI) error
- func WaitForInternalRegistryHostname(oc *CLI) (string, error)
- func WaitForNamespaceSCCAnnotations(c corev1client.CoreV1Interface, name string) error
- func WaitForNoPodsRunning(oc *CLI) error
- func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error
- func WaitForOperatorProgressingFalse(ctx context.Context, configClient configv1client.Interface, ...) error
- func WaitForOperatorProgressingTrue(ctx context.Context, configClient configv1client.Interface, ...) error
- func WaitForPods(c corev1client.PodInterface, label labels.Selector, ...) ([]string, error)
- func WaitForQueryOutputContains(oc *CLI, d Database, timeout time.Duration, admin bool, ...) error
- func WaitForQueryOutputSatisfies(oc *CLI, d Database, timeout time.Duration, admin bool, query string, ...) error
- func WaitForResourceQuotaSync(client corev1client.ResourceQuotaInterface, name string, ...) (corev1.ResourceList, error)
- func WaitForRouterInternalIP(oc *CLI) (string, error)
- func WaitForRouterServiceIP(oc *CLI) (string, error)
- func WaitForSamplesImagestream(ctx context.Context, oc *CLI, imagestream string, ...) error
- func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, ...) error
- func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string) error
- func WaitForServiceAccountWithSecret(config configclient.ClusterVersionInterface, ...) error
- func WaitForUserBeAuthorized(oc *CLI, user string, attributes *authorizationapi.ResourceAttributes) error
- func WaitUntilAllHelpersAreUp(oc *CLI, helpers []Database) error
- func WaitUntilPodIsGone(c corev1client.PodInterface, podName string, timeout time.Duration) error
- func WaitUntilUp(oc *CLI, d Database, timeout time.Duration) error
- func WithCleanup(fn func())
- type BuildResult
- type CLI
- func NewCLI(project string) *CLI
- func NewCLIForMonitorTest(project string) *CLI
- func NewCLIWithFramework(kubeFramework *framework.Framework) *CLI
- func NewCLIWithPodSecurityLevel(project string, level admissionapi.Level) *CLI
- func NewCLIWithoutNamespace(project string) *CLI
- func NewHypershiftManagementCLI(project string) *CLI
- func (c *CLI) AddExplicitResourceToDelete(resource schema.GroupVersionResource, namespace, name string)
- func (c *CLI) AddPathsToDelete(dir string)
- func (c *CLI) AddResourceToDelete(resource schema.GroupVersionResource, metadata metav1.Object)
- func (c *CLI) AdminAPIExtensionsV1Client() crdv1.ApiextensionsV1Interface
- func (c *CLI) AdminApiextensionsClient() apiextensionsclient.Interface
- func (c *CLI) AdminAppsClient() appsv1client.Interface
- func (c *CLI) AdminAuthorizationClient() authorizationv1client.Interface
- func (c *CLI) AdminBuildClient() buildv1client.Interface
- func (c *CLI) AdminConfig() *rest.Config
- func (c *CLI) AdminConfigClient() configv1client.Interface
- func (c *CLI) AdminDynamicClient() dynamic.Interface
- func (c *CLI) AdminGatewayApiClient() gatewayapiv1client.Interface
- func (c *CLI) AdminImageClient() imagev1client.Interface
- func (c *CLI) AdminIngressClient() ingressv1client.Interface
- func (c *CLI) AdminKubeClient() kubernetes.Interface
- func (c *CLI) AdminOAuthClient() oauthv1client.Interface
- func (c *CLI) AdminOperatorClient() operatorv1client.Interface
- func (c *CLI) AdminProjectClient() projectv1client.Interface
- func (c *CLI) AdminQuotaClient() quotav1client.Interface
- func (c *CLI) AdminRouteClient() routev1client.Interface
- func (c *CLI) AdminSecurityClient() securityv1client.Interface
- func (c *CLI) AdminTemplateClient() templatev1client.Interface
- func (c *CLI) AdminUserClient() userv1client.Interface
- func (c *CLI) AppsClient() appsv1client.Interface
- func (c *CLI) Args(args ...string) *CLI
- func (c *CLI) AsAdmin() *CLI
- func (c *CLI) AsGuestKubeconf() *CLI
- func (c *CLI) AuthorizationClient() authorizationv1client.Interface
- func (c *CLI) Background() (*exec.Cmd, *bytes.Buffer, *bytes.Buffer, error)
- func (c *CLI) BackgroundRC() (*exec.Cmd, io.ReadCloser, error)
- func (c *CLI) BuildClient() buildv1client.Interface
- func (c *CLI) ChangeUser(name string) *CLI
- func (c *CLI) CreateNamespaceUDN()
- func (c *CLI) CreateSpecificNamespaceUDN(ns string)
- func (c *CLI) CreateSpecifiedNamespaceAsAdmin(namespace string)
- func (c *CLI) CreateUser(prefix string) *userv1.User
- func (c *CLI) DeleteSpecifiedNamespaceAsAdmin(namespace string)
- func (c *CLI) DynamicClient() dynamic.Interface
- func (c *CLI) Env(env ...string) *CLI
- func (c *CLI) EnvVar(name, value string) *CLI
- func (c *CLI) Execute() error
- func (c *CLI) GatewayApiClient() gatewayapiv1client.Interface
- func (c *CLI) GetClientConfigForExtOIDCUser(tokenCacheDir string) *rest.Config
- func (c *CLI) GetClientConfigForUser(username string) *rest.Config
- func (c *CLI) GetGuestKubeconf() string
- func (c *CLI) GetKubeconf() string
- func (c *CLI) GuestConfig() *rest.Config
- func (c *CLI) GuestKubeClient() kubernetes.Interface
- func (c *CLI) ImageClient() imagev1client.Interface
- func (c *CLI) InputString(input string) *CLI
- func (c *CLI) KubeClient() kubernetes.Interface
- func (c *CLI) KubeFramework() *framework.Framework
- func (c *CLI) MachineConfigurationClient() mcv1client.Interface
- func (c *CLI) Namespace() string
- func (c *CLI) NewPrometheusClient(ctx context.Context) prometheusv1.API
- func (c *CLI) NotShowInfo() *CLI
- func (c *CLI) Output() (string, error)
- func (c *CLI) OutputToFile(filename string) (string, error)
- func (c *CLI) Outputs() (string, string, error)
- func (c *CLI) OutputsToFiles(fileName string) (string, string, error)
- func (c *CLI) ProjectClient() projectv1client.Interface
- func (c *CLI) QuotaClient() quotav1client.Interface
- func (c *CLI) RESTMapper() meta.RESTMapper
- func (c *CLI) RouteClient() routev1client.Interface
- func (c *CLI) Run(commands ...string) *CLI
- func (c *CLI) RunInMonitorTest(commands ...string) *CLI
- func (c *CLI) SetAdminKubeconf(adminKubeconf string) *CLI
- func (c *CLI) SetGuestKubeconf(guestKubeconf string) *CLI
- func (c *CLI) SetKubeconf(kubeconf string) *CLI
- func (c *CLI) SetManagedNamespace() *CLI
- func (c *CLI) SetNamespace(ns string) *CLI
- func (c *CLI) SetShowInfo() *CLI
- func (c *CLI) SetupProject() string
- func (c *CLI) SilentOutput() (string, error)
- func (c *CLI) TeardownProject()
- func (c *CLI) Template(t string) *CLI
- func (c *CLI) TemplateClient() templatev1client.Interface
- func (c *CLI) UserConfig() *rest.Config
- func (c *CLI) Username() string
- func (c *CLI) Verbose() *CLI
- func (c *CLI) WaitForAccessAllowed(review *kubeauthorizationv1.SelfSubjectAccessReview, user string) error
- func (c *CLI) WaitForAccessDenied(review *kubeauthorizationv1.SelfSubjectAccessReview, user string) error
- func (c CLI) WithKubeConfigCopy(fnc func(*CLI))
- func (c *CLI) WithKubectl() *CLI
- func (c CLI) WithToken(token string) *CLI
- func (c *CLI) WithoutKubeconf() *CLI
- func (c CLI) WithoutNamespace() *CLI
- type ConfigClientShim
- type ConfigV1ClientShim
- func (c *ConfigV1ClientShim) APIServers() configv1.APIServerInterface
- func (c *ConfigV1ClientShim) Authentications() configv1.AuthenticationInterface
- func (c *ConfigV1ClientShim) Builds() configv1.BuildInterface
- func (c *ConfigV1ClientShim) CRIOCredentialProviderConfigs() configv1.CRIOCredentialProviderConfigInterface
- func (c *ConfigV1ClientShim) ClusterImagePolicies() configv1.ClusterImagePolicyInterface
- func (c *ConfigV1ClientShim) ClusterOperators() configv1.ClusterOperatorInterface
- func (c *ConfigV1ClientShim) ClusterVersions() configv1.ClusterVersionInterface
- func (c *ConfigV1ClientShim) Consoles() configv1.ConsoleInterface
- func (c *ConfigV1ClientShim) DNSes() configv1.DNSInterface
- func (c *ConfigV1ClientShim) FeatureGates() configv1.FeatureGateInterface
- func (c *ConfigV1ClientShim) ImageContentPolicies() configv1.ImageContentPolicyInterface
- func (c *ConfigV1ClientShim) ImageDigestMirrorSets() configv1.ImageDigestMirrorSetInterface
- func (c *ConfigV1ClientShim) ImagePolicies(namespace string) configv1.ImagePolicyInterface
- func (c *ConfigV1ClientShim) ImageTagMirrorSets() configv1.ImageTagMirrorSetInterface
- func (c *ConfigV1ClientShim) Images() configv1.ImageInterface
- func (c *ConfigV1ClientShim) Infrastructures() configv1.InfrastructureInterface
- func (c *ConfigV1ClientShim) Ingresses() configv1.IngressInterface
- func (c *ConfigV1ClientShim) InsightsDataGathers() configv1.InsightsDataGatherInterface
- func (c *ConfigV1ClientShim) Networks() configv1.NetworkInterface
- func (c *ConfigV1ClientShim) Nodes() configv1.NodeInterface
- func (c *ConfigV1ClientShim) OAuths() configv1.OAuthInterface
- func (c *ConfigV1ClientShim) OperatorHubs() configv1.OperatorHubInterface
- func (c *ConfigV1ClientShim) Projects() configv1.ProjectInterface
- func (c *ConfigV1ClientShim) Proxies() configv1.ProxyInterface
- func (c *ConfigV1ClientShim) RESTClient() rest.Interface
- func (c *ConfigV1ClientShim) Schedulers() configv1.SchedulerInterface
- type ConfigV1DiscoveryClientShim
- func (c *ConfigV1DiscoveryClientShim) OpenAPISchema() (*openapi_v2.Document, error)
- func (c *ConfigV1DiscoveryClientShim) OpenAPIV3() openapi.Client
- func (c *ConfigV1DiscoveryClientShim) RESTClient() restclient.Interface
- func (c *ConfigV1DiscoveryClientShim) ServerGroups() (*metav1.APIGroupList, error)
- func (c *ConfigV1DiscoveryClientShim) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
- func (c *ConfigV1DiscoveryClientShim) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
- func (c *ConfigV1DiscoveryClientShim) ServerPreferredResources() ([]*metav1.APIResourceList, error)
- func (c *ConfigV1DiscoveryClientShim) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
- func (c *ConfigV1DiscoveryClientShim) ServerVersion() (*version.Info, error)
- func (c *ConfigV1DiscoveryClientShim) WithLegacy() discovery.DiscoveryInterface
- type ConfigV1InfrastructuresClientShim
- func (c *ConfigV1InfrastructuresClientShim) Apply(ctx context.Context, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) ApplyStatus(ctx context.Context, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) Create(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
- func (c *ConfigV1InfrastructuresClientShim) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
- func (c *ConfigV1InfrastructuresClientShim) Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) List(ctx context.Context, opts metav1.ListOptions) (*apiconfigv1.InfrastructureList, error)
- func (c *ConfigV1InfrastructuresClientShim) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) Update(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) UpdateStatus(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, ...) (*apiconfigv1.Infrastructure, error)
- func (c *ConfigV1InfrastructuresClientShim) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
- type ConfigV1NetworksClientShim
- func (c *ConfigV1NetworksClientShim) Apply(ctx context.Context, network *applyconfigv1.NetworkApplyConfiguration, ...) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) ApplyStatus(ctx context.Context, network *applyconfigv1.NetworkApplyConfiguration, ...) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) Create(ctx context.Context, network *apiconfigv1.Network, opts metav1.CreateOptions) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
- func (c *ConfigV1NetworksClientShim) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
- func (c *ConfigV1NetworksClientShim) Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) List(ctx context.Context, opts metav1.ListOptions) (*apiconfigv1.NetworkList, error)
- func (c *ConfigV1NetworksClientShim) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) Update(ctx context.Context, network *apiconfigv1.Network, opts metav1.UpdateOptions) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) UpdateStatus(ctx context.Context, network *apiconfigv1.Network, opts metav1.UpdateOptions) (*apiconfigv1.Network, error)
- func (c *ConfigV1NetworksClientShim) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
- type Database
- type ELBClient
- type ExitError
- type FakeWatcher
- func (f *FakeWatcher) Action(action watch.EventType, obj runtime.Object)
- func (f *FakeWatcher) Follow(inputChan watch.Interface, ignoreList ...runtime.Object) error
- func (f *FakeWatcher) IsStopped() bool
- func (f *FakeWatcher) Reset()
- func (f *FakeWatcher) ResultChan() <-chan watch.Event
- func (f *FakeWatcher) Stop()
- type GitRepo
- type LogDumperFunc
- type MissingTagError
- type OperationNotPermitted
- type OperatorProgressingStatus
- type PodExecutor
- type ReplicaSet
Constants ¶
const (
DefaultChanSize = 1000
)
Variables ¶
var ClusterDegraded bool
var (
ControlPlaneTopology *configv1.TopologyMode
)
var ManagedServiceNamespaces = sets.New[string](
"openshift-addon-operator",
"openshift-aqua",
"openshift-aws-vpce-operator",
"openshift-backplane",
"openshift-backplane-cee",
"openshift-backplane-csa",
"openshift-backplane-cse",
"openshift-backplane-csm",
"openshift-backplane-managed-scripts",
"openshift-backplane-mcs-tier-two",
"openshift-backplane-mobb",
"openshift-backplane-sdcicd",
"openshift-backplane-srep",
"openshift-backplane-srep-ro",
"openshift-backplane-tam",
"openshift-cloud-ingress-operator",
"openshift-codeready-workspaces",
"openshift-compliance",
"openshift-compliance-monkey",
"openshift-container-security",
"openshift-custom-domains-operator",
"openshift-customer-monitoring",
"openshift-deployment-validation-operator",
"openshift-file-integrity",
"openshift-logging",
"openshift-managed-node-metadata-operator",
"openshift-managed-upgrade-operator",
"openshift-marketplace",
"openshift-must-gather-operator",
"openshift-nmstate",
"openshift-observability-operator",
"openshift-ocm-agent-operator",
"openshift-operators-redhat",
"openshift-osd-metrics",
"openshift-package-operator",
"openshift-rbac-permissions",
"openshift-route-monitor-operator",
"openshift-scanning",
"openshift-security",
"openshift-splunk-forwarder-operator",
"openshift-sre-pruning",
"openshift-suricata",
"openshift-validation-webhook",
"openshift-velero",
)
ManagedServiceNamespaces is the set of namespaces used by managed service platforms like ROSA, ARO, etc. These are typically exempt from the requirements we impose on core platform namespaces. Consulted https://github.com/openshift/managed-cluster-config/blob/master/deploy/osd-managed-resources/managed-namespaces.ConfigMap.yaml, to pull out openshift-* namespaces that aren't owned by OCP.
var ( // TestContext which allows injecting context data into tests TestContext *framework.TestContextType = &framework.TestContext )
Functions ¶
func AllCapabilitiesEnabled ¶ added in v1.5.2
func AllCapabilitiesEnabled(oc *CLI, caps ...configv1.ClusterVersionCapability) (bool, error)
AllCapabilitiesEnabled returns true if all of the given capabilities are enabled on the cluster.
func ArtifactDirPath ¶ added in v1.0.7
func ArtifactDirPath() string
ArtifactDirPath returns the value of ARTIFACT_DIR environment variable
func ArtifactPath ¶ added in v1.0.7
ArtifactPath returns the absolute path to the fix artifact file The path is relative to ARTIFACT_DIR
func AssertPodToBeReady ¶ added in v1.5.2
AssertPodToBeReady poll pod status to determine it is ready and returns error
func BestStartTime ¶ added in v1.5.2
func CalculatePodMetrics ¶ added in v1.5.2
func CalculatePodMetrics(adminClient kubernetes.Interface, adminConfig *restclient.Config) error
CalculatePodMetrics receives an admin client and an admin.kubeconfig, and traverses a list of operator namespaces, measuring requests-per-second for each operator pod, using the overall long-running time of each pod as a base metric.
func CheckBuildCancelled ¶ added in v1.5.2
CheckBuildCancelled return true if the build was canceled
func CheckBuildFailed ¶ added in v1.5.2
CheckBuildFailed return true if the build failed
func CheckBuildSuccess ¶ added in v1.5.2
CheckBuildSuccess returns true if the build succeeded
func CheckForBuildEvent ¶ added in v1.5.2
func CheckForBuildEvent(client corev1client.CoreV1Interface, build *buildv1.Build, reason, message string)
CheckForBuildEvent will poll a build for up to 1 minute looking for an event with the specified reason and message template.
func CheckImageStreamLatestTagPopulated ¶ added in v1.5.2
func CheckImageStreamLatestTagPopulated(i *imagev1.ImageStream) bool
CheckImageStreamLatestTagPopulated returns true if the imagestream has a ':latest' tag filed
func CheckImageStreamTagNotFound ¶ added in v1.5.2
func CheckImageStreamTagNotFound(i *imagev1.ImageStream) bool
CheckImageStreamTagNotFound return true if the imagestream update was not successful
func CheckPodIsPending ¶ added in v1.5.2
CheckPodIsRunning returns true if the pod is running
func CheckPodIsReady ¶ added in v1.5.2
CheckPodIsReady returns true if the pod's ready probe determined that the pod is ready.
func CheckPodIsRunning ¶ added in v1.5.2
CheckPodIsRunning returns true if the pod is running
func CheckPodIsSucceeded ¶ added in v1.5.2
CheckPodIsSucceeded returns true if the pod status is "Succdeded"
func CheckPodNoOp ¶ added in v1.5.2
CheckPodNoOp always returns true
func ClientCurl ¶ added in v1.5.2
ClientCurl makes an HTTP request with authentication and optional proxy support
func CreateExecPodOrFail ¶ added in v1.5.1
func CreateExecPodOrFail(client kubernetes.Interface, ns, name string, tweak ...func(*v1.Pod)) *v1.Pod
CreateExecPodOrFail creates a pod used as a vessel for kubectl exec commands. Pod name is uniquely generated. The security context of this pod complies to the "restricted" profile. If necessary this can be overriden in tweaks.
func CreateLDAPTestServer ¶ added in v1.5.2
CreateLDAPTestServer deploys an LDAP server on the service network and then confirms StartTLS connectivity with an ldapsearch against it. It returns the ldapserver host and the ldap CA, or an error.
func CreateResource ¶ added in v1.0.7
CreateResource creates the resources from the supplied json file (not a template); ginkgo error checking included
func CustomImageStream ¶ added in v1.5.2
func CustomImageStream(oc *CLI, imageStream *imagev1.ImageStream) error
CustomImageStream uses the provided imageStreamObj reference to create an imagestream with the given name in the given namespace.
func DebugAllNodesRetryWithOptionsAndChroot ¶ added in v1.5.2
func DebugNodeRetryWithOptionsAndChroot ¶ added in v1.5.2
func DebugNodeRetryWithOptionsAndChroot(oc *CLI, nodeName string, debugNodeNamespace string, cmd ...string) (string, error)
DebugNodeRetryWithOptionsAndChroot launches debug container using chroot with options and waitPoll to avoid "error: unable to create the debug pod" and do retry
func DebugSelectedNodesRetryWithOptionsAndChroot ¶ added in v1.5.2
func DeletePVCsForDeployment ¶ added in v1.5.2
func DetermineImageFromRelease ¶ added in v1.5.2
DetermineImageFromRelease will get the image and tag for imageTagName from the release image. For example, you can specify oauth-server for the oauth-server image or network-tools to get the image and tag for that image.
func DoesApiResourceExist ¶ added in v1.5.2
DoesApiResourceExist searches the list of ApiResources and returns "true" if a given apiResourceName Exists. Valid search strings are for example "cloudprivateipconfigs" or "machines".
func DumpAndReturnTagging ¶ added in v1.0.7
DumpAndReturnTagging takes and array of tags and obtains the hex image IDs, dumps them to ginkgo for printing, and then returns them
func DumpApplicationPodLogs ¶ added in v1.5.2
DumpApplicationPodLogs will dump the latest application logs for a DeploymentConfig for debug purposes
func DumpBuildConfigs ¶ added in v1.5.2
func DumpBuildConfigs(oc *CLI)
DumpBuildConfigs will dump the yaml for every buildconfig in the test namespace
func DumpBuildLogs ¶ added in v1.2.0
DumpBuildLogs will dump the latest build logs for a BuildConfig for debug purposes
func DumpBuilds ¶ added in v1.5.2
func DumpBuilds(oc *CLI)
DumpBuilds will dump the yaml for every build in the test namespace; remember, pipeline builds don't have build pods so a generic framework dump won't cat our pipeline builds objs in openshift
func DumpConfigMapStates ¶ added in v1.5.2
func DumpConfigMapStates(oc *CLI)
DumpConfigMapStates dumps the state of all ConfigMaps in the CLI's current namespace.
func DumpDeploymentLogs ¶ added in v1.3.0
DumpDeploymentLogs will dump the latest deployment logs for a DeploymentConfig for debug purposes
func DumpDeploymentPodsLogs ¶ added in v1.5.2
DumpDeploymentPodsLogs will dump the deployment pods logs for a deployment for debug purposes
func DumpImageStream ¶ added in v1.5.2
func DumpImageStreams ¶ added in v1.3.0
func DumpImageStreams(oc *CLI)
DumpImageStreams will dump both the openshift namespace and local namespace imagestreams as part of debugging when the language imagestreams in the openshift namespace seem to disappear
func DumpPersistentVolumeInfo ¶ added in v1.5.2
func DumpPersistentVolumeInfo(oc *CLI)
func DumpPodLogs ¶ added in v1.5.2
func DumpPodLogsStartingWith ¶ added in v1.5.2
DumpPodLogsStartingWith will dump any pod starting with the name prefix provided
func DumpPodLogsStartingWithInNamespace ¶ added in v1.5.2
DumpPodLogsStartingWith will dump any pod starting with the name prefix provided
func DumpPodStates ¶ added in v1.5.2
func DumpPodStates(oc *CLI)
DumpPodStates dumps the state of all pods in the CLI's current namespace.
func DumpPodStatesInNamespace ¶ added in v1.5.2
DumpPodStatesInNamespace dumps the state of all pods in the provided namespace.
func DumpPodsCommand ¶ added in v1.5.2
DumpPodsCommand runs the provided command in every pod identified by selector in the provided namespace.
func DumpSampleOperator ¶ added in v1.5.2
func DumpSampleOperator(oc *CLI)
func DurationSinceStartInSeconds ¶ added in v1.5.2
DurationSinceStartInSeconds returns the current time minus the start limit time or suite time, or one hour by default. It rounds the duration to seconds. It always returns a one minute duration or longer, even if the start time is in the future.
This method simplifies the default behavior of tests that check metrics from the current time to the preferred start time (either implicit via the suite start time, or explicit via TEST_LIMIT_START_TIME). Depending on the suite a user is running, if the invariants the suite tests should hold BEFORE the suite is run, then TEST_LIMIT_START_TIME should be set to that time, and tests will automatically check that interval as well.
func ExamineDiskUsage ¶ added in v1.2.0
func ExamineDiskUsage()
ExamineDiskUsage will dump df output on the testing system; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExaminePodDiskUsage ¶ added in v1.3.0
func ExaminePodDiskUsage(oc *CLI)
ExaminePodDiskUsage will dump df/du output on registry pod; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExecCommandOnMachineConfigDaemon ¶ added in v1.5.2
func ExecCommandOnMachineConfigDaemon(c clientset.Interface, oc *CLI, node *corev1.Node, command []string) (string, error)
ExecCommandOnMachineConfigDaemon returns the output of the command execution on the machine-config-daemon pod that runs on the specified node
func ExecInPodWithResult ¶ added in v1.5.2
func ExecInPodWithResult(podClient coreclientset.CoreV1Interface, podRESTConfig *rest.Config, ns, name, containerName string, command []string) (string, error)
commandContents fetches the result of invoking a command in the provided container from stdout.
func FatalErr ¶
func FatalErr(msg interface{})
FatalErr exits the test in case a fatal error has occurred.
func FetchURL ¶ added in v1.0.7
FetchURL grabs the output from the specified url and returns it. It will retry once per second for duration retryTimeout if an error occurs during the request.
func FindRouterImage ¶ added in v1.5.2
func FixturePath ¶
FixturePath returns an absolute path to a fixture file in test/extended/testdata/, test/integration/, or examples/. The contents of the path will not exist until the test is started.
func FixturePaths ¶ added in v1.5.2
FixturePaths returns the set of paths within the provided fixture directory.
func GenerateOAuthTokenPair ¶ added in v1.5.2
func GenerateOAuthTokenPair() (privToken, pubToken string)
GenerateOAuthTokenPair returns two tokens to use with OpenShift OAuth-based authentication. The first token is a private token meant to be used as a Bearer token to send queries to the API, the second token is a hashed token meant to be stored in the database.
func GetApplicationPods ¶ added in v1.5.2
func GetAwsCredentialFromCluster ¶ added in v1.5.2
func GetAwsCredentialFromCluster(oc *CLI)
GetAwsCredentialFromCluster get aws credential from cluster
func GetClientConfig ¶ added in v1.5.2
func GetClusterNodesByRole ¶ added in v1.5.2
GetClusterNodesByRole returns the cluster nodes by role
func GetClusterNodesBySelector ¶ added in v1.5.2
func GetClusterRegion ¶ added in v1.5.2
GetClusterRegion get the cluster's region
func GetClusterVersion ¶ added in v1.5.2
func GetClusterVersion(ctx context.Context, config *restclient.Config) (*configv1.ClusterVersion, error)
GetClusterVersion returns the ClusterVersion object.
func GetControlPlaneTopology ¶ added in v1.5.2
func GetControlPlaneTopology(ocClient *CLI) (*configv1.TopologyMode, error)
GetControlPlaneTopology retrieves the cluster infrastructure TopologyMode
func GetControlPlaneTopologyFromConfigClient ¶ added in v1.5.2
func GetControlPlaneTopologyFromConfigClient(client *configclient.ConfigV1Client) (*configv1.TopologyMode, error)
func GetCurrentVersion ¶ added in v1.5.2
GetCurrentVersion determines and returns the cluster's current version by iterating through the provided update history until it finds the first version with update State of Completed. If a Completed version is not found the version of the oldest history entry, which is the originally installed version, is returned. If history is empty the empty string is returned.
func GetDeploymentConfigPods ¶ added in v1.5.1
func GetDeploymentPods ¶ added in v1.5.2
func GetDeploymentPods(oc *CLI, deployName, namespace, labelSelector string) (*corev1.PodList, error)
GetDeploymentPods gets the pods list of the deployment by labelSelector
func GetDeploymentRSPodTemplateHash ¶ added in v1.5.2
func GetDeploymentTemplateAnnotations ¶ added in v1.5.2
GetDeploymentTemplateAnnotations gets the deployment template annotations
func GetDockerImageReference ¶
func GetDockerImageReference(c imagev1typedclient.ImageStreamInterface, name, tag string) (string, error)
GetDockerImageReference retrieves the full Docker pull spec from the given ImageStream and tag
func GetEndpointAddress ¶ added in v1.0.7
GetEndpointAddress will return an "ip:port" string for the endpoint.
func GetFirstCoreOsWorkerNode ¶ added in v1.5.2
GetFirstCoreOsWorkerNode returns the first CoreOS worker node
func GetGlobalProxy ¶ added in v1.5.2
GetGlobalProxy gets the global proxy configuration from the cluster and returns error
func GetHypershiftManagementClusterConfigAndNamespace ¶ added in v1.5.2
func GetHypervisorConfig ¶ added in v1.5.2
func GetHypervisorConfig() *struct {
HypervisorIP string `json:"hypervisorIP"`
SSHUser string `json:"sshUser"`
PrivateKeyPath string `json:"privateKeyPath"`
}
GetHypervisorConfig returns the hypervisor configuration if available
func GetImageIDForTags ¶
GetImageIDForTags will obtain the hexadecimal IDs for the array of human readible image tags IDs provided
func GetMachineConfigDaemonByNode ¶ added in v1.5.2
GetMachineConfigDaemonByNode finds the privileged daemonset from the Machine Config Operator
func GetMasterThreadDump ¶ added in v1.5.2
func GetMasterThreadDump(oc *CLI)
GetMasterThreadDump will get a golang thread stack dump
func GetPodForContainer ¶ added in v1.0.7
GetPodForContainer creates a new Pod that runs specified container
func GetPodNamesByFilter ¶ added in v1.0.7
func GetPodNamesByFilter(c corev1client.PodInterface, label labels.Selector, predicate func(corev1.Pod) bool) (podNames []string, err error)
GetPodNamesByFilter looks up pods that satisfy the predicate and returns their names.
func GetPodsList ¶ added in v1.5.2
Get the pods List
func GetPodsListByLabel ¶ added in v1.5.2
Get the pods List by label
func GetReadySchedulableWorkerNodes ¶ added in v1.6.0
func GetReadySchedulableWorkerNodes(ctx context.Context, client kubernetes.Interface) ([]v1.Node, error)
GetReadySchedulableWorkerNodes returns ready schedulable worker nodes. This function filters out nodes with NoSchedule/NoExecute taints and non-worker nodes, making it suitable for tests that need to select worker nodes for workload placement.
func GetReleaseImage ¶ added in v1.5.2
GetReleaseImage returns ReleaseImage.
func GetRouterPodTemplate ¶ added in v1.5.2
func GetRouterPodTemplate(oc *CLI) (*corev1.PodTemplateSpec, string, error)
GetRouterPodTemplate finds the router pod template across different namespaces, helping to mitigate the transition from the default namespace to an operator namespace.
func GetStatefulSetPods ¶ added in v1.5.2
func HasEnvVar ¶ added in v1.5.2
HasEnvVar checks if a container has an environment variable with a specific value
func HasHypervisorConfig ¶ added in v1.5.2
func HasHypervisorConfig() bool
HasHypervisorConfig returns true if hypervisor configuration is available
func IPUrl ¶ added in v1.5.2
IPUrl safely converts a bare IPv4 or IPv6 into URL form with brackets
This is copied from net.JoinHostPort, but without the port Use net.JoinHostPort if you have host and port.
func IndexByteString ¶ added in v1.5.2
This is copied from go/src/internal/bytealg, which includes versions optimized for various platforms. Those optimizations are elided here so we don't have to maintain them.
func InitAwsConfig ¶ added in v1.6.0
InitAwsConfig init AWS config (AWS SDK v2)
func InitAwsSession ¶ added in v1.5.2
InitAwsSession init session
func InitDefaultEnvironmentVariables ¶ added in v1.5.2
func InitDefaultEnvironmentVariables()
InitDefaultEnvironmentVariables makes sure certain required env vars are available in the case that extended tests are invoked directly via calls to ginkgo/extended.test
func InitStandardFlags ¶ added in v1.5.2
func InitStandardFlags()
func IsAroHCP ¶ added in v1.5.2
IsAroHCP checks if the HyperShift operator deployment has MANAGED_SERVICE=ARO-HCP environment variable.
func IsBareMetalHyperShiftCluster ¶ added in v1.5.2
IsBareMetalHyperShiftCluster checks if the HyperShift cluster is running on bare metal by checking the platform type of the hosted cluster. It uses kubectl commands to query the hosted cluster's platform type and returns true if it's "None" or "Agent".
func IsCapabilityEnabled ¶ added in v1.5.2
func IsCapabilityEnabled(oc *CLI, cap configv1.ClusterVersionCapability) (bool, error)
func IsClusterOperated ¶ added in v1.5.2
func IsClusterProxyEnabled ¶ added in v1.5.2
IsClusterProxyEnabled returns true if the cluster has a global proxy enabled
func IsFIPS ¶ added in v1.5.2
func IsFIPS(client clientcorev1.ConfigMapsGetter) (bool, error)
func IsHypershift ¶ added in v1.5.2
func IsManagedServiceCluster ¶ added in v1.5.2
func IsMicroShiftCluster ¶ added in v1.5.2
IsMicroShiftCluster returns "true" if a cluster is MicroShift, "false" otherwise. It needs kube-admin client as input.
This function checks for the presence of the microshift-version configmap in the kube-public namespace. MicroShift clusters have this configmap, standard OpenShift clusters do not.
If the configmap cannot be accessed after polling for 5 minutes, the test is skipped with a precondition failure marker. This ensures consistent handling across all callers and surfaces the issue via synthetic test results.
func IsNamespaceExist ¶ added in v1.5.2
func IsNamespaceExist(kubeClient *kubernetes.Clientset, namespace string) (bool, error)
func IsNoUpgradeFeatureSet ¶ added in v1.5.2
IsNoUpgradeFeatureSet checks if a cluster has a non-upgradeable featureset such as TechPreviewNoUpgrade or CustomNoUpgrade.
func IsRosaCluster ¶ added in v1.5.2
IsRosaCluster returns "true" if a cluster is ROSA, "false" otherwise.
func IsSelfManagedHA ¶ added in v1.5.2
func IsSingleNode ¶ added in v1.5.2
func IsTechPreviewNoUpgrade ¶ added in v1.5.2
func IsTechPreviewNoUpgrade(ctx context.Context, configClient configv1client.Interface) bool
IsTechPreviewNoUpgrade checks if a cluster is a TechPreviewNoUpgrade cluster
func IsTwoNodeFencing ¶ added in v1.5.2
func IsTwoNodeFencing(ctx context.Context, configClient clientconfigv1.Interface) bool
func KubeConfigPath ¶
func KubeConfigPath() string
KubeConfigPath returns the value of KUBECONFIG environment variable
func LDAPClientMounts ¶ added in v1.5.2
func LDAPClientMounts() ([]corev1.VolumeMount, []corev1.Volume)
func LaunchWebserverPod ¶ added in v1.5.2
func LaunchWebserverPod(client k8sclient.Interface, namespace, podName, nodeName string) (ip string)
LaunchWebserverPod launches a pod serving http on port 8080 to act as the target for networking connectivity checks. The ip address of the created pod will be returned if the pod is launched successfully.
func LimitTestsToStartTime ¶ added in v1.5.2
LimitTestsToStartTime returns a time.Time which should be the earliest that a test in the e2e suite will consider. By default this is the empty Time object, and if TEST_LIMIT_START_TIME is set to a unix timestamp in seconds from the epoch, will return that time.
Tests should use this when looking at the historical record for failures - events that happen before this time are considered to be ignorable.
Disruptive tests use this value to signal when the disruption has healed so that normal conformance results are not impacted.
func ListImages ¶ added in v1.3.0
ListImages initiates the equivalent of a `docker images`
func NewRuleResolver ¶ added in v1.5.2
func NewRuleResolver(informers rbacinformers.Interface) rbacregistryvalidation.AuthorizationRuleResolver
func ParseLabelsOrDie ¶ added in v1.0.7
ParseLabelsOrDie turns the given string into a label selector or panics; for tests or other cases where you know the string is valid. TODO: Move this to the upstream labels package.
func PreTestDump ¶ added in v1.5.2
func PreTestDump()
func PrepareImagePullSecretAndCABundle ¶ added in v1.5.2
prepareImagePullSecretAndCABundle prepares the image pull secret and optional user CA bundle for use, returning the necessary command-line arguments, or an error if setup fails.
func ReadLDAPServerTestData ¶ added in v1.5.2
func RedactBearerToken ¶ added in v1.5.2
func RemoveDeploymentConfigs ¶ added in v1.5.2
RemoveDeploymentConfigs deletes the given DeploymentConfigs in a namespace
func RemovePodsWithPrefixes ¶ added in v1.5.2
RemovePodsWithPrefixes deletes pods whose name begins with the supplied prefixes
func RemoveStatefulSets ¶ added in v1.5.2
RemoveStatefulSets deletes the given stateful sets in a namespace
func RunOneShotCommandPod ¶ added in v1.5.2
func RunOneShotCommandPod( oc *CLI, name, image, command string, volumeMounts []corev1.VolumeMount, volumes []corev1.Volume, env []corev1.EnvVar, timeout time.Duration, ) (string, []error)
RunOneShotCommandPod runs the given command in a pod and waits for completion and log output for the given timeout duration, returning the command output or an error. TODO: merge with the PodExecutor above
func SearchLatestImage ¶ added in v1.6.0
SearchLatestImage returns the resolved docker pull spec for imageName:latest in the openshift namespace (payload imagestreams such as cli, tools, must-gather). The cluster serves the architecture-appropriate image; callers must not hardcode digests.
func SetupK8SNFSServerAndVolume ¶ added in v1.5.2
func SetupK8SNFSServerAndVolume(oc *CLI, count int) (*kapiv1.Pod, []*kapiv1.PersistentVolume, error)
SetupK8SNFSServerAndVolume sets up an nfs server pod with count number of persistent volumes
func SkipIfExternalControlplaneTopology ¶ added in v1.5.2
func SkipIfMissingCapabilities ¶ added in v1.5.2
func SkipIfMissingCapabilities(oc *CLI, caps ...configv1.ClusterVersionCapability)
SkipIfMissingCapabilities skips the test if any of the given cluster capabilities is not enabled.
func SkipIfNotPlatform ¶ added in v1.5.2
func SkipIfNotPlatform(oc *CLI, platforms ...configv1.PlatformType)
SkipIfNotPlatform skip the test if supported platforms are not matched
func StartBuild ¶
StartBuild executes OC start-build with the specified arguments. StdOut and StdErr from the process are returned as separate strings.
func StaticConfigManifestDir ¶ added in v1.5.2
func StaticConfigManifestDir() string
StaticConfigManifestDir returns the value of STATIC_CONFIG_MANIFEST_DIR environment variable It points to a directory with static manifests, each file is expected to be a single manifest. Manifest files can be stored under directory tree.
func SuiteStartTime ¶ added in v1.5.2
SuiteStartTime returns a time.Time which is the beginning of the suite execution (the set of tests). If this is empty or invalid the Time will be the zero value.
Tests that need to retrieve results newer than the suite start because they are only checking the behavior of the system while the suite is being run should use this time as the start of that interval.
func TriggerKernelPanic ¶ added in v1.6.0
func TriggerKernelPanic(kubeClient kubernetes.Interface, nodeName string) error
TriggerKernelPanic triggers an immediate kernel panic on a node via sysrq trigger.
func TriggerNetworkDisruption ¶ added in v1.5.2
func TriggerNetworkDisruption(kubeClient kubernetes.Interface, target, peer *corev1.Node, disruptionDuration time.Duration) (string, error)
TriggerNetworkDisruption blocks network traffic between the target and peer nodes for a given duration.
func TriggerNodeRebootGraceful ¶ added in v1.5.2
func TriggerNodeRebootGraceful(kubeClient kubernetes.Interface, nodeName string) error
TriggerNodeRebootGraceful initiates a graceful node reboot which allows the system to terminate processes cleanly before rebooting.
func TriggerNodeRebootUngraceful ¶ added in v1.5.2
func TriggerNodeRebootUngraceful(kubeClient kubernetes.Interface, nodeName string) error
TriggerNodeRebootUngraceful initiates an ungraceful node reboot which does not allow the system to terminate processes cleanly before rebooting.
func VarSubOnFile ¶ added in v1.0.7
VarSubOnFile reads in srcFile, finds instances of ${key} from the map and replaces them with their associated values.
func WaitForABuild ¶
func WaitForABuild(c buildv1clienttyped.BuildInterface, name string, isOK, isFailed, isCanceled func(*buildv1.Build) bool) error
WaitForABuild waits for a Build object to match either isOK or isFailed conditions.
func WaitForABuildWithTimeout ¶ added in v1.5.2
func WaitForABuildWithTimeout(c buildv1clienttyped.BuildInterface, name string, createTimeout, completeTimeout time.Duration, isOK, isFailed, isCanceled func(*buildv1.Build) bool) error
WaitForABuild waits for a Build object to match either isOK or isFailed conditions.
func WaitForAJob ¶ added in v1.3.0
func WaitForAJob(c batchv1client.JobInterface, name string, timeout time.Duration) error
func WaitForAccess ¶ added in v1.5.2
func WaitForAccess(c kubernetes.Interface, allowed bool, review *kubeauthorizationv1.SelfSubjectAccessReview) error
func WaitForAnImageStream ¶ added in v1.0.6
func WaitForAnImageStream(client imagev1typedclient.ImageStreamInterface, name string, isOK, isFailed func(*imagev1.ImageStream) bool, ) error
WaitForAnImageStream waits for an ImageStream to fulfill the isOK function
func WaitForAnImageStreamTag ¶ added in v1.3.0
WaitForAnImageStreamTag waits until an image stream with given name has non-empty history for given tag. Defaults to waiting for 300 seconds
func WaitForBuildResult ¶ added in v1.5.2
func WaitForBuildResult(c buildv1clienttyped.BuildInterface, result *BuildResult) error
WaitForBuildResult updates result with the state of the build
func WaitForCMState ¶ added in v1.5.2
func WaitForDeploymentConfig ¶ added in v1.5.2
func WaitForDeploymentConfig(kc kubernetes.Interface, dcClient appsv1clienttyped.DeploymentConfigsGetter, namespace, name string, version int64, enforceNotProgressing bool, cli *CLI) error
WaitForDeploymentConfig waits for a DeploymentConfig to complete transition to a given version and report minimum availability.
func WaitForDeploymentReady ¶ added in v1.5.2
WaitForDeploymentReady waits for the deployment become ready
func WaitForDeploymentReadyWithTimeout ¶ added in v1.5.2
func WaitForDeploymentReadyWithTimeout(oc *CLI, deployName, namespace string, revision int64, timeout time.Duration) error
WaitForDeploymentReadyWithTimeout waits for the deployment become ready with defined timeout
func WaitForEndpoint ¶ added in v1.5.2
func WaitForEndpoint(c kubernetes.Interface, ns, name string) error
func WaitForEndpointsAvailable ¶ added in v1.5.2
func WaitForImageStreamImport ¶ added in v1.5.2
WaitForImageStreamImport creates & waits for custom ruby imageStream to be available in current namespace TODO: To eliminate the dependency on OpenShift Samples Operator in future, WaitForImageStreamImport should be a replacement of WaitForOpenShiftNamespaceImageStreams func
func WaitForInternalRegistryHostname ¶ added in v1.5.2
WaitForInternalRegistryHostname waits for the internal registry hostname to be made available to the cluster.
func WaitForNamespaceSCCAnnotations ¶ added in v1.5.2
func WaitForNamespaceSCCAnnotations(c corev1client.CoreV1Interface, name string) error
WaitForNamespaceSCCAnnotations waits up to 30s for the cluster-policy-controller to add the SCC related annotations to the provided namespace.
func WaitForNoPodsRunning ¶ added in v1.5.2
WaitForNoPodsRunning waits until there are no (running) pods in the given namespace. (The idling tests use a DeploymentConfig which will leave a "Completed" deploy pod after deploying the service; we don't want to count that.)
func WaitForOpenShiftNamespaceImageStreams ¶ added in v1.3.0
WaitForOpenShiftNamespaceImageStreams waits for the standard set of imagestreams to be imported
func WaitForOperatorProgressingFalse ¶ added in v1.5.2
func WaitForOperatorProgressingTrue ¶ added in v1.5.2
func WaitForPods ¶ added in v1.0.7
func WaitForPods(c corev1client.PodInterface, label labels.Selector, predicate func(corev1.Pod) bool, count int, timeout time.Duration) ([]string, error)
WaitForPods waits until given number of pods that match the label selector and satisfy the predicate are found
func WaitForQueryOutputContains ¶ added in v1.1.5
func WaitForQueryOutputContains(oc *CLI, d Database, timeout time.Duration, admin bool, query, resultSubstr string) error
WaitForQueryOutputContains will execute the query multiple times, until the specified substring is found in the results. This function should be used for testing replication, since it might take some time until the data is propagated to slaves.
func WaitForQueryOutputSatisfies ¶ added in v1.1.5
func WaitForQueryOutputSatisfies(oc *CLI, d Database, timeout time.Duration, admin bool, query string, predicate func(string) bool) error
WaitForQueryOutputSatisfies will execute the query multiple times, until the specified predicate function is return true.
func WaitForResourceQuotaSync ¶ added in v1.1.4
func WaitForResourceQuotaSync( client corev1client.ResourceQuotaInterface, name string, expectedUsage corev1.ResourceList, expectedIsUpperLimit bool, timeout time.Duration, ) (corev1.ResourceList, error)
WaitForResourceQuotaSync watches given resource quota until its usage is updated to desired level or a timeout occurs. If successful, used quota values will be returned for expected resources. Otherwise an ErrWaitTimeout will be returned. If expectedIsUpperLimit is true, given expected usage must compare greater or equal to quota's usage, which is useful for expected usage increment. Otherwise expected usage must compare lower or equal to quota's usage, which is useful for expected usage decrement.
func WaitForRouterInternalIP ¶ added in v1.5.2
func WaitForRouterServiceIP ¶ added in v1.5.2
func WaitForSamplesImagestream ¶ added in v1.5.2
func WaitForSamplesImagestream(ctx context.Context, oc *CLI, imagestream string, imageRegistryEnabled, openshiftSamplesEnabled bool) error
WaitForSamplesImagestream waits for an imagestream imported by the samples operator to be imported. If the imagestream is managed by the samples operator and has failed to import on install, this will retry the import. Note that imagestreams which reference images in the OCP payload are not managed by the samples operator, and therefore will not be retried.
This will wait up to 150 seconds for the referenced imagestream to finish importing.
func WaitForSelfSAR ¶ added in v1.5.2
func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, selfSAR authorizationapiv1.SelfSubjectAccessReviewSpec) error
func WaitForServiceAccount ¶ added in v1.5.2
func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string) error
WaitForServiceAccount waits until the named service account gets fully provisioned. Does not wait for dockercfg secrets
func WaitForServiceAccountWithSecret ¶ added in v1.5.2
func WaitForServiceAccountWithSecret(config configclient.ClusterVersionInterface, c corev1client.ServiceAccountInterface, name string) error
WaitForServiceAccountWithSecret waits until the named service account gets fully provisioned, including dockercfg secrets. We also check if image registry is not enabled, the SA will not contain the docker secret and we simply return nil.
func WaitForUserBeAuthorized ¶ added in v1.5.2
func WaitForUserBeAuthorized(oc *CLI, user string, attributes *authorizationapi.ResourceAttributes) error
WaitForUserBeAuthorized waits a minute until the cluster bootstrap roles are available and the provided user is authorized to perform the action on the resource.
func WaitUntilAllHelpersAreUp ¶ added in v1.0.7
WaitUntilAllHelpersAreUp waits until all helpers are ready to serve requests.
func WaitUntilPodIsGone ¶ added in v1.0.7
func WaitUntilPodIsGone(c corev1client.PodInterface, podName string, timeout time.Duration) error
WaitUntilPodIsGone waits until the named Pod will disappear
func WaitUntilUp ¶ added in v1.0.7
WaitUntilUp continuously waits for the server to become ready, up until timeout.
func WithCleanup ¶ added in v1.5.2
func WithCleanup(fn func())
WithCleanup instructs utility methods to move out of dry run mode so there are no side effects due to package initialization of Ginkgo tests, and then after the function completes cleans up any artifacts created by this project.
Types ¶
type BuildResult ¶ added in v1.3.0
type BuildResult struct {
// BuildPath is a resource qualified name (e.g. "build/test-1").
BuildPath string
// BuildName is the non-resource qualified name.
BuildName string
// StartBuildStdErr is the StdErr output generated by oc start-build.
StartBuildStdErr string
// StartBuildStdOut is the StdOut output generated by oc start-build.
StartBuildStdOut string
// StartBuildErr is the error, if any, returned by the direct invocation of the start-build command.
StartBuildErr error
// The buildconfig which generated this build.
BuildConfigName string
// Build is the resource created. May be nil if there was a timeout.
Build *buildv1.Build
// BuildAttempt represents that a Build resource was created.
// false indicates a severe error unrelated to Build success or failure.
BuildAttempt bool
// BuildSuccess is true if the build was finshed successfully.
BuildSuccess bool
// BuildFailure is true if the build was finished with an error.
BuildFailure bool
// BuildCancelled is true if the build was canceled.
BuildCancelled bool
// BuildTimeout is true if there was a timeout waiting for the build to finish.
BuildTimeout bool
// Alternate log dumper function. If set, this is called instead of 'oc logs'
LogDumper LogDumperFunc
// The openshift client which created this build.
Oc *CLI
}
func NewBuildResult ¶ added in v1.5.2
func NewBuildResult(oc *CLI, build *buildv1.Build) *BuildResult
func StartBuildAndWait ¶ added in v1.3.0
func StartBuildAndWait(oc *CLI, args ...string) (result *BuildResult, err error)
StartBuildAndWait executes OC start-build with the specified arguments on an existing buildconfig. Note that start-build will be run with "-o=name" as a parameter when using this method. If no error is returned from this method, it means that the build attempted successfully, NOT that the build completed. For completion information, check the BuildResult object.
func StartBuildResult ¶ added in v1.5.1
func StartBuildResult(oc *CLI, args ...string) (result *BuildResult, err error)
func (*BuildResult) AssertFailure ¶ added in v1.3.0
func (t *BuildResult) AssertFailure() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT have an error (this will not assert on timeouts)
func (*BuildResult) AssertSuccess ¶ added in v1.3.0
func (t *BuildResult) AssertSuccess() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT succeed.
func (*BuildResult) DumpLogs ¶ added in v1.3.0
func (t *BuildResult) DumpLogs()
DumpLogs sends logs associated with this BuildResult to the GinkgoWriter.
func (*BuildResult) Logs ¶ added in v1.3.0
func (t *BuildResult) Logs() (string, error)
Logs returns the logs associated with this build.
func (*BuildResult) LogsNoTimestamp ¶ added in v1.5.2
func (t *BuildResult) LogsNoTimestamp() (string, error)
LogsNoTimestamp returns the logs associated with this build.
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI provides function to call the OpenShift CLI and Kubernetes and OpenShift clients.
func NewCLI ¶
NewCLI initializes the CLI and Kube framework helpers with the provided namespace. Should be called outside of a Ginkgo .It() function. This will apply the `restricted` pod security level to the given underlying namespace.
func NewCLIForMonitorTest ¶ added in v1.5.2
NewCLIForMonitorTest initializes the CLI and Kube framework helpers without a namespace. Should be called outside of a Ginkgo .It() function.
func NewCLIWithFramework ¶ added in v1.5.2
NewCLIWithFramework initializes the CLI using the provided Kube framework. It can be called inside of a Ginkgo .It() function.
func NewCLIWithPodSecurityLevel ¶ added in v1.5.2
func NewCLIWithPodSecurityLevel(project string, level admissionapi.Level) *CLI
NewCLIWithPodSecurityLevel initializes the CLI the same way as `NewCLI()` but the given pod security level is applied to the created e2e test namespace.
func NewCLIWithoutNamespace ¶ added in v1.5.2
NewCLIWithoutNamespace initializes the CLI and Kube framework helpers without a namespace. Should be called outside of a Ginkgo .It() function. Use SetupProject() to create a project for this namespace.
func NewHypershiftManagementCLI ¶ added in v1.5.2
NewHypershiftManagementCLI returns a CLI that interacts with the Hypershift management cluster. Contrary to a normal CLI it does not perform any cleanup, and it must not be used for any mutating operations. Also, contrary to a normal CLI it must be constructed inside an `It` block. This is because retrieval of hypershift management cluster config can fail, but assertions are only allowed inside an `It` block. `AfterEach` and `BeforeEach` are not allowed there though.
func (*CLI) AddExplicitResourceToDelete ¶ added in v1.5.2
func (c *CLI) AddExplicitResourceToDelete(resource schema.GroupVersionResource, namespace, name string)
func (*CLI) AddPathsToDelete ¶ added in v1.5.2
AddPathsToDelete adds paths to be deleted after the test
func (*CLI) AddResourceToDelete ¶ added in v1.5.2
func (c *CLI) AddResourceToDelete(resource schema.GroupVersionResource, metadata metav1.Object)
func (*CLI) AdminAPIExtensionsV1Client ¶ added in v1.5.2
func (c *CLI) AdminAPIExtensionsV1Client() crdv1.ApiextensionsV1Interface
AdminAPIExtensionsV1Client returns the API extensions v1 client
func (*CLI) AdminApiextensionsClient ¶ added in v1.5.2
func (c *CLI) AdminApiextensionsClient() apiextensionsclient.Interface
func (*CLI) AdminAppsClient ¶ added in v1.5.2
func (c *CLI) AdminAppsClient() appsv1client.Interface
func (*CLI) AdminAuthorizationClient ¶ added in v1.5.2
func (c *CLI) AdminAuthorizationClient() authorizationv1client.Interface
func (*CLI) AdminBuildClient ¶ added in v1.5.2
func (c *CLI) AdminBuildClient() buildv1client.Interface
func (*CLI) AdminConfig ¶ added in v1.5.2
func (*CLI) AdminConfigClient ¶ added in v1.5.2
func (c *CLI) AdminConfigClient() configv1client.Interface
func (*CLI) AdminDynamicClient ¶ added in v1.5.2
func (*CLI) AdminGatewayApiClient ¶ added in v1.5.2
func (c *CLI) AdminGatewayApiClient() gatewayapiv1client.Interface
AdminGatewayApiClient provides a GatewayAPI client for the cluster admin user.
func (*CLI) AdminImageClient ¶ added in v1.5.2
func (c *CLI) AdminImageClient() imagev1client.Interface
func (*CLI) AdminIngressClient ¶ added in v1.5.2
func (c *CLI) AdminIngressClient() ingressv1client.Interface
func (*CLI) AdminKubeClient ¶ added in v1.5.1
func (c *CLI) AdminKubeClient() kubernetes.Interface
AdminKubeClient provides a Kubernetes client for the cluster admin user.
func (*CLI) AdminOAuthClient ¶ added in v1.5.2
func (c *CLI) AdminOAuthClient() oauthv1client.Interface
func (*CLI) AdminOperatorClient ¶ added in v1.5.2
func (c *CLI) AdminOperatorClient() operatorv1client.Interface
func (*CLI) AdminProjectClient ¶ added in v1.5.2
func (c *CLI) AdminProjectClient() projectv1client.Interface
func (*CLI) AdminQuotaClient ¶ added in v1.5.2
func (c *CLI) AdminQuotaClient() quotav1client.Interface
func (*CLI) AdminRouteClient ¶ added in v1.5.2
func (c *CLI) AdminRouteClient() routev1client.Interface
func (*CLI) AdminSecurityClient ¶ added in v1.5.2
func (c *CLI) AdminSecurityClient() securityv1client.Interface
func (*CLI) AdminTemplateClient ¶ added in v1.5.2
func (c *CLI) AdminTemplateClient() templatev1client.Interface
func (*CLI) AdminUserClient ¶ added in v1.5.2
func (c *CLI) AdminUserClient() userv1client.Interface
func (*CLI) AppsClient ¶ added in v1.5.2
func (c *CLI) AppsClient() appsv1client.Interface
func (*CLI) AsGuestKubeconf ¶ added in v1.5.2
AsGuestKubeconf returns a CLI configured to use the guest kubeconfig
func (*CLI) AuthorizationClient ¶ added in v1.5.2
func (c *CLI) AuthorizationClient() authorizationv1client.Interface
func (*CLI) Background ¶ added in v1.3.0
Background executes the command in the background and returns the Cmd object which may be killed later via cmd.Process.Kill(). It also returns buffers holding the stdout & stderr of the command, which may be read from only after calling cmd.Wait().
func (*CLI) BackgroundRC ¶ added in v1.5.2
BackgroundRC executes the command in the background and returns the Cmd object which may be killed later via cmd.Process.Kill(). It returns a ReadCloser for stdout. If in doubt, use Background(). Consult the os/exec documentation.
func (*CLI) BuildClient ¶ added in v1.5.2
func (c *CLI) BuildClient() buildv1client.Interface
func (*CLI) ChangeUser ¶
ChangeUser changes the user used by the current CLI session.
func (*CLI) CreateNamespaceUDN ¶ added in v1.5.2
func (c *CLI) CreateNamespaceUDN()
CreateNamespaceUDN creates a new namespace with required user defined network label during creation time only required for testing networking UDN features on 4.17z+
func (*CLI) CreateSpecificNamespaceUDN ¶ added in v1.5.2
CreateSpecificNamespaceUDN creates a specific namespace with required user defined network label during creation time only required for testing networking UDN features on 4.17z+ Important Note: the namespace created by this function will not be automatically deleted, user need to explicitly delete the namespace after test is done
func (*CLI) CreateSpecifiedNamespaceAsAdmin ¶ added in v1.5.2
CreateSpecifiedNamespaceAsAdmin creates specified name namespace.
func (*CLI) DeleteSpecifiedNamespaceAsAdmin ¶ added in v1.5.2
DeleteSpecifiedNamespaceAsAdmin deletes specified name namespace.
func (*CLI) DynamicClient ¶ added in v1.5.2
func (*CLI) Env ¶ added in v1.5.2
Env sets the command's environment variables with the same semantics as exec.Cmd's Env property. https://pkg.go.dev/os/exec#Cmd
EnvVar()-provided variables will be appended to whatever Env was set before.
func (*CLI) EnvVar ¶ added in v1.5.2
EnvVar sets an environment variable for the command, appended to whatever Env is set on the CLI when eventually executed, or to environment inherited from the current process if Env() was not called.
func (*CLI) Execute ¶
Execute executes the current command and return error if the execution failed This function will set the default output to Ginkgo writer.
func (*CLI) GatewayApiClient ¶ added in v1.5.2
func (c *CLI) GatewayApiClient() gatewayapiv1client.Interface
GatewayApiClient provides a GatewayAPI client for the current namespace user.
func (*CLI) GetClientConfigForExtOIDCUser ¶ added in v1.5.2
GetClientConfigForExtOIDCUser gets a client config for an external OIDC cluster
func (*CLI) GetClientConfigForUser ¶ added in v1.5.2
func (*CLI) GetGuestKubeconf ¶ added in v1.5.2
GetGuestKubeconf gets the guest cluster kubeconf file
func (*CLI) GetKubeconf ¶ added in v1.5.2
func (*CLI) GuestConfig ¶ added in v1.5.2
GuestConfig provides a REST client config for the guest cluster user.
func (*CLI) GuestKubeClient ¶ added in v1.5.2
func (c *CLI) GuestKubeClient() kubernetes.Interface
GuestKubeClient provides a Kubernetes client for the guest cluster user.
func (*CLI) ImageClient ¶ added in v1.5.2
func (c *CLI) ImageClient() imagev1client.Interface
func (*CLI) InputString ¶ added in v1.0.7
InputString adds expected input to the command
func (*CLI) KubeClient ¶ added in v1.5.1
func (c *CLI) KubeClient() kubernetes.Interface
KubeClient provides a Kubernetes client for the current namespace
func (*CLI) KubeFramework ¶
KubeFramework returns Kubernetes framework which contains helper functions specific for Kubernetes resources
func (*CLI) MachineConfigurationClient ¶ added in v1.5.2
func (c *CLI) MachineConfigurationClient() mcv1client.Interface
func (*CLI) Namespace ¶
Namespace returns the name of the namespace used in the current test case. If the namespace is not set, an empty string is returned.
func (*CLI) NewPrometheusClient ¶ added in v1.5.2
func (c *CLI) NewPrometheusClient(ctx context.Context) prometheusv1.API
func (*CLI) NotShowInfo ¶ added in v1.5.2
NotShowInfo disables showing info in CLI output
func (*CLI) OutputToFile ¶
OutputToFile executes the command and store output to a file
func (*CLI) Outputs ¶ added in v1.3.0
Outputs executes the command and returns the stdout/stderr output as separate strings
func (*CLI) OutputsToFiles ¶ added in v1.5.2
OutputsToFiles executes the command and store the stdout in one file and stderr in another one The stdout output will be written to fileName+'.stdout' The stderr output will be written to fileName+'.stderr'
func (*CLI) ProjectClient ¶ added in v1.5.2
func (c *CLI) ProjectClient() projectv1client.Interface
func (*CLI) QuotaClient ¶ added in v1.5.2
func (c *CLI) QuotaClient() quotav1client.Interface
func (*CLI) RESTMapper ¶ added in v1.5.2
func (c *CLI) RESTMapper() meta.RESTMapper
func (*CLI) RouteClient ¶ added in v1.5.2
func (c *CLI) RouteClient() routev1client.Interface
func (*CLI) Run ¶
Run executes given OpenShift CLI command verb (iow. "oc <verb>"). This function also override the default 'stdout' to redirect all output to a buffer and prepare the global flags such as namespace and config path.
func (*CLI) RunInMonitorTest ¶ added in v1.5.2
Executes with the kubeconfig specified from the environment
func (*CLI) SetAdminKubeconf ¶ added in v1.5.2
SetAdminKubeconf instructs the admin cluster kubeconf file is set
func (*CLI) SetGuestKubeconf ¶ added in v1.5.2
SetGuestKubeconf sets the guest cluster kubeconf file
func (*CLI) SetKubeconf ¶ added in v1.5.2
SetKubeconf instructs the cluster kubeconf file is set
func (*CLI) SetManagedNamespace ¶ added in v1.5.2
SetManagedNamespace appends the managed workload partitioning annotations to namespace on creation
func (*CLI) SetNamespace ¶
SetNamespace sets a new namespace
func (*CLI) SetShowInfo ¶ added in v1.5.2
SetShowInfo enables showing info in CLI output
func (*CLI) SetupProject ¶
SetupProject creates a new project and assign a random user to the project. All resources will be then created within this project. Returns the name of the new project.
func (*CLI) SilentOutput ¶ added in v1.5.2
SilentOutput executes the command and returns stdout/stderr combined into one string
func (*CLI) TeardownProject ¶ added in v1.5.2
func (c *CLI) TeardownProject()
TeardownProject removes projects created by this test.
func (*CLI) Template ¶
Template sets a Go template for the OpenShift CLI command. This is equivalent of running "oc get foo -o template --template='{{ .spec }}'"
func (*CLI) TemplateClient ¶ added in v1.5.2
func (c *CLI) TemplateClient() templatev1client.Interface
func (*CLI) UserConfig ¶ added in v1.5.2
func (*CLI) Username ¶
Username returns the name of currently logged user. If there is no user assigned for the current session, it returns 'admin'.
func (*CLI) WaitForAccessAllowed ¶ added in v1.5.2
func (c *CLI) WaitForAccessAllowed(review *kubeauthorizationv1.SelfSubjectAccessReview, user string) error
func (*CLI) WaitForAccessDenied ¶ added in v1.5.2
func (c *CLI) WaitForAccessDenied(review *kubeauthorizationv1.SelfSubjectAccessReview, user string) error
func (CLI) WithKubeConfigCopy ¶ added in v1.5.2
WithKubeConfigCopy copies the current kubeconfig into a temporary file and sets the copy as the current kubeconfig for the duration of the invocation of fnc. The temporary file is removed once fnc returns.
func (*CLI) WithKubectl ¶ added in v1.5.2
WithKubectl instructs the command should be invoked with binary kubectl, not oc.
func (CLI) WithToken ¶ added in v1.5.2
WithToken instructs the command should be invoked with --token rather than --kubeconfig flag
func (*CLI) WithoutKubeconf ¶ added in v1.5.2
WithoutKubeconf simulates running commands without kubeconfig - OTP compatibility This is a no-op in origin but needed for OTP compatibility
func (CLI) WithoutNamespace ¶ added in v1.4.0
WithoutNamespace instructs the command should be invoked without adding --namespace parameter
type ConfigClientShim ¶ added in v1.5.2
type ConfigClientShim struct {
// contains filtered or unexported fields
}
ConfigClientShim makes sure whenever there's a static manifest present for a config v1 kind, fake client is used instead of the real one.
func NewConfigClientShim ¶ added in v1.5.2
func NewConfigClientShim( configClient configv1client.Interface, objects []runtime.Object, ) *ConfigClientShim
func (*ConfigClientShim) ConfigV1 ¶ added in v1.5.2
func (c *ConfigClientShim) ConfigV1() configv1.ConfigV1Interface
func (*ConfigClientShim) ConfigV1alpha1 ¶ added in v1.5.2
func (c *ConfigClientShim) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface
func (*ConfigClientShim) ConfigV1alpha2 ¶ added in v1.5.2
func (c *ConfigClientShim) ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface
func (*ConfigClientShim) Discovery ¶ added in v1.5.2
func (c *ConfigClientShim) Discovery() discovery.DiscoveryInterface
type ConfigV1ClientShim ¶ added in v1.5.2
type ConfigV1ClientShim struct {
// contains filtered or unexported fields
}
ConfigClientShim makes sure whenever there's a static manifest present for a config v1 kind, fake client is used instead of the real one.
func (*ConfigV1ClientShim) APIServers ¶ added in v1.5.2
func (c *ConfigV1ClientShim) APIServers() configv1.APIServerInterface
func (*ConfigV1ClientShim) Authentications ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Authentications() configv1.AuthenticationInterface
func (*ConfigV1ClientShim) Builds ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Builds() configv1.BuildInterface
func (*ConfigV1ClientShim) CRIOCredentialProviderConfigs ¶ added in v1.6.0
func (c *ConfigV1ClientShim) CRIOCredentialProviderConfigs() configv1.CRIOCredentialProviderConfigInterface
func (*ConfigV1ClientShim) ClusterImagePolicies ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ClusterImagePolicies() configv1.ClusterImagePolicyInterface
func (*ConfigV1ClientShim) ClusterOperators ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ClusterOperators() configv1.ClusterOperatorInterface
func (*ConfigV1ClientShim) ClusterVersions ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ClusterVersions() configv1.ClusterVersionInterface
func (*ConfigV1ClientShim) Consoles ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Consoles() configv1.ConsoleInterface
func (*ConfigV1ClientShim) DNSes ¶ added in v1.5.2
func (c *ConfigV1ClientShim) DNSes() configv1.DNSInterface
func (*ConfigV1ClientShim) FeatureGates ¶ added in v1.5.2
func (c *ConfigV1ClientShim) FeatureGates() configv1.FeatureGateInterface
func (*ConfigV1ClientShim) ImageContentPolicies ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ImageContentPolicies() configv1.ImageContentPolicyInterface
func (*ConfigV1ClientShim) ImageDigestMirrorSets ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ImageDigestMirrorSets() configv1.ImageDigestMirrorSetInterface
func (*ConfigV1ClientShim) ImagePolicies ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ImagePolicies(namespace string) configv1.ImagePolicyInterface
func (*ConfigV1ClientShim) ImageTagMirrorSets ¶ added in v1.5.2
func (c *ConfigV1ClientShim) ImageTagMirrorSets() configv1.ImageTagMirrorSetInterface
func (*ConfigV1ClientShim) Images ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Images() configv1.ImageInterface
func (*ConfigV1ClientShim) Infrastructures ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Infrastructures() configv1.InfrastructureInterface
func (*ConfigV1ClientShim) Ingresses ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Ingresses() configv1.IngressInterface
func (*ConfigV1ClientShim) InsightsDataGathers ¶ added in v1.5.2
func (c *ConfigV1ClientShim) InsightsDataGathers() configv1.InsightsDataGatherInterface
func (*ConfigV1ClientShim) Networks ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Networks() configv1.NetworkInterface
func (*ConfigV1ClientShim) Nodes ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Nodes() configv1.NodeInterface
func (*ConfigV1ClientShim) OAuths ¶ added in v1.5.2
func (c *ConfigV1ClientShim) OAuths() configv1.OAuthInterface
func (*ConfigV1ClientShim) OperatorHubs ¶ added in v1.5.2
func (c *ConfigV1ClientShim) OperatorHubs() configv1.OperatorHubInterface
func (*ConfigV1ClientShim) Projects ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Projects() configv1.ProjectInterface
func (*ConfigV1ClientShim) Proxies ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Proxies() configv1.ProxyInterface
func (*ConfigV1ClientShim) RESTClient ¶ added in v1.5.2
func (c *ConfigV1ClientShim) RESTClient() rest.Interface
func (*ConfigV1ClientShim) Schedulers ¶ added in v1.5.2
func (c *ConfigV1ClientShim) Schedulers() configv1.SchedulerInterface
type ConfigV1DiscoveryClientShim ¶ added in v1.5.2
type ConfigV1DiscoveryClientShim struct {
// contains filtered or unexported fields
}
func (*ConfigV1DiscoveryClientShim) OpenAPISchema ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) OpenAPISchema() (*openapi_v2.Document, error)
func (*ConfigV1DiscoveryClientShim) OpenAPIV3 ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) OpenAPIV3() openapi.Client
func (*ConfigV1DiscoveryClientShim) RESTClient ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) RESTClient() restclient.Interface
func (*ConfigV1DiscoveryClientShim) ServerGroups ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerGroups() (*metav1.APIGroupList, error)
func (*ConfigV1DiscoveryClientShim) ServerGroupsAndResources ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
func (*ConfigV1DiscoveryClientShim) ServerPreferredNamespacedResources ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
func (*ConfigV1DiscoveryClientShim) ServerPreferredResources ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerPreferredResources() ([]*metav1.APIResourceList, error)
func (*ConfigV1DiscoveryClientShim) ServerResourcesForGroupVersion ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
func (*ConfigV1DiscoveryClientShim) ServerVersion ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) ServerVersion() (*version.Info, error)
func (*ConfigV1DiscoveryClientShim) WithLegacy ¶ added in v1.5.2
func (c *ConfigV1DiscoveryClientShim) WithLegacy() discovery.DiscoveryInterface
type ConfigV1InfrastructuresClientShim ¶ added in v1.5.2
type ConfigV1InfrastructuresClientShim struct {
// contains filtered or unexported fields
}
func (*ConfigV1InfrastructuresClientShim) Apply ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Apply(ctx context.Context, infrastructure *applyconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) ApplyStatus ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) ApplyStatus(ctx context.Context, infrastructure *applyconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) Create ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Create(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, opts metav1.CreateOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) Delete ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
func (*ConfigV1InfrastructuresClientShim) DeleteCollection ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
func (*ConfigV1InfrastructuresClientShim) Get ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) List ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) List(ctx context.Context, opts metav1.ListOptions) (*apiconfigv1.InfrastructureList, error)
func (*ConfigV1InfrastructuresClientShim) Patch ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) Update ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Update(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, opts metav1.UpdateOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) UpdateStatus ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) UpdateStatus(ctx context.Context, infrastructure *apiconfigv1.Infrastructure, opts metav1.UpdateOptions) (*apiconfigv1.Infrastructure, error)
func (*ConfigV1InfrastructuresClientShim) Watch ¶ added in v1.5.2
func (c *ConfigV1InfrastructuresClientShim) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
type ConfigV1NetworksClientShim ¶ added in v1.5.2
type ConfigV1NetworksClientShim struct {
// contains filtered or unexported fields
}
func (*ConfigV1NetworksClientShim) Apply ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Apply(ctx context.Context, network *applyconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) ApplyStatus ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) ApplyStatus(ctx context.Context, network *applyconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) Create ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Create(ctx context.Context, network *apiconfigv1.Network, opts metav1.CreateOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) Delete ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
func (*ConfigV1NetworksClientShim) DeleteCollection ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
func (*ConfigV1NetworksClientShim) Get ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) List ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) List(ctx context.Context, opts metav1.ListOptions) (*apiconfigv1.NetworkList, error)
func (*ConfigV1NetworksClientShim) Patch ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) Update ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Update(ctx context.Context, network *apiconfigv1.Network, opts metav1.UpdateOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) UpdateStatus ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) UpdateStatus(ctx context.Context, network *apiconfigv1.Network, opts metav1.UpdateOptions) (*apiconfigv1.Network, error)
func (*ConfigV1NetworksClientShim) Watch ¶ added in v1.5.2
func (c *ConfigV1NetworksClientShim) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
type Database ¶ added in v1.0.7
type Database interface {
// PodName returns the name of the Pod this helper is bound to.
PodName() string
// IsReady indicates whether the underlying Pod is ready for queries.
IsReady(oc *CLI) (bool, error)
// Query queries the database as a regular user.
Query(oc *CLI, query string) (string, error)
// QueryPrivileged queries the database as a privileged user.
QueryPrivileged(oc *CLI, query string) (string, error)
// TestRemoteLogin tests whether it is possible to remote login to hostAddress.
TestRemoteLogin(oc *CLI, hostAddress string) error
}
Database interface allows testing database images.
type ELBClient ¶ added in v1.5.2
type ELBClient struct {
// contains filtered or unexported fields
}
func NewELBClient ¶ added in v1.5.2
NewELBClient creates an ELBClient
func (*ELBClient) GetCLBHealthCheckPortPath ¶ added in v1.6.0
GetLBHealthCheckPortPath get load balance health check port and path for Classic Load Balancer
type FakeWatcher ¶ added in v1.5.2
RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
func NewFakeWatcher ¶ added in v1.5.2
func NewFakeWatcher() *FakeWatcher
func (*FakeWatcher) Action ¶ added in v1.5.2
func (f *FakeWatcher) Action(action watch.EventType, obj runtime.Object)
Action sends an event of the requested type, for table-based testing.
func (*FakeWatcher) IsStopped ¶ added in v1.5.2
func (f *FakeWatcher) IsStopped() bool
func (*FakeWatcher) Reset ¶ added in v1.5.2
func (f *FakeWatcher) Reset()
Reset prepares the watcher to be reused.
func (*FakeWatcher) ResultChan ¶ added in v1.5.2
func (f *FakeWatcher) ResultChan() <-chan watch.Event
func (*FakeWatcher) Stop ¶ added in v1.5.2
func (f *FakeWatcher) Stop()
Stop implements Interface.Stop().
type GitRepo ¶ added in v1.5.2
type GitRepo struct {
RepoPath string
// contains filtered or unexported fields
}
func NewGitRepo ¶ added in v1.5.2
NewGitRepo creates temporary test directories with local and "remote" git repo
func (GitRepo) AddAndCommit ¶ added in v1.5.2
AddAndCommit commits a file with its content to local repo
type LogDumperFunc ¶ added in v1.5.2
type LogDumperFunc func(oc *CLI, br *BuildResult) (string, error)
type MissingTagError ¶
type MissingTagError struct {
Tags []string
}
func (MissingTagError) Error ¶
func (mte MissingTagError) Error() string
type OperationNotPermitted ¶ added in v1.5.2
type OperationNotPermitted struct {
Action string
}
func (OperationNotPermitted) Error ¶ added in v1.5.2
func (e OperationNotPermitted) Error() string
type OperatorProgressingStatus ¶ added in v1.5.2
type OperatorProgressingStatus struct {
// contains filtered or unexported fields
}
func WaitForOperatorToRollout ¶ added in v1.5.2
func WaitForOperatorToRollout(ctx context.Context, configClient configv1client.Interface, operatorName string) *OperatorProgressingStatus
WaitForOperatorToRollout is called *before* a configuration change is made. This method will close the first returned channel when the operator starts progressing and second channel once it is done progressing. If it fails, it will
func (*OperatorProgressingStatus) Done ¶ added in v1.5.2
func (p *OperatorProgressingStatus) Done() <-chan struct{}
Done is closed once the operator finishes progressing *or* once the operation has failed. If the operation failed, then Err() will be non-nil
func (*OperatorProgressingStatus) Err ¶ added in v1.5.2
func (p *OperatorProgressingStatus) Err() error
Err returns whether or not there was failure waiting on the operator status. If Done is not yet closed, Err returns nil. If Done is closed, Err returns nil if it was successful or non-nil if it was not.
func (*OperatorProgressingStatus) StableBeforeStarting ¶ added in v1.5.2
func (p *OperatorProgressingStatus) StableBeforeStarting() <-chan struct{}
StableBeforeStarting is closed once the operator indicates that it is stable to begin
func (*OperatorProgressingStatus) Started ¶ added in v1.5.2
func (p *OperatorProgressingStatus) Started() <-chan struct{}
Started is closed once the operator starts progressing
type PodExecutor ¶ added in v1.5.2
type PodExecutor struct {
// contains filtered or unexported fields
}
func NewPodExecutor ¶ added in v1.5.2
func NewPodExecutor(oc *CLI, name, image string) (*PodExecutor, error)
NewPodExecutor returns an executor capable of running commands in a Pod.
func (*PodExecutor) CopyFromHost ¶ added in v1.5.2
func (r *PodExecutor) CopyFromHost(local, remote string) error
func (*PodExecutor) Exec ¶ added in v1.5.2
func (r *PodExecutor) Exec(script string) (string, error)
Exec executes a single command or a bash script in the running pod. It returns the command output and error if the command finished with non-zero status code or the command took longer then 3 minutes to run.
Source Files
¶
- auth_rule_resolver.go
- aws_client.go
- client.go
- clusterversion.go
- conditions.go
- configv1shim.go
- db_image_helpers.go
- deployment.go
- deploymentconfigs.go
- docker.go
- endpoints.go
- exec.go
- framework.go
- http.go
- image_helpers.go
- ldap.go
- managed_services.go
- metrics.go
- net.go
- nfs.go
- node_helpers.go
- nodes.go
- oc_copy.go
- operator.go
- pods.go
- proxy.go
- router.go
- sar.go
- search_latest_image.go
- statefulsets.go
- test_setup.go
- util_otp.go
- volumes.go
- wait.go
Directories
¶
| Path | Synopsis |
|---|---|
|
version
Package version supplies version information collected at build time to OpenShift and Kubernetes components.
|
Package version supplies version information collected at build time to OpenShift and Kubernetes components. |
|
openshift
|
|
|
clusterversionoperator
Package clusterversionoperator contains utilities for exercising the cluster-version operator.
|
Package clusterversionoperator contains utilities for exercising the cluster-version operator. |