Skip to main content
logoTetrate Service BridgeVersion: next

ManageResources Service

Service to manage and clean up resources in TSB.

ManageResources

CleanupResources

CleanupResourcesRequest

Request message for finding and optionally cleaning up resources.

FieldDescriptionValidation Rule

usage

tetrateio.api.tsb.v2.CleanupResourcesRequest.Usage
The type of resources to target for cleanup. Note: when hostname is not set, usage has to be set to UNUSED.

hostname

string
Optional hostname filter: return or apply changes only for resources related to the specified hostname (for example, gateways exposing it).

path

string
Optional path filter: specify a specific path to further narrow down the resources. Requires hostname to be set.

apply

bool
When true, applies the changes; when false or unset, performs a dry-run.

force

bool
When true, forces the changes even when the resources are still marked as in use.

CleanupResourcesResponse

Response message for cleanup of unused resources.

FieldDescriptionValidation Rule

changes

List of tetrateio.api.tsb.v2.CleanupResourcesResponse.Change
The set of proposed or applied changes.

applied

bool
True if the request was executed with apply=true and the changes were applied. False indicates a dry-run with no changes enforced.

Change

Change represents a proposed or applied modification to a resource.

FieldDescriptionValidation Rule

fqn

string
Fully-qualified name of the resource.

kind

string
The kind of the resource (e.g., VirtualService, DestinationRule, Gateway, Workspace).

action

tetrateio.api.tsb.v2.CleanupResourcesResponse.Change.Action

reason

tetrateio.api.tsb.v2.CleanupResourcesResponse.Change.ReasonType
The specific reason for the change or display.

used

bool
Indicates whether the resource is still in use by an existing service.

istioGateway

tetrateio.api.tsb.v2.CleanupResourcesResponse.IstioGatewayDetails oneof _details
Istio Gateway-related details indicating which hosts will be removed.

unifiedGateway

tetrateio.api.tsb.v2.CleanupResourcesResponse.UnifiedGatewayDetails oneof _details
TSB Unified Gateway-related details with which categorized hosts will be removed.

virtualService

tetrateio.api.tsb.v2.CleanupResourcesResponse.VirtualServiceDetails oneof _details
VirtualService-related details indicating which hosts will be removed.

destinationRule

tetrateio.api.tsb.v2.CleanupResourcesResponse.DestinationRuleDetails oneof _details
DestinationRule-related details indicating the host associated with the rule.

workspace

tetrateio.api.tsb.v2.CleanupResourcesResponse.WorkspaceDetails oneof _details
Workspace-related details indicating ineffective namespace selectors.

DestinationRuleDetails

DestinationRuleDetails provides context for DestinationRule changes.

FieldDescriptionValidation Rule

host

string
The destination hostname associated with the rule.

IstioGatewayDetails

IstioGatewayDetails provides context for Istio Gateway changes.

FieldDescriptionValidation Rule

hosts

List of string
Hostnames on the gateway that would or have been removed.

UnifiedGatewayDetails

UnifiedGatewayDetails provides context for TSB Unified Gateway changes.

FieldDescriptionValidation Rule

httpHosts

List of string
HTTP hostnames that would or have been removed.

tcpHosts

List of string
TCP hostnames that would or have been removed.

tlsHosts

List of string
TLS hostnames that would or have been removed.

VirtualServiceDetails

VirtualServiceDetails provides context for VirtualService changes.

FieldDescriptionValidation Rule

httpHosts

List of string
HTTP hostnames that would or have been removed.

tcpHosts

List of string
TCP hostnames that would or have been removed.

tlsHosts

List of string
TLS hostnames that would or have been removed.

WorkspaceDetails

WorkspaceDetails provides context for Workspace changes.

FieldDescriptionValidation Rule

namespaceSelectors

List of string
Namespace selectors that are ineffective for this Workspace.

Usage

FieldNumberDescription

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.

FieldNumberDescription

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.

FieldNumberDescription

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.