-
Notifications
You must be signed in to change notification settings - Fork 12
Add namespaces to different levels of deployable kustomizations #1475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Standalone install of the ironcore apiserver against an external etcd | ||
| # (no in-cluster etcd StatefulSet): same content as config/apiserver/etcdless | ||
| # plus the ironcore-system Namespace. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - ../etcdless | ||
| - ../../namespaces/ironcore-system |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Standalone install of the ironcore apiserver (with the bundled etcd | ||
| # StatefulSet): same content as config/apiserver/default plus the | ||
| # ironcore-system Namespace. Use this when deploying the apiserver without | ||
| # the controller manager. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - ../default | ||
| - ../../namespaces/ironcore-system |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Standalone install of the ironcore controller manager: same content as | ||
| # config/controller/default plus the ironcore-system Namespace. Use this when | ||
| # deploying the controller without the apiserver. The combined config/default | ||
| # install references the Namespace kustomization directly, not via this | ||
| # wrapper. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - ../default | ||
| - ../../namespaces/ironcore-system |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Combined install: apiserver (with bundled etcd) + controller manager. | ||
| # Both bases are namespace-free; the namespace kustomization is referenced | ||
| # directly here. This replaces the previous remove-namespace.yaml patch dance. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - namespace.yaml | ||
| - apiserver | ||
| - controller | ||
| - ../apiserver/default | ||
| - ../controller/default | ||
| - ../namespaces/ironcore-system |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Combined install with an external etcd (no in-cluster etcd StatefulSet): | ||
| # apiserver/etcdless + controller manager. Same shape as config/default but | ||
| # pulls the etcdless apiserver base. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - namespace.yaml | ||
| - apiserver | ||
| - controller | ||
| - ../apiserver/etcdless | ||
| - ../controller/default | ||
| - ../namespaces/ironcore-system |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - namespace.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # The namespace where the ironcore apiserver and controller manager run. | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: ironcore-system | ||
| labels: | ||
| control-plane: apiserver-controller |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,7 @@ normal="$(tput sgr0)" | |||||
|
|
||||||
| for kustomization in "$BASEDIR"/../config/*/**/kustomization.yaml; do | ||||||
| path="$(dirname "$kustomization")" | ||||||
| dir="$(realpath --relative-to "$BASEDIR"/.. "$path")" | ||||||
| dir="${path#$BASEDIR/../}" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Show the relevant lines (including neighbors) around the referenced line
echo "== hack/validate-kustomize.sh (lines 1-40) =="
nl -ba hack/validate-kustomize.sh | sed -n '1,40p'
echo "== hack/validate-kustomize.sh: occurrences of BASEDIR and path#"$'\n'"BASEDIR =="
rg -n 'BASEDIR|path#\$\{?BASEDIR\}?|path#\$\BASEDIR|dir="\$\{path#\$\BASEDIR/.*\}"' hack/validate-kustomize.sh || trueRepository: ironcore-dev/ironcore Length of output: 172 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== hack/validate-kustomize.sh (lines 1-60) =="
awk 'NR>=1 && NR<=60 {printf "%4d\t%s\n", NR, $0}' hack/validate-kustomize.sh
echo "== BASEDIR definitions/usages =="
rg -n 'BASEDIR|path#\$\{?BASEDIR\}?|dir="\$\{path#\$\{?BASEDIR\}?/.*"' hack/validate-kustomize.sh || trueRepository: ironcore-dev/ironcore Length of output: 1059 Quote At Line 15, Proposed fix- dir="${path#$BASEDIR/../}"
+ dir="${path#"$BASEDIR"/../}"📝 Committable suggestion
Suggested change
🧰 Tools🪛 Shellcheck (0.11.0)[info] 15-15: Expansions inside ${..} need to be quoted separately, otherwise they match as patterns. (SC2295) 🤖 Prompt for AI Agents |
||||||
| echo "${bold}Validating $dir${normal}" | ||||||
| if ! kustomize_output="$(kustomize build "$path" 2>&1)"; then | ||||||
| echo "${red}Kustomize build $dir failed:" | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid deleting the shared namespace from single-component teardown targets.
uninstallandundeploynow delete standalone kustomizations that includeironcore-system. If both components are installed independently, removing one can delete the namespace and tear down the other component unexpectedly.Use delete targets that exclude the Namespace (or split namespace lifecycle into a separate explicit target).
Also applies to: 244-244
🤖 Prompt for AI Agents