2021-05-10 23:19:18 +08:00
apiVersion : apiextensions.k8s.io/v1
2018-02-18 21:15:38 +08:00
kind : CustomResourceDefinition
metadata :
name : foos.samplecontroller.k8s.io
2021-05-10 23:19:18 +08:00
# for more information on the below annotation, please see
# https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/2337-k8s.io-group-protection/README.md
annotations :
"api-approved.kubernetes.io": "unapproved, experimental-only; please get an approval from Kubernetes API reviewers if you're trying to develop a CRD in the *.k8s.io or *.kubernetes.io groups"
2018-02-18 21:15:38 +08:00
spec :
group : samplecontroller.k8s.io
2021-05-10 23:19:18 +08:00
versions :
- name : v1alpha1
served : true
storage : true
schema :
# schema used for validation
openAPIV3Schema :
type : object
properties :
spec :
type : object
properties :
deploymentName :
type : string
replicas :
type : integer
minimum : 1
maximum : 10
status :
type : object
properties :
availableReplicas :
type : integer
# subresources for the custom resource
subresources :
# enables the status subresource
status : {}
2018-02-18 21:15:38 +08:00
names :
kind : Foo
plural : foos
scope : Namespaced