-
Bug
-
Resolution: Done
-
Major
-
None
-
ACM 2.7.0
-
False
-
None
-
False
-
-
-
Important
-
No
Description of problem: Provided script https://github.com/stolostron/multicluster-global-hub/blob/main/operator/config/samples/storage/deploy_postgres.sh deploy PostgreSQL failed since cronjob version is not changed on OCP 4.12
```
time="2022-11-01T08:07:07Z" level=error msg="if kind is a CRD, it should be installed before calling Start" error="no matches for kind \"CronJob\" in version \"batch/v1beta1\"" file="sigs.k8s.io/controller-runtime@v0.8.3/pkg/log/deleg.go:144" func="log.(*DelegatingLogger).Error" kind=CronJob.batch version=5.0.3-0
panic: no matches for kind "CronJob" in version "batch/v1beta1"
goroutine 1 [running]:
main.assertNoError(...)
github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:39
main.main()
github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:84 +0x425
```
on OCP 4.12, the version is batch/v1
```
(base) cqu-mac:tests cqu$ oc api-resources |grep cronjob
cronjobs cj batch/v1 true CronJob
```
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
- run script
https://github.com/stolostron/multicluster-global-hub/blob/main/operator/config/samples/storage/deploy_postgres.sh
- pod is not running due to the cronjobs version is not match
```
(base) cqu-mac:tests cqu$ ocpod
NAME READY STATUS RESTARTS AGE
pgo-58c9975f77-nhjh2 0/1 CrashLoopBackOff 22 (23s ago) 93m
``` - ...