crd样例
v3版本的样例,参考
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: pytorchjobs.kubeflow.org
spec:
group: kubeflow.org
names:
kind: PyTorchJob
listKind: PyTorchJobList
plural: pytorchjobs
singular: pytorchjob
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Status of the workflow
jsonPath: .status.phase
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources: {}