Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-44942

OperatorSDK 1.36.1-ocp can't generate go type operator with golang 1.22

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.17
    • Operator SDK
    • None
    • Important
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          OperatorSDK 1.36.1-ocp can't generate go type operator with golang 1.22.

      Version-Release number of selected component (if applicable):

      $operator-sdk version
      operator-sdk version: "v1.36.1-ocp", commit: "056be373dcd434f631d66a53a7d8332dc90f9d07", kubernetes version: "v1.29.0", go version: "go1.22.7 (Red Hat 1.22.7-1.el9_5) X:strictfipsruntime", GOOS: "linux", GOARCH: "amd64"  
      $go version
      go version go1.22.7 linux/amd64  

      How reproducible:

      always    

      Steps to Reproduce:

          1.generate go type operator
      $operator-sdk init --domain=disconnected.com --repo=github.com/example-inc/memcached-operator --plugins go/v4
      Error: failed to initialize project: unable to run pre-scaffold tasks of "base.go.kubebuilder.io/v4": failed to retrieve 'go version': . You can skip this check using the --skip-go-version-check flag
      Usage:
        operator-sdk init [flags]   
      
      ......
      
      FATA[0000] failed to initialize project: unable to run pre-scaffold tasks of "base.go.kubebuilder.io/v4": failed to retrieve 'go version': . You can skip this check using the --skip-go-version-check flag 
          

      Actual results:

          Can't generate go type operator

      Expected results:

          Generate go type operator success.

      Additional info:

          OperatorSDK 1.36.1-ocp can generate go type operator with golang 1.23. 

              rh-ee-arsen Arkadeep Sen
              rhn-support-jfan Jia Fan
              Jia Fan Jia Fan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: