Skip to content

Add namespaces to different levels of deployable kustomizations#1475

Merged
friegger merged 5 commits into
mainfrom
chore/add-standalone-kustomizations
Jun 10, 2026
Merged

Add namespaces to different levels of deployable kustomizations#1475
friegger merged 5 commits into
mainfrom
chore/add-standalone-kustomizations

Conversation

@friegger

@friegger friegger commented May 22, 2026

Copy link
Copy Markdown
Contributor

Deal with namespaces more explicitly by adding them to kustomizations on different levels directly, eliminating the previous remove-namespace.yaml patch dance.

apiserver and controller components now have:

  • config/<component>/default/ - namespace+namePrefix only, emits no
    Namespace (used as a base)
  • config/<component>/standalone/ - wraps default/ and adds the
    ironcore-system Namespace; use this for
    single-component deploys

Shared Namespace lives in config/namespaces/ironcore-system/. The combined config/default and config/etcdless installs reference the bases and the Build output for both is byte-identical to main (only kustomize deprecation-warning lines disappear, since the patches that triggered them are gone).

The namespaces folder can be extended with additional namespaces, e.g. for the pool leases.

Behavioral change for downstream consumers of the low level kustomizations: users who previously ran kustomize build config/controller/default for a complete deploy must migrate to config/controller/standalone; same for config/apiserver/default -> config/apiserver/standalone (or config/apiserver/standalone-etcdless for the external-etcd variant).

Consumers must not apply namespace transformers in overlays, these will fail once we have multiple namespaces. This is true, independent of this change, once base kustomizations provide multiple namespaces.

The Makefile install/uninstall/deploy/undeploy targets are retargeted at the standalone variants accordingly. hack/validate-kustomize.sh is also made portable (GNU realpath --relative-to is unavailable on macOS).

Contributes to #1472

Summary by CodeRabbit

  • New Features

    • Added standalone and controller-only deployment overlays and a dedicated system namespace so users can deploy apiserver-only or controller-only setups.
  • Chores

    • Installer/deployer defaults updated to use standalone overlays.
    • Removed duplicate/implicit namespace declarations for cleaner installs.
    • Improved validation messages to show clearer path information.

apiserver and controller components now have:
- config/<component>/default/   - namespace+namePrefix only, emits no
                                  Namespace (used as a base)
- config/<component>/standalone/ - wraps default/ and adds the
                                  ironcore-system Namespace; use this for
                                  single-component deploys

Shared Namespace lives in config/namespaces/ironcore-system/. The combined
config/default and config/etcdless installs reference the bases and the
namespace kustomization directly, eliminating the previous
remove-namespace.yaml patch dance. Build output for both is byte-identical
to main (only kustomize deprecation-warning lines disappear, since the
patches that triggered them are gone).

The namespaces folder can be extended with additional namespaces, e.g. for
the pool leases.

Behavioral change for downstream consumers: users who previously ran
`kustomize build config/controller/default` for a complete deploy must
migrate to `config/controller/standalone`; same for
`config/apiserver/default` -> `config/apiserver/standalone` (or
`config/apiserver/standalone-etcdless` for the external-etcd variant).

Consumers must not apply namespace transformers in overlays, these
will fail once we have multiple namespaces.

The Makefile install/uninstall/deploy/undeploy targets are retargeted at
the standalone variants accordingly. hack/validate-kustomize.sh is also
made portable (GNU realpath --relative-to is unavailable on macOS).

Signed-off-by: Felix Riegger <felix.riegger@sap.com>
@friegger
friegger requested a review from a team May 22, 2026 07:17
@friegger friegger changed the title config: add namespaces to different levels of deployable kustomizations Add namespaces to different levels of deployable kustomizations May 22, 2026
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4699813e-6823-40de-adf3-5d716f0c2b68

📥 Commits

Reviewing files that changed from the base of the PR and between a201e35 and 1afe298.

📒 Files selected for processing (1)
  • config/namespaces/ironcore-system/kustomization.yaml
💤 Files with no reviewable changes (1)
  • config/namespaces/ironcore-system/kustomization.yaml

📝 Walkthrough

Walkthrough

This PR centralizes the ironcore-system namespace into a new kustomize directory, composes it into new standalone overlays for apiserver and controller (including etcdless), removes inline Namespace manifests, updates base kustomizations and kind overlays, updates Makefile targets, and tweaks a validation script path calculation.

Changes

Kustomize Namespace Refactoring

