Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-1950

MGH - Provided script failed to deploy PostgreSQL on OCP 4.12

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • ACM 2.7.0
    • Global Hub
    • False
    • None
    • False
    • No
    • Important

      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:

      1. run script 

        https://github.com/stolostron/multicluster-global-hub/blob/main/operator/config/samples/storage/deploy_postgres.sh

      1. 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
        ```
      2. ...

      Actual results:

      Expected results:

      Additional info:

            clyang82 Chunlin Yang
            cquredhat ChangLiang Qu
            ChangLiang Qu ChangLiang Qu
            ACM QE Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: