{
    "$schema": "http://json-schema.org/draft-07/schema",
    "type": "object",
    "required": [
        "clusterName",
        "authentication",
        "enterprise",
        "operator",
        "podSecurityPolicy",
        "labels",
        "chartMode",
        "validateConfigOnDeploy",
        "highAvailability",
        "podMonitor",
        "tls",
        "image",
        "enterpriseImage",
        "log",
        "affinity",
        "nodeSelector",
        "annotations",
        "extraContainers",
        "extraVolumes",
        "extraVolumeMounts",
        "imagePullPolicy",
        "initContainers",
        "resources",
        "tolerations",
        "probeTimeoutSeconds"
    ],
    "properties": {
        "clusterName": {
            "$id": "#/properties/clusterName",
            "type": "string",
            "default": ""
        },
        "proxyProtocol": {
            "$id": "#/properties/proxyProtocol",
            "type": "string",
            "default": "",
            "enum": [
                "off",
                "on"
            ]
        },
        "auth": {
            "$id": "#/properties/auth",
            "type": "object"
        },
        "proxy": {
            "$id": "#/properties/proxy",
            "type": "object"
        },
        "createProxyToken": {
            "$id": "#/properties/createProxyToken",
            "type": "boolean",
            "default": true
        },
        "podMonitor": {
            "$id": "#/properties/podMonitor",
            "type": "object",
            "required": [
                "enabled"
            ],
            "properties": {
                "enabled": {
                    "$id": "#/properties/podMonitor/enabled",
                    "type": "boolean",
                    "default": false
                },
                "additionalLabels": {
                    "$id": "#/properties/podMonitor/additionalLabels",
                    "type": "object",
                    "default": {
                        "prometheus": "default"
                    },
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "interval": {
                    "$id": "#/properties/podMonitor/interval",
                    "type": "string",
                    "default": "30s"
                }
            }
        },
        "authentication": {
            "$id": "#/properties/authentication",
            "type": "object",
            "required": [
                "type",
                "localAuth"
            ],
            "properties": {
                "type": {
                    "$id": "#/properties/authentication/properties/type",
                    "type": "string",
                    "default": "local"
                },
                "connectorName": {
                    "$id": "#/properties/authentication/properties/connectorName",
                    "type": "string",
                    "default": ""
                },
                "localAuth": {
                    "$id": "#/properties/authentication/properties/localAuth",
                    "type": "boolean",
                    "default": true
                },
                "lockingMode": {
                    "$id": "#/properties/authentication/properties/lockingMode",
                    "type": "string",
                    "default": ""
                },
                "secondFactor": {
                    "$id": "#/properties/authentication/properties/secondFactor",
                    "type": "string",
                    "enum": [
                        "off",
                        "on",
                        "otp",
                        "optional",
                        "webauthn"
                    ],
                    "default": "otp"
                },
                "webauthn": {
                    "$id": "#/properties/authentication/properties/webauthn",
                    "type": "object",
                    "required": [],
                    "properties": {
                        "attestationAllowedCas": {
                            "$id": "#/properties/authentication/properties/webauthn/properties/attestationAllowedCas",
                            "type": "array",
                            "default": []
                        },
                        "attestationDeniedCas": {
                            "$id": "#/properties/authentication/properties/webauthn/properties/attestationDeniedCas",
                            "type": "array",
                            "default": []
                        }
                    }
                }
            }
        },
        "authenticationType": {
            "$id": "#/properties/authenticationType",
            "type": "string"
        },
        "authenticationSecondFactor": {
            "$id": "#/properties/authenticationSecondFactor",
            "type": "object",
            "required": [],
            "properties": {
                "secondFactor": {
                    "$id": "#/properties/authenticationSecondFactor/properties/secondFactor",
                    "type": "string",
                    "enum": [
                        "off",
                        "on",
                        "otp",
                        "optional",
                        "webauthn"
                    ],
                    "default": "otp"
                },
                "webauthn": {
                    "$id": "#/properties/authenticationSecondFactor/properties/webauthn",
                    "type": "object",
                    "required": [],
                    "properties": {
                        "attestationAllowedCas": {
                            "$id": "#/properties/authenticationSecondFactor/properties/webauthn/properties/attestationAllowedCas",
                            "type": "array",
                            "default": []
                        },
                        "attestationDeniedCas": {
                            "$id": "#/properties/authenticationSecondFactor/properties/webauthn/properties/attestationDeniedCas",
                            "type": "array",
                            "default": []
                        }
                    }
                }
            }
        },
        "proxyListenerMode": {
            "$id": "#/properties/proxyListenerMode",
            "type": "string",
            "default": ""
        },
        "sessionRecording": {
            "$id": "#/properties/sessionRecording",
            "type": "string",
            "default": ""
        },
        "separatePostgresListener": {
            "$id": "#/properties/separatePostgresListener",
            "type": "boolean",
            "default": false
        },
        "separateMongoListener": {
            "$id": "#/properties/separateMongoListener",
            "type": "boolean",
            "default": false
        },
        "publicAddr": {
            "$id": "#/properties/publicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "kubePublicAddr": {
            "$id": "#/properties/kubePublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "mongoPublicAddr": {
            "$id": "#/properties/mongoPublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "mysqlPublicAddr": {
            "$id": "#/properties/mysqlPublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "postgresPublicAddr": {
            "$id": "#/properties/postgresPublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "sshPublicAddr": {
            "$id": "#/properties/sshPublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "tunnelPublicAddr": {
            "$id": "#/properties/tunnelPublicAddr",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": []
        },
        "teleportVersionOverride": {
            "$id": "#/properties/teleportVersionOverride",
            "type": "string",
            "default": ""
        },
        "acme": {
            "$id": "#/properties/acme",
            "type": "boolean",
            "default": false
        },
        "acmeEmail": {
            "$id": "#/properties/acmeEmail",
            "type": "string",
            "default": ""
        },
        "acmeURI": {
            "$id": "#/properties/acmeURI",
            "type": "string",
            "default": ""
        },
        "enterprise": {
            "$id": "#/properties/enterprise",
            "type": "boolean",
            "default": false
        },
        "installCRDs": {
            "$id": "#/properties/installCRDs",
            "type": "boolean"
        },
        "operator": {
            "$id": "#/properties/operator",
            "type": "object",
            "required": [
                "enabled"
            ],
            "properties": {
                "enabled": {
                    "$id": "#/properties/operator/properties/enabled",
                    "type": "boolean",
                    "default": false
                },
                "image": {
                    "$id": "#/properties/operator/properties/image",
                    "type": "string",
                    "default": "public.ecr.aws/gravitational/teleport-operator"
                },
                "resources": {
                    "$id": "#/properties/operator/properties/resources",
                    "type": "object",
                    "default": {}
                }
            }
        },
        "podSecurityPolicy": {
            "$id": "#/properties/podSecurityPolicy",
            "type": "object",
            "required": [
                "enabled"
            ],
            "properties": {
                "enabled": {
                    "$id": "#/properties/podSecurityPolicy/properties/enabled",
                    "type": "boolean",
                    "default": true
                }
            }
        },
        "labels": {
            "$id": "#/properties/labels",
            "type": "object",
            "default": {}
        },
        "chartMode": {
            "$id": "#/properties/chartMode",
            "type": "string",
            "enum": [
                "standalone",
                "aws",
                "azure",
                "gcp",
                "scratch"
            ],
            "default": "standalone"
        },
        "validateConfigOnDeploy": {
            "$id": "#/properties/validateConfigOnDeploy",
            "type": "boolean",
            "default": true
        },
        "standalone": {
            "$id": "#/properties/standalone",
            "type": "object",
            "required": [
                "volumeSize"
            ],
            "properties": {
                "existingClaimName": {
                    "$id": "#/properties/standalone/properties/existingClaimName",
                    "type": "string",
                    "default": ""
                },
                "volumeSize": {
                    "$id": "#/properties/standalone/properties/volumeSize",
                    "type": "string",
                    "default": ""
                }
            }
        },
        "persistence": {
            "$id": "#/properties/persistence",
            "type": "object",
            "required": [
                "enabled",
                "volumeSize"
            ],
            "properties": {
                "enabled": {
                    "$id": "#/properties/persistence/properties/enabled",
                    "type": "boolean",
                    "default": "true"
                },
                "existingClaimName": {
                    "$id": "#/properties/persistence/properties/existingClaimName",
                    "type": "string",
                    "default": ""
                },
                "storageClassName": {
                    "$id": "#/properties/persistence/properties/storageClassName",
                    "type": "string",
                    "default": ""
                },
                "volumeSize": {
                    "$id": "#/properties/persistence/properties/volumeSize",
                    "type": "string",
                    "default": ""
                }
            }
        },
        "aws": {
            "$id": "#/properties/aws",
            "type": "object",
            "properties": {
                "region": {
                    "$id": "#/properties/aws/properties/region",
                    "type": "string",
                    "default": ""
                },
                "backendTable": {
                    "$id": "#/properties/aws/properties/backendTable",
                    "type": "string",
                    "default": ""
                },
                "auditLogTable": {
                    "$id": "#/properties/aws/properties/auditLogTable",
                    "type": "string",
                    "default": ""
                },
                "auditLogMirrorOnStdout": {
                    "$id": "#/properties/aws/properties/auditLogMirrorOnStdout",
                    "type": "boolean",
                    "default": "false"
                },
                "sessionRecordingBucket": {
                    "$id": "#/properties/aws/properties/sessionRecordingBucket",
                    "type": "string",
                    "default": ""
                },
                "backups": {
                    "$id": "#/properties/aws/properties/backups",
                    "type": "boolean",
                    "default": false
                },
                "dynamoAutoScaling": {
                    "$id": "#/properties/aws/properties/dynamoAutoScaling",
                    "type": "boolean",
                    "default": false
                }
            },
            "if": {
                "properties": {
                    "dynamoAutoScaling": {
                        "const": true
                    }
                }
            },
            "then": {
                "properties": {
                    "readMinCapacity": {
                        "$id": "#/properties/aws/properties/readMinCapacity",
                        "type": "integer"
                    },
                    "readMaxCapacity": {
                        "$id": "#/properties/aws/properties/readMaxCapacity",
                        "type": "integer"
                    },
                    "readTargetValue": {
                        "$id": "#/properties/aws/properties/readTargetValue",
                        "type": "number"
                    },
                    "writeMinCapacity": {
                        "$id": "#/properties/aws/properties/writeMinCapacity",
                        "type": "integer"
                    },
                    "writeMaxCapacity": {
                        "$id": "#/properties/aws/properties/writeMaxCapacity",
                        "type": "integer"
                    },
                    "writeTargetValue": {
                        "$id": "#/properties/aws/properties/writeTargetValue",
                        "type": "number"
                    }
                }
            },
            "else": {
                "properties": {
                    "readMinCapacity": {
                        "$id": "#/properties/aws/properties/readMinCapacity",
                        "type": "null"
                    },
                    "readMaxCapacity": {
                        "$id": "#/properties/aws/properties/readMaxCapacity",
                        "type": "null"
                    },
                    "readTargetValue": {
                        "$id": "#/properties/aws/properties/readTargetValue",
                        "type": "null"
                    },
                    "writeMinCapacity": {
                        "$id": "#/properties/aws/properties/writeMinCapacity",
                        "type": "null"
                    },
                    "writeMaxCapacity": {
                        "$id": "#/properties/aws/properties/writeMaxCapacity",
                        "type": "null"
                    },
                    "writeTargetValue": {
                        "$id": "#/properties/aws/properties/writeTargetValue",
                        "type": "null"
                    }
                }
            }
        },
        "azure": {
            "$id": "#/properties/azure",
            "type": "object",
            "properties": {
                "databaseHost": {
                    "$id": "#/properties/azure/properties/databaseHost",
                    "type": "string",
                    "default": ""
                },
                "databaseUser": {
                    "$id": "#/properties/azure/properties/databaseUser",
                    "type": "string",
                    "default": ""
                },
                "backendDatabase": {
                    "$id": "#/properties/azure/properties/backendDatabase",
                    "type": "string",
                    "default": "teleport_backend"
                },
                "auditLogDatabase": {
                    "$id": "#/properties/azure/properties/auditLogDatabase",
                    "type": "string",
                    "default": "teleport_audit"
                },
                "auditLogMirrorOnStdout": {
                    "$id": "#/properties/azure/properties/auditLogMirrorOnStdout",
                    "type": "boolean",
                    "default": false
                },
                "sessionRecordingStorageAccount": {
                    "$id": "#/properties/azure/properties/sessionRecordingStorageAccount",
                    "type": "string",
                    "default": ""
                },
                "clientID": {
                    "$id": "#/properties/azure/properties/clientID",
                    "type": "string",
                    "default": ""
                },
                "databasePoolMaxConnections": {
                    "$id": "#/properties/azure/properties/databasePoolMaxConnections",
                    "type": "integer",
                    "default": 0
                }
            }
        },
        "gcp": {
            "$id": "#/properties/gcp",
            "type": "object",
            "properties": {
                "projectId": {
                    "$id": "#/properties/gcp/properties/projectId",
                    "type": "string",
                    "default": ""
                },
                "backendTable": {
                    "$id": "#/properties/gcp/properties/backendTable",
                    "type": "string",
                    "default": ""
                },
                "auditLogTable": {
                    "$id": "#/properties/gcp/properties/auditLogTable",
                    "type": "string",
                    "default": ""
                },
                "auditLogMirrorOnStdout": {
                    "$id": "#/properties/aws/properties/auditLogMirrorOnStdout",
                    "type": "boolean",
                    "default": "false"
                },
                "sessionRecordingBucket": {
                    "$id": "#/properties/gcp/properties/sessionRecordingBucket",
                    "type": "string",
                    "default": ""
                },
                "credentialSecretName": {
                    "$id": "#/properties/gcp/properties/credentialSecretName",
                    "type": "string",
                    "default": "teleport-gcp-credentials"
                }
            }
        },
        "highAvailability": {
            "$id": "#/properties/highAvailability",
            "type": "object",
            "required": [
                "replicaCount",
                "requireAntiAffinity",
                "certManager",
                "minReadySeconds",
                "podDisruptionBudget"
            ],
            "properties": {
                "replicaCount": {
                    "$id": "#/properties/highAvailability/properties/replicaCount",
                    "type": "integer",
                    "default": 1
                },
                "requireAntiAffinity": {
                    "$id": "#/properties/highAvailability/properties/requireAntiAffinity",
                    "type": "boolean",
                    "default": false
                },
                "certManager": {
                    "$id": "#/properties/highAvailability/properties/certManager",
                    "type": "object",
                    "required": [
                        "enabled",
                        "issuerName",
                        "issuerKind",
                        "issuerGroup"
                    ],
                    "properties": {
                        "addCommonName": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/addCommonName",
                            "type": "boolean",
                            "default": "false"
                        },
                        "addPublicAddrs": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/addPublicAddrs",
                            "type": "boolean",
                            "default": "false"
                        },
                        "enabled": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/enabled",
                            "type": "boolean",
                            "default": "false"
                        },
                        "issuerName": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/issuerName",
                            "type": "string",
                            "default": ""
                        },
                        "issuerKind": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/issuerKind",
                            "type": "string",
                            "default": "Issuer"
                        },
                        "issuerGroup": {
                            "$id": "#/properties/highAvailability/properties/certManager/properties/issuerGroup",
                            "type": "string",
                            "default": "cert-manager.io"
                        }
                    }
                },
                "minReadySeconds": {
                    "$id": "#/properties/highAvailability/properties/minReadySeconds",
                    "type": "integer",
                    "default": 15
                },
                "podDisruptionBudget": {
                    "$id": "#/properties/highAvailability/properties/podDisruptionBudget",
                    "type": "object",
                    "required": [
                        "enabled",
                        "minAvailable"
                    ],
                    "properties": {
                        "enabled": {
                            "$id": "#/properties/highAvailability/properties/podDisruptionBudget/properties/enabled",
                            "type": "boolean",
                            "default": false
                        },
                        "minAvailable": {
                            "$id": "#/properties/highAvailability/properties/podDisruptionBudget/properties/minAvailable",
                            "type": "integer",
                            "default": 1
                        }
                    }
                }
            }
        },
        "tls": {
            "$id": "#/properties/tls",
            "type": "object",
            "required": [
                "existingSecretName",
                "existingCASecretName"
            ],
            "properties": {
                "existingSecretName": {
                    "$id": "#/properties/tls/properties/existingSecretName",
                    "type": "string",
                    "default": ""
                },
                "existingCASecretName": {
                    "$id": "#/properties/tls/properties/existingCASecretName",
                    "type": "string",
                    "default": ""
                }
            }
        },
        "image": {
            "$id": "#/properties/image",
            "type": "string",
            "default": "public.ecr.aws/gravitational/teleport-distroless"
        },
        "enterpriseImage": {
            "$id": "#/properties/enterpriseImage",
            "type": "string",
            "default": "public.ecr.aws/gravitational/teleport-ent-distroless"
        },
        "imagePullSecrets": {
            "$id": "#/properties/imagePullSecrets",
            "type": "array",
            "default": []
        },
        "logLevel": {
            "$id": "#/properties/logLevel",
            "type": "string",
            "enum": [
                "DEBUG",
                "INFO",
                "WARN",
                "WARNING",
                "ERROR"
            ],
            "default": "INFO"
        },
        "log": {
            "$id": "#/properties/log",
            "type": "object",
            "required": [
                "output",
                "format",
                "extraFields"
            ],
            "properties": {
                "level": {
                    "$id": "#/properties/log/properties/level",
                    "type": "string",
                    "enum": [
                        "DEBUG",
                        "INFO",
                        "WARN",
                        "WARNING",
                        "ERROR"
                    ],
                    "default": "INFO"
                },
                "deployment": {
                    "$id": "#/properties/log/properties/output",
                    "type": "string",
                    "default": {}
                },
                "pod": {
                    "$id": "#/properties/log/properties/format",
                    "type": "string",
                    "default": {}
                },
                "service": {
                    "$id": "#/properties/log/properties/extraFields",
                    "type": "array",
                    "default": {}
                }
            }
        },
        "affinity": {
            "$id": "#/properties/affinity",
            "type": "object",
            "default": {}
        },
        "nodeSelector": {
            "$id": "#/properties/nodeSelector",
            "type": "object",
            "default": {}
        },
        "annotations": {
            "$id": "#/properties/annotations",
            "type": "object",
            "required": [
                "config",
                "deployment",
                "pod",
                "service",
                "serviceAccount",
                "certSecret",
                "ingress"
            ],
            "properties": {
                "config": {
                    "$id": "#/properties/annotations/properties/config",
                    "type": "object",
                    "default": {}
                },
                "deployment": {
                    "$id": "#/properties/annotations/properties/deployment",
                    "type": "object",
                    "default": {}
                },
                "pod": {
                    "$id": "#/properties/annotations/properties/pod",
                    "type": "object",
                    "default": {}
                },
                "service": {
                    "$id": "#/properties/annotations/properties/service",
                    "type": "object",
                    "default": {}
                },
                "serviceAccount": {
                    "$id": "#/properties/annotations/properties/serviceAccount",
                    "type": "object",
                    "default": {}
                },
                "certSecret": {
                    "$id": "#/properties/annotations/properties/certSecret",
                    "type": "object",
                    "default": {}
                }
            }
        },
        "service": {
            "$id": "#/properties/service",
            "type": "object",
            "required": [
                "type"
            ],
            "properties": {
                "type": {
                    "$id": "#properties/service/type",
                    "type": "string",
                    "default": "LoadBalancer"
                },
                "spec": {
                    "$id": "#/properties/service/spec",
                    "type": "object",
                    "default": {}
                }
            }
        },
        "ingress": {
            "enabled": {
                "$id": "#/properties/ingress/enabled",
                "type": "boolean",
                "default": false
            },
            "suppressAutomaticWildcards": {
                "$id": "#/properties/ingress/suppressAutomaticWildcards",
                "type": "boolean",
                "default": false
            },
            "spec": {
                "$id": "#/properties/ingress/spec",
                "type": "object",
                "default": {}
            }
        },
        "serviceAccount": {
            "$id": "#/properties/serviceAccount",
            "type": "object",
            "required": [],
            "properties": {
                "name": {
                    "$id": "#properties/service/name",
                    "type": "string",
                    "default": ""
                },
                "create": {
                    "$id": "#properties/service/create",
                    "type": "boolean",
                    "default": true
                }
            }
        },
        "rbac": {
            "$id": "#/properties/rbac",
            "type": "object",
            "required": [],
            "properties": {
                "create": {
                    "$id": "#properties/rbac/create",
                    "type": "boolean",
                    "default": true
                }
            }
        },
        "extraArgs": {
            "$id": "#/properties/extraArgs",
            "type": "array",
            "default": []
        },
        "extraEnv": {
            "$id": "#/properties/extraEnv",
            "type": "array",
            "default": []
        },
        "extraContainers": {
            "$id": "#/properties/extraContainers",
            "type": "array",
            "default": []
        },
        "extraVolumes": {
            "$id": "#/properties/extraVolumes",
            "type": "array",
            "default": []
        },
        "extraVolumeMounts": {
            "$id": "#/properties/extraVolumeMounts",
            "type": "array",
            "default": []
        },
        "imagePullPolicy": {
            "$id": "#/properties/imagePullPolicy",
            "type": "string",
            "enum": [
                "Never",
                "IfNotPresent",
                "Always"
            ],
            "default": "IfNotPresent"
        },
        "initContainers": {
            "$id": "#/properties/initContainers",
            "type": "array",
            "default": []
        },
        "postStart": {
            "$id": "#/properties/postStart",
            "type": "object",
            "required": [
                "command"
            ],
            "properties": {
                "command": {
                    "$id": "#properties/postStart/command",
                    "type": "array",
                    "default": []
                }
            }
        },
        "kubeClusterName": {
            "$id": "#/properties/kubeClusterName",
            "type": "string",
            "default": ""
        },
        "resources": {
            "$id": "#/properties/resources",
            "type": "object",
            "default": {}
        },
        "securityContext": {
            "$id": "#/properties/securityContext",
            "type": "object",
            "default": {}
        },
        "tolerations": {
            "$id": "#/properties/tolerations",
            "type": "array",
            "default": []
        },
        "priorityClassName": {
            "$id": "#/properties/priorityClassName",
            "type": "string",
            "default": ""
        },
        "probeTimeoutSeconds": {
            "$id": "#/properties/probeTimeoutSeconds",
            "type": "integer",
            "default": 1
        },
        "terminationGracePeriodSeconds": {
            "$id": "#/properties/terminationGracePeriodSeconds",
            "type": "integer",
            "default": 60
        }
    }
}
