apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: caches.openmcp.k8s.io
  annotations:
    "api-approved.kubernetes.io": "https://github.com/kubernetes/kubernetes/pull/78458"
spec:
  group: openmcp.k8s.io
  names:
    kind: Cache
    listKind: CacheList
    plural: caches
    singular: cache
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Created time stamp
      jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    - description: '-'
      jsonPath: .status.succeeded
      name: IsSuccess
      type: boolean
    - description: '-'
      jsonPath: .status.Reason
      name: REASON
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Cache is the Schema for the Caches API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: CacheSpec defines the desired state of Cache
            properties:
              cachecount:
                type: integer
              timer:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "operator-sdk generate k8s" to regenerate code after
                  modifying this file Add custom validation using kubebuilder tags:
                  https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
                type: string
            required:
            - cachecount
            - timer
            type: object
          status:
            description: CacheStatus defines the observed state of Cache
            properties:
              History:
                items:
                  properties:
                    ImageList:
                      items:
                        properties:
                          ImageCount:
                            format: int64
                            type: integer
                          ImageNmae:
                            type: string
                        type: object
                      type: array
                    Timestamp:
                      type: string
                  type: object
                type: array
              Reason:
                description: Reason indicates the reason for any backup related failures.
                type: string
              UpdateList:
                items:
                  properties:
                    ImageName:
                      type: string
                    ImageStatus:
                      type: string
                    Timestamp:
                      type: string
                  type: object
                type: array
              succeeded:
                description: Succeeded indicates if the backup has Succeeded.
                type: boolean
            required:
            - succeeded
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
