{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/grnhse/lotus/pkg/types/lotus-manifest","$ref":"#/$defs/LotusManifest","$defs":{"Autoscaling":{"properties":{"metrics":{"items":{"$ref":"#/$defs/AutoscalingMetrics"},"type":"array"}},"additionalProperties":false,"type":"object","required":["metrics"]},"AutoscalingMetrics":{"properties":{"name":{"type":"string"},"query":{"type":"string"},"average_value":{"type":"integer","description":"nolint:tagliatelle"}},"additionalProperties":false,"type":"object","required":["name","query","average_value"]},"ClientOf":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"application":{"type":"string"}},"additionalProperties":false,"type":"object","required":["name","type"]},"Component":{"properties":{"livenessProbe":{"$ref":"#/$defs/Probe","description":"Periodic probe of container liveness.\nContainer will be restarted if the probe fails.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/"},"readinessProbe":{"$ref":"#/$defs/Probe","description":"Periodic probe of container service readiness.\nContainer will be removed from service endpoints if the probe fails.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/"},"startupProbe":{"$ref":"#/$defs/Probe","description":"StartupProbe indicates whether the container has started.\nAll other probes are disabled until startup succeeds.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/"},"name":{"type":"string","maxLength":45,"pattern":"^[a-z][a-z\\d-\\.]*[a-z\\d]$","description":"Unique name for the component. It must be DNS-friendly"},"progressDeadlineSeconds":{"type":"integer","description":"Used for deployments that need longer than the default 5 minutes to start up"},"type":{"type":"string","enum":["http","worker","predeploy","postdeploy","grpc-sso-proxy","cron"],"description":"The type of component."},"service_name":{"type":"string","description":"The service name is only useful for grpc-sso-proxy components. If present,\na health service will be spun up for the service name, and it can be\npossible to perform auto updates of binaries."},"command":{"type":"string","description":"Command describes how to run the workload"},"rollingUpdate":{"$ref":"#/$defs/RollingUpdateDeployment"},"sso_proxy":{"$ref":"#/$defs/SSOProxy","description":"SSO Proxy settings for http components (grpc-sso-proxy has it enabled by default)"},"autoscaling":{"$ref":"#/$defs/Autoscaling","description":"Autoscaling settings for components of type http, grpc-sso-proxy or worker"},"expose_metrics":{"$ref":"#/$defs/ExposeMetrics","description":"ExposeMetrics for components of type http"}},"additionalProperties":false,"type":"object","required":["name","type","command"]},"Datastore":{"properties":{"name":{"type":"string","maxLength":24,"pattern":"^[a-z][a-z\\d-\\.]*[a-z\\d]$"},"type":{"type":"string"},"className":{"type":"string"},"disableFirewallRules":{"type":"boolean"},"postgresOptions":{"type":"object"},"elasticsearchOptions":{"type":"object"},"kafkaOptions":{"type":"object"},"kafkaClientOptions":{"type":"object"},"kafkaConnectorOptions":{"type":"object"},"opensearchOptions":{"type":"object"},"allowedClientApplications":{"items":{"type":"string"},"type":"array","description":"apps that will connect to the datastores for this app"},"clientOf":{"$ref":"#/$defs/ClientOf","description":"datastores that connect to other ones need to pass in the reference claim here"}},"additionalProperties":false,"type":"object","required":["name","type"]},"ExecAction":{"properties":{"command":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"ExposeMetrics":{"properties":{"enabled":{"type":"boolean"},"port":{"type":"integer","description":"optional port to expose metrics on, defaults to 8080"}},"additionalProperties":false,"type":"object","required":["enabled"]},"GRPCAction":{"properties":{"port":{"type":"integer"},"service":{"type":"string"}},"additionalProperties":false,"type":"object","required":["port","service"]},"HTTPGetAction":{"properties":{"path":{"type":"string"},"port":{"$ref":"#/$defs/IntOrString"},"host":{"type":"string"},"scheme":{"type":"string"},"httpHeaders":{"items":{"$ref":"#/$defs/HTTPHeader"},"type":"array"}},"additionalProperties":false,"type":"object","required":["port"]},"HTTPHeader":{"properties":{"name":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"type":"object","required":["name","value"]},"IntOrString":{"properties":{"Type":{"type":"integer"},"IntVal":{"type":"integer"},"StrVal":{"type":"string"}},"additionalProperties":false,"type":"object","required":["Type","IntVal","StrVal"]},"LotusManifest":{"properties":{"name":{"type":"string","maxLength":45,"pattern":"^[a-z][a-z\\d-\\.]*[a-z\\d]$","title":"application name","description":"The application name should match the repository's"},"components":{"items":{"$ref":"#/$defs/Component"},"type":"array","description":"Workloads to run"},"auth_tokens":{"items":{"type":"string"},"type":"array","description":"Tokens minted to securely interact with other applications"},"firewall_rules":{"items":{"type":"string"},"type":"array","description":"Named egress rules"},"datastores":{"items":{"$ref":"#/$defs/Datastore"},"type":"array","description":"List of datastores to provision"}},"additionalProperties":false,"type":"object","required":["name","components"]},"Probe":{"properties":{"exec":{"$ref":"#/$defs/ExecAction"},"httpGet":{"$ref":"#/$defs/HTTPGetAction"},"tcpSocket":{"$ref":"#/$defs/TCPSocketAction"},"grpc":{"$ref":"#/$defs/GRPCAction"},"initialDelaySeconds":{"type":"integer"},"timeoutSeconds":{"type":"integer"},"periodSeconds":{"type":"integer"},"successThreshold":{"type":"integer"},"failureThreshold":{"type":"integer"},"terminationGracePeriodSeconds":{"type":"integer"}},"additionalProperties":false,"type":"object"},"RollingUpdateDeployment":{"properties":{"maxUnavailable":{"$ref":"#/$defs/IntOrString"},"maxSurge":{"$ref":"#/$defs/IntOrString"}},"additionalProperties":false,"type":"object"},"SSOProxy":{"properties":{"enabled":{"type":"boolean"},"pass_auth_header":{"type":"boolean","description":"pass OIDC IDToken to upstream via Authorization Bearer header"},"allow_bearer_auth":{"type":"boolean","description":"skip requests that have verified JWT bearer tokens"},"skip_auth":{"items":{"type":"string"},"type":"array","description":"bypass authentication for requests that match the method \u0026 path. Format: method=path_regex OR path_regex alone for all methods"}},"additionalProperties":false,"type":"object"},"TCPSocketAction":{"properties":{"port":{"$ref":"#/$defs/IntOrString"},"host":{"type":"string"}},"additionalProperties":false,"type":"object","required":["port"]}}}
