tetragon icon indicating copy to clipboard operation
tetragon copied to clipboard

Add nameOverride and fullnameOverride support to Tetragon Helm chart

Open cy83rc0llect0r opened this issue 7 months ago • 12 comments

Enhancement #2951

Description

This pull request adds support for nameOverride and fullnameOverride in the Tetragon Helm chart, addressing the enhancement request in issue #2951. This feature allows users to customize the names of Kubernetes resources deployed via Helm, improving flexibility and compatibility in diverse environments (e.g., when deploying multiple instances or following naming conventions).

The changes include:

  • Addition of nameOverride and fullnameOverride fields to values.yaml.
  • Introduction of a new tetragon.fullname helper in _helpers.tpl to unify naming logic across templates.
  • Updates to all affected templates (DaemonSet, Deployment, ServiceAccount, etc.) to use the new helper instead of .Release.Name.
  • Tested the changes using helm template to validate correct name rendering.

These changes are fully backward compatible: if nameOverride and fullnameOverride are not set, the chart behaves as before.

Use Case Example

A user deploying multiple instances of Tetragon (e.g., in different namespaces or clusters) can now avoid resource name collisions by customizing the full names of the Kubernetes objects. This is especially useful in CI/CD pipelines or large multi-tenant setups where naming conventions must be enforced.

Changelog

Added nameOverride and fullnameOverride support to the Tetragon Helm chart. Use these fields in values.yaml to customize resource names.

cy83rc0llect0r avatar Apr 07 '25 21:04 cy83rc0llect0r

Deploy Preview for tetragon ready!

Name Link
Latest commit 95a7785ee839bc7d05ca1f88d795ef0ba858c6f7
Latest deploy log https://app.netlify.com/projects/tetragon/deploys/682ef78b216b9000083204f0
Deploy Preview https://deploy-preview-3604--tetragon.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Apr 07 '25 21:04 netlify[bot]

@tpapagian Could you please find some time to review my PR? It's been pending for a while, and your feedback would be greatly appreciated to move it forward. Thank you for your time and support!

cy83rc0llect0r avatar Apr 22 '25 09:04 cy83rc0llect0r

@tpapagian Could you please find some time to review my PR? It's been pending for a while, and your feedback would be greatly appreciated to move it forward. Thank you for your time and support!

Hey, sorry missed that review. This PR looks good to me. Thanks!

tpapagian avatar Apr 22 '25 10:04 tpapagian

Aside I'll be off for the next two weeks, so feel free to ping someone else if you want to merge this earlier

mtardy avatar Apr 30 '25 12:04 mtardy

My bad! I accidentally created a wrong push and closed my PR! Can you remove this and I will create new PR? @mtardy

cy83rc0llect0r avatar May 21 '25 20:05 cy83rc0llect0r

Can you remove this and I will create new PR? @mtardy

Hey, what would you like to remove? This PR seems to be closed already.

mtardy avatar May 22 '25 08:05 mtardy

Can you remove this and I will create new PR? @mtardy

Hey, what would you like to remove? This PR seems to be closed already.

Yes it closed by my mistake :(

cy83rc0llect0r avatar May 22 '25 08:05 cy83rc0llect0r

Can you remove this and I will create new PR? @mtardy

Hey, what would you like to remove? This PR seems to be closed already.

Yes it closed by my mistake :(

I think you might be able to reopen it if you push commit to the branch again

mtardy avatar May 22 '25 08:05 mtardy

@mtardy Could you please check my changes?

cy83rc0llect0r avatar May 26 '25 10:05 cy83rc0llect0r

hey I don't understand your changes, are you using an LLM to generate those patches?

No I didn't. I was working on another PR for Tetragon and I think everything was messed up. Let me clean it up.

cy83rc0llect0r avatar May 26 '25 11:05 cy83rc0llect0r

@mtardy

To be honest, I felt quite disheartened and lost some focus after seeing the assumption that I might have used an LLM to patch my code. I understand that the code might appear a bit messy or unexpected, but this is primarily due to the long time gap between opening this PR and today, which has led to a lack of proper focus on this particular fork. Given this, I prefer to either close this Pull Request or convert it to a DRAFT.

Thank you so much.

cy83rc0llect0r avatar May 26 '25 11:05 cy83rc0llect0r

To be honest, I felt quite disheartened and lost some focus after seeing the assumption that I might have used an LLM to patch my code. I understand that the code might appear a bit messy or unexpected, but this is primarily due to the long time gap between opening this PR and today, which has led to a lack of proper focus on this particular fork. Given this, I prefer to either close this Pull Request or convert it to a DRAFT.

yeah sorry it's just that it happened in the past and because I saw some random changes I thought it was that again, sorry it was indelicate! The PR is helpful

mtardy avatar May 26 '25 14:05 mtardy

This has been fixed by https://github.com/cilium/tetragon/pull/3864. Again I'm sorry I didn't want to demotivate you and hope you'll continue contributing to Tetragon, I'll be happy to review other patches :)!

mtardy avatar Aug 04 '25 10:08 mtardy