Skip to content

Conversation

@alexstojda
Copy link
Contributor

This pull request introduces support for standard Helm naming conventions in the charts/pdp Helm 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.

@alexstojda
Copy link
Contributor Author

@EliMoshkovich please have a look when you can :)

@alexstojda
Copy link
Contributor Author

@EliMoshkovich could you have a look please?

@alexstojda alexstojda force-pushed the fix/correct-resource-names branch from 8f53c08 to 28883bd Compare September 17, 2025 13:25
Copy link
Collaborator

@EliMoshkovich EliMoshkovich left a 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 👀

Copy link
Collaborator

@EliMoshkovich EliMoshkovich left a 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:

  1. Add fullnameOverride to values.yaml - It's already handled in _helpers.tpl, just needs documentation
  2. Consider standard helper naming - Most Helm charts use pdp.fullname instead 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! 🚀

alexstojda added a commit to alexstojda/PDP that referenced this pull request Oct 23, 2025
@alexstojda
Copy link
Contributor Author

Thanks @EliMoshkovich, I implemented the changes you recommended

@alexstojda alexstojda force-pushed the fix/correct-resource-names branch from 0d57dc2 to 0fb2e8c Compare November 17, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants