Skip to content

Commit 98527f3

Browse files
authored
Merge pull request #74 from ecordell/correct-depdocs
Correct dependency docs
2 parents b1ef0b5 + fe14900 commit 98527f3

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

content/en/docs/Concepts/olm-architecture/dependency-resolution.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ A typical example is an operator that requires the use of some other Operator's
1212
{{<mermaid>}}
1313
graph TD;
1414
e(FooOperator) --> |Provides|ec(Kind: Foo<br/>apiVerson: foogroup.io/foo/v1alpha1);
15-
v(BarOperator)--> |Provides|vs(Kind: Bar<br/>apiVersion: bargroup.io/bar/v1alpha1);
15+
v(BarOperator) --> |Provides|vs(Kind: Bar<br/>apiVersion: bargroup.io/bar/v1alpha1);
16+
s(BazOperator) --> |Provides|ss(Kind: Baz<br />apiVersion: bazgroup.io/baz/v1alpha1)
1617
v--> |Requires|ec;
1718

1819
classDef foo fill:#8addf2,stroke:#333,stroke-width:4px;
@@ -277,16 +278,11 @@ Like dependencies, subscription constraints have preference as well. OLM will ch
277278

278279
Within a namespace, no two operators may come from the same package.
279280

280-
281-
#### Operator Minimization
282-
283-
In the case that there is more than one valid solution, the solution that installs the fewest operators is preferred.
284-
285281
## Best Practices
286282

287-
### Depend on APIs
283+
### Either depend on APIs or a specific version range of operators
288284

289-
Operators may add or remove APIs at any time - always specify an `olm.gvk` dependency on any APIs your operator requires.
285+
Operators may add or remove APIs at any time - always specify an `olm.gvk` dependency on any APIs your operator requires. The exception to this is if you are specifying `olm.packageVersion` constraints instead. See [Caveats](#caveats) for more information.
290286

291287
### Set a minimum version
292288

@@ -336,13 +332,13 @@ dependencies:
336332
version: v1beta2
337333
```
338334

339-
It would be possible, but unlikely, for OLM to satisfy this with two operators: one that provides `EtcdCluster` and one that has version `>3.1.0`. However, because of [Operator Minimization](#operator-minimization), this will only happen if there does not exist any operator that does satisfy both constraints.
335+
It would be possible for OLM to satisfy this with two operators: one that provides `EtcdCluster` and one that has version `>3.1.0`. Whether that happens, or whether an operator is selected that satisfies both constraints, depends on the ordering that potential options are visited. This [order is well-defined](#understanding-preferences) and can be reasoned about, but to be on the safe side, operators should stick to one mechanism or the other.
340336

341-
A future release of OLM will support compound constraints.
337+
A future release of OLM will support compound constraints. When that happens, this guidance will change.
342338

343339
### Cross-Namespace Compatibility
344340

345-
OLM performs dependency resolution at the namespace scope. It is possible to get into an update deadlock if updating an operator in one namespace would be an issue for an operator in another namespace, and vice-versa.
341+
OLM performs dependency resolution at the namespace scope. It is possible to get into an update deadlock if updating an operator in one namespace would be an issue for an operator in another namespace, and vice-versa.
346342

347343
## Backwards-Compatibility Notes
348344

0 commit comments

Comments
 (0)