Files
cookie-operator/cookie-crd.yaml
2023-01-01 21:42:31 +01:00

98 lines
3.9 KiB
YAML

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: cookiereceipts.de.eenfach.olbohlen
spec:
group: de.eenfach.olbohlen
names:
kind: CookieReceipt
plural: cookiereceipts
singular: cookiereceipt
scope: Namespaced
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
description: "The CookieReceipt CRD is a k8s demo for enhancing functionality, it will not (unfortunately) provide you real cookies in the end..."
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
type: string
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
metadata:
type: object
spec:
type: object
properties:
description:
type: string
description: please describe the cookie
source:
type: string
description: where does this come from? (grandma, mum, the internet...)
ingredients:
description: this list provides required ingredients for this receipt
type: array
x-kubernetes-list-type: atomic
items:
type: object
properties:
name:
type: string
description: specifies the ingredient
amount:
type: number
description: the amount
unit:
type: string
description: the unit for the amount
remarks:
type: string
description: additional remarks, i.e. "grandma always used to..."
required:
- name
- amount
- unit
steps:
description: the actual preparation steps
type: array
x-kubernetes-list-type: atomic
items:
type: object
properties:
order:
type: integer
description: the order number of the step
instruction:
type: string
description: the instruction text for this step
required:
- order
- instruction
temperature:
type: integer
description: temperature for the oven
sanescale:
type: boolean
description: if true or not defined, use Celsius-scale, else use Fahrenheit
preheat:
type: boolean
description: shall the oven be pre-heated, assume yes if undefined
duration:
type: integer
description: the amount of time in minutes to bake the cookies
required:
- ingredients
- steps
- temperature
- duration