-
Task
-
Resolution: Done
-
Major
-
None
-
5
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
API CCS Sprint 36 (3Scale), API CCS Sprint 36 (3Scale), API CCS Sprint 37 (3Scale), API CCS Sprint 38 (3Scale), API CCS Sprint 43 (3Scale), API CCS Sprint 44 (3Scale) 2
Currently, when replicas are not set in the APIManager CR (or APIcast CR), the operator adds them to the CR (with value to 1). Then on reconcilliation loop, the operator makes sure the replica value at the deployment matches the one specified in the CR.
The problem is that if the replica count is managed by some external controller (like the HPA controller), the operator does not allow it and tries to update deployment's replica count with the one in the CR.
As a workaround, https://issues.redhat.com/browse/THREESCALE-8374 was implemented. This is based on an annotation to disable replica reconciliation.
Enhancing the replica reconciliation by the operator allows external controllers to manage the replica count if that is desired by the user.
The proposal is to reconcile the replicas only if they are explicitly set in the CR, otherwise replica will not be reconciled (allowing external controller to do that, like HPA controller).
In order to do that, the first thing to be done is to remove the code that adds default replica values to the CR by the operator. Then, add replica reconciliation only when it is set explicitly in the CR. The replica fields are already optional, so the operator can know if it has been set or not.
When the operator gets a reconciliation event, there are two scenarios:
- The deploymentconfig does not exit
If the replicas are found in the CR, the deployment config replica value will be the one of the CR. If the replicas are not found in the CR, the deployment config replica value will be set to 1
- The deploymentconfig exists
If the replicas are found in the CR, the deploymentconfig replica value will be set to the value found in the CR. Even if it is 0. If the replicas are not found in the CR, the deployment config replica value will not be reconciled and will be left as it is.
With this implementation, we remove the annotation to disable replica reconciliation implemented in https://issues.redhat.com/browse/THREESCALE-8374
This applies both to the apicast operator and 3scale operator
- is depended on by
-
THREESCALE-9019 Add documentation for the management of replicas for APIcast operator
- Documenting
- links to
- mentioned on
1.
|
3scale operator enhance replica reconciliation | Closed | Unassigned | ||
2.
|
Apicast operator enhance replica reconciliation | Closed | Unassigned |