apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: infrastructures.extensions.gardener.cloud
  labels:
    gardener.cloud/deletion-protected: "true"
spec:
  group: extensions.gardener.cloud
  versions:
  - name: v1alpha1
    served: true
    storage: true
  version: v1alpha1
  scope: Namespaced
  names:
    plural: infrastructures
    singular: infrastructure
    kind: Infrastructure
    shortNames:
    - infra
  additionalPrinterColumns:
  - name: Type
    type: string
    description: The type of the cloud provider for this resource.
    JSONPath: .spec.type
  - name: Region
    type: string
    description: The region into which the infrastructure should be deployed.
    JSONPath: .spec.region
  - name: Status
    type: string
    JSONPath: .status.lastOperation.state
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  subresources:
    status: {}
  validation:
    openAPIV3Schema:
      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/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/api-conventions.md#types-kinds'
          type: string
        metadata:
          type: object
        spec:
          properties:
            type:
              description: Type contains the instance of the resource's kind.
              type: string
            providerConfig:
              description: ProviderConfig contains provider-specific configuration
                for this infrastructure.
              type: object
            region:
              description: Region is the region of this infrastructure.
              type: string
            secretRef:
              description: SecretRef is a reference to a secret that contains the
                actual result of the generated cloud config.
              type: object
            sshPublicKey:
              description: SSHPublicKey is the public SSH key that should be used
                with this infrastructure.
              format: byte
              type: string
          required:
          - region
          - secretRef
          type: object
        status:
          properties:
            providerStatus:
              description: ProviderStatus contains provider-specific output for this
                infrastructure.
              type: object
            lastOperation:
              description: LastOperation holds information about the last operation
                on the resource.
              properties:
                description:
                  description: A human readable message indicating details about the
                    last operation.
                  type: string
                lastUpdateTime:
                  description: Last time the operation state transitioned from one
                    to another.
                  format: date-time
                  type: string
                progress:
                  description: The progress in percentage (0-100) of the last operation.
                  format: int64
                  type: integer
                state:
                  description: Status of the last operation, one of Aborted, Processing,
                    Succeeded, Error, Failed.
                  type: string
                type:
                  description: Type of the last operation, one of Create, Reconcile,
                    Delete.
                  type: string
              required:
                - description
                - lastUpdateTime
                - progress
                - state
                - type
              type: object
            observedGeneration:
              description: ObservedGeneration is the most recent generation observed
                for this resource.
              format: int64
              type: integer
            state:
              description: State can be filled by the operating controller with what
                ever data it needs.
              type: object
          type: object
      required:
        - spec
