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

Add Kubernetes Manifests #5748

Draft
wants to merge 73 commits into
base: edge
Choose a base branch
from

Conversation

XtremeOwnageDotCom
Copy link
Contributor

@XtremeOwnageDotCom XtremeOwnageDotCom commented Oct 25, 2023

Work in progress- however, this should be a good starting set of manifests to quickly deploy FreshRSS to a kubernetes cluster.

IDEALLY, a helm chart would be even better. However, I lack the knowledge to build a successful helm chart, and instead rely on a few simple manifests.

Let me know feedback, and I will make changes as required.

ToDo:

  • Build helm chart
  • Add health checks
  • Determine any other features we can wrap into the helm chart
  • Need someone else to spotcheck my chart, and identify potential areas which can be improved.
  • Will need to update gh-pages to work with helm. -> https://helm.sh/docs/howto/chart_releaser_action/
  • Add helm testing?
  • Automated deployment testing?

@Alkarex Alkarex added this to the 1.22.1 milestone Oct 25, 2023
@XtremeOwnageDotCom
Copy link
Contributor Author

Taking a swing at building a proper helm chart.

Added todo list to parent comment.

If, there are any other commonly used configuration variables, let me know, and I can wrap them into the helm chart.

@Alkarex Alkarex marked this pull request as draft October 26, 2023 18:31
@XtremeOwnageDotCom
Copy link
Contributor Author

Thanks for the draft already @XtremeOwnageDotCom 👍🏻 Let's see if someone else ships in to finalise it :-)

I have a few more things to add to it, such as re-using existing PVCs, etc...

Hopefully, someone else can come behind me and spot-check, and give corrections if needed.

From you though- if you can give me a list of the features you want to be easily configured from the chart's values- I can add those in.

As of now, the only features I put by default-

I added the CRON scheduling.

In the documentation, I see we can also schedule the cron externally. We "COULD" use Kubernetes's build in CRON to handle the schedules. But, I don't see any advantage to it, as opposed to just leveraging CRON inside of the freshrss container.

OIDC

Given, OIDC was the spark behind all of this, I of course added the configuration parameters for OIDC. If odic.enabled = true- All of the other relevant env variables will be populated. Otherwise, OIDC_ENABLED="false" will be the only one.

Regarding the random crypto key, I also want to add a random function, which generates a random key if none is provided.

Other Features

Looking for details here, as to what the other "big" items could potentially be.

Versioning

It should also be possible to automatically publish a updated chart version, whenever a new release is created, so that updating the chart, will work as expected, without requiring maintenance.

* Added testing values.

* Added helper to manage labels. Added extraLabels

* Better service implementation.

* blah

* updated labels.

* fixed selector.

* Added selector labels

* Removed commented out version.

* Corrected names.

* Added automatically generated password.

* removed labels where labels shouldn't be

* Added missing space

* Cleaned up labels.

* updated comments.

* Updated default values.
@XtremeOwnageDotCom
Copy link
Contributor Author

XtremeOwnageDotCom commented Oct 29, 2023

@Alkarex so, I'd say the helm chart, appears to work as expected at this point.

But, doing some research into how to get this to actually work- appears, there are a few actions needed to make this "easily" usable publicly.

https://helm.sh/docs/topics/chart_repository/
https://medium.com/@mattiaperi/create-a-public-helm-chart-repository-with-github-pages-49b180dbb417

That being said, the least disruptive method of getting this working, is likely to just create another repository for freshrss-charts, where the related charts/actions can be stored.

thoughts / opinions?

For anyone who would like to test-

Directions for deploying-

git clone https://github.com/XtremeOwnageDotCom/FreshRSS.git
cd FreshRSS
git switch kubernetes-manifests
cd charts
helm upgrade --install freshrss-testing freshrss --namespace freshrss-test --create-namespace --values freshrss/values.yaml --set ingress.host=freshrss.yourdomain.com

Will produce....

Release "freshrss-testing" does not exist. Installing it now.
NAME: freshrss-testing
LAST DEPLOYED: Sat Oct 28 21:10:36 2023
NAMESPACE: freshrss-test
STATUS: deployed
REVISION: 1
TEST SUITE: None
root@rke-master-1:~/fresh-test/FreshRSS/charts#

And.... navigating to freshrss.yourdomain.com will yield....

A brand-new freshrss instance.

image

The chart itself, creates a Service, Ingress, StatefulSet, ConfigMap, Secret, and a PVC.

Ingress/Service/Persistence is all fully configurable via values.yaml.

FreshRSS Env variables for cron/env/port, along with OIDC-related variables are also configurable.

If, OIDC is enabled, and a clientCryptoKey is not provided, a random one will be automatically provisioned, and will not be overwritten for subsequent upgrades/deployments.

@Alkarex
Copy link
Member

Alkarex commented Oct 29, 2023

I fixed some minor syntax issues 35b3ed7
Hint: to get your editor to automatically use the project's whitespace convention, consider enabling https://editorconfig.org in your editor

@Alkarex Alkarex modified the milestones: 1.23.0, 1.24.0 Nov 24, 2023
@Alkarex Alkarex modified the milestones: 1.24.0, 1.25.0 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Everything related to Docker Documentation 📚
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants