operator-framework / operator-lifecycle-manager

A management framework for extending Kubernetes with Operators
https://olm.operatorframework.io
Apache License 2.0
1.7k stars 542 forks source link

Release packaging uses amd64 manifest instead of multiarch manifest #2786

Open kbrighton opened 2 years ago

kbrighton commented 2 years ago

Bug Report

What did you do? Attempted to install the OLM via both quickstart and operator-sdk on arm64 arch

What did you expect to see? OLM installed using the multiarch manifest and working correctly

What did you see instead? Under which circumstances? OLM was installed using the amd64 images at all times, because the release olm.yaml is using that reference instead of the multiarch reference. With the releases being generated as they are, it breaks most of the installation instructions, as the operator-sdk olm install command pulls from the release as well to do its installation.

Environment

Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6+k3s1", GitCommit:"418c3fa858b69b12b9cefbcff0526f666a6236b9", GitTreeState:"clean", BuildDate:"2022-04-28T22:16:58Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/arm64"}

k3s

Possible Solution Issue seems to be in the release build action, Generate quickstart release manifests. When it does the docker pull, it gets the correct digest, but for some reason when it gets the olmref (Makefile line 233), it grabs the digest for the amd64 version. Is there something hardcoding that earlier in that action that I'm missing, or is this unintentional?

Additional context

Pertinent lines:

docker pull quay.io/operator-framework/olm:v0.21.2 v0.21.2: Pulling from operator-framework/olm Digest: sha256:fb5fe941aa2256dfdc07205cae9bf7216db00e40ffaf2997a529cd60007173ef Status: Downloaded newer image for quay.io/operator-framework/olm:v0.21.2 quay.io/operator-framework/olm:v0.21.2 make target=upstream ver=v0.21.2 quickstart=true package make[1]: Entering directory '/home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager' go run -mod=vendor ./vendor/github.com/mikefarah/yq/v3/ w -i deploy/upstream/values.yaml olm.image.ref quay.io/operator-framework/olm@sha256:32db73274863b08cef237d02314a9d8c827ed2f33f0b00166dd3b055af63bb31 go run -mod=vendor ./vendor/github.com/mikefarah/yq/v3/ w -i deploy/upstream/values.yaml catalog.image.ref quay.io/operator-framework/olm@sha256:32db73274863b08cef237d02314a9d8c827ed2f33f0b00166dd3b055af63bb31 go run -mod=vendor ./vendor/github.com/mikefarah/yq/v3/ w -i deploy/upstream/values.yaml package.image.ref quay.io/operator-framework/olm@sha256:32db73274863b08cef237d02314a9d8c827ed2f33f0b00166dd3b055af63bb31

agelwarg commented 1 year ago

Is there any update on this? Looks like most of the olm pods are fine, but when trying to install an operator, this one below fails:

NAME                                                              READY   STATUS       RESTARTS   AGE
catalog-operator-774d464fdd-c4m4c                                 1/1     Running      0          4m54s
packageserver-54c6596968-pr2lz                                    1/1     Running      0          4m49s
operatorhubio-catalog-r5zqh                                       1/1     Running      0          4m50s
packageserver-54c6596968-k2ccl                                    1/1     Running      0          4m48s
olm-operator-55f84c5b9b-wslxz                                     1/1     Running      0          38s
429a4688fd46db61b498e5fed2d35f9c8283e4bb61818ad68240e30b58ccvw4   0/1     Init:Error   0          4s

Describing that pod:

...
Init Containers:
  util:
    Container ID:  containerd://e4ed9a6c465e0edf3e0db0ffbc8b25d49882cc1f50546c56ac9a31581f8f1400
    Image:         quay.io/operator-framework/olm@sha256:3cfc40fa4b779fe1d9817dc454a6d70135e84feba1ffc468c4e434de75bb2ac5
...

and we're still affected by https://github.com/operator-framework/operator-lifecycle-manager/pull/2896