Documentation ¶
Index ¶
- Variables
- func InternalListOptionsToSelectors(options *metainternal.ListOptions) (labels.Selector, fields.Selector)
- type FilteredClusterWorkspaces
- type REST
- func (s *REST) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (s *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, ...) (runtime.Object, bool, error)
- func (s *REST) Destroy()
- func (s *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (s *REST) List(ctx context.Context, options *metainternal.ListOptions) (runtime.Object, error)
- func (s *REST) NamespaceScoped() bool
- func (s *REST) New() runtime.Object
- func (*REST) NewList() runtime.Object
- func (s *REST) Watch(ctx context.Context, options *metainternal.ListOptions) (watch.Interface, error)
- type WorkspacesScopeKeyType
Constants ¶
This section is empty.
Variables ¶
var Strategy = workspaceStrategy{typerSchema, names.SimpleNameGenerator}
Strategy is the default logic that applies when creating and updating Project objects via the REST API.
Functions ¶
func InternalListOptionsToSelectors ¶
func InternalListOptionsToSelectors(options *metainternal.ListOptions) (labels.Selector, fields.Selector)
Types ¶
type FilteredClusterWorkspaces ¶ added in v0.6.0
type FilteredClusterWorkspaces interface { workspaceauth.Lister workspaceauth.WatchableCache AddWatcher(watcher workspaceauth.CacheWatcher) Stop() }
FilteredClusterWorkspaces allows to list and watch ClusterWorkspaces filtered by authorizaation, i.e. a user only sees those object he has access to.
type REST ¶
type REST struct { rest.TableConvertor // contains filtered or unexported fields }
func NewREST ¶
func NewREST( kubeClusterClient kubernetesclient.ClusterInterface, kcpClusterClient kcpclient.ClusterInterface, clusterWorkspaceCache *workspacecache.ClusterWorkspaceCache, wildcardsCRBInformer rbacinformers.ClusterRoleBindingInformer, getFilteredClusterWorkspaces func(orgClusterName logicalcluster.Name) FilteredClusterWorkspaces, ) *REST
NewREST returns a RESTStorage object that will work against ClusterWorkspace resources in org workspaces, projecting them to the Workspace type.
func (*REST) Create ¶
func (s *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)
Create creates a new workspace. The corresponding ClusterWorkspace resource is created in the underlying KCP server.
Workspace creation also creates a ClusterRole and a ClusterRoleBinding that links the ClusterRole with the user Subject.
This will give the workspace creator the following permissions on the newly-created workspace: - 'cluster-admin' inside the newly created workspace, - 'get' permission to the workspace resource itself, so that it would appear when listing workspaces in the parent - 'delete' permission so that the user can delete a workspace it has created.
func (*REST) Get ¶
func (s *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
Get retrieves a Workspace by name
func (*REST) List ¶
func (s *REST) List(ctx context.Context, options *metainternal.ListOptions) (runtime.Object, error)
List retrieves a list of Workspaces that match label.
func (*REST) NamespaceScoped ¶
func (*REST) Watch ¶ added in v0.6.0
func (s *REST) Watch(ctx context.Context, options *metainternal.ListOptions) (watch.Interface, error)
type WorkspacesScopeKeyType ¶
type WorkspacesScopeKeyType string
const (
WorkspacesOrgKey WorkspacesScopeKeyType = "VirtualWorkspaceWorkspacesOrg"
)