Skip to content

namespace

Contents

NamespaceService

(-- api-linter: core::0132::http-body=disabled api-linter: core::0132::http-method=disabled aip.dev/not-precedent: We need to do this because we can't have advance filters as query params. --) NamespaceService provides APIs to list namespaces on the control plane.

ListNamespaces

rpc ListNamespaces(ListNamespacesRequest) ListNamespacesResponse

ListNamespaces API will return all the namespaces on the control plane.

DeleteNamespace

rpc DeleteNamespace(DeleteNamespaceRequest) .google.protobuf.Empty

DeleteNamespace API will trigger deletion and cleanup on the control plane.

Messages

DeleteNamespaceRequest

Delete namespace request.

Field Type Description
id string ID of the namespace instance.

ListNamespacesRequest

ListNamespacesRequest request message for the ListNamespaces API.

Field Type Description
tenant_id string Tenant (Organization) ID for which namespace need to be fetched.
label_selector public.portworx.common.v1.Selector Provides the key in labels and associated values for which namespaces need to be listed.
field_selector public.portworx.common.v1.Selector Field selector is used to filter namespaces based on the fields in the namespace's proto message.
infra_resource_selector public.portworx.common.v1.ResourceSelector Infra_resource_selector is used to filter namespaces based on the infra resources associated with the namespace. Supported infra resource filters: PROJECT, CLUSTER.
resp_data public.portworx.common.v1.RespData Response data flags for listing cloud credentials.
sort public.portworx.common.v1.Sort Sorting details using which requested list of namespaces to be sorted.
pagination public.portworx.common.v1.PageBasedPaginationRequest Pagination parameters for listing namespaces.

ListNamespacesResponse

ListNamespacesResponse response message for the ListNamespaces API.

Field Type Description
namespaces repeated Namespace list of namespaces.
pagination public.portworx.common.v1.PageBasedPaginationResponse Pagination metadata for this response. (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this field for pagination. --)

Namespace

A managed Kubernetes namespace.

Field Type Description
meta public.portworx.common.v1.Meta Metadata of the namespace.
status NamespaceStatus status of the namespace resource.

NamespacePhase

NamespaceStatus is the current state of the namespace.

NamespaceStatus

NamespaceStatus represents the status of the namespace resource.

Field Type Description
phase NamespacePhase.Phase phase of a namespace is determined based on the available label on the namespace object.

Enums

NamespacePhase.Phase

Phase is the status of the namespace based on the label type.

Name Number Description
PHASE_UNSPECIFIED 0 Must be set in the proto file; ignore.
AVAILABLE 1 Available namespaces can be used to deploy applications, they have "/available: true" label.
RESERVED 2 Reserved namespaces are used by platform agents and cannot be used to deploy applications, they have "/reserved: true" label.
UNAVAILABLE 3 Unavailable namespaces are the ones deleted by user with active deployments or by removing available label.
TERMINATING 4 Termintaing state represents, namespace deletion is in progress on the target cluster.
TOMBSTONED 5 Tombstoned state represents namespace has been deleted from the cluster.
DELETE_PENDING 6 Deletion of namespace is yet to start.
DELETE_IN_PROGRESS 7 Deletion of the namespace is scheduled and in progress.
DELETE_FAILED 8 Deletion failed.

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type

double
double double float

float
float float float

int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int

int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long

uint32
Uses variable-length encoding. uint32 int int/long

uint64
Uses variable-length encoding. uint64 long int/long

sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int

sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long

fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int

fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long

sfixed32
Always four bytes. int32 int int

sfixed64
Always eight bytes. int64 long int/long

bool
bool boolean boolean

string
A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode

bytes
May contain any arbitrary sequence of bytes. string ByteString str