Skip to main content

buildCrd

@webda/kubernetes


Function: buildCrd()

buildCrd(model, options): CustomResourceDefinition

Defined in: kubernetes/src/crd/schema.ts:400

Build the CustomResourceDefinition of a model

The custom resource is named after the primary key; spec holds the stored fields but the primary key and the status fields, status the status fields

Parameters​

model​

CrdModel

the model metadata

options​

CrdOptions

the group, version, scope and fields mapping

Returns​

CustomResourceDefinition

the CustomResourceDefinition manifest

Throws​

Error when the names, the key or the fields cannot be mapped