{
  "description": "TalosControlPlane is the Schema for the taloscontrolplanes API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "TalosControlPlaneSpec defines the desired state of TalosControlPlane",
      "properties": {
        "controlPlaneConfig": {
          "description": "ControlPlaneConfig is a two TalosConfigSpecs\nto use for initializing and joining machines to the control plane.",
          "properties": {
            "controlplane": {
              "description": "TalosConfigSpec defines the desired state of TalosConfig",
              "properties": {
                "configPatches": {
                  "items": {
                    "properties": {
                      "op": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "value": {
                        "x-kubernetes-preserve-unknown-fields": true
                      }
                    },
                    "required": [
                      "op",
                      "path"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "data": {
                  "type": "string"
                },
                "generateType": {
                  "type": "string"
                },
                "hostname": {
                  "description": "Set hostname in the machine configuration to some value.",
                  "properties": {
                    "source": {
                      "description": "Source of the hostname.\n\nAllowed values: \"MachineName\" (use linked Machine's Name).",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "strategicPatches": {
                  "description": "Talos Linux machine configuration strategic merge patch list.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "talosVersion": {
                  "type": "string"
                }
              },
              "required": [
                "generateType"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "init": {
              "description": "Deprecated: starting from cacppt v0.4.0 provider doesn't use init configs.",
              "properties": {
                "configPatches": {
                  "items": {
                    "properties": {
                      "op": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "value": {
                        "x-kubernetes-preserve-unknown-fields": true
                      }
                    },
                    "required": [
                      "op",
                      "path"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "data": {
                  "type": "string"
                },
                "generateType": {
                  "type": "string"
                },
                "hostname": {
                  "description": "Set hostname in the machine configuration to some value.",
                  "properties": {
                    "source": {
                      "description": "Source of the hostname.\n\nAllowed values: \"MachineName\" (use linked Machine's Name).",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "strategicPatches": {
                  "description": "Talos Linux machine configuration strategic merge patch list.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "talosVersion": {
                  "type": "string"
                }
              },
              "required": [
                "generateType"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "controlplane"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "infrastructureTemplate": {
          "description": "InfrastructureTemplate is a required reference to a custom resource\noffered by an infrastructure provider.",
          "properties": {
            "apiVersion": {
              "description": "API version of the referent.",
              "type": "string"
            },
            "fieldPath": {
              "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
              "type": "string"
            },
            "kind": {
              "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
              "type": "string"
            },
            "name": {
              "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": "string"
            },
            "resourceVersion": {
              "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
              "type": "string"
            },
            "uid": {
              "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
              "type": "string"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "replicas": {
          "description": "Number of desired machines. Defaults to 1. When stacked etcd is used only\nodd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members).\nThis is a pointer to distinguish between explicit zero and not specified.",
          "format": "int32",
          "type": "integer"
        },
        "rolloutStrategy": {
          "default": {
            "rollingUpdate": {
              "maxSurge": 1
            },
            "type": "RollingUpdate"
          },
          "description": "The RolloutStrategy to use to replace control plane machines with\nnew ones.",
          "properties": {
            "rollingUpdate": {
              "description": "Rolling update config params. Present only if\nRolloutStrategyType = RollingUpdate.",
              "properties": {
                "maxSurge": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "The maximum number of control planes that can be scheduled above or under the\ndesired number of control planes.\nValue can be an absolute number 1 or 0.\nDefaults to 1.\nExample: when this is set to 1, the control plane can be scaled\nup immediately when the rolling update starts.",
                  "x-kubernetes-int-or-string": true
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "type": {
              "description": "Change rollout strategy.\n\nSupported strategies:\n * \"RollingUpdate\".\n * \"OnDelete\"\n\nDefault is RollingUpdate.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "version": {
          "description": "Version defines the desired Kubernetes version.",
          "minLength": 2,
          "pattern": "^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)([-0-9a-zA-Z_\\.+]*)?$",
          "type": "string"
        }
      },
      "required": [
        "controlPlaneConfig",
        "infrastructureTemplate",
        "version"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "TalosControlPlaneStatus defines the observed state of TalosControlPlane",
      "properties": {
        "bootstrapped": {
          "description": "Bootstrapped denotes whether any nodes received bootstrap request\nwhich is required to start etcd and Kubernetes components in Talos.",
          "type": "boolean"
        },
        "conditions": {
          "description": "Conditions defines current service state of the KubeadmControlPlane.",
          "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.\nThis should be when the underlying condition changed. If that is not known, then using the time when\nthe API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.\nThis field may be empty.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may be empty.",
                "type": "string"
              },
              "severity": {
                "description": "severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe 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.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "failureMessage": {
          "description": "ErrorMessage indicates that there is a terminal problem reconciling the\nstate, and will be set to a descriptive error message.",
          "type": "string"
        },
        "failureReason": {
          "description": "FailureReason indicates that there is a terminal problem reconciling the\nstate, and will be set to a token value suitable for\nprogrammatic interpretation.",
          "type": "string"
        },
        "initialized": {
          "description": "Initialized denotes whether or not the control plane has the\nuploaded talos-config configmap.",
          "type": "boolean"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the latest generation observed by the controller.",
          "format": "int64",
          "type": "integer"
        },
        "ready": {
          "description": "Ready denotes that the TalosControlPlane API Server is ready to\nreceive requests.",
          "type": "boolean"
        },
        "readyReplicas": {
          "description": "Total number of fully running and ready control plane machines.",
          "format": "int32",
          "type": "integer"
        },
        "replicas": {
          "description": "Total number of non-terminated machines targeted by this control plane\n(their labels match the selector).",
          "format": "int32",
          "type": "integer"
        },
        "selector": {
          "description": "Selector is the label selector in string format to avoid introspection\nby clients, and is used to provide the CRD-based integration for the\nscale subresource and additional integrations for things like kubectl\ndescribe.. The string will be in the same format as the query-param syntax.\nMore info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
          "type": "string"
        },
        "unavailableReplicas": {
          "description": "Total number of unavailable machines targeted by this control plane.\nThis is the total number of machines that are still required for\nthe deployment to have 100% available capacity. They may either\nbe machines that are running but not yet ready or machines\nthat still have not been created.",
          "format": "int32",
          "type": "integer"
        },
        "version": {
          "description": "version represents the minimum Kubernetes version for the control plane machines\nin the cluster.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
