Skip to content

feat: Allow arbitrary podSpec in migration-job and crd-install jobs for operator chart#1288

Open
localleon wants to merge 3 commits intoredpanda-data:mainfrom
localleon:podspec
Open

feat: Allow arbitrary podSpec in migration-job and crd-install jobs for operator chart#1288
localleon wants to merge 3 commits intoredpanda-data:mainfrom
localleon:podspec

Conversation

@localleon
Copy link
Copy Markdown

Closes #1287

This extends the Redpanda Operator Helm chart to allow configurable security contexts and other pod spec settings for pre-install CRD job and post-upgrade migration job hooks via new top-level values fields.

Values Configuration

  1. Customize the CRD pre-install hook Job's pod spec (securityContext, tolerations, nodeSelector, etc.)
  2. Customize the post-upgrade migration hook Job's pod spec

Implementation Details

  • Added CRDs.PodTemplate and MigrationJob.PodTemplate structs to values.go
  • Updated pre_install_crd_job.go and post_upgrade_migration_job.go to apply [StrategicMergePatch] when overrides are provided
  • Merged via StrategicMergePatch semantics on top of chart-managed defaults
  • Only the spec field is merged (not metadata) to avoid nil pointer issues when users provide spec-only overrides
crds:
  enabled: true
  podTemplate:
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 65532
      containers:
        - name: crd-installation
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true

migrationJob:
  podTemplate:
    spec:
      securityContext:
        runAsNonRoot: true
      tolerations:
        - key: workload
          operator: Equal
          value: batch
          effect: NoSchedule

I've regenerated the charts using the taskfile and performed manual validation (helm template), if the rednering is successfull with both jobs!

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 9, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Mar 15, 2026
@localleon
Copy link
Copy Markdown
Author

Dear all, would you be so kind and review the PR?

Thanks in advance!

@github-actions github-actions bot removed the stale label Mar 18, 2026
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Mar 24, 2026
@localleon
Copy link
Copy Markdown
Author

Still there :-)

@github-actions github-actions bot removed the stale label Mar 25, 2026
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Mar 30, 2026
@localleon
Copy link
Copy Markdown
Author

@andrewstucki @ivotron @RafalKorepta @hidalgopl @david-yu would anyone of you please be so kind and take a look at the PR?

Thanks in advance!

@redpanda-data redpanda-data deleted a comment from CLAassistant Apr 2, 2026
@github-actions github-actions bot removed the stale label Apr 3, 2026
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.

Unable to set securityContext for crd-installation Job via values; operatorSecurityContext appears unused/deprecated

2 participants