Closed this-is-tobi closed 12 months ago
After building the mattermost-operator image locally with --platform=linux/arm64
, it still doesn't seem to work.
After taking a closer look at the build system, I discovered that the binary contained in the docker image was not built for the correct architecture (cf. https://github.com/mattermost/mattermost-operator/blob/master/Makefile#L122).
I made a PR with the corrections available here.
OPERATOR_IMAGE_NAME=registry.ohmlab.fr/library/mattermost-operator OPERATOR_IMAGE_TAG=new-master make buildx-image
Note: The image is available with the command :
docker pull registry.ohmlab.fr/library/mattermost-operator:new-master
helm upgrade \
--install \
--create-namespace \
--namespace mattermost \
--set-string mattermostOperator.image.repository="registry.ohmlab.fr/library/mattermost-operator" \
--set-string mattermostOperator.image.tag="new-master" \
mattermost-operator mattermost/mattermost-operator
kubectl -n mattermost get pod
NAME READY STATUS RESTARTS AGE
mattermost-operator-56bcbf47bf-hq6jb 1/1 Running 0 58s
kubectl -n mattermost describe pod/mattermost-operator-56bcbf47bf-hq6jb
Name: mattermost-operator-56bcbf47bf-hq6jb
Namespace: mattermost
Priority: 0
Service Account: mattermost-operator
Node: pi3/192.168.0.103
Start Time: Thu, 03 Aug 2023 01:23:36 +0200
Labels: app.kubernetes.io/instance=mattermost-operator
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=mattermost-operator
helm.sh/chart=mattermost-operator-0.3.5
name=mattermost-operator
pod-template-hash=56bcbf47bf
Annotations: <none>
Status: Running
IP: 10.42.0.21
IPs:
IP: 10.42.0.21
Controlled By: ReplicaSet/mattermost-operator-56bcbf47bf
Containers:
mattermost-operator:
Container ID: containerd://d8dc3afaf5164060ee031dce747b99c43ee54b52db76a098e93bb64f3ac23cc7
Image: registry.ohmlab.fr/library/mattermost-operator:new-master
Image ID: registry.ohmlab.fr/library/mattermost-operator@sha256:c88c42b9945d0b1c555a165405db88c97c6a165e2461993376a2f0ab4c8b95b7
Port: 8383/TCP
Host Port: 0/TCP
Command:
/mattermost-operator
Args:
--enable-leader-election
--metrics-addr=0.0.0.0:8383
State: Running
Started: Thu, 03 Aug 2023 01:23:43 +0200
Ready: True
Restart Count: 0
Environment:
MAX_RECONCILING_INSTALLATIONS: 20
MAX_RECONCILE_CONCURRENCY: 10
REQUEUE_ON_LIMIT_DELAY: 20s
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-j5mk8 (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
kube-api-access-j5mk8:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 64s default-scheduler Successfully assigned mattermost/mattermost-operator-56bcbf47bf-hq6jb to pi3
Normal Pulling 64s kubelet Pulling image "registry.ohmlab.fr/library/mattermost-operator:new-master"
Normal Pulled 58s kubelet Successfully pulled image "registry.ohmlab.fr/library/mattermost-operator:new-master" in 5.767722162s (5.767754643s including waiting)
Normal Created 58s kubelet Created container mattermost-operator
Normal Started 58s kubelet Started container mattermost-operator
Summary
Image for
arm64
architecture is not working.Steps to reproduce
arm64
architecture with Helm :Version used :
master
Environment :
4 model B - 8GB
6.1.21-v8+
Debian GNU/Linux 11 (bullseye)
v1.27.3+k3s1
Expected behavior
Because docker image is now build for
arm64
architecture the mattermost-operator container should be able to start in that kind of hosts as it does foramd64
.Observed behavior (that appears unintentional)
Possible fixes
Maybe add a step to setup
QEMU
emulator in.github/workflows/ci.yml
and.github/workflows/cd.yml
could fix the issue :