Documentation ¶
Index ¶
- Variables
- func AdmitWorkspaceAccess(ctx context.Context, t *testing.T, ...)
- func ClientCAUserConfig(t *testing.T, cfg *rest.Config, clientCAConfigDirectory, username string, ...) *rest.Config
- func ConfigWithToken(token string, cfg *rest.Config) *rest.Config
- func CreateClientCA(t *testing.T) (string, string)
- func CreateResources(ctx context.Context, fs embed.FS, upstreamConfig *rest.Config, ...) error
- func CreateTempDirForTest(t *testing.T, dirName string) (string, error)
- func DirectOrGoRunCommand(executableName string) []string
- func Eventually(t *testing.T, condition func() (success bool, reason string), ...)
- func EventuallyCondition(t *testing.T, getter func() (conditions.Getter, error), ...)
- func EventuallyReady(t *testing.T, getter func() (conditions.Getter, error), ...)
- func ExportVirtualWorkspaceURLs(export *apisv1alpha1.APIExport) []string
- func GatherMetrics(ctx context.Context, t *testing.T, server RunningServer, directory string)
- func GetFreePort(t *testing.T) (string, error)
- func InProcessEnvSet() bool
- func Kubectl(t *testing.T, kubeconfigPath string, args ...string) []byte
- func KubectlApply(t *testing.T, kubeconfigPath string, input []byte) []byte
- func LoadKubeConfig(kubeconfigPath, contextName string) (clientcmd.ClientConfig, error)
- func LogToConsoleEnvSet() bool
- func LogicalClusterRawConfig(rawConfig clientcmdapi.Config, logicalClusterName logicalcluster.Path, ...) clientcmdapi.Config
- func NewBindCompute(t *testing.T, path logicalcluster.Path, server RunningServer, ...) *bindCompute
- func NewOrganizationFixture(t *testing.T, server RunningServer, options ...UnprivilegedWorkspaceOption) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
- func NewPrivilegedOrganizationFixture[O WorkspaceOption](t *testing.T, server RunningServer, options ...O) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
- func NewSyncerFixture(t *testing.T, server RunningServer, path logicalcluster.Path, ...) *syncerFixture
- func NewWorkspaceFixture(t *testing.T, server RunningServer, parent logicalcluster.Path, ...) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
- func NoGoRunEnvSet() bool
- func RepositoryBinDir() string
- func RepositoryDir() string
- func RunInProcess(o *runOptions)
- func RunTMCCliPlugin(t *testing.T, kubeconfigPath string, subcommand []string) []byte
- func ScrapeMetrics(ctx context.Context, cfg *rest.Config, ...) error
- func ScrapeMetricsForServer(t *testing.T, srv RunningServer)
- func ScratchDirs(t *testing.T) (string, string, error)
- func StartKcpCommand() []string
- func StaticTokenUserConfig(username string, cfg *rest.Config) *rest.Config
- func Suite(t *testing.T, suite string)
- func TestServerArgs() []string
- func TestServerArgsWithTokenAuthFile(tokenAuthFile string) []string
- func TestServerWithAuditPolicyFile(auditPolicyFile string) []string
- func TestServerWithClientCAFile(clientCAFile string) []string
- func TmcCliPluginCommand() []string
- func UniqueGroup(suffix string) string
- func VirtualWorkspaceURL(ctx context.Context, kcpClusterClient kcpclientset.ClusterInterface, ...) (string, bool, error)
- func VirtualWorkspaceURLOrDie(t *testing.T, kcpClusterClient kcpclientset.ClusterInterface, ...) string
- func WaitForReady(ctx context.Context, t *testing.T, cfg *rest.Config, keepMonitoring bool) error
- func WithLogStreaming(o *runOptions)
- func WorkspaceShard(ctx context.Context, kcpClient kcpclientset.ClusterInterface, ...) (*corev1alpha1.Shard, error)
- func WorkspaceShardOrDie(t *testing.T, kcpClient kcpclientset.ClusterInterface, ...) *corev1alpha1.Shard
- func WriteEmbedFile(t *testing.T, source string) string
- func WriteLogicalClusterConfig(t *testing.T, rawConfig clientcmdapi.Config, contextName string, ...) (clientcmd.ClientConfig, string)
- func WriteTokenAuthFile(t *testing.T) string
- type Accessory
- type ArtifactFunc
- type BindComputeOption
- func WithAPIExportsWorkloadBindOption(apiexports ...string) BindComputeOption
- func WithLocationSelectorWorkloadBindOption(selectors ...metav1.LabelSelector) BindComputeOption
- func WithLocationWorkspaceWorkloadBindOption(clusterName logicalcluster.Path) BindComputeOption
- func WithNSSelectorWorkloadBindOption(selector metav1.LabelSelector) BindComputeOption
- func WithPlacementNameBindOption(placementName string) BindComputeOption
- type ConditionEvaluator
- type Expectation
- type ExpectationController
- type Expecter
- type PrivilegedWorkspaceOption
- type RegisterWorkspaceExpectation
- type RegisterWorkspaceShardExpectation
- type RunOption
- type RunningServer
- type StartedSyncerFixture
- func (sf *StartedSyncerFixture) DownstreamNamespaceFor(t *testing.T, upstreamWorkspace logicalcluster.Name, upstreamNamespace string) string
- func (sf StartedSyncerFixture) StartAPIImporter(t *testing.T) *appliedSyncerFixture
- func (sf StartedSyncerFixture) StartHeartBeat(t *testing.T) *StartedSyncerFixture
- func (sf StartedSyncerFixture) StartSyncer(t *testing.T) *StartedSyncerFixture
- func (sf StartedSyncerFixture) StartSyncerTunnel(t *testing.T) *StartedSyncerFixture
- func (sf *StartedSyncerFixture) StopHeartBeat(t *testing.T)
- func (sf *StartedSyncerFixture) StopSyncerTunnel(t *testing.T)
- func (sf *StartedSyncerFixture) ToSyncTargetKey() string
- func (sf *StartedSyncerFixture) WaitForSyncTargetReady(ctx context.Context, t *testing.T)
- type SyncTargetOption
- type SyncerOption
- func WithAPIExports(exports ...string) SyncerOption
- func WithDownstreamPreparation(prepare func(config *rest.Config, isFakePCluster bool)) SyncerOption
- func WithExtraResources(resources ...string) SyncerOption
- func WithSyncTargetLabels(labels map[string]string) SyncerOption
- func WithSyncTargetName(name string) SyncerOption
- func WithSyncedUserWorkspaces(syncedUserWorkspaces ...*tenancyv1alpha1.Workspace) SyncerOption
- type TmcConfigOption
- type UnprivilegedWorkspaceOption
- func TODO_WithoutMultiShardSupport() UnprivilegedWorkspaceOption
- func WithLocation(w tenancyv1alpha1.WorkspaceLocation) UnprivilegedWorkspaceOption
- func WithName(s string, formatArgs ...interface{}) UnprivilegedWorkspaceOption
- func WithNameSuffix(suffix string) UnprivilegedWorkspaceOption
- func WithRootShard() UnprivilegedWorkspaceOption
- func WithShard(name string) UnprivilegedWorkspaceOption
- func WithType(path logicalcluster.Path, name tenancyv1alpha1.WorkspaceTypeName) UnprivilegedWorkspaceOption
- type WorkspaceExpectation
- type WorkspaceOption
- type WorkspaceShardExpectation
Constants ¶
This section is empty.
Variables ¶
var TestConfig *testConfig
Functions ¶
func AdmitWorkspaceAccess ¶
func AdmitWorkspaceAccess(ctx context.Context, t *testing.T, kubeClusterClient kcpkubernetesclientset.ClusterInterface, clusterName logicalcluster.Path, users []string, groups []string, admin bool)
AdmitWorkspaceAccess create RBAC rules that allow the given users and/or groups to access the given workspace, optionally as admin.
func ClientCAUserConfig ¶
func ClientCAUserConfig(t *testing.T, cfg *rest.Config, clientCAConfigDirectory, username string, groups ...string) *rest.Config
ClientCAUserConfig returns a config based on a dynamically created client certificate. The returned client CA is signed by "test/e2e/framework/client-ca.crt".
func CreateResources ¶
func CreateResources(ctx context.Context, fs embed.FS, upstreamConfig *rest.Config, clusterName logicalcluster.Path, transformers ...helpers.TransformFileFunc) error
CreateResources creates all resources from a filesystem in the given workspace identified by upstreamConfig.
func CreateTempDirForTest ¶
CreateTempDirForTest creates the named directory with a unique base path derived from the name of the current test.
func DirectOrGoRunCommand ¶
DirectOrGoRunCommand returns the string tokens required to start the given executable in the currently configured mode (direct or via `go run`).
func Eventually ¶
func Eventually(t *testing.T, condition func() (success bool, reason string), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Eventually asserts that given condition will be met in waitFor time, periodically checking target function each tick. In addition to require.Eventually, this function t.Logs the raason string value returned by the condition function (eventually after 20% of the wait time) to aid in debugging.
func EventuallyCondition ¶
func EventuallyCondition(t *testing.T, getter func() (conditions.Getter, error), evaluator *ConditionEvaluator, msgAndArgs ...interface{})
EventuallyCondition asserts that the object returned by getter() eventually has a condition that matches the evaluator.
func EventuallyReady ¶
func EventuallyReady(t *testing.T, getter func() (conditions.Getter, error), msgAndArgs ...interface{})
EventuallyReady asserts that the object returned by getter() eventually has a ready condition.
func ExportVirtualWorkspaceURLs ¶
func ExportVirtualWorkspaceURLs(export *apisv1alpha1.APIExport) []string
func GatherMetrics ¶
func GetFreePort ¶
GetFreePort asks the kernel for a free open port that is ready to use.
func InProcessEnvSet ¶
func InProcessEnvSet() bool
func Kubectl ¶
Kubectl runs kubectl with the given arguments and returns the combined stderr and stdout.
func KubectlApply ¶
KubectlApply runs kubectl apply -f with the supplied input piped to stdin and returns the combined stderr and stdout output.
func LoadKubeConfig ¶
func LoadKubeConfig(kubeconfigPath, contextName string) (clientcmd.ClientConfig, error)
LoadKubeConfig loads a kubeconfig from disk. This method is intended to be common between fixture for servers whose lifecycle is test-managed and fixture for servers whose lifecycle is managed separately from a test run.
func LogToConsoleEnvSet ¶
func LogToConsoleEnvSet() bool
func LogicalClusterRawConfig ¶
func LogicalClusterRawConfig(rawConfig clientcmdapi.Config, logicalClusterName logicalcluster.Path, contextName string) clientcmdapi.Config
LogicalClusterRawConfig returns the raw cluster config of the given config.
func NewBindCompute ¶
func NewBindCompute(t *testing.T, path logicalcluster.Path, server RunningServer, opts ...BindComputeOption) *bindCompute
func NewOrganizationFixture ¶
func NewOrganizationFixture(t *testing.T, server RunningServer, options ...UnprivilegedWorkspaceOption) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
func NewPrivilegedOrganizationFixture ¶
func NewPrivilegedOrganizationFixture[O WorkspaceOption](t *testing.T, server RunningServer, options ...O) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
func NewSyncerFixture ¶
func NewSyncerFixture(t *testing.T, server RunningServer, path logicalcluster.Path, opts ...SyncerOption) *syncerFixture
func NewWorkspaceFixture ¶
func NewWorkspaceFixture(t *testing.T, server RunningServer, parent logicalcluster.Path, options ...UnprivilegedWorkspaceOption) (logicalcluster.Path, *tenancyv1alpha1.Workspace)
func NoGoRunEnvSet ¶
func NoGoRunEnvSet() bool
func RepositoryBinDir ¶
func RepositoryBinDir() string
RepositoryBinDir returns the absolute path of <repo-dir>/bin. That's where `make build` produces our binaries.
func RepositoryDir ¶
func RepositoryDir() string
RepositoryDir returns the absolute path of <repo-dir>.
func RunInProcess ¶
func RunInProcess(o *runOptions)
func RunTMCCliPlugin ¶
RunTMCCliPlugin runs the tmc workspace plugin with the provided subcommand and returns the combined stderr and stdout output.
func ScrapeMetrics ¶
func ScrapeMetricsForServer ¶
func ScrapeMetricsForServer(t *testing.T, srv RunningServer)
func ScratchDirs ¶
ScratchDirs determines where artifacts and data should live for a test server.
func StartKcpCommand ¶
func StartKcpCommand() []string
StartKcpCommand returns the string tokens required to start kcp in the currently configured mode (direct or via `go run`).
func StaticTokenUserConfig ¶
StaticTokenUserConfig returns a user config based on static user tokens defined in "test/e2e/framework/auth-tokens.csv". The token being used is "[username]-token".
func Suite ¶
Suite should be called at the very beginning of a test case, to ensure that a test is only run when the suite containing it is selected by the user running tests.
func TestServerArgs ¶
func TestServerArgs() []string
TestServerArgs returns the set of kcp args used to start a test server using the token auth file from the working tree.
func TestServerArgsWithTokenAuthFile ¶
TestServerArgsWithTokenAuthFile returns the set of kcp args used to start a test server with the given token auth file.
func TestServerWithAuditPolicyFile ¶
TestServerWithAuditPolicyFile returns the set of kcp args used to start a test server with the given audit policy file.
func TmcCliPluginCommand ¶
func TmcCliPluginCommand() []string
TmcCliPluginCommand returns the cli args to run the workspace plugin directly or via go run (depending on whether NO_GORUN is set).
func UniqueGroup ¶
UniqueGroup returns a unique API group with the given suffix by prefixing some random 8 character base36 string. suffix must start with a dot if the random string should be dot-separated.
func VirtualWorkspaceURL ¶
func VirtualWorkspaceURL(ctx context.Context, kcpClusterClient kcpclientset.ClusterInterface, ws *tenancyv1alpha1.Workspace, urls []string) (string, bool, error)
func VirtualWorkspaceURLOrDie ¶
func VirtualWorkspaceURLOrDie(t *testing.T, kcpClusterClient kcpclientset.ClusterInterface, ws *tenancyv1alpha1.Workspace, urls []string) string
func WaitForReady ¶
func WithLogStreaming ¶
func WithLogStreaming(o *runOptions)
func WorkspaceShard ¶
func WorkspaceShard(ctx context.Context, kcpClient kcpclientset.ClusterInterface, ws *tenancyv1alpha1.Workspace) (*corev1alpha1.Shard, error)
func WorkspaceShardOrDie ¶
func WorkspaceShardOrDie(t *testing.T, kcpClient kcpclientset.ClusterInterface, ws *tenancyv1alpha1.Workspace) *corev1alpha1.Shard
func WriteLogicalClusterConfig ¶
func WriteLogicalClusterConfig(t *testing.T, rawConfig clientcmdapi.Config, contextName string, clusterName logicalcluster.Path) (clientcmd.ClientConfig, string)
WriteLogicalClusterConfig creates a logical cluster config for the given config and cluster name and writes it to the test's artifact path. Useful for configuring the workspace plugin with --kubeconfig.
func WriteTokenAuthFile ¶
WriteTokenAuthFile writes the embedded token file to the current test's data dir.
Persistent servers can target the file in the source tree with `--token-auth-file` and test-managed servers can target a file written to a temp path. This avoids requiring a test to know the location of the token file.
TODO(marun) Is there a way to avoid embedding by determining the path to the file during test execution?
Types ¶
type Accessory ¶
type Accessory struct {
// contains filtered or unexported fields
}
Accessory knows how to run an executable with arguments for the duration of the context.
func NewAccessory ¶
NewAccessory creates a new accessory process.
type BindComputeOption ¶
func WithAPIExportsWorkloadBindOption ¶
func WithAPIExportsWorkloadBindOption(apiexports ...string) BindComputeOption
func WithLocationSelectorWorkloadBindOption ¶
func WithLocationSelectorWorkloadBindOption(selectors ...metav1.LabelSelector) BindComputeOption
func WithLocationWorkspaceWorkloadBindOption ¶
func WithLocationWorkspaceWorkloadBindOption(clusterName logicalcluster.Path) BindComputeOption
func WithNSSelectorWorkloadBindOption ¶
func WithNSSelectorWorkloadBindOption(selector metav1.LabelSelector) BindComputeOption
func WithPlacementNameBindOption ¶
func WithPlacementNameBindOption(placementName string) BindComputeOption
type ConditionEvaluator ¶
type ConditionEvaluator struct {
// contains filtered or unexported fields
}
func Is ¶
func Is(conditionType conditionsv1alpha1.ConditionType) *ConditionEvaluator
func IsNot ¶
func IsNot(conditionType conditionsv1alpha1.ConditionType) *ConditionEvaluator
func (*ConditionEvaluator) WithReason ¶
func (c *ConditionEvaluator) WithReason(reason string) *ConditionEvaluator
type Expectation ¶
Expectation closes over a statement of intent, allowing the caller to accumulate errors and determine when the expectation should cease to be evaluated.
type ExpectationController ¶
type ExpectationController struct {
// contains filtered or unexported fields
}
ExpectationController knows how to register expectations and trigger them.
func NewExpecter ¶
func NewExpecter(informer cache.SharedIndexInformer) *ExpectationController
NewExpecter creates a informer-driven registry of expectations, which will be triggered on every event that the informer ingests.
func (*ExpectationController) ExpectBefore ¶
func (c *ExpectationController) ExpectBefore(ctx context.Context, expectation Expectation, duration time.Duration) error
type Expecter ¶
type Expecter interface { // ExpectBefore will result in the Expectation being evaluated whenever // state changes, up until the desired timeout is reached. ExpectBefore(context.Context, Expectation, time.Duration) error }
Expecter allows callers to register expectations.
type PrivilegedWorkspaceOption ¶
type PrivilegedWorkspaceOption func(ws *tenancyv1alpha1.Workspace)
func WithRequiredGroups ¶
func WithRequiredGroups(groups ...string) PrivilegedWorkspaceOption
WithRequiredGroups is a privileged action, so we return a privileged option type, and only the helpers that use the system:master config can consume this. However, workspace initialization requires a valid user annotation on the workspace object to impersonate during initialization, and system:master bypasses setting that, so we end up needing to hard-code something conceivable.
type RegisterWorkspaceExpectation ¶
type RegisterWorkspaceExpectation func(seed *tenancyv1alpha1.Workspace, expectation WorkspaceExpectation) error
RegisterWorkspaceExpectation registers an expectation about the future state of the seed.
func ExpectWorkspaces ¶
func ExpectWorkspaces( ctx context.Context, t *testing.T, client kcpclient.Interface, ) (RegisterWorkspaceExpectation, error)
ExpectWorkspaces sets up an Expecter in order to allow registering expectations in tests with minimal setup.
type RegisterWorkspaceShardExpectation ¶
type RegisterWorkspaceShardExpectation func(seed *corev1alpha1.Shard, expectation WorkspaceShardExpectation) error
RegisterWorkspaceShardExpectation registers an expectation about the future state of the seed.
func ExpectWorkspaceShards ¶
func ExpectWorkspaceShards(ctx context.Context, t *testing.T, client kcpclient.Interface) (RegisterWorkspaceShardExpectation, error)
ExpectWorkspaceShards sets up an Expecter in order to allow registering expectations in tests with minimal setup.
type RunningServer ¶
type RunningServer interface { Name() string KubeconfigPath() string RawConfig() (clientcmdapi.Config, error) BaseConfig(t *testing.T) *rest.Config RootShardSystemMasterBaseConfig(t *testing.T) *rest.Config ShardSystemMasterBaseConfig(t *testing.T, shard string) *rest.Config ShardNames() []string Artifact(t *testing.T, producer func() (runtime.Object, error)) ClientCAUserConfig(t *testing.T, config *rest.Config, name string, groups ...string) *rest.Config CADirectory() string }
func NewFakeWorkloadServer ¶
func NewFakeWorkloadServer(t *testing.T, server RunningServer, org logicalcluster.Path, syncTargetName string) RunningServer
NewFakeWorkloadServer creates a workspace in the provided server and org and creates a server fixture for the logical cluster that results.
func PrivateKcpServer ¶
func PrivateKcpServer(t *testing.T, options ...TmcConfigOption) RunningServer
PrivateKcpServer returns a new kcp server fixture managing a new server process that is not intended to be shared between tests.
func SharedKcpServer ¶
func SharedKcpServer(t *testing.T) RunningServer
SharedKcpServer returns a kcp server fixture intended to be shared between tests. A persistent server will be configured if `--kcp-kubeconfig` or `--use-default-kcp-server` is supplied to the test runner. Otherwise a test-managed server will be started. Only tests that are known to be hermetic are compatible with shared fixture.
type StartedSyncerFixture ¶
type StartedSyncerFixture struct {
// contains filtered or unexported fields
}
StartedSyncerFixture contains the configuration used to start a syncer and interact with its downstream cluster.
func (*StartedSyncerFixture) DownstreamNamespaceFor ¶
func (sf *StartedSyncerFixture) DownstreamNamespaceFor(t *testing.T, upstreamWorkspace logicalcluster.Name, upstreamNamespace string) string
func (StartedSyncerFixture) StartAPIImporter ¶
StartAPIImporter starts the APIImporter the same way as the Syncer would have done if started. This will allow KCP to do the API compatibilitiy checks and update the SyncTarget accordingly. The real syncer is not started, and resource will be effectively synced after calling this method.
func (StartedSyncerFixture) StartHeartBeat ¶
func (sf StartedSyncerFixture) StartHeartBeat(t *testing.T) *StartedSyncerFixture
StartHeartBeat starts the Heartbeat keeper to maintain the SyncTarget to the Ready state. No resource will be effectively synced after calling this method.
func (StartedSyncerFixture) StartSyncer ¶
func (sf StartedSyncerFixture) StartSyncer(t *testing.T) *StartedSyncerFixture
StartSyncer starts a new Syncer against the upstream kcp workspaces Whether the syncer runs in-process or deployed on a pcluster will depend whether --pcluster-kubeconfig and --syncer-image are supplied to the test invocation.
func (StartedSyncerFixture) StartSyncerTunnel ¶
func (sf StartedSyncerFixture) StartSyncerTunnel(t *testing.T) *StartedSyncerFixture
func (*StartedSyncerFixture) StopHeartBeat ¶
func (sf *StartedSyncerFixture) StopHeartBeat(t *testing.T)
StopHeartBeat stop maintaining the heartbeat for this Syncer SyncTarget.
func (*StartedSyncerFixture) StopSyncerTunnel ¶
func (sf *StartedSyncerFixture) StopSyncerTunnel(t *testing.T)
StopSyncerTunnel stops the syncer tunnel, the syncer will close the reverse connection and pod subresources will not be available anymore.
func (*StartedSyncerFixture) ToSyncTargetKey ¶
func (sf *StartedSyncerFixture) ToSyncTargetKey() string
func (*StartedSyncerFixture) WaitForSyncTargetReady ¶
func (sf *StartedSyncerFixture) WaitForSyncTargetReady(ctx context.Context, t *testing.T)
WaitForSyncTargetReady waits for the SyncTarget to be ready. The SyncTarget becoming ready indicates that the syncer on the related physical cluster is healthy and has successfully sent a heartbeat to kcp.
type SyncTargetOption ¶
type SyncTargetOption func(cluster *workloadv1alpha1.SyncTarget)
type SyncerOption ¶
func WithAPIExports ¶
func WithAPIExports(exports ...string) SyncerOption
func WithDownstreamPreparation ¶
func WithDownstreamPreparation(prepare func(config *rest.Config, isFakePCluster bool)) SyncerOption
func WithExtraResources ¶
func WithExtraResources(resources ...string) SyncerOption
func WithSyncTargetLabels ¶
func WithSyncTargetLabels(labels map[string]string) SyncerOption
func WithSyncTargetName ¶
func WithSyncTargetName(name string) SyncerOption
func WithSyncedUserWorkspaces ¶
func WithSyncedUserWorkspaces(syncedUserWorkspaces ...*tenancyv1alpha1.Workspace) SyncerOption
type TmcConfigOption ¶
type TmcConfigOption func(*tmcConfig) *tmcConfig
TmcConfigOption a function that wish to modify a given tmc configuration.
func WithCustomArguments ¶
func WithCustomArguments(args ...string) TmcConfigOption
WithCustomArguments applies provided arguments to a given kcp configuration.
func WithScratchDirectories ¶
func WithScratchDirectories(artifactDir, dataDir string) TmcConfigOption
WithScratchDirectories adds custom scratch directories to a kcp configuration.
type UnprivilegedWorkspaceOption ¶
type UnprivilegedWorkspaceOption func(ws *tenancyv1alpha1.Workspace)
func TODO_WithoutMultiShardSupport ¶
func TODO_WithoutMultiShardSupport() UnprivilegedWorkspaceOption
func WithLocation ¶
func WithLocation(w tenancyv1alpha1.WorkspaceLocation) UnprivilegedWorkspaceOption
func WithName ¶
func WithName(s string, formatArgs ...interface{}) UnprivilegedWorkspaceOption
func WithNameSuffix ¶
func WithNameSuffix(suffix string) UnprivilegedWorkspaceOption
func WithRootShard ¶
func WithRootShard() UnprivilegedWorkspaceOption
func WithShard ¶
func WithShard(name string) UnprivilegedWorkspaceOption
func WithType ¶
func WithType(path logicalcluster.Path, name tenancyv1alpha1.WorkspaceTypeName) UnprivilegedWorkspaceOption
type WorkspaceExpectation ¶
type WorkspaceExpectation func(*tenancyv1alpha1.Workspace) error
WorkspaceExpectation evaluates an expectation about the object.
type WorkspaceOption ¶
type WorkspaceOption interface { PrivilegedWorkspaceOption | UnprivilegedWorkspaceOption }
type WorkspaceShardExpectation ¶
type WorkspaceShardExpectation func(*corev1alpha1.Shard) error
WorkspaceShardExpectation evaluates an expectation about the object.