{
  "description": "ClusterHealthCheck is the Schema for the clusterhealthchecks 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": "ClusterHealthCheckSpec defines the desired state of ClusterHealthCheck",
      "properties": {
        "clusterSelector": {
          "description": "Selector identifies clusters to associate to.",
          "properties": {
            "matchExpressions": {
              "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
              "items": {
                "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                "properties": {
                  "key": {
                    "description": "key is the label key that the selector applies to.",
                    "type": "string"
                  },
                  "operator": {
                    "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                    "type": "string"
                  },
                  "values": {
                    "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
              "type": "object"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "livenessChecks": {
          "description": "LivenessChecks is a list of source of liveness checks to evaluate.\nAnytime one of those changes, notifications will be sent",
          "items": {
            "properties": {
              "livenessSourceRef": {
                "description": "LivenessSourceRef is a reference to a liveness-specific resource that holds\nthe details for the liveness check.",
                "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
              },
              "name": {
                "description": "Name of the liveness check.\nMust be a DNS_LABEL and unique within the ClusterHealthCheck.",
                "type": "string"
              },
              "type": {
                "description": "Type specifies the type of liveness",
                "enum": [
                  "Addons",
                  "HealthCheck"
                ],
                "type": "string"
              }
            },
            "required": [
              "name",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "notifications": {
          "description": "Notification is a list of notification mechanisms.",
          "items": {
            "properties": {
              "name": {
                "description": "Name of the notification check.\nMust be a DNS_LABEL and unique within the ClusterHealthCheck.",
                "type": "string"
              },
              "notificationRef": {
                "description": "NotificationRef is a reference to a notification-specific resource that holds\nthe details for the notification.",
                "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
              },
              "type": {
                "description": "NotificationType specifies the type of notification",
                "enum": [
                  "KubernetesEvent",
                  "Slack",
                  "Webex",
                  "Discord",
                  "Teams",
                  "Telegram",
                  "SMTP"
                ],
                "type": "string"
              }
            },
            "required": [
              "name",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "livenessChecks",
        "notifications"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "clusterCondition": {
          "description": "ClusterConditions contains conditions and notification status for all clusters\nmatching ClusterHealthCheck instance",
          "items": {
            "properties": {
              "clusterInfo": {
                "properties": {
                  "cluster": {
                    "description": "Cluster references the Cluster",
                    "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
                  },
                  "failureMessage": {
                    "description": "FailureMessage provides more information about the error.",
                    "type": "string"
                  },
                  "hash": {
                    "description": "Hash represents the hash of the Classifier currently deployed\nin the Cluster",
                    "format": "byte",
                    "type": "string"
                  },
                  "status": {
                    "description": "Status represents the state of the feature in the workload cluster",
                    "enum": [
                      "Provisioning",
                      "Provisioned",
                      "Failed",
                      "FailedNonRetriable",
                      "Removing",
                      "Removed"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "cluster",
                  "hash"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "conditions": {
                "description": "Cluster conditions.",
                "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"
                    },
                    "name": {
                      "description": "Condition name",
                      "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 not 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.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "lastTransitionTime",
                    "name",
                    "status",
                    "type"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "notificationSummaries": {
                "description": "NotificationSummaries contains status information on notifications",
                "items": {
                  "properties": {
                    "failureMessage": {
                      "description": "FailureMessage is a human consumable message explaining the\nmisconfiguration",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the notification check.",
                      "type": "string"
                    },
                    "status": {
                      "description": "NotificationStatus specifies the notification status",
                      "enum": [
                        "Delivered",
                        "FailedToDeliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "status"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "required": [
              "clusterInfo"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "matchingClusters": {
          "description": "MatchingClusterRefs reference all the clusters currently matching\nClusterHealthCheck ClusterSelector",
          "items": {
            "description": "ObjectReference contains enough information to let you inspect or modify the referred object.",
            "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
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
