-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add option to use standard helm naming conventions #273
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
base: main
Are you sure you want to change the base?
Conversation
|
@EliMoshkovich please have a look when you can :) |
|
@EliMoshkovich could you have a look please? |
8f53c08 to
28883bd
Compare
EliMoshkovich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alexstojda ! Sorry I missed your earlier messages.
I’m reviewing the PR now 👀
EliMoshkovich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alexstojda!
Thanks for this PR! The implementation looks solid and follows Helm best practices. I did a thorough review and found one critical issue that needs to be fixed before merge.
🚨 Critical: ConfigMap Reference Mismatch
When this bug occurs: Only when both useStandardHelmNamingConventions: true and pdp.logs_forwarder.enabled: true are set together.
The issue:
- ConfigMap is created with name:
{release-name}-pdp-fluentbit-config(line 6 in logs-forwarder-cm.yaml) - Deployment still references hardcoded:
fluentbit-config(line 144 in deployment.yaml) - Result: Pod fails to mount ConfigMap because the name doesn't match
Verified with helm template:
$ helm template test-release . --set useStandardHelmNamingConventions=true --set pdp.logs_forwarder.enabled=true
# Creates ConfigMap:
name: test-release-pdp-fluentbit-config
# But references:
name: fluentbit-config # ❌ Not found!Fix needed in deployment.yaml line 144:
volumes:
{{- if .Values.pdp.logs_forwarder.enabled }}
- name: fluent-bit-config
configMap:
{{- if .Values.useStandardHelmNamingConventions }}
name: {{ include "..fullname" . }}-fluentbit-config
{{- else }}
name: fluentbit-config
{{- end }}
- name: logs
emptyDir: {}💡 Optional Suggestions (Non-blocking)
These are nice-to-haves that could be addressed in a follow-up if you prefer:
- Add
fullnameOverrideto values.yaml - It's already handled in_helpers.tpl, just needs documentation - Consider standard helper naming - Most Helm charts use
pdp.fullnameinstead of..fullname(purely cosmetic)
✅ What Looks Great
- Excellent documentation explaining the feature in values.yaml
- Smart backward compatibility with sensible defaults
- Proper handling of edge cases (name deduplication)
- Clean, focused implementation
Once the ConfigMap fix is in, this is ready to merge! 🚀
|
Thanks @EliMoshkovich, I implemented the changes you recommended |
0d57dc2 to
0fb2e8c
Compare
This pull request introduces support for standard Helm naming conventions in the
charts/pdpHelm chart while preserving backward compatibility with the existing naming scheme. It adds a feature flag (useStandardHelmNamingConventions) to toggle between the naming conventions.This is the standard naming convention of resources virtually all helm charts use. Defining static names as is currently done presents the risk of potential name collisions with other resources and/or other PDP deployments in the same namespace.