Skip to content

Class: PersistentVolume#

Renderer.K8sApi.PersistentVolume

Hierarchy#

PersistentVolume

Table of contents#

Constructors#

Properties#

Accessors#

Methods#

Constructors#

constructor#

new PersistentVolume(data)

Parameters#

Name Type
data KubeJsonApiData

Inherited from#

KubeObject.constructor

Properties#

apiVersion#

apiVersion: string

Inherited from#

KubeObject.apiVersion


kind#

kind: string

Inherited from#

KubeObject.kind


managedFields#

Optional managedFields: any

Inherited from#

KubeObject.managedFields


metadata#

metadata: KubeObjectMetadata

Inherited from#

KubeObject.metadata


spec#

spec: Object

Type declaration#

Name Type
accessModes string[]
capacity Object
capacity.storage string
claimRef Object
claimRef.apiVersion string
claimRef.kind string
claimRef.name string
claimRef.namespace string
claimRef.resourceVersion string
claimRef.uid string
flexVolume Object
flexVolume.driver string
flexVolume.options Object
flexVolume.options.clusterNamespace string
flexVolume.options.image string
flexVolume.options.pool string
flexVolume.options.storageClass string
mountOptions? string[]
nfs? Object
nfs.path string
nfs.server string
persistentVolumeReclaimPolicy string
storageClassName string

Inherited from#

KubeObject.spec


status#

Optional status: Object

Type declaration#

Name Type
phase string
reason? string

Inherited from#

KubeObject.status


apiBase#

Static apiBase: string = "/api/v1/persistentvolumes"

Inherited from#

KubeObject.apiBase


kind#

Static kind: string = "PersistentVolume"

Inherited from#

KubeObject.kind


namespaced#

Static namespaced: boolean = false

Inherited from#

KubeObject.namespaced

Accessors#

get selfLink(): string

Returns#

string

Methods#

delete#

delete(params?): Promise<KubeJsonApiData>

deprecated use KubeApi.delete instead

Parameters#

Name Type
params? JsonApiParams<any>

Returns#

Promise<KubeJsonApiData>

Inherited from#

KubeObject.delete


getAge#

getAge(humanize?, compact?, fromNow?): string | number

deprecated This function computes a new "now" on every call might cause subtle issues if called multiple times

NOTE: this function also is not reactive to updates in the current time so it should not be used for renderering

Parameters#

Name Type Default value
humanize boolean true
compact boolean true
fromNow boolean false

Returns#

string | number

Inherited from#

KubeObject.getAge


getAnnotations#

getAnnotations(filter?): string[]

Parameters#

Name Type Default value
filter boolean false

Returns#

string[]

Inherited from#

KubeObject.getAnnotations


getCapacity#

getCapacity(inBytes?): string | number

Parameters#

Name Type Default value
inBytes boolean false

Returns#

string | number


getClaimRefName#

getClaimRefName(): string

Returns#

string


getCreationTimestamp#

getCreationTimestamp(): number

This function computes the number of milliseconds from the UNIX EPOCH to the creation timestamp of this object.

Returns#

number

Inherited from#

KubeObject.getCreationTimestamp


getFinalizers#

getFinalizers(): string[]

Returns#

string[]

Inherited from#

KubeObject.getFinalizers


getId#

getId(): string

Returns#

string

Inherited from#

KubeObject.getId


getLabels#

getLabels(): string[]

Returns#

string[]

Inherited from#

KubeObject.getLabels


getName#

getName(): string

Returns#

string

Inherited from#

KubeObject.getName


getNs#

getNs(): string

Returns#

string

Inherited from#

KubeObject.getNs


getOwnerRefs#

getOwnerRefs(): { apiVersion: string ; blockOwnerDeletion: boolean ; controller: boolean ; kind: string ; name: string ; namespace: string ; uid: string }[]

Returns#

{ apiVersion: string ; blockOwnerDeletion: boolean ; controller: boolean ; kind: string ; name: string ; namespace: string ; uid: string }[]

