Domain Catalog
The Domain Catalog allows you to group all of your entities (services, resources, and other domains) into hierarchical, logical units. For example, you could represent Cortex's Scorecards system in the following hierarchy:
Scorecards [Domain]
└── CQL [Domain]
| ├── Parser [Service]
└── Evaluator [Domain]
| ├── Async Evaluator Service [Service]
| ├── Scorecard Cache [Service]
Domain children
You can define a list of other catalog entities as children for a domain, allowing you to represent a hierarchy of how
your services & resources are modeled across your workspace using the x-cortex-children
tag.
openapi: 3.0.0
info:
title: Payments
description: This is my cool domain.
x-cortex-tag: payments-domain
x-cortex-type: domain
x-cortex-children:
- tag: child-domain-1
- tag: child-service-1
This hierarchy is available to look at across the domain catalog pages, and can also be used to inherit ownership across different levels.
Domain parents
Domain children allow you to define the domain relationship from the top-down, but in some cases it may be easier to define the domain hierarchy from the bottom-up. For these cases, the x-cortex-domain-parents
can be added to any entity's YAML to define its parents.
openapi: 3.0.0
info:
title: Payments
description: This is my cool service.
x-cortex-tag: payments-service
x-cortex-domain-parents:
- tag: parent-domain-1
- tag: parent-domain-2
Ownership inheritance
One major use-case for domains is defining ownership for the subtree of catalog entities. Instead of defining ownership individually for every single service in your catalog, you can define ownership at the domain level and have that pass down to all of its children.
openapi: 3.0.0
info:
title: Payments
description: This is my cool domain.
x-cortex-tag: payments-domain
x-cortex-type: domain
x-cortex-owners:
- type: GROUP
name: cortexapps/engineering
provider: GITHUB
inheritance: APPEND | FALLBACK | NONE
The inheritance
type for each owner can be one of APPEND
, FALLBACK
, or NONE
.
APPEND [Default]: This owner is appended to the list of owners for all child entities.
FALLBACK: In the case where a child has no valid owners, including fallbacks, this fallback will be assigned as the owner.
NONE: This owner owns the domain, but not necessarily any of its children (no inheritance).
GitOps
When using GitOps you can define any number of domains
in any repository. Domain definitions should live in the .cortex/domains
directory in your repository.
For example, you may store all of your domain definitions in a single repository, along with your other definitions.
.
└── .cortex
├── catalog
│ ├── database.yml
│ ├── s3-bucket.yml
│ ├── auth-service.yml
│ └── billing-service.yml
├── domains
│ ├── billing-domain.yml
│ └── health-domain.yml
└── scorecards
├── service-readiness.yml
└── security.yml