seaweedfs / seaweedfs-operator

seaweedfs kubernetes operator
Apache License 2.0
174 stars 42 forks source link

Publish official docker image #71

Closed scrayos closed 2 years ago

scrayos commented 2 years ago

This PR adds a public docker image to this repository. That simplifies the deployment of the seaweedfs-operator in Kubernetes clusters and removes the need to run anything but kustomize. This change should be fully compatible with the existing workflows as the image is overridden in Makefile's deploy job. Therefore people that modify the image will still be use to update their operator with the same commands and new users can just deploy it with the official docker image.

The image will be deployed to the free github container registry of this repository.

If this PR gets merged, I'd be happy if you could add the hacktoberfest-accepted label again! :+1:

chrislusf commented 2 years ago

Thanks! Can you dual publish to both docker hub and github repo? Someone may use the docker hub copy, intentionally or by mistake.

If anything I need to do, please give me some instructions.

scrayos commented 2 years ago

Okay, I've added Docker Hub image deployment and I've also added the latest tag for even easier access. You have to add the secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN to this repository with your respective account name and private access token.

And I've tested that everything works in another fork :+1:

chrislusf commented 2 years ago

Thanks! I can use current version to try the credentials. After the test, this should only build on tagging, right?

Is it possible to have the master built and pushed to :latest?

scrayos commented 2 years ago

You can just remove line 44 and :latest will always point to the most recent tag, while :master will be published for all builds, so that adventurous users can try out dev builds.

scrayos commented 2 years ago

What you're asking for is what the configuration does at the moment. If you want that, you don't have to change line 44 😄

chrislusf commented 2 years ago

I added the DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.

Could you confirm this PR is working?

scrayos commented 2 years ago

I added the DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.

Could you confirm this PR is working?

I have confirmed that this is working in scrayosnet/seaweedfs-operator earlier this day. It successfully pushed to docker hub and ghcr! 👍

You should be able to see the build log here: https://github.com/scrayosnet/seaweedfs-operator/actions/runs/3336162765/jobs/5520980055