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

Add secret in helm charts. #85

Closed
wants to merge 1 commit into from
Closed

Add secret in helm charts. #85

wants to merge 1 commit into from

Conversation

WilmsJochen
Copy link
Contributor

@WilmsJochen WilmsJochen commented Oct 29, 2024


💡 Summary generated by FirstMate:

  • Created new file demo-secrets.yaml in /charts/templates/ for Helm chart secrets.
  • Defined a Kubernetes Secret with name demo-secrets and included a secure password.

Copy link

firstmatebot bot commented Oct 29, 2024

PR Review

⚠️ It seems that you can still improve the quality of your PR. Have a look into this:

   

❌ Helm configuration: Remove secrets from helm templates; reference existing cluster secrets in values.yaml.

These are the improvements you should make:

  • No secrets in helm templates: Remove the secret from the helm template and reference an existing secret in the cluster using values.yaml.

No secrets in helm templates

You are defining a secret directly in the Helm template, which violates the guideline of not including Kubernetes secrets in templates. Instead, reference the existing secret in the cluster using the values.yaml file. Here's how you can modify the demo-secrets.yaml file:

apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.secrets.EXAMPLE_SECRET.secretName }}
type: Opaque
data:
  secret-pw: {{ .Values.secrets.EXAMPLE_SECRET.secretKey | b64enc }}

This change ensures that the secret is referenced correctly, adhering to best practices.

To improve your PR. Please make changes to these files:

  • /charts/templates/demo-secrets.yaml

Generated by Firstmate to make sure you can focus on coding new features.

@wvl94 wvl94 closed this Nov 5, 2024
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