apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: machinedeployments.cluster.k8s.io
  annotations:
    "api-approved.kubernetes.io": "unapproved, legacy API"
spec:
  group: cluster.k8s.io
  scope: Namespaced
  names:
    kind: MachineDeployment
    plural: machinedeployments
    singular: machinedeployment
    listKind: MachineDeploymentList
    shortNames: ["md"]
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          x-kubernetes-preserve-unknown-fields: true
          type: object
      subresources:
        scale:
          specReplicasPath: .spec.replicas
          statusReplicasPath: .status.replicas
        status: {}
      additionalPrinterColumns:
        - name: Replicas
          type: integer
          jsonPath: .spec.replicas
        - name: Available-Replicas
          type: integer
          jsonPath: .status.availableReplicas
        - name: Provider
          type: string
          jsonPath: .spec.template.spec.providerSpec.value.cloudProvider
        - name: OS
          type: string
          jsonPath: .spec.template.spec.providerSpec.value.operatingSystem
        - name: Kubelet
          type: string
          jsonPath: .spec.template.spec.versions.kubelet
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp
        - name: Deleted
          type: date
          jsonPath: .metadata.deletionTimestamp
          priority: 1
