@k8slens/extensions / Exports / Main / K8sApi / CustomResourceDefinition
Class: CustomResourceDefinition#
Main.K8sApi.CustomResourceDefinition
Hierarchy#
- KubeObject<- ClusterScopedMetadata,- CustomResourceDefinitionStatus,- CustomResourceDefinitionSpec>
↳ CustomResourceDefinition
Table of contents#
Constructors#
Properties#
- apiVersion
- kind
- metadata
- spec
- status
- apiBase
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- kind
- namespaced
- stringifyLabels
Accessors#
Methods#
- delete
- getAge
- getAnnotations
- getConditions
- getConversion
- getCreationTimestamp
- getFinalizers
- getGroup
- getId
- getLabels
- getName
- getNames
- getNs
- getOwnerRefs
- getPluralName
- getPreferedVersion
- getPreferredVersion
- getPrinterColumns
- getResourceApiBase
- getResourceKind
- getResourceTitle
- getResourceUrl
- getResourceVersion
- getScope
- getScopedName
- getSearchFields
- getStoredVersions
- getTimeDiffFromNow
- getValidation
- getVersion
- isNamespaced
- patch
- toPlainObject
- update
Constructors#
constructor#
• new CustomResourceDefinition(data)
Parameters#
| Name | Type | 
|---|---|
| data | KubeJsonApiData<ClusterScopedMetadata,CustomResourceDefinitionStatus,CustomResourceDefinitionSpec> | 
Inherited from#
Properties#
apiVersion#
• apiVersion: string
Inherited from#
kind#
• kind: string
Inherited from#
metadata#
• metadata: ClusterScopedMetadata
Inherited from#
spec#
• spec: CustomResourceDefinitionSpec
Inherited from#
status#
• Optional status: CustomResourceDefinitionStatus
Inherited from#
apiBase#
▪ Static apiBase: string
Overrides#
create#
▪ Static create: <Metadata, Status, Spec>(data: KubeJsonApiData<Metadata, Status, Spec>) => KubeObject<Metadata, Status, Spec>
Type declaration#
▸ <Metadata, Status, Spec>(data): KubeObject<Metadata, Status, Spec>
Deprecated
Switch to using __type instead
Type parameters#
| Name | Type | 
|---|---|
| Metadata | extends KubeObjectMetadata<KubeObjectScope> =KubeObjectMetadata<KubeObjectScope> | 
| Status | unknown | 
| Spec | unknown | 
Parameters#
| Name | Type | 
|---|---|
| data | KubeJsonApiData<Metadata,Status,Spec> | 
Returns#
KubeObject<Metadata, Status, Spec>
Inherited from#
isJsonApiData#
▪ Static isJsonApiData: (object: unknown) => object is KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>
Type declaration#
▸ (object): object is KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
Returns#
object is KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>
Inherited from#
isJsonApiDataList#
▪ Static isJsonApiDataList: object: unknown, verifyItem: (val: unknown) => val is T) => object is KubeJsonApiDataList<T>
Type declaration#
▸ <T>(object, verifyItem): object is KubeJsonApiDataList<T>
Deprecated
Switch to using __type instead
Type parameters#
| Name | 
|---|
| T | 
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
| verifyItem | ( val:unknown) => val is T | 
Returns#
object is KubeJsonApiDataList<T>
Inherited from#
isKubeJsonApiListMetadata#
▪ Static isKubeJsonApiListMetadata: (object: unknown) => object is KubeJsonApiListMetadata
Type declaration#
▸ (object): object is KubeJsonApiListMetadata
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
Returns#
object is KubeJsonApiListMetadata
Inherited from#
KubeObject.isKubeJsonApiListMetadata
isKubeJsonApiMetadata#
▪ Static isKubeJsonApiMetadata: (object: unknown) => object is KubeJsonApiObjectMetadata<KubeObjectScope>
Type declaration#
▸ (object): object is KubeJsonApiObjectMetadata<KubeObjectScope>
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
Returns#
object is KubeJsonApiObjectMetadata<KubeObjectScope>
Inherited from#
KubeObject.isKubeJsonApiMetadata
isNonSystem#
▪ Static isNonSystem: (item: KubeObject<KubeObjectMetadata<KubeObjectScope>, unknown, unknown> | KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>) => boolean
Type declaration#
▸ (item): boolean
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| item | KubeObject<KubeObjectMetadata<KubeObjectScope>,unknown,unknown> |KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>,unknown,unknown> | 
Returns#
boolean
Inherited from#
isPartialJsonApiData#
▪ Static isPartialJsonApiData: (object: unknown) => object is Partial<KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Type declaration#
▸ (object): object is Partial<KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
Returns#
object is Partial<KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Inherited from#
KubeObject.isPartialJsonApiData
isPartialJsonApiMetadata#
▪ Static isPartialJsonApiMetadata: (object: unknown) => object is Partial<KubeJsonApiObjectMetadata<KubeObjectScope>>
Type declaration#
▸ (object): object is Partial<KubeJsonApiObjectMetadata<KubeObjectScope>>
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| object | unknown | 
Returns#
object is Partial<KubeJsonApiObjectMetadata<KubeObjectScope>>
Inherited from#
KubeObject.isPartialJsonApiMetadata
kind#
▪ Static kind: string
Overrides#
namespaced#
▪ Static namespaced: boolean
Overrides#
stringifyLabels#
▪ Static stringifyLabels: (labels?: Partial<Record<string, string>>) => string[]
Type declaration#
▸ (labels?): string[]
Deprecated
Switch to using __type instead
Parameters#
| Name | Type | 
|---|---|
| labels? | Partial<Record<string,string>> | 
Returns#
string[]
Inherited from#
Accessors#
selfLink#
• get selfLink(): string
Returns#
string
Inherited from#
KubeObject.selfLink
Methods#
delete#
▸ delete(params?): void
Deprecated
use KubeApi.delete instead
Parameters#
| Name | Type | 
|---|---|
| params? | object | 
Returns#
void
Inherited from#
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 rendering
Parameters#
| Name | Type | 
|---|---|
| humanize? | boolean | 
| compact? | boolean | 
| fromNow? | boolean | 
Returns#
string | number
Inherited from#
getAnnotations#
▸ getAnnotations(filter?): string[]
Parameters#
| Name | Type | 
|---|---|
| filter? | boolean | 
Returns#
string[]
Inherited from#
getConditions#
▸ getConditions(): { isReady: boolean ; lastTransitionTime?: string ; message?: string ; reason?: string ; status: "True" | "False" | "Unknown" ; tooltip: string ; type: string  }[]
Returns#
{ isReady: boolean ; lastTransitionTime?: string ; message?: string ; reason?: string ; status: "True" | "False" | "Unknown" ; tooltip: string ; type: string  }[]
getConversion#
▸ getConversion(): 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#
getGroup#
▸ getGroup(): string
Returns#
string
getId#
▸ getId(): string
Returns#
string
Inherited from#
getLabels#
▸ getLabels(): string[]
Returns#
string[]
Inherited from#
getName#
▸ getName(): string
Returns#
string
Inherited from#
getNames#
▸ getNames(): CustomResourceDefinitionNames
Returns#
CustomResourceDefinitionNames
getNs#
▸ getNs(): undefined
Returns#
undefined
Inherited from#
getOwnerRefs#
▸ getOwnerRefs(): { apiVersion: string ; blockOwnerDeletion?: boolean ; controller?: boolean ; kind: string ; name: string ; namespace: undefined ; uid: string  }[]
Returns#
{ apiVersion: string ; blockOwnerDeletion?: boolean ; controller?: boolean ; kind: string ; name: string ; namespace: undefined ; uid: string  }[]
Inherited from#
getPluralName#
▸ getPluralName(): string
Returns#
string
getPreferedVersion#
▸ getPreferedVersion(): CustomResourceDefinitionVersion
Deprecated
Switch to using getPreferredVersion instead (which fixes the is a typo)
Returns#
CustomResourceDefinitionVersion
getPreferredVersion#
▸ getPreferredVersion(): CustomResourceDefinitionVersion
Returns#
CustomResourceDefinitionVersion
getPrinterColumns#
▸ getPrinterColumns(ignorePriority?): AdditionalPrinterColumnsV1[]
Parameters#
| Name | Type | 
|---|---|
| ignorePriority? | boolean | 
Returns#
AdditionalPrinterColumnsV1[]
getResourceApiBase#
▸ getResourceApiBase(): string
Returns#
string
getResourceKind#
▸ getResourceKind(): string
Returns#
string
getResourceTitle#
▸ getResourceTitle(): string
Returns#
string
getResourceUrl#
▸ getResourceUrl(): string
Returns#
string
getResourceVersion#
▸ getResourceVersion(): string
Returns#
string
Inherited from#
getScope#
▸ getScope(): "Cluster" | "Namespaced"
Returns#
"Cluster" | "Namespaced"
getScopedName#
▸ getScopedName(): string
Returns#
string
Inherited from#
getSearchFields#
▸ getSearchFields(): (undefined | string)[]
Returns#
(undefined | string)[]
Inherited from#
getStoredVersions#
▸ getStoredVersions(): string
Returns#
string
getTimeDiffFromNow#
▸ getTimeDiffFromNow(): number
Deprecated
This function computes a new "now". Switch to using getCreationTimestamp instead
Returns#
number
Inherited from#
getValidation#
▸ getValidation(): string
Returns#
string
getVersion#
▸ getVersion(): string
Returns#
string
isNamespaced#
▸ isNamespaced(): boolean
Returns#
boolean
patch#
▸ patch(patch): Promise<null | KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Deprecated
use KubeApi.patch instead
Parameters#
| Name | Type | 
|---|---|
| patch | Patch | 
Returns#
Promise<null | KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Inherited from#
toPlainObject#
▸ toPlainObject(): Record<string, unknown>
Returns#
Record<string, unknown>
Inherited from#
update#
▸ update(data): Promise<null | KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>
Deprecated
use KubeApi.patch instead
Parameters#
| Name | Type | 
|---|---|
| data | Partial<CustomResourceDefinition> | 
Returns#
Promise<null | KubeJsonApiData<KubeJsonApiObjectMetadata<KubeObjectScope>, unknown, unknown>>