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 helm secret. #84

Closed
wants to merge 1 commit into from
Closed

Add helm secret. #84

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 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:

   

❌ Security & secret handling: Remove secrets from Helm charts; store them in Kubernetes secrets and reference in deployment.

These are the improvements you should make:

  • Helm charts should not contain secrets: Remove the secret from the Helm chart template. Store it in a Kubernetes secret and reference it in the deployment.

Helm charts should not contain secrets

You are storing sensitive information directly in the Helm chart template, which is against best practices. Instead, store the secret in a Kubernetes Secret and reference it in your deployment. Here's how to modify the demo-secrets.yaml:

- apiVersion: v1
- kind: Secret
- metadata:
-   name: demo-secrets
- data:
-   secret-pw: "super-secure-secret"
+ apiVersion: v1
+ kind: Secret
+ metadata:
+   name: demo-secrets
+ data:
+   secret-pw: {{ .Values.secretPassword | b64enc | quote }}

Make sure to define secretPassword in your values.yaml file to keep it secure.

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.

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.

1 participant