Omnistrate Service Specification¶
Omnistrate Service Specification Overview (Helm, Operators, Kustomize, Terraform, OpenTofu)¶
When defining a service using Helm, Operators, Kustomize, Terraform or OpenTofu we need to define the details of the Plan using a specification file.
Info
When using docker compose there is no need to set up this file as the information for the Plan can be defined on the docker compose spec. More information under Getting started / Setup using Compose
A complete list of settings that can be configured on the Service Spec file is included below.
The default path for a Plan specification file is spec.yaml.
Using Schema Validation¶
To simplify the definition of this specification file Omnistrate provide a JSON schema that can be used for validation. You can use the JSON schema in IDEs that use the YAML Language Server (eg: VSCode / NeoVim).
# yaml-language-server: $schema=https://api.omnistrate.cloud/2022-09-01-00/schema/service-spec-schema.json
For IntelliJ replace the top line with the following line to set up the yaml schema
Plan schema definitions¶
This Service Schema defines the structure for a Plan specification in Omnistrate. It consists of several key components such as API parameters, capabilities, compute resources, network configurations, etc. Each component is detailed below.
Root schema¶
The root of the schema includes the following properties:
| Property | Type | Description |
|---|---|---|
name | string | The name of the Plan. |
deployment | deployment schema | The deployment type of the Plan. The possible values are hostedDeployment and byoaDeployment. |
features | features schema | The list of features enabled for the Plan. The possible values are INTERNAL and CUSTOMER. |
services | array | A list of service configurations for the plan. Required. |
pricing | pricing schema | A list of pricing dimensions for the plan. |
metering | metering schema | The configuration for metering. |
billingProviders | billing provider schema | A list of billing providers. |
maxNumberOfInstancesAllowed | integer | The maximum number of instances allowed. |
loadBalancers | load balancers schema | The configuration for load balancers. |
enableDeletionProtection | boolean | Whether deletion protection is enabled for the plan. |
Deployment schema¶
The deployment type of the Plan. The possible values are hostedDeployment and byoaDeployment. Within the deployment type we need to add the information for the cloud provide account to use. If you are planning to use a single cloud provider, there is no need to add information for the others.
| Property | Type | Description |
|---|---|---|
awsAccountId | string | AWS Account ID. |
awsBootstrapRoleAccountArn | string | ARN of the AWS bootstrap role. |
gcpProjectId | string | GCP Project ID. |
gcpProjectNumber | string | GCP Project number. |
gcpServiceAccountEmail | string | Email of the GCP service account. |
azureSubscriptionId | string | Azure Subscription GUID. |
azureTenantId | string | Azure Tenant GUID. |
Features schema¶
Defines the available features for both internal and customer-facing use cases. Features are categorized into INTERNAL and CUSTOMER, specifying their respective functionalities.
| Property | Type | Description |
|---|---|---|
INTERNAL | string | Features scoped to SaaS Providers |
CUSTOMER | string | Feature scoped to end customer |
Supported INTERNAL Features¶
| Property | Type | Description |
|---|---|---|
logs | string | Enable SaaS Provider logs on the operational log dashboard |
Supported CUSTOMER Features¶
| Property | Type | Description |
|---|---|---|
logs | string | Enable customer visible logs |
metrics | object | Enable customer-visible metrics collection, additional metric modeling, and dashboards |
licensing | string | Enable software license management |
CUSTOMER.metrics schema (advanced metrics and dashboards)¶
Use features.CUSTOMER.metrics to define how customer-facing metrics are collected and visualized.
features:
CUSTOMER:
metrics:
scrapeTargets:
- name: postgres
podSelector:
app.kubernetes.io/name: postgresql
endpoint:
portNumber: 9187
path: /metrics
scheme: http
additionalMetrics:
postgres:
metrics:
pg_stat_activity_count:
"Active Sessions":
aggregationFunction: sum
labelFilters:
datname: postgres
state: active
pg_locks_count:
"Locks by Mode":
aggregationFunction: sum
groupByLabels:
- mode
labelFilters:
datname: postgres
dashboards:
exporter:
title: "Postgres Exporter"
sections:
- title: "Sessions and Locks"
panels:
- title: "Active Sessions"
type: timeseries
unit: short
targets:
- ref: "Active Sessions"
- title: "Locks by Mode"
type: timeseries
unit: short
targets:
- ref: "Locks by Mode"
Configuration structure and intent:
scrapeTargets: defines where metrics are scraped from.- Use
podSelectorand/orserviceSelectorto discover endpoints. endpointsupportsportNameorportNumber, pluspath,scheme, and optional queryparams.additionalMetrics.<resource>.metrics: models raw metrics into stable named series.<resource>should match your service component name (for example,postgres).- First key is raw metric name (for example,
pg_stat_activity_count). - Nested key is exported series name (for example,
"Active Sessions"), referenced by dashboards. - Optional per-series controls:
aggregationFunction:sum,min,max,avggroupByLabels: preserves selected dimensions in the outputlabelFilters: filters label key/value pairs before aggregation
additionalMetrics.<resource>.dashboards: builds custom dashboards from modeled series.title: dashboard title overridesections[]: ordered dashboard sectionspanels[]: panel definitions (timeseries,stat,gauge,table)targets[]:ref: reference a modeled series name frommetricsexpr: raw PromQL (optional override)legend,axis: optional display controls
- Optional panel fields:
description,unit,min,max,thresholds,tags
Dashboard property details:
| Path | Type | Required | Description |
|---|---|---|---|
dashboards.<dashboardKey>.title | string | No | Display title for the dashboard |
dashboards.<dashboardKey>.sections | array | Yes | Ordered list of sections |
sections[].title | string | Yes | Section heading |
sections[].description | string | No | Optional section help/context |
sections[].panels | array | Yes | Panels under section |
panels[].title | string | Yes | Panel title |
panels[].type | enum | Yes | timeseries, stat, gauge, table |
panels[].description | string | No | Optional panel description |
panels[].unit | string | No | Unit formatting (for example bytes, s, short) |
panels[].min / panels[].max | number | No | Explicit panel bounds |
panels[].targets | array | Yes | Query targets for panel |
targets[].ref | string | Recommended | Modeled series key from additionalMetrics.<resource>.metrics |
targets[].expr | string | Optional alternative | Raw PromQL expression |
targets[].legend | string | No | Legend override |
targets[].axis | enum | No | Axis side: left or right |
panels[].thresholds | array | No | Threshold definitions |
thresholds[].color | string | Yes (if used) | Threshold color |
thresholds[].value | number | Yes (if used) | Threshold boundary value |
panels[].tags | array[string] | No | Optional panel tags |
Practical guidance:
- Start by validating
scrapeTargetsfirst; missing scrape configuration is the most common reason custom panels stay empty. - Use modeled series names in
targets.refso dashboard layout stays stable if raw metric labels change. - Apply
labelFiltersbefore aggregation to avoid mixing unrelated dimensions. - For copy/paste panel templates (health stat, saturation trend, distribution table), see Build Guide / Integrations.
- For legacy-to-advanced migration steps, see Build Guide / Integrations.
Service schema¶
Each Plan has a list of Resources that need to be created as part of the Plan. For each service component we need to define a set of properties.
| Property | Type | Description |
|---|---|---|
name | string | The name of the Resources. |
internal | boolean | Defines if the Resource can be created by customers or is an internal resource used by other Resources |
dependsOn | array | List of Resources defined on this service that need to be created before this Resource |
apiParameters | api parameters schema | List of parameters for the Resource. |
compute | compute schema | The compute resources allocated for the service. |
network | network schema | Network-related configuration for the service, including ports. |
capabilities | capabilities schema | Defines Resource characteristics like running on more than one AZ. |
helmChartConfiguration | helm schema | Helm chart configuration, if the Resource is defined using Helm. Can be specified for each Helm resource in the service |
operatorCRDConfiguration | operator schema | Operator CRD configuration for provisioning the Resource, if the service is component is defined as an Operator. Can be specified for each Operator resource in the service |
kustomizeConfiguration | kustomize schema | Kustomize configuration for provisioning the Resource if the Resource is defined using Kustomize. Can be specified for each Kustomize resource in the service |
terraformConfigurations | terraform schema | Terraform configuration for provisioning the Resource on each cloud provider, if the Resource requires a terraform stack. Can be specified for each Terraform/OpenTofu resource in the service |
deploymentTarget | deployment target schema | Optional. Specifies the target account for the resource. When set to ControlPlane, the resource is deployed in the service provider's account instead of following the deployment model default. See Deployment Target. |
API parameters schema¶
Defines the list of API parameters for the Resource
| Property | Type | Description |
|---|---|---|
key | string | The key of the parameter. |
description | string | Description of the parameter. |
name | string | The display name of the parameter. |
type | string | The type of the parameter (e.g., string). |
modifiable | boolean | Indicates if the parameter is modifiable. |
required | boolean | Indicates if the parameter is required. |
export | boolean | If true, the parameter is exportable. |
defaultValue | string | Default value of the parameter. |
regex | string | A regular expression to validate the parameter value. |
options | array | Available options for the parameter. |
labeledOptions | object | A set of labeled options as key-value pairs. |
limits | object | Limit settings for the parameter. |
dependentResourceKey | string | Key for dependent resources. |
parameterDependencyMap | object | Dependency map for other parameters. |
scope | object | Conditions to restrict parameter visibility by cloud provider. Contains CloudProviders (array of aws, gcp, azure). |
The valid types are described on the api parameters build guide
See Scoped API Parameters for usage examples.
Compute schema¶
Configuration for compute resources for the Resource.
| Property | Type | Description |
|---|---|---|
instanceTypes | array | List of instance types supported. |
rootVolumeSizeGi | integer | The size of the root volume in Gi. |
cpuArchitecture | string | The CPU architecture for the resource. |
Instance Type schema¶
| Property | Type | Description |
|---|---|---|
name | string | The name of the instance type. |
apiParam | string | The API parameter name associated with the instance type. |
cloudProvider | string | The cloud provider for the instance type (e.g., AWS, GCP, Azure). |
Network schema¶
Configuration for network interfaces for the Resource.
| Property | Type | Description |
|---|---|---|
ports | array | A list of ports and port ranges. Supports integer values (e.g., 5432) and range syntax (e.g., 8000-8100). |
namedPorts | map | A map of port names to ports or port ranges. Supports integer values and range syntax (e.g., postgresql: 5432, grpc-range: 50000-50010). |
Capabilities schema¶
Specifies capabilities enabled for the Resource.
| Property | Type | Description |
|---|---|---|
enableMultiZone | boolean | Whether multi-zone support is enabled. |
Helm chart configuration schema¶
When defining a Resource using Helm charts we need to specify the Helm chart definition and values
Info
You can use system parameters to customize Helm Chart values. A detailed list of system parameters be found on Build Guide / System Parameters.
| Property | Type | Description |
|---|---|---|
chartName | string | Name of the Helm chart. Required. |
chartVersion | string | Version of the Helm chart. Required. |
chartRepoName | string | Name of the chart repository. Required. |
chartRepoURL | string | URL of the chart repository. Required. |
chartValues | object | Values to be passed to the Helm chart. |
chartAffinityControl | object | Affinity control settings for the Helm chart. See chart affinity control schema. |
authProvider | object | Username and password to access a private Helm chart repository. |
Chart affinity control schema¶
Controls automatic injection of Kubernetes affinity rules into Helm chart manifests. By default, Omnistrate automatically injects node affinity and pod anti-affinity rules to ensure proper scheduling on Omnistrate-managed nodes. For more details, see Helm Chart Customization.
| Property | Type | Default | Description |
|---|---|---|---|
enableInjection | boolean | true | Enables automatic injection of node affinity and pod anti-affinity rules into Helm chart manifests. |
enableSharedHost | boolean | true | Enables shared host support, allowing pods to be co-located when appropriate. |
Operator CRD schema¶
When defining a Resource using Operators CRD we need to specify the CDR information as test and add a reference to the required Helm charts
Info
You can use system parameters to customize Operators CRD. A detailed list of system parameters be found on Build Guide / System Parameters.
| Property | Type | Description |
|---|---|---|
template | string | The template for the operator CRD configuration. |
readinessConditions | object | Conditions that determine the readiness state of the CRD. |
supplementalFiles | array | A list of supplemental files (inline defined as multi-line strings) for the CRD. |
outputParameters | object | A map of output parameters with string values. |
helmChartDependencies | array | A list of Helm chart dependencies referenced by the CRD. |
Helm chart dependency schema¶
| Property | Type | Description |
|---|---|---|
chartName | string | The name of the Helm chart dependency. |
chartVersion | string | The version of the Helm chart dependency. |
chartRepoName | string | Name of the chart repository. |
chartRepoURL | string | URL of the chart repository. |
chartValues | object | Values to be passed to the Helm chart. |
authProvider | object | Username and password to access private Helm cart repo. |
Kustomize configuration schema¶
When defining a Resource using Kustomize you need to specify a reference to the GitHub repository where the Kustomize stack is defined.
| Property | Type | Description |
|---|---|---|
kustomizePath | string | The path to the Kustomize configuration. |
gitConfiguration | git access schema | Configuration for Git access related to Kustomize files. |
Deployment target schema¶
Specifies the target account for resource deployment. Only supported for Terraform resources in BYOC deployments. Once set, the account value cannot be changed.
| Property | Type | Description |
|---|---|---|
account | enum | The target account: DataPlane (default) deploys to the dataplane account determined by deployment model; ControlPlane deploys to the service provider's Provisioner host cluster (AWS only). |
Warning
The account setting is immutable after creation. Existing resources without an explicit deploymentTarget default to DataPlane and cannot be changed to ControlPlane.
For usage details and restrictions, see Deployment Target.
Terraform configuration schema¶
When defining a Terraform (or OpenTofu) stack to be executed to provision the Resource, you need to add a reference to the GitHub repository where the stack definition is stored. A different Terraform stack can be defined for each cloud provider using the configurationPerCloudProvider property.
Info
You can use system parameters to pass input parameters to your Terraform stack. A detailed list of system parameters can be found on Build Guide / System Parameters.
| Property | Type | Description |
|---|---|---|
configurationPerCloudProvider | per-cloud-provider schema | Terraform configuration for each cloud provider. Accepts aws, gcp, and azure keys. |
Terraform per-cloud-provider configuration schema¶
Each key under configurationPerCloudProvider (aws, gcp, azure) accepts the following properties:
| Property | Type | Description |
|---|---|---|
terraformPath | string | The directory path within the repository containing the Terraform stack for this cloud provider. Required. |
terraformExecutionIdentity | string | The identity (AWS IAM role ARN or GCP service account email) to use for executing Terraform. |
variablesValuesFileOverride | string | Inline Terraform variable definitions in .tfvars format. Supports Omnistrate system parameters for dynamic value injection at deployment time. |
gitConfiguration | git access schema | Configuration for Git access to the repository containing the Terraform stack. Required. |
Example:
terraformConfigurations:
configurationPerCloudProvider:
aws:
terraformPath: /terraform/aws
variablesValuesFileOverride: |
vpc_id = "{{ $sys.deploymentCell.cloudProviderNetworkID }}"
region = "{{ $sys.deploymentCell.region }}"
gitConfiguration:
reference: refs/heads/main
repositoryUrl: https://github.com/your-org/infra-repo.git
gcp:
terraformPath: /terraform/gcp
gitConfiguration:
reference: refs/heads/main
repositoryUrl: https://github.com/your-org/infra-repo.git
For more details, see Terraform Overview, Multi-Cloud Configuration, and Input Parameters and Output Mapping.
Git configuration schema¶
Defines the configuration for Git access.
| Property | Type | Description |
|---|---|---|
userName | string | Git user name. |
accessToken | string | Access token for Git authentication. |
reference | string | Reference to the Git branch or commit. Required. |
repositoryUrl | string | URL of the Git repository. Required. |
Pricing schema¶
Defines the pricing structure for the plan based on various dimensions.
| Property | Type | Description |
|---|---|---|
dimension | string | The name of the pricing dimension (e.g., "CPU"). |
unit | string | (Optional) The unit of measurement for the dimension. |
timeUnit | string | (Optional) The time unit for billing (e.g., "hour"). |
price | number | The price per unit. |
Info
For more detailed information on the pricing, metering, billingProviders configuration, please see End-to-End Billing and Usage Metering.
Metering schema¶
Defines the configuration for metering.
| Property | Type | Description |
|---|---|---|
s3BucketArn | string | The ARN of the S3 bucket for metering. |
s3BucketRegion | string | The region of the S3 bucket. |
gcsBucketName | string | The name of the GCS bucket. |
Billing Provider schema¶
Defines a billing provider.
| Property | Type | Description |
|---|---|---|
name | string | The name of the billing provider. Use stripe (case-insensitive) for Stripe integration or the name you set for your bring-your-own (BYO) billing provider. |
externalProductID | string | (Stripe only) The external product ID. |
enablePaywall | boolean | (Stripe only) Specifies if a paywall is enabled. |
isDefault | boolean | Specifies if this is the default provider. |
Load Balancers schema¶
Defines the configuration for L7 and L4 load balancers.
| Property | Type | Description |
|---|---|---|
https | array | A list of L7 load balancer configurations. |
tcp | array | A list of L4 load balancer configurations. |
L7 Load Balancer Configuration schema¶
| Property | Type | Description |
|---|---|---|
name | string | The name of the L7 load balancer. |
description | string | A description of the L7 load balancer. |
enableCustomDNS | boolean | Specifies if custom DNS is enabled. |
paths | array | A list of L7 load balancer paths. |
L7 Load Balancer Path Configuration schema¶
| Property | Type | Description |
|---|---|---|
targetKubernetesServiceName | string | The name of the target Kubernetes service. |
associatedResourceKey | string | The associated resource key. |
path | string | The path for the load balancer rule. |
backendPort | integer | The backend port. |
L4 Load Balancer Configuration schema¶
| Property | Type | Description |
|---|---|---|
name | string | The name of the L4 load balancer. |
description | string | A description of the L4 load balancer. |
ports | array | A list of L4 load balancer ports. |
L4 Load Balancer Port Configuration schema¶
| Property | Type | Description |
|---|---|---|
associatedResourceKeys | array | A list of associated resource keys. |
backendPort | integer | The backend port. |
ingressPort | integer | The ingress port. |
