-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting MaxConcurrentReconciles through env variable (#665)
* update common/config.go * Support using sync.Map in common Config * Read max concurrent reconcile from env * Fix typo * Update utils.go * Add GetMaxConcurrentReconciles test * Allow configuring a default MAX_CONCURRENT_RECONCILES for all CRs * Set MaxconcurrentReconciles for RuntimeComponent only * Add max concurrent reconcile tests * Update kustomize files * Use quotes when setting max concurrent reconcile in YAML * Add kustomize env for max concurrent reconciles * Apply max concurrent reconcile as kustomize overlay * Add instructions for using max concurrent reconciles in kustomize * Add install command for kustomize * Add 1.4.1 readme.adoc instructions with max concurrent reconciles * Update readme.adoc * Add defaults in readme.adoc * Fix wording * Update properties file name * Update kustomization.yaml * Fix readme typos
- Loading branch information
Showing
12 changed files
with
189 additions
and
4 deletions.
There are no files selected for viewing
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,88 @@ | ||
= Runtime Component Operator v1.4.1 | ||
|
||
== Supported Environments | ||
|
||
The Runtime Component Operator is available for the following CPU architectures: | ||
|
||
- Linux® x86_64 (amd64) | ||
- Linux® on IBM® Z (s390x) | ||
- Linux® on Power® (ppc64le) | ||
|
||
Red Hat OpenShift 4.12 or higher is supported. The operator is also supported on Kubernetes environments with v1.25 or higher. | ||
|
||
== Installation | ||
|
||
=== Option 1: Install using Operator Lifecycle Manager (OLM) on OpenShift | ||
|
||
Runtime Component Operator is available from Red Hat's Certified OpenShift Operators catalog. | ||
|
||
To install using the integrated OperatorHub in OpenShift UI, select `Operators` from the navigation panel, then select `OperatorHub` and then search for `Runtime Component`. Click on the tile with `Runtime Component` to install the Operator. Select the channel `v1.4` and install. | ||
|
||
To install using the `oc` CLI, use the following `Subscription`. Replace `<install_namespace>` with the namespace you want to install the Operator to: | ||
|
||
``` | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: runtime-component-operator-certified | ||
namespace: <install_namespace> | ||
spec: | ||
channel: v1.4 | ||
name: runtime-component-operator-certified | ||
source: certified-operators | ||
sourceNamespace: openshift-marketplace | ||
``` | ||
|
||
==== OPTIONAL: Set multiple concurrent reconcile workers | ||
|
||
You can configure multiple workers to reconcile Runtime Component custom resource instances concurrently. If not set, the number of workers defaults to `1`. | ||
|
||
To set this using the integrated OperatorHub in OpenShift UI, select `Manual` Update Approval and install the operator. Under the `Installed Operators` tab, you should see the operator pending installation with message "Upgrade available". Click the name to enter the Subscription resource then navigate to the YAML tab to nest the following configuration as the Subscription's `.spec.config` field. | ||
|
||
``` | ||
config: | ||
env: | ||
- name: MAX_CONCURRENT_RECONCILES | ||
value: "8" | ||
``` | ||
To set this using the `oc` CLI, use the following `Subscription`. | ||
|
||
``` | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: runtime-component-operator-certified | ||
namespace: <install_namespace> | ||
spec: | ||
channel: v1.4 | ||
name: runtime-component-operator-certified | ||
source: certified-operators | ||
sourceNamespace: openshift-marketplace | ||
config: | ||
env: | ||
- name: MAX_CONCURRENT_RECONCILES | ||
value: "8" | ||
``` | ||
|
||
You can verify if the configuration has been successfully set by viewing the Pod logs under the `rco-controller-manager` Deployment which outputs the newly modified `worker count` as `8`. | ||
|
||
``` | ||
2024-11-15T18:10:35Z INFO Starting workers {"controller": "runtimeoperation", "controllerGroup": "rc.app.stacks", "controllerKind": "RuntimeOperation", "worker count": 1} | ||
2024-11-15T18:10:35Z INFO Starting workers {"controller": "runtimecomponent", "controllerGroup": "rc.app.stacks", "controllerKind": "RuntimeComponent", "worker count": 8} | ||
``` | ||
|
||
|
||
=== Option 2: Install using kubectl | ||
|
||
See the instructions link:++kubectl/++[here]. | ||
|
||
=== Option 3: Install using kustomize | ||
|
||
See the instructions link:++kustomize/++[here]. | ||
|
||
|
||
== Limitations | ||
|
||
* Knative support is limited. Values specified for `.spec.autoscaling`, `.spec.resources` and `.spec.replicas` fields would not apply for Knative when enabled using `.spec.createKnativeService` field. | ||
* Monitoring feature does not support integration with Knative Service. Prometheus Operator is required to use ServiceMonitor. | ||
* After the initial deployment of `RuntimeComponent`, any changes to its labels would be applied only when one of the fields from `.spec` is updated. |
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
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 |
---|---|---|
|
@@ -7,4 +7,3 @@ resources: | |
- runtime-component-crd.yaml | ||
- runtime-component-operator.yaml | ||
- runtime-component-roles.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
25 changes: 25 additions & 0 deletions
25
internal/deploy/kustomize/daily/overlays/set-max-concurrent-reconciles/kustomization.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,25 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: runtime-component | ||
|
||
|
||
resources: | ||
- ../../base | ||
|
||
configMapGenerator: | ||
- envs: | ||
- operator.properties | ||
name: operator-config | ||
|
||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: operator-config | ||
fieldPath: data.MAX_CONCURRENT_RECONCILES | ||
targets: | ||
- select: | ||
name: rco-controller-manager | ||
kind: Deployment | ||
fieldPaths: | ||
- spec.template.spec.containers.[name=manager].env.[name=MAX_CONCURRENT_RECONCILES].value |
1 change: 1 addition & 0 deletions
1
internal/deploy/kustomize/daily/overlays/set-max-concurrent-reconciles/operator.properties
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 @@ | ||
MAX_CONCURRENT_RECONCILES=8 |
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