Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Helm charts to version 0.80.0 and the common library to 0.9.0. Key changes include refactoring the cnpg chart to support existing secret lookups and dynamic password generation, adding a new sharedSecretFiles feature to the common library for mounting multiple files from secrets, and simplifying the ServiceAccount template. Documentation and repository indices have been updated accordingly. Feedback highlights a syntax error in the secret-admin-postgres.yaml template where the default function is missing an argument, and suggests restoring standard labels to the ServiceAccount resource for better resource management.
I am having trouble creating individual review comments. Click here to see my feedback.
charts/cnpg/templates/secret-admin-postgres.yaml (8)
The default function is used incorrectly here. It requires two arguments: the default value and the input value to evaluate (e.g., {{ .Values.someValue | default "default-value" }}). The current usage {{ default "kubernetes.io/basic-auth" }} is missing the input value and will cause a template rendering error. If the intention was to allow an override, it should likely reference a value like .Values.superuser.type.
charts/common/templates/_serviceaccount.yaml (9-10)
The labels have been removed from the ServiceAccount resource. It is a best practice to include standard labels on all Kubernetes resources to support consistent resource management, filtering, and observability. Consider restoring them using the current helper (e.g., helm-chart.labels).
Sync Onechart and CNPG template From onechart repo