{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "controller": {
    "allOf": [
      {
        "$ref": "#/definitions/component"
      },
      {
        "description": "MetalLB Controller",
        "properties": {
          "command": {
            "type": "string"
          },
          "strategy": {
            "properties": {
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "webhookMode": {
            "type": "string"
          }
        },
        "type": "object"
      }
    ]
  },
  "definitions": {
    "component": {
      "properties": {
        "affinity": {
          "type": "object"
        },
        "enabled": {
          "type": "boolean"
        },
        "image": {
          "properties": {
            "pullPolicy": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "enum": [
                    "Always",
                    "IfNotPresent",
                    "Never"
                  ],
                  "type": "string"
                }
              ]
            },
            "repository": {
              "type": "string"
            },
            "tag": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "type": "object"
        },
        "livenessProbe": {
          "$ref": "#/definitions/probe"
        },
        "logLevel": {
          "enum": [
            "all",
            "debug",
            "info",
            "warn",
            "error",
            "none"
          ],
          "type": "string"
        },
        "nodeSelector": {
          "type": "object"
        },
        "podAnnotations": {
          "type": "object"
        },
        "priorityClassName": {
          "type": "string"
        },
        "readinessProbe": {
          "$ref": "#/definitions/probe"
        },
        "resources": {
          "type": "object"
        },
        "runtimeClassName": {
          "type": "string"
        },
        "serviceAccount": {
          "properties": {
            "annotations": {
              "type": "object"
            },
            "create": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "tolerations": {
          "items": {
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "image",
        "serviceAccount"
      ],
      "type": "object"
    },
    "probe": {
      "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"
      ],
      "type": "object"
    },
    "prometheusAlert": {
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "required": [
        "enabled"
      ],
      "type": "object"
    }
  },
  "properties": {
    "configInLine": {
      "description": "MetalLB configuration",
      "type": "object"
    },
    "crds": {
      "description": "CRD configuration",
      "properties": {
        "enabled": {
          "description": "Enable CRDs",
          "type": "boolean"
        },
        "validationFailurePolicy": {
          "description": "Failure policy to use with validating webhooks",
          "enum": [
            "Ignore",
            "Fail"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "fullNameOverride": {
      "description": "Override fully qualified app name",
      "type": "string"
    },
    "imagePullSecrets": {
      "description": "Secrets used for pulling images",
      "items": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "loadBalancerClass": {
      "type": "string"
    },
    "nameOverride": {
      "description": "Override chart name",
      "type": "string"
    },
    "prometheus": {
      "description": "Prometheus monitoring config",
      "properties": {
        "metricsPort": {
          "type": "integer"
        },
        "namespace": {
          "type": "string"
        },
        "podMonitor": {
          "description": "Prometheus Operator PodMonitors",
          "properties": {
            "additionalMonitors": {
              "type": "object"
            },
            "enabled": {
              "type": "boolean"
            },
            "interval": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "jobLabel": {
              "type": "string"
            },
            "metricRelabelings": {
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "relabelings": {
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "prometheusRule": {
          "description": "Prometheus Operator alertmanager alerts",
          "properties": {
            "additionalMonitors": {
              "type": "object"
            },
            "addressPoolExhausted": {
              "$ref": "#/definitions/prometheusAlert"
            },
            "addressPoolUsage": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "thresholds": {
                  "items": {
                    "properties": {
                      "labels": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "percent": {
                        "maximum": 100,
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "percent"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "enabled"
              ],
              "type": "object"
            },
            "bgpSessionDown": {
              "$ref": "#/definitions/prometheusAlert"
            },
            "configNotLoaded": {
              "$ref": "#/definitions/prometheusAlert"
            },
            "enabled": {
              "type": "boolean"
            },
            "extraAlerts": {
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "staleConfig": {
              "$ref": "#/definitions/prometheusAlert"
            }
          },
          "required": [
            "enabled",
            "staleConfig",
            "configNotLoaded",
            "addressPoolExhausted",
            "addressPoolUsage",
            "bgpSessionDown"
          ],
          "type": "object"
        },
        "rbacPrometheus": {
          "type": "boolean"
        },
        "rbacProxy": {
          "description": "kube-rbac-proxy configuration",
          "properties": {
            "repository": {
              "type": "string"
            },
            "tag": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "scrapeAnnotations": {
          "type": "boolean"
        },
        "secureMetricsPort": {
          "type": "integer"
        },
        "serviceAccount": {
          "type": "string"
        },
        "serviceMonitor": {
          "description": "Prometheus Operator ServiceMonitors",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "interval": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "jobLabel": {
              "type": "string"
            },
            "metricRelabelings": {
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "relabelings": {
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "podMonitor",
        "prometheusRule"
      ],
      "type": "object"
    },
    "rbac": {
      "description": "RBAC configuration",
      "properties": {
        "create": {
          "description": "Enable RBAC",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "speaker": {
      "allOf": [
        {
          "$ref": "#/definitions/component"
        },
        {
          "description": "MetalLB Speaker",
          "properties": {
            "command": {
              "type": "string"
            },
            "excludeInterfaces": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "frr": {
              "description": "Install FRR container in speaker deployment",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "image": {
                  "$ref": "#/definitions/component/properties/image"
                },
                "metricsPort": {
                  "type": "integer"
                },
                "resources:": {
                  "type": "object"
                },
                "secureMetricsPort": {
                  "type": "integer"
                }
              },
              "required": [
                "enabled"
              ],
              "type": "object"
            },
            "frrMetrics": {
              "properties": {
                "resources": {
                  "type": "object"
                }
              },
              "type": "object"
            },
            "memberlist": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "mlBindPort": {
                  "type": "integer"
                },
                "mlSecretKeyPath": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "reloader": {
              "properties": {
                "resources": {
                  "type": "object"
                }
              },
              "type": "object"
            },
            "runtimeClassName": {
              "type": "string"
            },
            "secretName": {
              "type": "string"
            },
            "tolerateMaster": {
              "type": "boolean"
            },
            "updateStrategy": {
              "properties": {
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "tolerateMaster"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "controller",
    "speaker"
  ],
  "title": "Values",
  "type": "object"
}