-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #5565: Added parsing of annotations
Signed-off-by: Venkat Ramaraju <[email protected]>
- Loading branch information
Venkat Ramaraju
committed
Mar 10, 2022
1 parent
ef05f20
commit cad82fa
Showing
7 changed files
with
127 additions
and
4 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
changelog/fragments/helm-annotations-reconcile-period.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
entries: | ||
- description: > | ||
For the helm/v1 plugin, parsed the "helm.sdk.operatorframework.io/reconcile-period" | ||
value from the custom resource annotations for helm operators. This value is set to | ||
then set to the 'reconcile-period' field of the reconciler to reconcile the cluster | ||
in the specified intervals of time. | ||
kind: "addition" | ||
# Is this a breaking change? | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...en/docs/building-operators/helm/reference/advanced_features/reconcile-period.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Reconcile Period from Custom Resource Annotations | ||
linkTitle: Custom Resource Annotations Reconcile Period | ||
weight: 200 | ||
description: Allow a user to set the desired reconcile period from the custom resource's annotations | ||
--- | ||
|
||
While running a Helm-based operator, the reconcile-period can be specified through the custom resource's annotations under the `helm.sdk.operatorframework.io/reconcile-period` key. | ||
This feature guarantees that an operator will get reconciled, at minimum, in the specified interval of time. In other words, it ensures that the cluster will not go longer | ||
than the specified reconcile-period without being reconciled. However, the cluster may be reconciled at any moment if there are changes detected in the desired state. | ||
|
||
The reconcile period can be specified in the custom resource's annotations in the following manner: | ||
|
||
```sh | ||
... | ||
metadata: | ||
name: nginx-sample | ||
annotations: | ||
helm.sdk.operatorframework.io/reconcile-period: "5s" | ||
... | ||
``` | ||
|
||
The value that is present under this key must be in the h/m/s format. For example, 1h2m4s, 3m0s, 4s are all valid values, but 1x3m9s is invalid. | ||
|
||
**NOTE**: This is just one way of specifying the reconcile period for Helm-based operators. Another way is using the `--reconcile-period` command line flag while running the operator. However, if both of these methods are used together (which they shouldn't be), *the custom resource's annotations will take precedence*. |