Layer / File(s) Summary
Centralized namespace definition
config/namespaces/ironcore-system/kustomization.yaml, config/namespaces/ironcore-system/namespace.yaml
Create shared ironcore-system Kustomize namespace resource and kustomization manifest in a new dedicated directory for reuse across deployments.
Apiserver standalone overlays
config/apiserver/standalone/kustomization.yaml, config/apiserver/standalone-etcdless/kustomization.yaml, config/apiserver/server/server.yaml
Add standalone and standalone-etcdless apiserver overlays that compose the base configuration with the centralized namespace. Remove the Namespace resource from the apiserver manifest.
Controller standalone overlay
config/controller/standalone/kustomization.yaml, config/controller/manager/manager.yaml
Add standalone controller overlay that composes the base configuration with the centralized namespace. Remove the Namespace resource from the controller manifest.
Base and etcdless configurations
config/default/kustomization.yaml, config/etcdless/kustomization.yaml
Update default and etcdless base configurations to reference the centralized namespace directly instead of using patch files.
Kind overlays
config/apiserver/kind/kustomization.yaml, config/controller/kind/kustomization.yaml
Update kind kustomizations to reference the new standalone overlays instead of default.
Deployment entry points
Makefile
Update Makefile install/uninstall/deploy/undeploy targets to use the standalone overlays for apiserver and controller.
Validation script utility
hack/validate-kustomize.sh
Update path calculation to use Bash parameter expansion instead of realpath for computing displayed relative directory paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: adding namespaces to kustomizations at different deployment levels, which is the main focus of this PR.
Description check ✅ Passed The description provides comprehensive details about the changes, behavioral impacts, and migration guidance, though it doesn't strictly follow the template's 'Proposed Changes' bullet format.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-standalone-kustomizations

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/validate-kustomize.sh`:
- Line 15: The prefix-removal pattern dir="${path#$BASEDIR/../}" can misbehave
if BASEDIR contains glob meta-characters; update the pattern to quote BASEDIR
inside the parameter expansion so the prefix is treated literally (i.e. use the
variable name BASEDIR within the ${path#...} expression in a quoted form) —
modify the occurrence of ${path#$BASEDIR/../} to use a quoted BASEDIR in the
pattern so dir assignment is robust against globbing.

In `@Makefile`:
- Line 235: The uninstall/undeploy Makefile targets currently run "kubectl
delete -k config/apiserver/standalone" (and a similar line at the other
occurrence) which deletes the shared ironcore-system Namespace; change these
targets to avoid removing the Namespace by either pointing to a kustomize
overlay that excludes the Namespace resource or by splitting namespace lifecycle
into a separate explicit target (e.g., "uninstall-namespace") and having
uninstall/undeploy call only component-specific deletions; update the lines
containing "kubectl delete -k config/apiserver/standalone" (and the second
similar delete) to use the non-namespace overlay or remove the Namespace
deletion so removing one component won’t tear down the other.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 22fdf563-639d-4a15-b423-ecfe90aed72e

📥 Commits

Reviewing files that changed from the base of the PR and between 4cd4d58 and caaf1d3.

📒 Files selected for processing (23)
  • Makefile
  • config/apiserver/kind/kustomization.yaml
  • config/apiserver/server/server.yaml
  • config/apiserver/standalone-etcdless/kustomization.yaml
  • config/apiserver/standalone/kustomization.yaml
  • config/controller/kind/kustomization.yaml
  • config/controller/manager/manager.yaml
  • config/controller/standalone/kustomization.yaml
  • config/default/apiserver/kustomization.yaml
  • config/default/apiserver/remove-namespace.yaml
  • config/default/controller/kustomization.yaml
  • config/default/controller/remove-namespace.yaml
  • config/default/kustomization.yaml
  • config/default/namespace.yaml
  • config/etcdless/apiserver/kustomization.yaml
  • config/etcdless/apiserver/remove-namespace.yaml
  • config/etcdless/controller/kustomization.yaml
  • config/etcdless/controller/remove-namespace.yaml
  • config/etcdless/kustomization.yaml
  • config/etcdless/namespace.yaml
  • config/namespaces/ironcore-system/kustomization.yaml
  • config/namespaces/ironcore-system/namespace.yaml
  • hack/validate-kustomize.sh
💤 Files with no reviewable changes (12)
  • config/etcdless/controller/remove-namespace.yaml
  • config/default/namespace.yaml
  • config/etcdless/apiserver/remove-namespace.yaml
  • config/default/controller/remove-namespace.yaml
  • config/etcdless/namespace.yaml
  • config/etcdless/apiserver/kustomization.yaml
  • config/default/apiserver/remove-namespace.yaml
  • config/default/apiserver/kustomization.yaml
  • config/default/controller/kustomization.yaml
  • config/etcdless/controller/kustomization.yaml
  • config/controller/manager/manager.yaml
  • config/apiserver/server/server.yaml

Comment thread hack/validate-kustomize.sh Outdated
Comment thread Makefile
@hardikdr hardikdr added the area/iaas Issues related to IronCore IaaS development. label May 22, 2026
@hardikdr hardikdr added this to Roadmap May 22, 2026
Comment thread config/namespaces/ironcore-system/kustomization.yaml
friegger added 3 commits June 9, 2026 10:06
Signed-off-by: Felix Riegger <felix.riegger@sap.com>
Signed-off-by: Felix Riegger <felix.riegger@sap.com>
@friegger
friegger requested a review from gonzolino June 9, 2026 14:04
Signed-off-by: Felix Riegger <felix.riegger@sap.com>
@friegger
friegger merged commit 455f76c into main Jun 10, 2026
12 checks passed
@friegger
friegger deleted the chore/add-standalone-kustomizations branch June 10, 2026 12:36
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Jun 10, 2026
@friegger friegger linked an issue Jul 3, 2026 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/iaas Issues related to IronCore IaaS development. chore size/L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Implement Pool Health Proposal

3 participants