{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "title": "Values",
  "type": "object",
  "definitions": {
    "prometheusAlert": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "enabled"
      ]
    },
    "probe": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "failureThreshold": {
          "type": "integer"
        },
        "initialDelaySeconds": {
          "type": "integer"
        },
        "periodSeconds": {
          "type": "integer"
        },
        "successThreshold": {
          "type": "integer"
        },
        "timeoutSeconds": {
          "type": "integer"
        }
      },
      "required": [
        "failureThreshold",
        "initialDelaySeconds",
        "periodSeconds",
        "successThreshold",
        "timeoutSeconds"
      ]
    },
    "component": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "logLevel": {
          "type": "string",
          "enum": [
            "all",
            "debug",
            "info",
            "warn",
            "error",
            "none"
          ]
        },
        "image": {
          "type": "object",
          "properties": {
            "repository": {
              "type": "string"
            },
            "tag": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pullPolicy": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "enum": [
                    "Always",
                    "IfNotPresent",
                    "Never"
                  ]
                }
              ]
            }
          }
        },
        "serviceAccount": {
          "type": "object",
          "properties": {
            "create": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "annotations": {
              "type": "object"
            }
          }
        },
        "resources": {
          "type": "object"
        },
        "nodeSelector": {
          "type": "object"
        },
        "tolerations": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "priorityClassName": {
          "type": "string"
        },
        "runtimeClassName": {
          "type": "string"
        },
        "affinity": {
          "type": "object"
        },
        "podAnnotations": {
          "type": "object"
        },
        "livenessProbe": {
          "$ref": "#/definitions/probe"
        },
        "readinessProbe": {
          "$ref": "#/definitions/probe"
        }
      },
      "required": [
        "image",
        "serviceAccount"
      ]
    }
  },
  "properties": {
    "imagePullSecrets": {
      "description": "Secrets used for pulling images",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "nameOverride": {
      "description": "Override chart name",
      "type": "string"
    },
    "fullNameOverride": {
      "description": "Override fully qualified app name",
      "type": "string"
    },
    "rbac": {
      "description": "RBAC configuration",
      "type": "object",
      "properties": {
        "create": {
          "description": "Enable RBAC",
          "type": "boolean"
        }
      }
    },
    "prometheus": {
      "description": "Prometheus monitoring config",
      "type": "object",
      "properties": {
        "scrapeAnnotations": {
          "type": "boolean"
        },
        "metricsPort": {
          "type": "integer"
        },
        "secureMetricsPort": {
          "type": "integer"
        },
        "rbacPrometheus": {
          "type": "boolean"
        },
        "serviceAccount": {
          "type": "string"
        },
        "namespace": {
          "type": "string"
        },
        "rbacProxy": {
          "description": "kube-rbac-proxy configuration",
          "type": "object",
          "properties": {
            "repository": {
              "type": "string"
            },
            "tag": {
              "type": "string"
            }
          }
        },
        "serviceMonitor": {
          "description": "Prometheus Operator ServiceMonitors",
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "jobLabel": {
              "type": "string"
            },
            "interval": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metricRelabelings": {
              "type": "array",
              "items": {
                "type": "object"
              }
            },
            "relabelings": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          }
        }
      },
      "frrk8s": {
        "allOf": [
          {
            "$ref": "#/definitions/component"
          },
          {
            "description": "FRR-K8s controller",
            "type": "object",
            "properties": {
              "tolerateMaster": {
                "type": "boolean"
              },
              "updateStrategy": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ]
              },
              "runtimeClassName": {
                "type": "string"
              },
              "secretName": {
                "type": "string"
              },
              "frr": {
                "description": "The FRR properties in the controller",
                "type": "object",
                "properties": {
                  "image": {
                    "$ref": "#/definitions/component/properties/image"
                  },
                  "metricsPort": {
                    "type": "integer"
                  },
                  "secureMetricsPort": {
                    "type": "integer"
                  },
                  "resources:": {
                    "type": "object"
                  }
                },
                "required": [
                  "enabled"
                ]
              },
              "command": {
                "type": "string"
              },
              "reloader": {
                "type": "object",
                "properties": {
                  "resources": {
                    "type": "object"
                  }
                }
              },
              "frrMetrics": {
                "type": "object",
                "properties": {
                  "resources": {
                    "type": "object"
                  }
                }
              }
            },
            "required": [
              "tolerateMaster"
            ]
          }
        ]
      },
      "crds": {
        "description": "CRD configuration",
        "type": "object",
        "properties": {
          "enabled": {
            "description": "Enable CRDs",
            "type": "boolean"
          },
          "validationFailurePolicy": {
            "description": "Failure policy to use with validating webhooks",
            "type": "string",
            "enum": [
              "Ignore",
              "Fail"
            ]
          }
        }
      }
    },
    "frrk8s": {
      "allOf": [
        {
          "$ref": "#/definitions/component"
        },
        {
          "description": "FRRk8s Controller",
          "type": "object",
          "properties": {
            "strategy": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ]
            },
            "command": {
              "type": "string"
            },
            "webhookMode": {
              "type": "string"
            }
          }
        }
      ]
    }
  },
  "required": [
    "frrk8s"
  ]
}