mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-27 16:51:21 +00:00
Use v1beta1 for the first example (it's a bit simpler) and v1 for the second example. The second example illustrate the served and storage attributes, and the fact that each version can have a different schema. Closes #541
36 lines
822 B
YAML
36 lines
822 B
YAML
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: coffees.container.training
|
|
spec:
|
|
group: container.training
|
|
scope: Namespaced
|
|
names:
|
|
plural: coffees
|
|
singular: coffee
|
|
kind: Coffee
|
|
shortNames:
|
|
- cof
|
|
versions:
|
|
- name: v1alpha1
|
|
served: true
|
|
storage: true
|
|
schema:
|
|
openAPIV3Schema:
|
|
properties:
|
|
spec:
|
|
required:
|
|
- taste
|
|
properties:
|
|
taste:
|
|
description: Subjective taste of that kind of coffee bean
|
|
type: string
|
|
additionalPrinterColumns:
|
|
- jsonPath: .spec.taste
|
|
description: Subjective taste of that kind of coffee bean
|
|
name: Taste
|
|
type: string
|
|
- jsonPath: .metadata.creationTimestamp
|
|
name: Age
|
|
type: date
|