Skip to content

feat(db-migrations): new chart#28

Merged
zavertiaev merged 2 commits intomainfrom
db-mig
Oct 31, 2025
Merged

feat(db-migrations): new chart#28
zavertiaev merged 2 commits intomainfrom
db-mig

Conversation

@zavertiaev
Copy link
Contributor

@zavertiaev zavertiaev commented Oct 31, 2025

Summary by CodeRabbit

  • New Features
    • Added Helm chart for database migrations enabling deployment as Kubernetes Jobs with configurable execution policies, resource constraints, environment variables, scheduling options, and image pull settings. Includes reusable template helpers, ConfigMap integration, comprehensive defaults, and standard packaging configuration.

@zavertiaev zavertiaev self-assigned this Oct 31, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A complete Helm chart for database migrations is added at charts/db-migrations/, including chart metadata, Kubernetes Job and ConfigMap templates with helper functions, and default configuration values supporting container images, environment variables, volumes, and scheduling.

Changes

Cohort / File(s) Summary
Chart metadata and configuration
charts/db-migrations/.helmignore, charts/db-migrations/Chart.yaml
Adds Helm chart definition with apiVersion v2, name db-migrations, version 0.1.0, and ignore patterns for version control and editor artifacts
Template helpers
charts/db-migrations/templates/_helpers.tpl
Defines five shared template functions: name, fullname, chart identifier, labels, and selector labels with 63-character truncation and dash-trimming logic
Kubernetes manifests
charts/db-migrations/templates/job.yaml, charts/db-migrations/templates/trigger-configmap.yaml
Job template renders batch/v1 Job with conditional fields for command, args, volumes, environment variables, and scheduling; ConfigMap template stores image tag reference
Default values
charts/db-migrations/values.yaml
Provides default configuration including image repository/tag/pullPolicy, job retry settings, restartPolicy=Never, and placeholders for cmd, args, env, volumes, nodeSelector, tolerations, and affinity

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify all five helper template functions implement correct Kubernetes naming conventions (63-character truncation, dash handling)
  • Confirm Job template conditionals properly handle optional fields (cmd, args, env, envFrom, volumes, volumeMounts)
  • Validate YAML indentation and formatting consistency across toYaml helper calls in templates
  • Review values.yaml for completeness and reasonable defaults for a database migration workload

Poem

🐰 A chart for migrations hops into place,
With Jobs and ConfigMaps, quite the embrace!
Templates and helpers, so tidy and neat,
Database deployments—complete and so sweet! ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch db-mig

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 54fda44 and 00f4540.

📒 Files selected for processing (6)
  • charts/db-migrations/.helmignore (1 hunks)
  • charts/db-migrations/Chart.yaml (1 hunks)
  • charts/db-migrations/templates/_helpers.tpl (1 hunks)
  • charts/db-migrations/templates/job.yaml (1 hunks)
  • charts/db-migrations/templates/trigger-configmap.yaml (1 hunks)
  • charts/db-migrations/values.yaml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zavertiaev zavertiaev merged commit 1e47bc1 into main Oct 31, 2025
1 check passed
@zavertiaev zavertiaev deleted the db-mig branch October 31, 2025 15:05
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