kloudlite / helm-charts

Collection of kloudlite helm charts
https://kloudlite.github.io/helm-charts/
GNU Affero General Public License v3.0
4 stars 3 forks source link

feat/nats-and-mongo-backup-cron #108

Closed abdheshnayak closed 2 months ago

abdheshnayak commented 3 months ago

Summary by Sourcery

This pull request adds a cron job for NATS backups, scheduled to run every 2 hours, and integrates S3 storage using a CSI driver. It includes the necessary configurations for RBAC, service accounts, and a new StorageClass for S3-backed persistent volumes.

gitguardian[bot] commented 3 months ago

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [13125080](https://dashboard.gitguardian.com/workspace/389548/incidents/13125080?occurrence=161113809) | Triggered | Generic High Entropy Secret | 980d7f9055c2afcba50220a0b285388cfe4c4660 | charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/secret.yml.tpl | [View secret](https://github.com/kloudlite/helm-charts/commit/980d7f9055c2afcba50220a0b285388cfe4c4660#diff-8e392224bbf117dec21947e7be94d0e3e08f46bc7b83e1d5814a2ce688e838b6R1) | | [13125080](https://dashboard.gitguardian.com/workspace/389548/incidents/13125080?occurrence=161113810) | Triggered | Generic High Entropy Secret | 980d7f9055c2afcba50220a0b285388cfe4c4660 | charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/storage-class.yml.tpl | [View secret](https://github.com/kloudlite/helm-charts/commit/980d7f9055c2afcba50220a0b285388cfe4c4660#diff-6a6c7d94c519f7891376f37d40c8a7a78215759d55eed127c0a9092010428616R2) | | [13125325](https://dashboard.gitguardian.com/workspace/389548/incidents/13125325?occurrence=161115959) | Triggered | Generic High Entropy Secret | 2b5a4d9ad9b3fa63a8020574eb52c046310e33d4 | charts/kloudlite-platform/templates/4-cron-jobs/mongo-backup/secret.yml.tpl | [View secret](https://github.com/kloudlite/helm-charts/commit/2b5a4d9ad9b3fa63a8020574eb52c046310e33d4#diff-f007878306ddb15927c054ee17daf3cf62489a03ee036d1bdb7c2dcfff653442R1) | | [13125325](https://dashboard.gitguardian.com/workspace/389548/incidents/13125325?occurrence=161115960) | Triggered | Generic High Entropy Secret | 2b5a4d9ad9b3fa63a8020574eb52c046310e33d4 | charts/kloudlite-platform/templates/4-cron-jobs/mongo-backup/storage-class.yml.tpl | [View secret](https://github.com/kloudlite/helm-charts/commit/2b5a4d9ad9b3fa63a8020574eb52c046310e33d4#diff-5a291ff05ab715837e93e3bd81ae466daa38284ac7bac283ecaa97b09376471fR2) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secret safely. [Learn here](https://blog.gitguardian.com/secrets-api-management) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/detectors/specifics/private_key_openssh#revoke-the-secret). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

sourcery-ai[bot] commented 3 months ago

Reviewer's Guide by Sourcery

This pull request introduces a new cron job for NATS backup, leveraging a CSI S3 driver for storage. The changes include updates to the Helm chart values, the addition of several Kubernetes resource templates for the CSI S3 driver, and the configuration of the NATS backup cron job.

File-Level Changes

Files Changes
charts/kloudlite-platform/templates/utils/csi-s3/csi-s3.yaml
charts/kloudlite-platform/templates/utils/csi-s3/provisioner.yaml
charts/kloudlite-platform/templates/utils/csi-s3/driver.yaml
Introduced CSI S3 driver and provisioner configurations, including DaemonSet, StatefulSet, ServiceAccount, ClusterRole, ClusterRoleBinding, and CSIDriver resources.
charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/cron.yml.tpl
charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/storage-class.yml.tpl
charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/pvc.yml.tpl
charts/kloudlite-platform/templates/4-cron-jobs/nats-backup/secret.yml.tpl
Added templates for the NATS backup cron job, including CronJob, StorageClass, PersistentVolumeClaim, and Secret resources.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.