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

Create data directory to improve k8s convenience #123

Merged
merged 4 commits into from
Sep 6, 2021

Conversation

wzxjohn
Copy link
Contributor

@wzxjohn wzxjohn commented Sep 5, 2021

Because k8s can only mount config map or secret as directory, it will override all files in the same directory of config file. So I move each config to it's own folder so anyone who want to run the docker image on k8s can simply mount the config folder without affect anything else.

@wzxjohn
Copy link
Contributor Author

wzxjohn commented Sep 5, 2021

By the way, why setting loop to false in Docker file?

@Revadike
Copy link
Owner

Revadike commented Sep 5, 2021

By the way, why setting loop to false in Docker file?

The docker fork isn't mine.

Copy link
Owner

@Revadike Revadike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a subdir for each file is a bit excessive (for now), but having a data folder seems indeed like a good idea.

@jackblk
Copy link
Contributor

jackblk commented Sep 5, 2021

By the way, why setting loop to false in Docker file?

I did it because the image is intended to be run only once a week, suitable for many services offering on-demand trigger or simply a crontab.

For user who wants to trigger it once per week, to disable the loop we will need to implement a bit more to the code base. Maybe I will create a PR for a better way to disable/enable the loop via env var. If user wants to use via k8s, they can override the config file anyway so I think this is currently the best option.

@wzxjohn wzxjohn force-pushed the master branch 2 times, most recently from 00d6f11 to a1d1665 Compare September 6, 2021 01:20
@wzxjohn
Copy link
Contributor Author

wzxjohn commented Sep 6, 2021

By the way, why setting loop to false in Docker file?

I did it because the image is intended to be run only once a week, suitable for many services offering on-demand trigger or simply a crontab.

For user who wants to trigger it once per week, to disable the loop we will need to implement a bit more to the code base. Maybe I will create a PR for a better way to disable/enable the loop via env var. If user wants to use via k8s, they can override the config file anyway so I think this is currently the best option.

I see. Sorry I didn't understand the design here at first. So I can actually run this container directly in k8s using CronJob instead of Deployment. Thanks!

@Revadike
Copy link
Owner

Revadike commented Sep 6, 2021

Thanks for the PR! Accepted!

Now, todo:

  • Update wiki to reflect this change in the next update

@Revadike Revadike merged commit 32a7362 into Revadike:master Sep 6, 2021
@wzxjohn
Copy link
Contributor Author

wzxjohn commented Sep 7, 2021

Thanks for the PR! Accepted!

Now, todo:

  • Update wiki to reflect this change in the next update

I have finished the wiki update. Could you please double check it now?

@Revadike
Copy link
Owner

Revadike commented Sep 7, 2021

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Installation-(Prerequisites) is missing the device_auth.json should be moved to /data

@wzxjohn
Copy link
Contributor Author

wzxjohn commented Sep 9, 2021

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Installation-(Prerequisites) is missing the device_auth.json should be moved to /data

Added 😄

@jackblk
Copy link
Contributor

jackblk commented Sep 9, 2021

I will update wiki for Docker version in next version. For now we are still at 1.5.3, new file structure will be updated in 1.5.4.

@Revadike
Copy link
Owner

Revadike commented Sep 9, 2021

Yes

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

Successfully merging this pull request may close these issues.

3 participants