---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.9.1
  creationTimestamp: null
  name: kkmachines.infrastructure.cluster.x-k8s.io
spec:
  group: infrastructure.cluster.x-k8s.io
  names:
    categories:
    - cluster-api
    kind: KKMachine
    listKind: KKMachineList
    plural: kkmachines
    shortNames:
    - kkm
    singular: kkmachine
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Cluster to which this KKMachine belongs
      jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
      name: Cluster
      type: string
    - description: KKInstance name
      jsonPath: .spec.instanceID
      name: Instance
      type: string
    - description: Machine ready status
      jsonPath: .status.ready
      name: Ready
      type: string
    - description: Machine object which owns with this KKMachine
      jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
      name: Machine
      type: string
    name: v1beta1
    schema:
      openAPIV3Schema:
        description: KKMachine is the Schema for the kkmachines 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: KKMachineSpec defines the desired state of KKMachine
            properties:
              containerManager:
                description: ContainerManager is the container manager config of this
                  machine.
                properties:
                  criDockerdVersion:
                    description: CRIDockerdVersion defines the version of cri-dockerd,
                      available only when Type is docker. https://github.com/Mirantis/cri-dockerd
                    type: string
                  criSocket:
                    description: CRISocket is used to connect an existing CRIClient.
                    type: string
                  crictlVersion:
                    description: CRICTLVersion defines the version of CRICTL.
                    type: string
                  type:
                    description: Type defines the type of ContainerManager. "docker",
                      "containerd"
                    type: string
                  version:
                    description: Version defines the version of ContainerManager.
                    type: string
                type: object
              instanceID:
                description: InstanceID is the name of the KKInstance.
                type: string
              providerID:
                description: ProviderID is the unique identifier as specified by the
                  kubekey provider.
                type: string
              repository:
                description: Repository is the repository config of this machine.
                properties:
                  iso:
                    description: 'ISO specifies the ISO file name. There are 3 options:
                      "": empty string means will not install the packages. "none":
                      no ISO file will be used. And capkk will use the default repository
                      to install the required packages. "auto": capkk will detect
                      the ISO file automatically. Only support Ubuntu/Debian/CentOS.
                      "xxx-20.04-debs-amd64.iso": use the specified name to get the
                      ISO file name.'
                    type: string
                  packages:
                    description: Packages is a list of packages to be installed.
                    items:
                      type: string
                    type: array
                  update:
                    description: Update will update the repository packages list and
                      cache if it is true.
                    type: boolean
                type: object
              roles:
                description: Roles is the role of the machine.
                items:
                  description: Role represents a role of a node.
                  type: string
                type: array
            type: object
          status:
            description: KKMachineStatus defines the observed state of KKMachine
            properties:
              addresses:
                description: Addresses contains the KK instance associated addresses.
                items:
                  description: MachineAddress contains information for the node's
                    address.
                  properties:
                    address:
                      description: The machine address.
                      type: string
                    type:
                      description: Machine address type, one of Hostname, ExternalIP
                        or InternalIP.
                      type: string
                  required:
                  - address
                  - type
                  type: object
                type: array
              conditions:
                description: Conditions defines current service state of the KKMachine.
                items:
                  description: Condition defines an observation of a Cluster API resource
                    operational state.
                  properties:
                    lastTransitionTime:
                      description: Last time the condition transitioned from one status
                        to another. This should be when the underlying condition changed.
                        If that is not known, then using the time when the API field
                        changed is acceptable.
                      format: date-time
                      type: string
                    message:
                      description: A human readable message indicating details about
                        the transition. This field may be empty.
                      type: string
                    reason:
                      description: The reason for the condition's last transition
                        in CamelCase. The specific API may choose whether or not this
                        field is considered a guaranteed API. This field may not be
                        empty.
                      type: string
                    severity:
                      description: Severity provides an explicit classification of
                        Reason code, so the users or machines can immediately understand
                        the current situation and act accordingly. The Severity field
                        MUST be set only when Status=False.
                      type: string
                    status:
                      description: Status of the condition, one of True, False, Unknown.
                      type: string
                    type:
                      description: Type of condition in CamelCase or in foo.example.com/CamelCase.
                        Many .condition.type values are consistent across resources
                        like Available, but because arbitrary conditions can be useful
                        (see .node.status.conditions), the ability to deconflict is
                        important.
                      type: string
                  required:
                  - lastTransitionTime
                  - status
                  - type
                  type: object
                type: array
              failureMessage:
                description: "FailureMessage will be set in the event that there is
                  a terminal problem reconciling the Machine and will contain a more
                  verbose string suitable for logging and human consumption. \n This
                  field should not be set for transitive errors that a controller
                  faces that are expected to be fixed automatically over time (like
                  service outages), but instead indicate that something is fundamentally
                  wrong with the Machine's spec or the configuration of the controller,
                  and that manual intervention is required. Examples of terminal errors
                  would be invalid combinations of settings in the spec, values that
                  are unsupported by the controller, or the responsible controller
                  itself being critically misconfigured. \n Any transient errors that
                  occur during the reconciliation of Machines can be added as events
                  to the Machine object and/or logged in the controller's output."
                type: string
              failureReason:
                description: "FailureReason will be set in the event that there is
                  a terminal problem reconciling the Machine and will contain a succinct
                  value suitable for machine interpretation. \n This field should
                  not be set for transitive errors that a controller faces that are
                  expected to be fixed automatically over time (like service outages),
                  but instead indicate that something is fundamentally wrong with
                  the Machine's spec or the configuration of the controller, and that
                  manual intervention is required. Examples of terminal errors would
                  be invalid combinations of settings in the spec, values that are
                  unsupported by the controller, or the responsible controller itself
                  being critically misconfigured. \n Any transient errors that occur
                  during the reconciliation of Machines can be added as events to
                  the Machine object and/or logged in the controller's output."
                type: string
              instanceState:
                description: InstanceState is the state of the KK instance for this
                  machine.
                type: string
              ready:
                description: Ready is true when the provider resource is ready.
                type: boolean
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
