workspace.proto

Package : admin.gloo.solo.io

Top

workspace.proto

Table of Contents

ClusterSelector

Select clusters and namespaces for a workspace

Field Type Label Description
name string Optional: Name of the cluster to select. Use * to match name patterns in multiple clusters name.
selector []admin.gloo.solo.io.ClusterSelector.SelectorEntry repeated Optional: Include workload clusters in the workspace by using a selector. The selector matches the selector values in the KubernetesCluster resource on the management cluster. Selector is a map of {key,value} pairs. A single {key,value} in the selector map is equivalent to an element of labelRequirements, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
namespaces []admin.gloo.solo.io.ClusterSelector.NamespaceSelector repeated Select the namespaces in the cluster(s) to include in the workspace. If you do not select any namespaces, the workspace is empty and results in an error.
configEnabled bool Optional: Enable configuration from this workload cluster. (default: true unless explicitly enabled for any selected clusters or namespaces)

ClusterSelector.NamespaceSelector

Select namespaces for the selected cluster(s)

Field Type Label Description
name string name of the namespace to select. can use * to match name patterns in multiple namespaces.
configEnabled bool Optional: Enable configuration from this namespace. (default: true unless explicitly enabled for any selected clusters or namespaces)

ClusterSelector.SelectorEntry

Field Type Label Description
key string
value string

WorkspaceSpec

Workspace describes a logical grouping of Kubernetes namespaces within the clusters that are part of a virtual mesh. Workspace can be treated as a boundary for configuration and service discovery. The specification describes how to select namespaces or/and clusters for a given workspace.
The workspace-wide settings such as importFrom, exportTo are configured in the WorkspaceSettings object. Refer to the WorkspaceSettings documentation for details.
The following example creates the web workspace that selects all workload clusters and all namespaces within those clusters to be part of the workspace. yaml apiVersion: admin.gloo.solo.io/v2 kind: Workspace metadata: name: web namespace: gloo-mesh spec: workloadClusters: - name: "*" namespaces: - name: "*"
The following configuration creates the web workspace that selects the web namespace from all workload clusters that have the label of region: us-east to be part of the workspace. Refer to the KubernetesCluster documentation for examples on how to label your KubernetesCluster resource. yaml apiVersion: admin.gloo.solo.io/v2 kind: Workspace metadata: name: web namespace: gloo-mesh spec: workloadClusters: - selector: region: us-east namespaces: - name: web
The following example creates the policy namespace that does NOT have any workload clusters. This workspace also has the gloo.solo.io/global label which other workspaces can use to import this workspace by label in their WorkspaceSettings resource. yaml apiVersion: admin.gloo.solo.io/v2 kind: Workspace metadata: name: policy namespace: gloo-mesh labels: gloo.solo.io/global: 'true'
The example below creates the backend workspace that select any namespace that starts with ns1 in cluster1 and any namespace that starts with ns2 in cluster2. It has the gloo.solo.io/exportToGateway label, which other workspaces can use to import this workspace by label in their WorkspaceSettings resource. Refer to the KubernetesCluster documentation for examples on how to name your KubernetesCluster resource. yaml apiVersion: admin.gloo.solo.io/v2 kind: Workspace metadata: name: backend namespace: gloo-mesh labels: gloo.solo.io/exportToGateway: tier1 team: backend spec: workloadClusters: - name: cluster1 namespaces: - name: ns1* - name: cluster2 namespaces: - name: ns2*

Field Type Label Description
workloadClusters []admin.gloo.solo.io.ClusterSelector repeated Optional: Select workload clusters and namespaces for the workload clusters that are part of the workspace. When this is not specified, the workspace contains no workload clusters.

WorkspaceStatus

reflects the status of the workspace

Field Type Label Description
generic common.gloo.solo.io.GenericContextStatus
workspaceSettings common.gloo.solo.io.ObjectReference The workspacesettings object configuring this workspace.
clusters []admin.gloo.solo.io.WorkspaceStatus.SelectedCluster repeated Clusters that this workspace selects. These cluster objects contain the namespaces that the workspace owns within them.
resources []admin.gloo.solo.io.WorkspaceStatus.ResourcesEntry repeated gvk -> private/export/import reference
policyCounts []admin.gloo.solo.io.WorkspaceStatus.PolicyCountsEntry repeated policy resource counts in this workspace by type (security, trafficcontrol, resilience, observability)
destinationCounts []admin.gloo.solo.io.WorkspaceStatus.DestinationCountsEntry repeated destination resource counts in this workspace by type (k8s service, virtual destination, external service)
importedWorkspaces []string repeated list of workspaces imported into this workspace

WorkspaceStatus.DestinationCountsEntry

Field Type Label Description
key string
value int32

WorkspaceStatus.Exported

Field Type Label Description
objectReferences []common.gloo.solo.io.ObjectReference repeated

WorkspaceStatus.Imported

Field Type Label Description
objectReferences []common.gloo.solo.io.ObjectReference repeated

WorkspaceStatus.PolicyCountsEntry

Field Type Label Description
key string
value int32

WorkspaceStatus.Private

Field Type Label Description
objectReferences []common.gloo.solo.io.ObjectReference repeated

WorkspaceStatus.ResourcesEntry

Field Type Label Description
key string
value admin.gloo.solo.io.WorkspaceStatus.SourceType

WorkspaceStatus.SelectedCluster

Represents a cluster that gloo mesh successfully associates to a workspace based on the WorkspaceSpec.

Field Type Label Description
name string Name of a cluster that this workspace selects
namespaces []string repeated Namespaces inside the cluster that this workspace owns.

WorkspaceStatus.SourceType

Field Type Label Description
imported admin.gloo.solo.io.WorkspaceStatus.Imported
exported admin.gloo.solo.io.WorkspaceStatus.Exported
private admin.gloo.solo.io.WorkspaceStatus.Private