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

Should update the default go image to be 1.17 for hybird operator

XMLWordPrintable

    • Moderate
    • None
    • OPECO 233
    • 1
    • Rejected
    • Unspecified
    • If docs needed, set a value

      Description of problem:
      The default base go image "golang:1.16" is 1.16. This image will cause the build error "accumulateFile error".

      Version-Release number of selected component (if applicable):
      operator-sdk version: "v1.20.0-ocp", commit: "deb99d5a456fa32c3153de89d940ee05b603c83b", kubernetes version: "v1.23", go version: "go1.17.4", GOOS: "linux", GOARCH: "amd64"

      How reproducible:
      always

      Steps to Reproduce:
      1.generate hybird operator through https://docs.openshift.com/container-platform/4.10/operators/operator_sdk/helm/osdk-hybrid-helm.html

      Actual results:
      1. meet error when "make docker-build"

      • accumulateFile error: "accumulating resources from 'bases/cache6.hybird.com_memcachedbackups.yaml': evalsymlink failure on '/home/jfan/work/image/helm-go/4.11/hybird-operator/config/crd/bases/cache6.hybird.com_memcachedbackups.yaml' : lstat /home/jfan/work/image/helm-go/4.11/hybird-operator/config/crd/bases/cache6.hybird.com_memcachedbackups.yaml: no such file or directory"

      2.The docker file
      $cat Dockerfile

      1. Build the manager binary
        FROM golang:1.16 as builder

      WORKDIR /workspace

      1. Copy the Go Modules manifests
        COPY go.mod go.mod
        COPY go.sum go.sum

      Expected results:
      Should update the golang:1.16 to be golang:1.17 then the image will be build success.
      $cat Dockerfile

      1. Build the manager binary
        FROM golang:1.17 as builder

      WORKDIR /workspace

      1. Copy the Go Modules manifests
        COPY go.mod go.mod
        COPY go.sum go.sum

      Additional info:

              rh-ee-bpalmer Bryce Palmer
              rhn-support-jfan Jia Fan
              Jia Fan Jia Fan
              Red Hat Employee
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: