apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: weatherdatas.kubernetes.dev
spec:
  group: kubernetes.dev
  names:
    kind: WeatherData
    listKind: WeatherDataList
    plural: weatherdatas
    singular: weatherdata
  scope: Cluster
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.mainWeather
      name: MainWeather
      priority: 0
      type: string
    - format: double
      jsonPath: .spec.temperature
      name: Temperature
      priority: 0
      type: number
    name: v1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            description: Specification of the kubernetes object.
            properties:
              mainWeather:
                type: string
              description:
                type: string
              temperature:
                format: double
                type: number
              sunrise:
                format: date-time
                type: string
              sunset:
                format: date-time
                type: string
            type: object
        type: object
    served: true
    storage: true
