Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

velero-backup-notification doesnt work with Graviton node #7

Open
noamlivni opened this issue Dec 25, 2023 · 5 comments
Open

velero-backup-notification doesnt work with Graviton node #7

noamlivni opened this issue Dec 25, 2023 · 5 comments

Comments

@noamlivni
Copy link

Hey @vitobotta ,
im having issue with velero-notifications.
im using velero-backup-notifiaction , until now i worked with amd64 arch nodes and it worked amazing

i changed the arch of my nodes to graviton (arm64) and it stopped working , i get this error: exec /velero-notifications: exec format error

@vitobotta
Copy link
Owner

Hi, you need to build the image for ARM to work on that architecture :)

@noamlivni
Copy link
Author

noamlivni commented Dec 25, 2023

@vitobotta i download the image as arm64
docker pull --platform linux/arm64 vitobotta/velero-backup-notification:v1.0.0

here is the inspect of the image

`[

    "Parent": "",
    "Comment": "buildkit.dockerfile.v0",
    "Created": "2023-05-02T11:30:11.142075184Z",
    "Container": "",
    "ContainerConfig": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": null,
        "Image": "",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": null
    },
    "DockerVersion": "",
    "Author": "",
    "Config": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "Cmd": [
            "/velero-notifications"
        ],
        "ArgsEscaped": true,
        "Image": "",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": null
    },
    "Architecture": "arm64",
    "Os": "linux",
    "Size": 44734073,
    "VirtualSize": 44734073,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/bcabe00f4cfb41febcd98fae899cd8977ef2d9ee67d1e5f6904112cb55b4f786/diff",
            "MergedDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/merged",
            "UpperDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/diff",
            "WorkDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/work"
        },
        "Name": "overlay2"
    },
    "RootFS": {
        "Type": "layers",
        "Layers": [
            "sha256:26cbea5cba74143fbe6f584f5fc5321543155aedc4a434fcaa63b643877b5a74",
            "sha256:c7086c3b6feae8516c178070b150b3c6667f250052e1b6d0fd5616a9f0e840ed"
        ]
    },
    "Metadata": {
        "LastTagTime": "2023-12-25T06:07:42.805128792Z"
    }
}

]`

@vitobotta
Copy link
Owner

Ah sorry by bad, the problem is the binary itself. It would need to be compiled for ARM to work on that architecture, so it's not just the image.

@noamlivni
Copy link
Author

@vitobotta thanks!
can you help me to understand how to compile it?

@vitobotta
Copy link
Owner

You need an ARM Linux machine with Crystal installed, better if with Alpine Linux so you can compile a static binary, then run:

shards install --without-development
crystal build src/hetzner-k3s.cr --release --static

Then build the Docker image with the binary that it creates and the Dockerfile in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants