{
  "description": "SelfNodeRemediationConfig is the Schema for the selfnoderemediationconfigs API in which a user can configure the self node remediation agents",
  "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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "SelfNodeRemediationConfigSpec defines the desired state of SelfNodeRemediationConfig",
      "properties": {
        "apiCheckInterval": {
          "default": "15s",
          "description": "The frequency for api-server connectivity check.\nValid time units are \"ms\", \"s\", \"m\", \"h\".\nthe frequency for api-server connectivity check",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "apiServerTimeout": {
          "default": "5s",
          "description": "Timeout for each api-connectivity check.\nValid time units are \"ms\", \"s\", \"m\", \"h\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "customDsTolerations": {
          "description": "CustomDsTolerations allows to add custom tolerations snr agents that are running on the ds in order to support remediation for different types of nodes.",
          "items": {
            "additionalProperties": false,
            "description": "The pod this Toleration is attached to tolerates any taint that matches\nthe triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.",
            "properties": {
              "effect": {
                "description": "Effect indicates the taint effect to match. Empty means match all taint effects.\nWhen specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "key": {
                "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys.\nIf the key is empty, operator must be Exists; this combination means to match all values and all keys.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "operator": {
                "description": "Operator represents a key's relationship to the value.\nValid operators are Exists and Equal. Defaults to Equal.\nExists is equivalent to wildcard for value, so that a pod can\ntolerate all taints of a particular category.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "tolerationSeconds": {
                "description": "TolerationSeconds represents the period of time the toleration (which must be\nof effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,\nit is not set, which means tolerate the taint forever (do not evict). Zero and\nnegative values will be treated as 0 (evict immediately) by the system.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "value": {
                "description": "Value is the taint value the toleration matches to.\nIf the operator is Exists, the value should be empty, otherwise just a regular string.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "endpointHealthCheckUrl": {
          "description": "EndpointHealthCheckUrl is an url that self node remediation agents which run on control-plane node will try to access when they can't contact their peers.\nThis is a part of self diagnostics which will decide whether the node should be remediated or not.\nIt will be ignored when empty (which is the default).",
          "type": [
            "string",
            "null"
          ]
        },
        "hostPort": {
          "default": 30001,
          "description": "HostPort is used for internal communication between SNR agents.",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "isSoftwareRebootEnabled": {
          "default": true,
          "description": "IsSoftwareRebootEnabled indicates whether self node remediation agent will do software reboot,\nif the watchdog device can not be used or will use watchdog only,\nwithout a fallback to software reboot.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "maxApiErrorThreshold": {
          "default": 3,
          "description": "After this threshold, the node will start contacting its peers.",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "minPeersForRemediation": {
          "default": 1,
          "description": "Minimum number of peer workers/control nodes to attempt to contact before deciding if node is unhealthy or not\n\tif set to zero, no other peers will be required to be present for remediation action to occur when this\n\tnode has lost API server access.  If an insufficient number of peers are found, we will not attempt to ask\n\tany peer nodes (if present) whether they see that the current node has been marked unhealthy with a\n\tSelfNodeRemediation CR",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "peerApiServerTimeout": {
          "default": "5s",
          "description": "The timeout for api-server connectivity check.\nValid time units are \"ms\", \"s\", \"m\", \"h\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "peerDialTimeout": {
          "default": "5s",
          "description": "Timeout for establishing connection to peer.\nValid time units are \"ms\", \"s\", \"m\", \"h\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "peerRequestTimeout": {
          "default": "7s",
          "description": "Timeout for each peer request.\nValid time units are \"ms\", \"s\", \"m\", \"h\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "peerUpdateInterval": {
          "default": "15m",
          "description": "The frequency for updating peers.\nValid time units are \"ms\", \"s\", \"m\", \"h\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "safeTimeToAssumeNodeRebootedSeconds": {
          "description": "SafeTimeToAssumeNodeRebootedSeconds is the time after which the healthy self node remediation\nagents will assume the unhealthy node has been rebooted, and it is safe to recover affected workloads.\nThis is extremely important as starting replacement Pods while they are still running on the failed\nnode will likely lead to data corruption and violation of run-once semantics.\nIn an effort to prevent this, the operator ignores values lower than a minimum calculated from the\nApiCheckInterval, ApiServerTimeout, MaxApiErrorThreshold, PeerDialTimeout, and PeerRequestTimeout fields,\nand the unhealthy node's individual watchdog timeout.",
          "type": [
            "integer",
            "null"
          ]
        },
        "watchdogFilePath": {
          "default": "/dev/watchdog",
          "description": "WatchdogFilePath is the watchdog file path that should be available on each node, e.g. /dev/watchdog.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "description": "SelfNodeRemediationConfigStatus defines the observed state of SelfNodeRemediationConfig",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}