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

helm: Allow multiple installations of the Tetragon Helm chart #1400

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

ashishkurmi
Copy link
Contributor

fixes #1399

@ashishkurmi ashishkurmi requested a review from a team as a code owner August 28, 2023 20:41
@ashishkurmi ashishkurmi changed the title Allow Multiple Installations of the Tetragon Helm Chart Allow multiple installations of the Tetragon Helm chart Aug 28, 2023
@ashishkurmi ashishkurmi changed the title Allow multiple installations of the Tetragon Helm chart helm: Allow multiple installations of the Tetragon Helm chart Aug 28, 2023
@kkourt
Copy link
Contributor

kkourt commented Aug 30, 2023

Thanks!

@willfindlay or @mtardy could you please have a look at this? CC: @michi-covalent

Copy link
Member

@mtardy mtardy 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 Helm recommended to use something like {{ template "fullname" . }} that was combining the release name and the chart name. But it would look weird to have that here and would result in very weird naming.

It was something very complicated like:

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "tetragon-enterprise.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

Honestly, I feel like it's simpler to do it that way, we can just end up with invalid names because of Kubernetes resources naming restriction but that would be the user shooting shooting their own foot with a nice error message so I think it's fine.

If it's annoying for some reason (because we want people to be free with their release name) we can use something like that later:

{{/*
Expand the name of the chart.
*/}}
{{- define "tetragon-enterprise.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

With a dedicated .Values.nameOverride that can be used for those advanced use cases.

@mtardy mtardy removed the request for review from olsajiri September 6, 2023 15:32
@mtardy
Copy link
Member

mtardy commented Sep 12, 2023

Hey @willfindlay do you want to take a look at this?

@mtardy mtardy added the needs-rebase This PR needs to be rebased because it has merge conflicts. label Sep 12, 2023
Copy link
Contributor

@willfindlay willfindlay left a comment

Choose a reason for hiding this comment

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

Yep this makes good sense to me

@mtardy mtardy added the release-note/minor This PR introduces a minor user-visible change label Sep 12, 2023
@mtardy
Copy link
Member

mtardy commented Sep 12, 2023

I added the release-note/minor This PR introduces a minor user-visible change tag, we might need a sentence for the changelog for this PR.

Sorry @ashishkurmi we delayed your PR because of unavailability and unfortunately, you now need to rebase on main. Could you do that?

@ashishkurmi
Copy link
Contributor Author

@mtardy no worries, I have rebased my pull request, could you please review and merge it if everything looks good? I have also requested code review from @willfindlay as the earlier sign off had become stale.

@mtardy mtardy removed the needs-rebase This PR needs to be rebased because it has merge conflicts. label Sep 14, 2023
@mtardy
Copy link
Member

mtardy commented Sep 14, 2023

@mtardy no worries, I have rebased my pull request, could you please review and merge it if everything looks good? I have also requested code review from @willfindlay as the earlier sign off had become stale.

so did you adapt in the rebase? because a new operator thingy was pushed in the helm chart right, or modified? If yes we can merge this :)

@ashishkurmi
Copy link
Contributor Author

@mtardy yes, I updated my PR as part of the rebase. A cluster role name was renamed as part of 84f1a37, I have updated my PR to accomodate this change.

@mtardy
Copy link
Member

mtardy commented Sep 14, 2023

@mtardy yes, I updated my PR as part of the rebase. A cluster role name was renamed as part of 84f1a37, I have updated my PR to accomodate this change.

Fantastic thanks!

@mtardy mtardy merged commit a11de01 into cilium:main Sep 14, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Multiple Installations of the Tetragon Helm Chart
4 participants