Skip to content

Commit 992b618

Browse files
authored
Merge pull request #874 from ezgidemirel/pkg-downgrade
Document automatic dependency downgrade option
2 parents 93a76c9 + e98a6d9 commit 992b618

File tree

8 files changed

+168
-4
lines changed

8 files changed

+168
-4
lines changed

content/master/concepts/packages.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,47 @@ spec:
275275
# Removed for brevity
276276
```
277277

278+
#### Automatically update dependency versions
279+
280+
Crossplane can automatically upgrade a package's dependency version to the minimum
281+
valid version that satisfies all the constraints. It's an alpha feature that
282+
requires enabling with the `--enable-dependency-version-upgrades` flag.
283+
284+
In some cases, dependency version downgrade is required for proceeding with
285+
installations. Suppose configuration A, which depends on package X with the
286+
constraint`>=v0.0.0`, is installed on the control plane. In this case, the package
287+
manager installs the latest version of package X, such as `v3.0.0`. Later, you decide
288+
to install configuration B, which depends on package X with the constraint `<=v2.0.0`.
289+
Since version `v2.0.0`satisfies both conditions, package X must be downgraded to
290+
allow the installation of configuration B which is disabled by default.
291+
292+
For enabling automatic dependency version downgrades, there is a configuration
293+
option as a helm value `packageManager.enableAutomaticDependencyDowngrade=true`.
294+
Downgrading a package can cause unexpected behavior, therefore, this
295+
option is disabled by default. After enabling this option, the package manager will
296+
automatically downgrade a package's dependency version to the maximum valid version
297+
that satisfies the constraints.
298+
299+
{{<hint "note" >}}
300+
This configuration requires the `--enable-dependency-version-upgrades` flag.
301+
Please check the
302+
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
303+
and
304+
[feature flags]({{<ref "../software/install#feature-flags">}})
305+
are available in the
306+
[Crossplane Install]({{<ref "../software/install">}})
307+
section for more details.
308+
{{</hint >}}
309+
310+
{{<hint "important" >}}
311+
Enabling automatic dependency downgrades may have unintended consequences, such as:
312+
313+
1) CRDs missing in the downgraded version, possibly leaving orphaned MRs without
314+
controllers to reconcile them.
315+
2) Loss of data if downgraded CRD versions omit fields that were set before.
316+
3) Changes in the CRD storage version, which may prevent package version update.
317+
{{</hint >}}
318+
278319
#### Ignore Crossplane version requirements
279320

280321
A Configuration package may require a specific or minimum Crossplane version

content/master/concepts/pods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ the Helm `values.yml` file or after installation by editing the `Deployment`.
350350
The full list of
351351
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
352352
and
353-
[feature flags]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
353+
[feature flags]({{<ref "../software/install#feature-flags">}})
354354
are available in the
355355
[Crossplane Install]({{<ref "../software/install">}})
356356
section.

content/master/concepts/providers.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,47 @@ spec:
302302
# Removed for brevity
303303
```
304304

305+
#### Automatically update dependency versions
306+
307+
Crossplane can automatically upgrade a package's dependency version to the minimum
308+
valid version that satisfies all the constraints. It's an alpha feature that
309+
requires enabling with the `--enable-dependency-version-upgrades` flag.
310+
311+
In some cases, dependency version downgrade is required for proceeding with
312+
installations. Suppose configuration A, which depends on package X with the
313+
constraint`>=v0.0.0`, is installed on the control plane. In this case, the package
314+
manager installs the latest version of package X, such as `v3.0.0`. Later, you decide
315+
to install configuration B, which depends on package X with the constraint `<=v2.0.0`.
316+
Since version `v2.0.0`satisfies both conditions, package X must be downgraded to
317+
allow the installation of configuration B which is disabled by default.
318+
319+
For enabling automatic dependency version downgrades, there is a configuration
320+
option as a helm value `packageManager.enableAutomaticDependencyDowngrade=true`.
321+
Downgrading a package can cause unexpected behavior, therefore, this
322+
option is disabled by default. After enabling this option, the package manager will
323+
automatically downgrade a package's dependency version to the maximum valid version
324+
that satisfies the constraints.
325+
326+
{{<hint "note" >}}
327+
This configuration requires the `--enable-dependency-version-upgrades` flag.
328+
Please check the
329+
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
330+
and
331+
[feature flags]({{<ref "../software/install#feature-flags">}})
332+
are available in the
333+
[Crossplane Install]({{<ref "../software/install">}})
334+
section for more details.
335+
{{</hint >}}
336+
337+
{{<hint "important" >}}
338+
Enabling automatic dependency downgrades may have unintended consequences, such as:
339+
340+
1) CRDs missing in the downgraded version, possibly leaving orphaned MRs without
341+
controllers to reconcile them.
342+
2) Loss of data if downgraded CRD versions omit fields that were set before.
343+
3) Changes in the CRD storage version, which may prevent package version update.
344+
{{</hint >}}
345+
305346
#### Ignore Crossplane version requirements
306347

307348
A Provider package may require a specific or minimum Crossplane version before

content/v1.17/concepts/pods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ the Helm `values.yml` file or after installation by editing the `Deployment`.
350350
The full list of
351351
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
352352
and
353-
[feature flags]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
353+
[feature flags]({{<ref "../software/install#feature-flags">}})
354354
are available in the
355355
[Crossplane Install]({{<ref "../software/install">}})
356356
section.

content/v1.18/concepts/pods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ the Helm `values.yml` file or after installation by editing the `Deployment`.
350350
The full list of
351351
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
352352
and
353-
[feature flags]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
353+
[feature flags]({{<ref "../software/install#feature-flags">}})
354354
are available in the
355355
[Crossplane Install]({{<ref "../software/install">}})
356356
section.

content/v1.19/concepts/packages.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,47 @@ spec:
275275
# Removed for brevity
276276
```
277277

278+
#### Automatically update dependency versions
279+
280+
Crossplane can automatically upgrade a package's dependency version to the minimum
281+
valid version that satisfies all the constraints. It's an alpha feature that
282+
requires enabling with the `--enable-dependency-version-upgrades` flag.
283+
284+
In some cases, dependency version downgrade is required for proceeding with
285+
installations. Suppose configuration A, which depends on package X with the
286+
constraint`>=v0.0.0`, is installed on the control plane. In this case, the package
287+
manager installs the latest version of package X, such as `v3.0.0`. Later, you decide
288+
to install configuration B, which depends on package X with the constraint `<=v2.0.0`.
289+
Since version `v2.0.0`satisfies both conditions, package X must be downgraded to
290+
allow the installation of configuration B which is disabled by default.
291+
292+
For enabling automatic dependency version downgrades, there is a configuration
293+
option as a helm value `packageManager.enableAutomaticDependencyDowngrade=true`.
294+
Downgrading a package can cause unexpected behavior, therefore, this
295+
option is disabled by default. After enabling this option, the package manager will
296+
automatically downgrade a package's dependency version to the maximum valid version
297+
that satisfies the constraints.
298+
299+
{{<hint "note" >}}
300+
This configuration requires the `--enable-dependency-version-upgrades` flag.
301+
Please check the
302+
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
303+
and
304+
[feature flags]({{<ref "../software/install#feature-flags">}})
305+
are available in the
306+
[Crossplane Install]({{<ref "../software/install">}})
307+
section for more details.
308+
{{</hint >}}
309+
310+
{{<hint "important" >}}
311+
Enabling automatic dependency downgrades may have unintended consequences, such as:
312+
313+
1) CRDs missing in the downgraded version, possibly leaving orphaned MRs without
314+
controllers to reconcile them.
315+
2) Loss of data if downgraded CRD versions omit fields that were set before.
316+
3) Changes in the CRD storage version, which may prevent package version update.
317+
{{</hint >}}
318+
278319
#### Ignore Crossplane version requirements
279320

280321
A Configuration package may require a specific or minimum Crossplane version

content/v1.19/concepts/pods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ the Helm `values.yml` file or after installation by editing the `Deployment`.
350350
The full list of
351351
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
352352
and
353-
[feature flags]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
353+
[feature flags]({{<ref "../software/install#feature-flags">}})
354354
are available in the
355355
[Crossplane Install]({{<ref "../software/install">}})
356356
section.

content/v1.19/concepts/providers.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,47 @@ spec:
302302
# Removed for brevity
303303
```
304304

305+
#### Automatically update dependency versions
306+
307+
Crossplane can automatically upgrade a package's dependency version to the minimum
308+
valid version that satisfies all the constraints. It's an alpha feature that
309+
requires enabling with the `--enable-dependency-version-upgrades` flag.
310+
311+
In some cases, dependency version downgrade is required for proceeding with
312+
installations. Suppose configuration A, which depends on package X with the
313+
constraint`>=v0.0.0`, is installed on the control plane. In this case, the package
314+
manager installs the latest version of package X, such as `v3.0.0`. Later, you decide
315+
to install configuration B, which depends on package X with the constraint `<=v2.0.0`.
316+
Since version `v2.0.0`satisfies both conditions, package X must be downgraded to
317+
allow the installation of configuration B which is disabled by default.
318+
319+
For enabling automatic dependency version downgrades, there is a configuration
320+
option as a helm value `packageManager.enableAutomaticDependencyDowngrade=true`.
321+
Downgrading a package can cause unexpected behavior, therefore, this
322+
option is disabled by default. After enabling this option, the package manager will
323+
automatically downgrade a package's dependency version to the maximum valid version
324+
that satisfies the constraints.
325+
326+
{{<hint "note" >}}
327+
This configuration requires the `--enable-dependency-version-upgrades` flag.
328+
Please check the
329+
[configuration options]({{<ref "../software/install#customize-the-crossplane-helm-chart">}})
330+
and
331+
[feature flags]({{<ref "../software/install#feature-flags">}})
332+
are available in the
333+
[Crossplane Install]({{<ref "../software/install">}})
334+
section for more details.
335+
{{</hint >}}
336+
337+
{{<hint "important" >}}
338+
Enabling automatic dependency downgrades may have unintended consequences, such as:
339+
340+
1) CRDs missing in the downgraded version, possibly leaving orphaned MRs without
341+
controllers to reconcile them.
342+
2) Loss of data if downgraded CRD versions omit fields that were set before.
343+
3) Changes in the CRD storage version, which may prevent package version update.
344+
{{</hint >}}
345+
305346
#### Ignore Crossplane version requirements
306347

307348
A Provider package may require a specific or minimum Crossplane version before

0 commit comments

Comments
 (0)