Skip to content

# Class: CustomResourceDefinition

Renderer.K8sApi.CustomResourceDefinition

## Hierarchy

- KubeObject

↳ CustomResourceDefinition

## Table of contents

### Constructors

- constructor

### Properties

- apiVersion
- kind
- managedFields
- metadata
- spec
- status
- apiBase
- kind
- namespaced
- nonEditableFields

### Accessors

- selfLink

### Methods

- delete
- getAge
- getAnnotations
- getConditions
- getConversion
- getFinalizers
- getGroup
- getId
- getLabels
- getName
- getNames
- getNs
- getOwnerRefs
- getPluralName
- getPrinterColumns
- getResourceApiBase
- getResourceKind
- getResourceTitle
- getResourceUrl
- getResourceVersion
- getScope
- getSearchFields
- getStoredVersions
- getTimeDiffFromNow
- getValidation
- getVersion
- isNamespaced
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels

## Constructors

### constructor

• new CustomResourceDefinition(`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
--- | ---
`additionalPrinterColumns?` | `AdditionalPrinterColumnsV1Beta`[]
`conversion` | `Object`
`conversion.strategy?` | `string`
`conversion.webhook?` | `any`
`group` | `string`
`names` | `Object`
`names.kind` | `string`
`names.listKind` | `string`
`names.plural` | `string`
`names.singular` | `string`
`scope` | `string`
`validation?` | `any`
`version?` | `string`
`versions?` | { `additionalPrinterColumns?`: `AdditionalPrinterColumnsV1`[] ; `name`: `string` ; `schema?`: `unknown` ; `served`: `boolean` ; `storage`: `boolean` }[]

#### Inherited from

KubeObject.spec

### status

• status: `Object`

#### Type declaration

Name | Type
--- | ---
`acceptedNames` | `Object`
`acceptedNames.kind` | `string`
`acceptedNames.listKind` | `string`
`acceptedNames.plural` | `string`
`acceptedNames.shortNames` | `string`[]
`acceptedNames.singular` | `string`
`conditions` | { `lastTransitionTime`: `string` ; `message`: `string` ; `reason`: `string` ; `status`: `string` ; `type?`: `string` }[]
`storedVersions` | `string`[]

#### Inherited from

KubeObject.status

### apiBase

▪ `Static` apiBase: `string` = "/apis/apiextensions.k8s.io/v1/customresourcedefinitions"

### kind

▪ `Static` kind: `string` = "CustomResourceDefinition"

#### Inherited from

KubeObject.kind

### namespaced

▪ `Static` namespaced: `boolean` = false

#### Inherited from

KubeObject.namespaced

### nonEditableFields

▪ `Static` `Protected` `Readonly` nonEditableFields: `string`[]

#### Inherited from

KubeObject.nonEditableFields

## Accessors

### selfLink

• `get` selfLink(): `string`

#### Returns

`string`

## Methods

### delete

▸ delete(`params?`): `Promise`<KubeJsonApiData>

#### Parameters

Name | Type
--- | ---
`params?` | `JsonApiParams`<any>

#### Returns

`Promise`<KubeJsonApiData>

#### Inherited from

KubeObject.delete

### getAge

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

#### 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

### getConditions

▸ getConditions(): { `isReady`: `boolean` ; `lastTransitionTime`: `string` ; `message`: `string` ; `reason`: `string` ; `status`: `string` ; `tooltip`: `string` ; `type?`: `string` }[]

#### Returns

{ `isReady`: `boolean` ; `lastTransitionTime`: `string` ; `message`: `string` ; `reason`: `string` ; `status`: `string` ; `tooltip`: `string` ; `type?`: `string` }[]

### getConversion

▸ getConversion(): `string`

#### Returns

`string`

### getFinalizers

▸ getFinalizers(): `string`[]

#### Returns

`string`[]

#### Inherited from

KubeObject.getFinalizers

### getGroup

▸ getGroup(): `string`

#### Returns

`string`

### 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

### getNames

▸ getNames(): `Object`

#### Returns

`Object`

Name | Type
--- | ---
`kind` | `string`
`listKind` | `string`
`plural` | `string`
`singular` | `string`

### 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

### getPluralName

▸ getPluralName(): `string`

#### Returns

`string`

### getPrinterColumns

▸ getPrinterColumns(`ignorePriority?`): `AdditionalPrinterColumnsV1`[]

#### Parameters

Name | Type | Default value
--- | --- | ---
`ignorePriority` | `boolean` | true

#### 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

KubeObject.getResourceVersion

### getScope

▸ getScope(): `string`

#### Returns

`string`

### getSearchFields

▸ getSearchFields(): `string`[]

#### Returns

`string`[]

#### Inherited from

KubeObject.getSearchFields

### getStoredVersions

▸ getStoredVersions(): `string`

#### Returns

`string`

### getTimeDiffFromNow

▸ getTimeDiffFromNow(): `number`

#### Returns

`number`

#### Inherited from

KubeObject.getTimeDiffFromNow

### getValidation

▸ getValidation(): `string`

#### Returns

`string`

### getVersion

▸ getVersion(): `string`

#### Returns

`string`

### isNamespaced

▸ isNamespaced(): `boolean`

#### Returns

`boolean`

### toPlainObject

▸ toPlainObject(): `object`

#### Returns

`object`

#### Inherited from

KubeObject.toPlainObject

### update

▸ update<K>(`data`): `Promise`<K>

#### Type parameters

Name | Type
--- | ---
`K` | `K`: KubeObject<KubeObjectMetadata, any, any, K>

#### Parameters

Name | Type
--- | ---
`data` | `Partial`<K>

#### Returns

`Promise`<K>

#### 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