-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
The documentation for the Resource Optimization (Cost Management) plugin and the patch-k8s-resource workflow does not explain how to configure the workflow's ConfigMap for multi-cluster support. This is a critical configuration step that is undocumented anywhere.
What is missing
The patch-k8s-resource workflow image uses a multi-cluster design where the clusterName parameter (received from the Cost Management API as cluster_alias) is used to resolve cluster-specific REST client configuration. The ConfigMap must use property names with a cluster-name suffix:
quarkus.rest-client."patch_k8s_resource_yaml.<cluster_alias>".url=<cluster_api_url> quarkus.openapi-generator.patch_k8s_resource_yaml.<cluster_alias>.auth.BearerToken.bearer-token=<token>
However, none of the following documentation sources explain this:
- The plugin's README and dynamic-plugin.md (PR #2255 in rhdh-plugins) - no mention of ConfigMap cluster-name suffix
- The workflow's manifest template (01-configmap_patch-k8s-resource-props.yaml in the serverless-workflows repo) - uses generic property names without cluster suffix, which do not work
- The Optimizer app README (https://github.com/rhdhorchestrator/optimizer) - mentions clusterNames config but does not explain the relationship to the workflow ConfigMap
What needs to be documented
- The relationship between the Cost Management API's cluster_alias and the workflow ConfigMap property naming convention
- How to discover the cluster_alias for a given cluster (via Cost Management API or console)
- How to configure the patch-k8s-resource-props ConfigMap with the correct cluster-name suffix for each target cluster
- That the manifest template (01-configmap_patch-k8s-resource-props.yaml) in the serverless-workflows repo uses incorrect property names and needs to be updated for multi-cluster support
- An example of a properly configured ConfigMap for single and multi-cluster scenarios
Current behavior
Deployers must reverse-engineer the property naming convention by:
- Reading the workflow image's built-in application.properties (which uses .mycluster suffix)
- Reading the Optimizer app's Java source code (OptimizerTask.java) to understand that clusterName comes from Cost Management's cluster_alias
- Cross-referencing these to construct the correct ConfigMap properties
This is not a reasonable expectation for deployers.
References
- Optimizer app repo: https://github.com/rhdhorchestrator/optimizer
- Workflow manifests: https://github.com/rhdhorchestrator/serverless-workflows/tree/main/workflows/patch-k8s-resource/manifests
- Plugin documentation PR: https://github.com/redhat-developer/rhdh-plugins/pull/2255