bonny v0.2.3 Bonny.CRD

Represents the spec portion of a Kubernetes CustomResourceDefinition manifest.

The CustomResourceDefinition API resource allows you to define custom resources. Defining a CRD object creates a new custom resource with a name and schema that you specify. The Kubernetes API serves and handles the storage of your custom resource.

Link to this section Summary

Types

t()

CRD Spec

Functions

URL Path to list a CRD’s resources

Plural name of CRD

URL path to read the specified CustomResourceDefinition

Generates the map equivalent of the Kubernetes CRD YAML manifest

Link to this section Types

Link to this type names_t()
names_t() :: %{
  kind: String.t(),
  singular: String.t(),
  plural: String.t(),
  shortNames: nil | [String.t()],
  version: String.t()
}
Link to this type t()
t() :: %Bonny.CRD{
  group: String.t(),
  names: names_t(),
  scope: :namespaced | :cluster,
  version: String.t()
}

CRD Spec

Link to this section Functions

Link to this function list_path(crd)
list_path(Bonny.CRD.t()) :: binary()

URL Path to list a CRD’s resources

Namespaced CRD URL Path /apis/bonny.example.om/v1/namespaces/default/widgets

Cluster Resource URL Path & --all-namespaces path /apis/example.com/v1/widgets

Link to this function plural(crd)
plural(Bonny.CRD.t()) :: binary()

Plural name of CRD

Link to this function read_path(crd, name)
read_path(Bonny.CRD.t(), String.t()) :: binary()

URL path to read the specified CustomResourceDefinition

Namespaced CRD Resource URL Path /apis/example.com/v1/namespaces/default/widgets/test-widget

Cluster CRD Resource URL Path & --all-namespaces path /apis/example.com/v1/widgets/test-widget

Link to this function to_manifest(crd)
to_manifest(Bonny.CRD.t()) :: map()

Generates the map equivalent of the Kubernetes CRD YAML manifest

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  creationTimestamp: null
  name: widgets.example.com
spec:
  group: example.com
  names:
    kind: Widget
    plural: widgets
  scope: Namespaced
  version: v1
Link to this function watch_path(crd, resource_version)
watch_path(Bonny.CRD.t(), String.t() | integer()) :: binary()