{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
        "autoscaling": {
            "type": "object",
            "properties": {
                "enabled": {
                    "default": false,
                    "type": "boolean"
                },
                "maxReplicas": {
                    "default": 10,
                    "type": "integer"
                },
                "minReplicas": {
                    "default": 1,
                    "type": "integer"
                },
                "targetCPUUtilizationPercentage": {
                    "default": 80,
                    "type": "integer"
                },
                "targetMemoryUtilizationPercentage": {
                    "default": 80,
                    "type": "integer"
                }
            }
        },
        "config": {
            "type": "object",
            "properties": {
                "bouncer": {
                    "type": "object",
                    "properties": {
                        "apiKey": {
                            "default": "",
                            "type": "string"
                        },
                        "apiKeySecretRef": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "default": "",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        },
                        "enabled": {
                            "default": true,
                            "type": "boolean"
                        },
                        "lapiURL": {
                            "default": "http://crowdsec-service:8080",
                            "type": "string"
                        },
                        "metrics": {
                            "default": false,
                            "type": "boolean"
                        },
                        "metricsInterval": {
                            "default": "10m",
                            "type": "string"
                        },
                        "tickerInterval": {
                            "default": "10s",
                            "type": "string"
                        },
                        "tls": {
                            "type": "object",
                            "properties": {
                                "caPath": {
                                    "default": "/app/tls/ca.crt",
                                    "type": "string"
                                },
                                "certPath": {
                                    "default": "/app/tls/tls.crt",
                                    "type": "string"
                                },
                                "enabled": {
                                    "default": false,
                                    "type": "boolean"
                                },
                                "insecureSkipVerify": {
                                    "default": false,
                                    "type": "boolean"
                                },
                                "keyPath": {
                                    "default": "/app/tls/tls.key",
                                    "type": "string"
                                }
                            }
                        },
                        "tlsSecretRef": {
                            "type": "object",
                            "properties": {
                                "caKey": {
                                    "default": "ca.crt",
                                    "type": "string"
                                },
                                "certKey": {
                                    "default": "tls.crt",
                                    "type": "string"
                                },
                                "keyKey": {
                                    "default": "tls.key",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "captcha": {
                    "type": "object",
                    "properties": {
                        "callbackURL": {
                            "default": "",
                            "type": "string"
                        },
                        "challengeDuration": {
                            "default": "5m",
                            "type": "string"
                        },
                        "cookieDomain": {
                            "default": "",
                            "type": "string"
                        },
                        "cookieName": {
                            "default": "",
                            "type": "string"
                        },
                        "disableChallengeReplayProtection": {
                            "default": false,
                            "type": "boolean"
                        },
                        "enabled": {
                            "default": false,
                            "type": "boolean"
                        },
                        "provider": {
                            "default": "",
                            "type": "string"
                        },
                        "secretKey": {
                            "default": "",
                            "type": "string"
                        },
                        "secretKeySecretRef": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "default": "",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        },
                        "secureCookie": {
                            "default": true,
                            "type": "boolean"
                        },
                        "sessionDuration": {
                            "default": "15m",
                            "type": "string"
                        },
                        "signingKey": {
                            "default": "",
                            "type": "string"
                        },
                        "signingKeySecretRef": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "default": "",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        },
                        "siteKey": {
                            "default": "",
                            "type": "string"
                        },
                        "timeout": {
                            "default": "10s",
                            "type": "string"
                        }
                    }
                },
                "prometheus": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "default": false,
                            "type": "boolean"
                        },
                        "port": {
                            "default": 9090,
                            "type": "integer"
                        },
                        "serviceMonitor": {
                            "type": "object",
                            "properties": {
                                "enabled": {
                                    "default": false,
                                    "type": "boolean"
                                },
                                "interval": {
                                    "default": "30s",
                                    "type": "string"
                                },
                                "prometheusMatchLabels": {
                                    "default": {},
                                    "type": "object"
                                },
                                "scrapeTimeout": {
                                    "default": "10s",
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "server": {
                    "type": "object",
                    "properties": {
                        "grpcPort": {
                            "default": 8080,
                            "type": "integer"
                        },
                        "httpPort": {
                            "default": 8081,
                            "type": "integer"
                        },
                        "logLevel": {
                            "default": "info",
                            "type": "string"
                        }
                    }
                },
                "templates": {
                    "type": "object",
                    "properties": {
                        "captchaTemplateHeaders": {
                            "default": "",
                            "type": "string"
                        },
                        "captchaTemplatePath": {
                            "default": "",
                            "type": "string"
                        },
                        "deniedTemplateHeaders": {
                            "default": "",
                            "type": "string"
                        },
                        "deniedTemplatePath": {
                            "default": "",
                            "type": "string"
                        },
                        "showDeniedPage": {
                            "default": true,
                            "type": "boolean"
                        }
                    }
                },
                "trustedProxies": {
                    "default": [],
                    "type": "array"
                },
                "waf": {
                    "type": "object",
                    "properties": {
                        "apiKey": {
                            "default": "",
                            "type": "string"
                        },
                        "apiKeySecretRef": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "default": "",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        },
                        "appSecURL": {
                            "default": "http://crowdsec-appsec-service:7422",
                            "type": "string"
                        },
                        "enabled": {
                            "default": false,
                            "type": "boolean"
                        }
                    }
                },
                "webhook": {
                    "type": "object",
                    "properties": {
                        "bufferSize": {
                            "default": 100,
                            "type": "integer"
                        },
                        "signingKey": {
                            "default": "",
                            "type": "string"
                        },
                        "signingKeySecretRef": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "default": "",
                                    "type": "string"
                                },
                                "name": {
                                    "default": "",
                                    "type": "string"
                                }
                            }
                        },
                        "subscriptions": {
                            "default": [],
                            "type": "array"
                        },
                        "timeout": {
                            "default": "5s",
                            "type": "string"
                        }
                    }
                }
            }
        },
        "fullnameOverride": {
            "default": "",
            "type": "string"
        },
        "grafana": {
            "type": "object",
            "properties": {
                "dashboard": {
                    "type": "object",
                    "properties": {
                        "annotations": {
                            "default": {},
                            "type": "object"
                        },
                        "enabled": {
                            "default": false,
                            "type": "boolean"
                        },
                        "folder": {
                            "default": "",
                            "type": "string"
                        },
                        "labels": {
                            "type": "object",
                            "properties": {
                                "grafana_dashboard": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "httproute": {
            "type": "object",
            "properties": {
                "annotations": {
                    "default": {},
                    "type": "object"
                },
                "enabled": {
                    "default": false,
                    "type": "boolean"
                },
                "hostnames": {
                    "default": [],
                    "type": "array"
                },
                "parentRefs": {
                    "default": [],
                    "type": "array"
                }
            }
        },
        "image": {
            "type": "object",
            "properties": {
                "pullPolicy": {
                    "default": "IfNotPresent",
                    "type": "string"
                },
                "repository": {
                    "default": "ghcr.io/kdwils/envoy-proxy-bouncer",
                    "type": "string"
                },
                "tag": {
                    "default": ".Chart.AppVersion",
                    "type": "string"
                }
            }
        },
        "imagePullSecrets": {
            "type": "array"
        },
        "nameOverride": {
            "default": "",
            "type": "string"
        },
        "podSecurityContext": {
            "type": "object"
        },
        "probes": {
            "type": "object",
            "properties": {
                "liveness": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "default": true,
                            "type": "boolean"
                        },
                        "failureThreshold": {
                            "default": 3,
                            "type": "integer"
                        },
                        "initialDelaySeconds": {
                            "default": 5,
                            "type": "integer"
                        },
                        "periodSeconds": {
                            "default": 5,
                            "type": "integer"
                        },
                        "timeoutSeconds": {
                            "default": 5,
                            "type": "integer"
                        }
                    }
                },
                "readiness": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "default": true,
                            "type": "boolean"
                        },
                        "failureThreshold": {
                            "default": 3,
                            "type": "integer"
                        },
                        "initialDelaySeconds": {
                            "default": 5,
                            "type": "integer"
                        },
                        "periodSeconds": {
                            "default": 5,
                            "type": "integer"
                        },
                        "timeoutSeconds": {
                            "default": 5,
                            "type": "integer"
                        }
                    }
                }
            }
        },
        "referenceGrant": {
            "type": "object",
            "properties": {
                "create": {
                    "default": false,
                    "type": "boolean"
                },
                "fromNamespaces": {
                    "default": [],
                    "type": "array"
                }
            }
        },
        "replicaCount": {
            "default": 1,
            "type": "integer"
        },
        "resources": {
            "type": "object",
            "properties": {
                "limits": {
                    "type": "object",
                    "properties": {
                        "cpu": {
                            "type": "string"
                        },
                        "memory": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "securityContext": {
            "type": "object",
            "properties": {
                "allowPrivilegeEscalation": {
                    "type": "boolean"
                },
                "capabilities": {
                    "type": "object",
                    "properties": {
                        "drop": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                },
                "readOnlyRootFilesystem": {
                    "type": "boolean"
                },
                "runAsNonRoot": {
                    "type": "boolean"
                },
                "runAsUser": {
                    "type": "integer"
                }
            }
        },
        "service": {
            "type": "object",
            "properties": {
                "grpcPort": {
                    "default": 8080,
                    "type": "integer"
                },
                "httpPort": {
                    "default": 8081,
                    "type": "integer"
                },
                "type": {
                    "default": "ClusterIP",
                    "type": "string"
                }
            }
        },
        "serviceAccount": {
            "type": "object",
            "properties": {
                "create": {
                    "default": true,
                    "type": "boolean"
                },
                "name": {
                    "default": "",
                    "type": "string"
                }
            }
        },
        "templates": {
            "type": "object",
            "properties": {
                "captchaTemplateContent": {
                    "default": "",
                    "type": "string"
                },
                "deniedTemplateContent": {
                    "default": "",
                    "type": "string"
                }
            }
        }
    }
}
