target / pod-reaper

Rule based pod killing kubernetes controller
MIT License
200 stars 52 forks source link

Split the helm chart into a new repo or Equate the the Helm chart version with the pod-reaper version #80

Open rogerioefonseca opened 2 years ago

rogerioefonseca commented 2 years ago

Hello, I'm configuring the pod-reaper helm chart with Renovate bot, then I figured that the helm chart version is not the same as the pod-reaper code. For that there are 2 strategies that I can see now: 1 - Separate the Helm chart code in a new repo and maintain it there (That would be a better OMHO) 2 - Equate the Helm Chart version to match the pod-reaper version so then I could create a new MR with a real tagging version.

brianberzins commented 2 years ago

I actually don't know much about helm...

I see a couple of things like this: https://github.com/target/pod-reaper/blob/9b4221dc62d437ef21d36ee5046d7e882f3ec97a/chart/pod-reaper/values.yaml#L6 https://github.com/target/pod-reaper/blob/9b4221dc62d437ef21d36ee5046d7e882f3ec97a/chart/pod-reaper/Chart.yaml#L4

Seems like both of those are candidates for matching up with the pod-reaper version correct? Is there a repository where new versions are updated? How is it being used right now?

brianberzins commented 2 years ago

Trying to ask this a different way. With charts also being versioned, are the charts published anywhere (or are they someone pulled directly from github/here)? Trying to see if/when these have been published.

I've got a lot to learn here!

rogerioefonseca commented 2 years ago

Nice, so regarding that, the strategy that is most common to opensource projects is to create a separate repo only for the helm files, create the helm package and add it to the repo as well and then integrate that repo with the CNCF project https://artifacthub.io/. After that we will be able to install the helm charts using only the helm repo add and helm install pod-reaper --version XYZ

I can see those steps ahead.

Let me know if I can help somehow.

rogerioefonseca commented 2 years ago

Hey, I took the liberty to execute the steps above, but I would only use it if you agree, and then I would transfer the ownership to you. https://github.com/rogerioefonseca/pod-reaper-helm https://artifacthub.io/packages/helm/pod-reaper-chart/pod-reaper

brianberzins commented 2 years ago

Only managed to find a bit of time to dig at this...

What's the advantage of having a separate repository for just the chart? Doesn't that mean keeping both in sync? Mostly just trying to understand and I suspect that is in part because of how long I've used the pattern of "just have full kubernetes manifest files live in my application's repository, fully codifying the app, deployment configuration, and pipeline together in the same repo".

rogerioefonseca commented 2 years ago

So that is a nice question and my points are pretty much related to your comment when you mention the "just have full kubernetes manifest files live in my application's repository, fully codifying the app, deployment configuration, and pipeline together in the same repo". :) Helm Charts have its only responsibility and it is more related to Kubernetes rather than your application, having the Helm charts in a separate repo would: Pros:

Cons:

rogerioefonseca commented 2 years ago

Ping! Happy new year!!

brianberzins commented 2 years ago

I'm currently leaning towards trying to do it in this repo, but mostly because it means fewer PRs, makes it easier to automate between release of the helm chart and the code. Also because I'm not an owner/admin of the Target organization, so I'd have to have someone else make it (unless I want to do it under my personal space).

rogerioefonseca commented 2 years ago

Yep, fair enough, I still did not understand the fewer PR's that you mentioned since the Helm charts are not really being changed that much. Can you please keep the Helm version the same as the repo? :)

brianberzins commented 2 years ago

Oh, maybe my understanding is wrong... wouldn't I want to update the helm chart to use the latest version of the pod-reaper in the helm chart each time I update the pod-reaper?

I'm mostly thinking about this version number: https://github.com/target/pod-reaper/blob/9b4221dc62d437ef21d36ee5046d7e882f3ec97a/chart/pod-reaper/values.yaml#L6

rogerioefonseca commented 2 years ago

No it is not that one. The chart version should match the TAG version - https://github.com/target/pod-reaper/blob/9b4221dc62d437ef21d36ee5046d7e882f3ec97a/chart/pod-reaper/Chart.yaml#L4

rogerioefonseca commented 2 years ago

Ping...

brianberzins commented 2 years ago

Thanks for the ping. I'm mostly just swamped with work this week. I promise it's still on my to-do list

Is there a date you'd really like to see this by? Or just as ASAP thing?

In either case, honestly appreciate the reminders!

rogerioefonseca commented 2 years ago

haha, for me it would be an ASAP thing, haha. :)

brianberzins commented 2 years ago

@rogerioefonseca Way too much I'm not tracking with helm. Any chance you'd be up for a pair programming session sometime? I think there are a few things needed to make this work that'd be overstepping my bounds as I'm not an admin on this repo. So I'm considering doing this all myself on a git repo (very similar to what you had), but I'd like to know more about expected use cases.

When this is all working properly, what are some examples of commands you want to see working?

brianberzins commented 2 years ago

@slushpupie Do you (or know someone else) know/use helm well/often? Seems like some steps here would be asking for another repo or at least initializing git admin pages/setting up an account on artifacthub.io

Struggling with a back and forth between wanting to keep everything together and breaking it out/letting someone else (even if it's me) own the helm chart.

rogerioefonseca commented 2 years ago

Sure! We can do pair programming and discuss the pros and cons. Let me know if one of these slots works for you:

https://calendly.com/d/cmr-zbp-64k/helm-chart-conversation

Regarding your points: 1 - After having a new repository configured with Github pages and published in artifact.io I would just need to:

helm repo add pod-reaper https://rogerioefonseca.github.io/pod-reaper-helm/charts
helm install pod-reaper

2 - And yes I use Helm often

brianberzins commented 2 years ago

got a This calendar is currently unavailable. Also pinged an admin on the repo to see what they think. Otherwise, I can set it up under my personal space if/until we sort something out.

Sincere apologies, but I've been swamped the last few weeks and I'm still catching up. Still poking at this when I catch a few minutes here and there.

rogerioefonseca commented 2 years ago

Hey there, sorry for the lack of reply! I manage here inside do check the helm version internally, was a little tricky but worked. If you are still opened to, let me know when it would be a good date to discuss this topic, it is still relevant in my opinion. Best