Resolver Configuration
This page is the technical reference for OCM resolver configuration. For a high-level introduction, see OCM Resolvers.
Configuration File
Resolvers are configured in the OCM configuration file. By default, the CLI searches for configuration in
$HOME/.ocmconfig. You can also specify a configuration file explicitly with the --config flag.
For more information about the OCM configuration file, see .ocmconfig documentation.
The resolver configuration uses the type resolvers.config.ocm.software/v1alpha1 inside a generic OCM configuration type:
type: generic.config.ocm.software/v1
configurations:
- type: resolvers.config.ocm.software/v1alpha1
resolvers:
- repository:
type: OCIRepository/v1
baseUrl: ghcr.io
subPath: my-org/components
componentNamePattern: "example.com/services/*"Config Schema
The resolver configuration is defined by the resolvers.config.ocm.software/v1alpha1 type in
the
OCM specification.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be resolvers.config.ocm.software/v1alpha1. |
resolvers | array | No | List of resolver entries. |
Resolver Entry Schema
| Field | Type | Required | Description |
|---|---|---|---|
repository | object | Yes | An OCM repository specification (must include a type field). |
componentNamePattern | string | No | Glob pattern for matching component names. If omitted, the resolver matches all components. |
Repository Types
The repository field accepts any OCM repository specification. The most common types are:
Component Name Patterns
Each resolver entry can include a componentNamePattern field that uses glob patterns to filter for certain component names.
Only components matching the pattern will be routed to that repository.
Supported glob patterns:
| Pattern | Matches |
|---|---|
example.com/services/* | Any component directly under example.com/services/ |
example.com/core/** | Any component under example.com/core/ or its subpaths |
* | All components (wildcard catch-all) |
Pattern syntax:
*— Matches any sequence of characters within a path segment**— Matches any sequence of characters in subpath segments?— Matches any single character[abc]— Matches any character in the set (a, b, or c)[a-z]— Matches any character in the range
For more information on the supported glob syntax, see the glob package documentation.
Resolver Evaluation Order
Resolvers are evaluated in the order they are defined. The first matching resolver wins. Place more specific patterns before broader ones.
Related Documentation
- OCM Resolvers — High-level introduction to resolvers
- Working with Resolvers Tutorial — Hands-on walkthrough for setting up resolvers
- How to Resolve Components Across Multiple Registries — Recipe for multi-registry resolution
- Migrate from Deprecated Resolvers — Replace deprecated fallback resolvers with glob-based resolvers