mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-19 16:12:52 +08:00
cba5d7c8c2
- Update CRDs (crd.yaml, crd-status-subresource.yaml) to match requirements of current release - Add `versions` field and structures `schema` as made mandatory in apiextensions/v1 - Add annotation for api-approved.kubernetes.io since CRD is under *k8s.io domain - Delete crd-validation.yaml since structured schema is mandatory in v1 - Update README Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com> Kubernetes-commit: fd0ac9c8d169169c8072639970565cda9fb9499a
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: foos.samplecontroller.k8s.io
|
|
# 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"
|
|
spec:
|
|
group: samplecontroller.k8s.io
|
|
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
|
|
names:
|
|
kind: Foo
|
|
plural: foos
|
|
scope: Namespaced
|