-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| {{- if .Values.useStandardHelmNamingConventions }} | ||
| name: {{ include "pdp.fullname" . }} | ||
| {{- else }} | ||
| name: permitio-pdp | ||
| {{- end }} | ||
| labels: | ||
| {{- include "pdp.labels" . | nindent 4 }} | ||
| {{- with .Values.annotations }} | ||
|
|
@@ -145,7 +149,7 @@ spec: | |
| {{- if .Values.pdp.logs_forwarder.enabled }} | ||
| - name: fluent-bit-config | ||
| configMap: | ||
| name: fluentbit-config | ||
| name: {{ include "pdp.fullname" . }}-fluentbit-config | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add the condition here also for "useStandardHelmNamingConventions"
|
||
| - name: logs | ||
| emptyDir: {} | ||
| {{- else if .Values.openshift.enabled }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,11 @@ | |||||
| apiVersion: policy/v1 | ||||||
| kind: PodDisruptionBudget | ||||||
| metadata: | ||||||
| {{- if .Values.useStandardHelmNamingConventions }} | ||||||
| name: {{ include "pdp.fullname" . }} | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| {{- else }} | ||||||
| name: permitio-pdp-pdb | ||||||
| {{- end }} | ||||||
| labels: | ||||||
| {{- include "pdp.labels" . | nindent 4 }} | ||||||
| {{- with .Values.annotations }} | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,26 @@ | ||
| # Feature flag added to preserve backward compatibility with the old naming conventions | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excellent docs please add te fluentbit-config ConfigMap naming (fluentbit-config vs {fullname}-fluentbit-config) |
||
| # When useStandardHelmNamingConventions is false (default): | ||
| # - Service name: permitio-pdp | ||
| # - Secret name: permitio-pdp-secret | ||
| # - Deployment name: permitio-pdp | ||
| # - PodDisruptionBudget name: permitio-pdp-pdb | ||
| # | ||
| # When useStandardHelmNamingConventions is true: | ||
| # - Service name: {release-name}-{chart-name} (e.g., my-release-pdp) | ||
| # - Secret name: {release-name}-{chart-name} (e.g., my-release-pdp) | ||
| # - Deployment name: {release-name}-{chart-name} (e.g., my-release-pdp) | ||
| # - PodDisruptionBudget name: {release-name}-{chart-name} (e.g., my-release-pdp) | ||
| # | ||
| # The standard Helm naming convention follows the pattern {release-name}-{chart-name} | ||
| # and automatically truncates names to 63 characters to comply with Kubernetes DNS naming spec. | ||
| useStandardHelmNamingConventions: false | ||
|
|
||
| labels: {} | ||
| annotations: {} | ||
|
|
||
| nameOverride: "" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are standard Helm overrides but they're only used when |
||
| fullnameOverride: "" | ||
|
|
||
| pdp: | ||
| pdpEnvs: | ||
| [] | ||
|
|
@@ -58,11 +78,11 @@ resources: | |
|
|
||
| # OpenShift configuration | ||
| openshift: | ||
| enabled: false # Set to true for OpenShift deployments | ||
| enabled: false # Set to true for OpenShift deployments | ||
| serviceAccount: | ||
| create: true | ||
| name: "permitio-pdp-sa" | ||
| sccName: "restricted-v2" # OpenShift Security Context Constraint | ||
| sccName: "restricted-v2" # OpenShift Security Context Constraint | ||
| # Security context (SCC will override user/group settings automatically) | ||
| securityContext: | ||
| runAsNonRoot: true | ||
|
|
||
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.
add to values.yaml that selector labels won't change with the feature flag.
Consider also adding "app.kubernetes.io/name" and "app.kubernetes.io/instance" labels as standard Helm practice.