Skip to content

Commit 47b24ca

Browse files
authored
Added OpenShift considerations for 4.22 (#224)
* Added OpenShift considerations for 4.22 Added steps for upgrades via the command line with the example
1 parent 93de68c commit 47b24ca

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

docs/update-openshift.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Upgrade the Operator and CRD via Operator Lifecycle Manager (OLM)
22

3+
## Considerations for using OpenShift 4.22
4+
5+
Starting with OpenShift 4.22, the way images with not fully qualified names are pulled has changed for repositories that share the same repository name on DockerHub and Red Hat Marketplace. By default the tags are pulled from Red Hat Marketplace. Specifying not fully qualified image names may result in the `ImagePullBackOff` error.
6+
7+
* **OLM installation:** Images are provided with the fully qualified names and are pulled from the Red Hat Marketplace/DockerHub registry.
8+
* **Manual install/update with default manifests:** Images must use the `docker.io` registry prefix to guarantee successful download from the DockerHub `percona-server-mysql-operator` repository. See the [Update via the command-line interface](#update-via-the-command-line-interface) section for the exact steps.
9+
10+
311
The upgrade on OpenShift consists of two steps:
412

513
* Upgrade the Operator Deployment
@@ -70,3 +78,53 @@ These overrides are applied on top of the CSV and persist across upgrades. All o
7078

7179
2. Click the "Upgrade available" link to review details, click "Preview InstallPlan," and then click "Approve" to upgrade the Operator.
7280

81+
### Update via the command-line interface
82+
83+
The following steps apply if you plan to use OpenShift 4.22. See the [Considerations for using OpenShift 4.22](#considerations-for-using-openshift-422).
84+
85+
1. Check all clusters managed by the Operator to see if `initContainer.image` is set.
86+
87+
* If defined: skip the next step.
88+
* If undefined: proceed to step 2.
89+
90+
2. Apply a patch to the clusters with undefined `initContainer.image` to define this image with the `docker.io` registry in the image path:
91+
92+
```bash
93+
kubectl patch ps ps-cluster1 --type=merge --patch '{
94+
"spec": {
95+
"initcontainer": {
96+
"image": "docker.io/percona-server-mysql-operator:1.1.0"
97+
}
98+
}
99+
}'
100+
```
101+
102+
**Important!** This command triggers the restart of your clusters. Wait till they restart and report the `Ready` status.
103+
104+
3. Update the Operator deployment and specify the `docker.io` registry name in the image path:
105+
106+
```bash
107+
kubectl patch deployment percona-server-mysql-operator \
108+
-p'{"spec":{"template":{"spec":{"containers":[{"name":"percona-server-mysql-operator","image":"docker.io/percona/percona-server-mysql-operator:{{release}}"}]}}}}'
109+
```
110+
111+
4. Update the Custom Resource version and the database cluster. Specify the `initContainer` image with the `docker.io` registry name in the path.
112+
113+
The following example shows how to update Percona Server for MySQL cluster 8.4 with Group Replication and HAProxy:
114+
115+
```bash
116+
kubectl patch ps ps-cluster1 --type=merge --patch '{
117+
"spec": {
118+
"crVersion": "{{release}}",
119+
"initContainer": "docker.io/percona/percona-server-mysql-operator:{{release}}",
120+
"mysql":{ "image": "docker.io/percona/percona/percona-server:{{ ps84recommended }}" },
121+
"proxy":{
122+
"haproxy":{ "image": "docker.io/percona/haproxy:{{haproxyrecommended}}" }
123+
},
124+
"backup":{ "image": "docker.io/percona/percona-xtrabackup:{{ pxb84recommended }}" },
125+
"toolkit":{ "image": "docker.io/percona/percona-toolkit:{{ptrecommended}}" },
126+
"pmm":{ "image": "docker.io/percona/pmm-client:{{ pmm3recommended }}" }
127+
}
128+
}'
129+
```
130+

0 commit comments

Comments
 (0)