Inherited from#

KubeObject.getOwnerRefs


getResourceVersion#

getResourceVersion(): string

Returns#

string

Inherited from#

KubeObject.getResourceVersion


getSearchFields#

getSearchFields(): string[]

Returns#

string[]

Inherited from#

KubeObject.getSearchFields


getStatus#

getStatus(): string

Returns#

string


getStorageClass#

getStorageClass(): string

Returns#

string


getStorageClassName#

getStorageClassName(): string

Returns#

string


getTimeDiffFromNow#

getTimeDiffFromNow(): number

deprecated This function computes a new "now" on every call which might cause subtle issues if called multiple times

NOTE: Generally you can use getCreationTimestamp instead.

Returns#

number

Inherited from#

KubeObject.getTimeDiffFromNow


patch#

patch(patch): Promise<KubeJsonApiData>

deprecated use KubeApi.patch instead

Parameters#

Name Type
patch Patch

Returns#

Promise<KubeJsonApiData>

Inherited from#

KubeObject.patch


toPlainObject#

toPlainObject(): object

Returns#

object

Inherited from#

KubeObject.toPlainObject


update#

update(data): Promise<KubeJsonApiData>

Perform a full update (or more specifically a replace)

Note: this is brittle if data is not actually partial (but instead whole). As fields such as resourceVersion will probably out of date. This is a common race condition.

deprecated use KubeApi.update instead

Parameters#

Name Type
data Partial<PersistentVolume>

Returns#

Promise<KubeJsonApiData>

Inherited from#

KubeObject.update


create#

Static create(data): KubeObject<KubeObjectMetadata, any, any>

Parameters#

Name Type
data KubeJsonApiData

Returns#

KubeObject<KubeObjectMetadata, any, any>

Inherited from#

KubeObject.create


isJsonApiData#

Static isJsonApiData(object): object is KubeJsonApiData

Parameters#

Name Type
object unknown

Returns#

object is KubeJsonApiData

Inherited from#

KubeObject.isJsonApiData


isJsonApiDataList#

Static isJsonApiDataList<T>(object, verifyItem): object is KubeJsonApiDataList<T>

Type parameters#

Name
T

Parameters#

Name Type
object unknown
verifyItem (val: unknown) => val is T

Returns#

object is KubeJsonApiDataList<T>

Inherited from#

KubeObject.isJsonApiDataList


isKubeJsonApiListMetadata#

Static isKubeJsonApiListMetadata(object): object is KubeJsonApiListMetadata

Parameters#

Name Type
object unknown

Returns#

object is KubeJsonApiListMetadata

Inherited from#

KubeObject.isKubeJsonApiListMetadata


isKubeJsonApiMetadata#

Static isKubeJsonApiMetadata(object): object is KubeJsonApiMetadata

Parameters#

Name Type
object unknown

Returns#

object is KubeJsonApiMetadata

Inherited from#

KubeObject.isKubeJsonApiMetadata


isNonSystem#

Static isNonSystem(item): boolean

Parameters#

Name Type
item KubeObject<KubeObjectMetadata, any, any> | KubeJsonApiData

Returns#

boolean

Inherited from#

KubeObject.isNonSystem


isPartialJsonApiData#

Static isPartialJsonApiData(object): object is Partial<KubeJsonApiData>

Parameters#

Name Type
object unknown

Returns#

object is Partial<KubeJsonApiData>

Inherited from#

KubeObject.isPartialJsonApiData


isPartialJsonApiMetadata#

Static isPartialJsonApiMetadata(object): object is Partial<KubeJsonApiMetadata>

Parameters#

Name Type
object unknown

Returns#

object is Partial<KubeJsonApiMetadata>

Inherited from#

KubeObject.isPartialJsonApiMetadata


stringifyLabels#

Static stringifyLabels(labels?): string[]

Parameters#

Name Type
labels? Object

Returns#

string[]

Inherited from#

KubeObject.stringifyLabels