Skip to content

fix: add namespace to remaining poddisruptionbudget helm templates - #888

Merged
Demonsthere merged 1 commit into
ory:masterfrom
somaz94:fix/pdb-namespace-remaining-charts
Jul 31, 2026
Merged

fix: add namespace to remaining poddisruptionbudget helm templates#888
Demonsthere merged 1 commit into
ory:masterfrom
somaz94:fix/pdb-namespace-remaining-charts

Conversation

@somaz94

@somaz94 somaz94 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The PodDisruptionBudget templates for kratos, hydra-maester, and
oathkeeper-maester don't set metadata.namespace, so the PDB doesn't
inherit the release namespace. This completes the same fix already
merged for hydra (#885) and in progress for oathkeeper (#883); keto
already has it.

Same guard as #885:

  {{- if .Release.Namespace }}
  namespace: {{ .Release.Namespace }}
  {{- end }}

Validation:

  • helm template on all three charts with pdb.enabled=true renders
    namespace: <release-namespace> on the PDB.
  • default render is unchanged; the only delta vs master is the added
    namespace line.

related: #882, #884

Summary by CodeRabbit

  • Bug Fixes
    • PodDisruptionBudget resources now include the release namespace when one is provided, improving chart rendering consistency across deployments.
    • Applied the same namespace handling across all affected charts to reduce surprises during installation or upgrade.

@CLAassistant

CLAassistant commented Jul 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c0e3eb5-af49-4dd6-b9db-741cf3097238

📥 Commits

Reviewing files that changed from the base of the PR and between 4de8d62 and 312afe1.

📒 Files selected for processing (3)
  • helm/charts/hydra-maester/templates/pdb.yaml
  • helm/charts/kratos/templates/pdb.yaml
  • helm/charts/oathkeeper-maester/templates/pdb.yaml

📝 Walkthrough

Walkthrough

Three Helm chart PodDisruptionBudget templates (hydra-maester, kratos, oathkeeper-maester) are updated so metadata.namespace is conditionally rendered from .Release.Namespace when that value is set.

Changes

PDB Namespace Conditional Rendering

Layer / File(s) Summary
Conditional metadata.namespace in PDB templates
helm/charts/hydra-maester/templates/pdb.yaml, helm/charts/kratos/templates/pdb.yaml, helm/charts/oathkeeper-maester/templates/pdb.yaml
Each template wraps a namespace: {{ .Release.Namespace }} line in an if/end block so metadata.namespace is only rendered when .Release.Namespace is set.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related issues

Possibly related PRs

  • ory/k8s#874: Applies the same conditional metadata.namespace from .Release.Namespace pattern to hydra-maester's deployment.yaml.
  • ory/k8s#885: Modifies a PodDisruptionBudget template to conditionally render metadata.namespace from .Release.Namespace.

Suggested reviewers: piotrmsc, Demonsthere

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding namespace handling to the remaining PodDisruptionBudget Helm templates.
Description check ✅ Passed The description explains the fix, links related issues, and includes validation notes; only non-critical template sections are left empty.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

somaz94 added a commit to somaz94/somaz94 that referenced this pull request Jul 3, 2026
Signed-off-by: somaz <genius5711@gmail.com>
@somaz94
somaz94 force-pushed the fix/pdb-namespace-remaining-charts branch from cd68a5f to 312afe1 Compare July 3, 2026 07:13
@somaz94
somaz94 marked this pull request as ready for review July 3, 2026 07:19
@somaz94

somaz94 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Demonsthere — friendly ping on this one.

All checks are green and there are no conflicts. This is the follow-up to #885 (hydra), covering the remaining charts that still template a PodDisruptionBudget without a namespace: hydra-maester, kratos and oathkeeper-maester. It does not overlap with #885 or with the open #883.

Happy to rebase or split it up if that would help. Thanks!

@Demonsthere

Copy link
Copy Markdown
Collaborator

Hi there!
Sorry for the delay on this 😞

@Demonsthere
Demonsthere merged commit 8beada8 into ory:master Jul 31, 2026
22 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.

3 participants