ManageResources Service
Service to manage and clean up resources in TSB.
ManageResources
CleanupResources
CleanupResourcesRequest
Request message for finding and optionally cleaning up resources.
| Field | Description | Validation Rule |
|---|---|---|
usage | tetrateio.api.tsb.v2.CleanupResourcesRequest.Usage | – |
hostname | string | – |
path | string | – |
apply | bool | – |
force | bool | – |
CleanupResourcesResponse
Response message for cleanup of unused resources.
| Field | Description | Validation Rule |
|---|---|---|
changes | List of tetrateio.api.tsb.v2.CleanupResourcesResponse.Change | – |
applied | bool | – |
Change
Change represents a proposed or applied modification to a resource.
| Field | Description | Validation Rule |
|---|---|---|
fqn | string | – |
kind | string | – |
action | – | |
reason | tetrateio.api.tsb.v2.CleanupResourcesResponse.Change.ReasonType | – |
used | bool | – |
istioGateway | tetrateio.api.tsb.v2.CleanupResourcesResponse.IstioGatewayDetails oneof _details | – |
unifiedGateway | tetrateio.api.tsb.v2.CleanupResourcesResponse.UnifiedGatewayDetails oneof _details | – |
virtualService | tetrateio.api.tsb.v2.CleanupResourcesResponse.VirtualServiceDetails oneof _details | – |
destinationRule | tetrateio.api.tsb.v2.CleanupResourcesResponse.DestinationRuleDetails oneof _details | – |
workspace | tetrateio.api.tsb.v2.CleanupResourcesResponse.WorkspaceDetails oneof _details | – |
DestinationRuleDetails
DestinationRuleDetails provides context for DestinationRule changes.
| Field | Description | Validation Rule |
|---|---|---|
host | string | – |
IstioGatewayDetails
IstioGatewayDetails provides context for Istio Gateway changes.
| Field | Description | Validation Rule |
|---|---|---|
hosts | List of string | – |
UnifiedGatewayDetails
UnifiedGatewayDetails provides context for TSB Unified Gateway changes.
| Field | Description | Validation Rule |
|---|---|---|
httpHosts | List of string | – |
tcpHosts | List of string | – |
tlsHosts | List of string | – |
VirtualServiceDetails
VirtualServiceDetails provides context for VirtualService changes.
| Field | Description | Validation Rule |
|---|---|---|
httpHosts | List of string | – |
tcpHosts | List of string | – |
tlsHosts | List of string | – |
WorkspaceDetails
WorkspaceDetails provides context for Workspace changes.
| Field | Description | Validation Rule |
|---|---|---|
namespaceSelectors | List of string | – |
Usage
| Field | Number | Description |
|---|---|---|
ANY | 0 | Default value. Returns all resources (both in-use and unused). It requires a hostname to be set. |
IN_USE | 1 | Returns only resources that are currently in use. It requires a hostname to be set. |
UNUSED | 2 | Returns only resources that are currently unused. |
Action
The action to be taken or that was taken on the resource.
| Field | Number | Description |
|---|---|---|
NONE | 0 | The resource will not be changed. It is either still used by other active routes, or requires force to be removed. |
UPDATE | 1 | The resource will be updated (e.g., hosts removed). Action returned during dry-run (apply=false). An update is proposed when the resource serves multiple routes, including the target hostname/path (if specified), and can be partially updated (e.g., remove a specific HTTP server from a TSB Gateway, or remove specific routes from a VirtualService). |
DELETE | 2 | The resource will be deleted. Action returned during dry-run (apply=false). A deletion is proposed when the resource is used exclusively by the target hostname/path (if specified), or when the resource is unused. |
UPDATED | 3 | The resource has been updated (e.g. remove hosts). Action returned when apply=true. |
DELETED | 4 | The resource has been deleted. Action returned when apply=true. |
ReasonType
Reason enumeration explaining why a resource requires change or is displayed.
| Field | Number | Description |
|---|---|---|
REASON_UNSPECIFIED | 0 | |
ALL_HOSTS_UNUSED | 1 | All hostnames on the resource were not found; suggests a deletion. |
SOME_HOSTS_UNUSED | 2 | Some hostnames on the resource are unused; suggests an update. |
HOST_DECOMMISSIONED | 3 | The provided hostname has been found in the resource; suggests an update or deletion to decommission it. |
ALL_NAMESPACE_SELECTORS_INEFFECTIVE | 4 | All namespace selectors are ineffective, with no services in these namespaces. It suggests a deletion of the workspace. |
RESOURCE_USED_BY_OTHER_ROUTES | 5 | The resource is still referenced by other routes and is only displayed. For example, DestinationRules when multiple routes reference the same service. Decommissioning one route will not remove the resource. |
RESOURCE_IN_USE_REQUIRES_FORCE | 6 | The resource is still in use by the specified hostname/path and requires force to be removed. |