Skip to content

fix: correct nindent value for application.container in Job templates#95

Merged
ctron merged 1 commit into
guacsec:mainfrom
ruromero:fix/resource-indentation-job-templates
Jul 1, 2026
Merged

fix: correct nindent value for application.container in Job templates#95
ctron merged 1 commit into
guacsec:mainfrom
ruromero:fix/resource-indentation-job-templates

Conversation

@ruromero

@ruromero ruromero commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix incorrect nindent 6nindent 10 for trustification.application.container helper in all three init Job templates (create-database, migrate-database, create-importers)
  • Aligns with the pattern already used in service Deployment templates

Fixes #94

Jira: TC-4969

Test plan

  • helm template with resource overrides on createDatabase, migrateDatabase, and createImporters renders valid YAML with resources: inside the container spec
  • Templates render correctly without resource overrides (no regression)

🤖 Generated with Claude Code

Summary by Sourcery

Bug Fixes:

  • Fix misaligned trustification.application.container helper in create-database, migrate-database, and create-importers Job templates to ensure properly nested container configuration.

The trustification.application.container helper was included with
nindent 6 instead of nindent 10 in all three init Job templates,
placing the resources block at the wrong YAML indentation level
when resource limits are configured. This matches the pattern
already used in service Deployment templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts Helm init Job templates to indent the shared application container helper consistently so that rendered Job container specs remain valid and match the Deployment pattern.

Flow diagram for Helm Job template rendering with corrected container helper indentation

flowchart TD
  A[Helm values for init Jobs
createDatabase / migrateDatabase / createImporters] --> B[Job templates
020-Job.yaml]
  B --> C[include trustification.common.defaultImage]
  B --> D[include trustification.application.container
nindent 10]
  C --> E[Rendered container spec]
  D --> E
  E --> F[Valid Kubernetes Job YAML
resources inside container]
Loading

File-Level Changes

Change Details Files
Align indentation of application container helper in init Job templates with container spec indentation to ensure valid YAML rendering.
  • Changed nindent from 6 to 10 for trustification.application.container in the create-database Job template so it aligns under the container definition.
  • Updated nindent from 6 to 10 for trustification.application.container in the create-importers Job template to match other container fields.
  • Adjusted nindent from 6 to 10 for trustification.application.container in the migrate-database Job template so resources and other fields render inside the container spec.
charts/trustify/templates/init/create-database/020-Job.yaml
charts/trustify/templates/init/create-importers/020-Job.yaml
charts/trustify/templates/init/migrate-database/020-Job.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#94 Update the Helm init Job templates so that the trustification.application.container helper is included with nindent 10 (instead of nindent 6) in all three affected Job templates, ensuring the resources: block is indented under the container spec and deployments succeed when resource limits are configured.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ruromero ruromero requested a review from ctron June 30, 2026 11:23
@ctron ctron merged commit ed24b58 into guacsec:main Jul 1, 2026
3 checks passed
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.

Job templates fail deployment when resource limits are configured due to incorrect YAML indentation

2 participants