Data Grid Operator 8.4.x and 8.5.x spec.version feature
Environment
- Red hat OpenShift Container Platform (OCP)
- 4.x
- Red Hat Data Grid (RHDG)
- 8.4 <--- feature introduced
- 8.5
Resolution
Using multiple versions of Data Grid (not Data Grid Operator versions)
Starting on DG Operator 8.4.x (channel 8.4.x) a feature to use more than one DG cluster version in the same DG Operator version.
This tackles the problem of having only one DG Operator version in the whole cluster, given the CRDs are saved on the etcd global cluster section. This limitation still exist.
The user can have a single Data Grid Operator installation that supports multiple versions of Data Grid. For doing so use spec.version field in your Infinispan CR to upgrade between supported versions.
Supported Data Grid versions by each Data Grid Operator version are listed in the Release Notes for Data Grid Operator:
- 8.4.x: <https://docs.redhat.com/en/documentation/red_hat_data_grid/8.4/html/data_grid_operator_8.4_release_notes/rhdg-operator-releases#rhdg-operator-cd-releases_rhdg-operator-releases>
- 8.5.x: <https://docs.redhat.com/en/documentation/red_hat_data_grid/8.5/html/data_grid_operator_8.5_release_notes/rhdg-operator-releases#rhdg-operator-cd-releases_rhdg-operator-releases>
Note that Data Grid Operator versions do not always directly correspond to Data Grid versions because the release schedule is different. Also, in the table of the above release note, "Data Grid version" is the default version which is installed by the version of Data Grid Operator, and "Operand versions" are supported Data Grid versions (container image version tag) by the version of Data Grid Operator.
For example with Data Grid 8.5.x Operator:
| Data Grid Operator version | Data Grid version | Operand versions |
|---|---|---|
| 8.5.6 | 8.5.3 | 8.5.3-1, 8.5.2-2, 8.5.2-1, 8.5.1-1, 8.5.0-3, 8.5.0-2, 8.5.0-1, 8.4.8-2, 8.4.8-1, 8.4.7-1, 8.4.6-2, 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1 |
| 8.5.5 | 8.5.2 | 8.5.2-2, 8.5.2-1, 8.5.1-1, 8.5.0-3, 8.5.0-2, 8.5.0-1, 8.4.8-2, 8.4.8-1, 8.4.7-1,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.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1 |
For example with Data Grid 8.4.x Operator:
| Data Grid Operator version | Data Grid version | Operand versions |
|---|---|---|
| 8.4.16 | 8.4.8 | 8.4.8-2, 8.4.8-1, 8.4.7-1, 8.4.6-2, 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.15 | 8.4.8 | 8.4.8-1, 8.4.7-1, 8.4.6-2, 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.14 | 8.4.7 | 8.4.7-1, 8.4.6-2, 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.13 | 8.4.6 | 8.4.6-2, 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.12 | 8.4.6 | 8.4.6-1, 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.11 | 8.4.5 | 8.4.5-2, 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.10 | N/A | N/A (The 8.4.9 release included an error in version naming, when the release was mistakenly labeled as 8.4.10. To address this issue and maintain version continuity, the 8.4.10 release is not available, and the subsequent release is 8.4.11.) |
| 8.4.9 | 8.4.5 | 8.4.5-1, 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.8 | 8.4.4 | 8.4.4-1, 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.7 | 8.4.3 | 8.4.3-2, 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.6 | 8.4.3 | 8.4.3-1, 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.5 | 8.4.2 | 8.4.2-1, 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.4 | 8.4.1 | 8.4.1-3, 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.3 | 8.4.1 | 8.4.1-2, 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.2 | 8.4.1 | 8.4.1-1, 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.1 | 8.4.0 | 8.4.0-2, 8.4.0-1, 8.3.1-1 |
| 8.4.0 | 8.4.0 | 8.4.0-1, 8.3.1-1 |
The above means the DG Operator 8.4.2 can be launched with three Infinispan CR with three different DG 8.4 versions: 3 container versions of DG 8.4 (8.4.1-1, 8.4.0-2, and 8.4.0-1) and 1 DG 8.3 (8.3.1-1).
Also note that newer versions of DG image requires to use newer Data Grid Operator.
If the specified spec.version is not valid or not suported by the installed Data Grid Operator, then the Infinispan CR webhook will reject it when user tries to create the resource:
Danger alert:Error
Fix the following errors:
Error "Invalid value: "8.4.0-3": unknown version: 8.4.0-3" for field "spec.version".
For example, when you specify unsuppored version to oc infinispan create cluster command (For example, when specify --version=8.5.0-1 to Data Grid 8.4.16 Operator):
$ oc infinispan create cluster --replicas=2 -Pservice.type=DataGrid dgtest --version=8.5.0-1
KubernetesClientException: Failure executing: POST at: https://<your-url>:<port>/apis/infinispan.org/v1/namespaces/dgtest/infinispans. Message: admission webhook "vinfinispan.kb.io" denied the request: Infinispan.infinispan.org "dgtest" is invalid: spec.version: Invalid value: "8.5.0-1": unknown version: 8.5.0-1. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.version, message=Invalid value: "8.5.0-1": unknown version: 8.5.0-1, reason=FieldValueInvalid, additionalProperties={})], group=infinispan.org, kind=Infinispan, name=dgtest, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=admission webhook "vinfinispan.kb.io" denied the request: Infinispan.infinispan.org "dgtest" is invalid: spec.version: Invalid value: "8.5.0-1": unknown version: 8.5.0-1, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
Root Cause
The spec.image is a mandatory field on the Infinispan Custom resource that sets the image on the DG pods to be used. The fact it is mandatory means if the user creates a custom resource without spec, the Operator will fill the spec.version with a certain value. On this case can be 8.3.1 (in case of a upgrade or custom image) or 8.4.2-latest.
Not just that but the spec.version will overwrite the image that user sets on the custom resource and using a custom image won't be possible.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.