keel-hq / keel

Kubernetes Operator to automate Helm, DaemonSet, StatefulSet & Deployment updates
https://keel.sh
Mozilla Public License 2.0
2.46k stars 282 forks source link

ARM support #282

Closed githubcdr closed 6 years ago

githubcdr commented 6 years ago

Hi,

Are there any plans to support Keel on ARM machines?

rusenask commented 6 years ago

hi, there is no reason not to :) armhf and aarch64?

githubcdr commented 6 years ago

I run a lab on raspberry so armhf would be nice :)

rusenask commented 6 years ago

okay, will try to get to this when I have a minute. Ideally docker cloud should build it, otherwise maybe circle CI could be also used for this.

githubcdr commented 6 years ago

nice, I will test as soon it lands

rusenask commented 6 years ago

Hi @githubcdr, added makefile scripts to build it. Currently also used upx to make them smaller, built armhf and aarch64:

https://hub.docker.com/r/keelhq/keel-arm/tags/

Will think of a way to automate builds, maybe with cloudbuild since docker cloud would take ages to compress.

githubcdr commented 6 years ago

Hi @rusenask,

I noticed this error when starting the -arm tagged image on raspberry;

Error: failed to start container "keel": Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/keel\": stat /bin/keel: no such file or directory": unknown
Back-off restarting failed container

image itself seems to be running, will check some more...

sudo docker run -it keelhq/keel-arm --help
INFO[0000] extension.credentialshelper: helper registered  name=aws
INFO[0000] bot: registered                               name=slack
usage: keel [<flags>]

Automated Kubernetes deployment updates. Learn more on https://keel.sh.

Flags:
  --help       Show context-sensitive help (also try --help-long and --help-man).
  --incluster  use in cluster configuration (defaults to 'true'), use '--no-incluster' if running outside of the cluster
  --kubeconfig="/root/.kube/config"
               path to kubeconfig (if not in running inside a cluster)
  --version    Show application version.
rusenask commented 6 years ago

Hi @githubcdr, I think deployment defines command as well, I will just change images to have the same target.

githubcdr commented 6 years ago

And while you''re at it release a version tagged image ;)

rusenask commented 6 years ago

Done, please test it :)

githubcdr commented 6 years ago

Getting there, the image runs but with errors;

time="2018-10-07T19:10:13Z" level=info msg="extension.credentialshelper: helper registered" name=aws
time="2018-10-07T19:10:13Z" level=info msg="bot: registered" name=slack
time="2018-10-07T19:10:13Z" level=info msg="keel starting..." arch=arm build_date=2018-10-07T190104Z go_version=go1.10.3 os=linux revision=f571b82c version=0.11.2
time="2018-10-07T19:10:13Z" level=info msg="provider.kubernetes: using in-cluster configuration"
time="2018-10-07T19:10:13Z" level=info msg="provider.defaultProviders: provider 'kubernetes' registered"
time="2018-10-07T19:10:13Z" level=info msg="extension.credentialshelper: helper registered" name=secrets
time="2018-10-07T19:10:13Z" level=info msg="bot.slack.Configure(): Slack approval bot is not configured"
time="2018-10-07T19:10:13Z" level=error msg="bot.Run(): can not get configuration for bot [slack]"
time="2018-10-07T19:10:13Z" level=info msg="trigger.poll.manager: polling trigger configured"
time="2018-10-07T19:10:13Z" level=info msg="webhook trigger server starting..." port=9300
time="2018-10-07T19:10:13Z" level=info msg=started context=watch resource=statefulsets
time="2018-10-07T19:10:13Z" level=info msg=started context=buffer
time="2018-10-07T19:10:13Z" level=info msg=started context=watch resource=daemonsets
time="2018-10-07T19:10:13Z" level=info msg=started context=watch resource=cronjobs
time="2018-10-07T19:10:13Z" level=info msg=started context=watch resource=deployments
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x1156c]
 goroutine 51 [running]:
sync/atomic.addUint64(0x12db2c4c, 0x1, 0x0, 0x12a9e01c, 0x0)
    /usr/local/go/src/sync/atomic/64bit_arm.go:31 +0x4c
github.com/keel-hq/keel/approvals.(*DefaultManager).SubscribeApproved(0x12db2c40, 0xf446f0, 0x12ddc040, 0x12ddc040, 0x12d7a000, 0x0)
    /home/karolis/go/src/github.com/keel-hq/keel/approvals/approvals.go:171 +0x40
github.com/keel-hq/keel/provider.(*DefaultProviders).subscribeToApproved(0x12befb50)
    /home/karolis/go/src/github.com/keel-hq/keel/provider/provider.go:60 +0x70
created by github.com/keel-hq/keel/provider.New
    /home/karolis/go/src/github.com/keel-hq/keel/provider/provider.go:45 +0x1d4
rusenask commented 6 years ago

oh great :| did some changes, another image with the same tag should be there in a few minutes, if it works, I will commit changes.

githubcdr commented 6 years ago

Looks good now!