Skip to content

🌱 Make namespace creation optional and configurable per component #813

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $addonNamespace := default ( printf "%s-%s" $name "addon-system" ) (get $addon "namespace") }}
{{- $addonName := $name }}
{{- $addonVersion := get $addon "version" }}
{{- if ne $addon.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $addonNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: AddonProvider
Expand Down
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $bootstrapNamespace := default ( printf "%s-%s" $name "bootstrap-system" ) (get $bootstrap "namespace") }}
{{- $bootstrapName := $name }}
{{- $bootstrapVersion := get $bootstrap "version" }}
{{- if ne $bootstrap.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $bootstrapNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider
Expand Down
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $controlPlaneNamespace := default ( printf "%s-%s" $name "control-plane-system" ) (get $controlPlane "namespace") }}
{{- $controlPlaneName := $name }}
{{- $controlPlaneVersion := get $controlPlane "version" }}
{{- if ne $controlPlane.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $controlPlaneNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: ControlPlaneProvider
Expand Down
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $coreNamespace := default "capi-system" (get $core "namespace") }}
{{- $coreName := $name }}
{{- $coreVersion := get $core "version" }}
{{- if ne $core.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $coreNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
Expand Down
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $infrastructureNamespace := default ( printf "%s-%s" $name "infrastructure-system" ) (get $infra "namespace") }}
{{- $infrastructureName := $name }}
{{- $infrastructureVersion := get $infra "version" }}
{{- if ne $infra.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $infrastructureNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
Expand Down
2 changes: 2 additions & 0 deletions hack/charts/cluster-api-operator/templates/ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $ipamNamespace := default ( printf "%s-%s" $name "ipam-system" ) (get $ipam "namespace") }}
{{- $ipamName := $name }}
{{- $ipamVersion := get $ipam "version" }}
{{- if ne $ipam.createNamespace false }}
---
apiVersion: v1
kind: Namespace
Expand All @@ -14,6 +15,7 @@ metadata:
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $ipamNamespace }}
{{- end }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: IPAMProvider
Expand Down
42 changes: 24 additions & 18 deletions hack/charts/cluster-api-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,35 @@
# ---
# Cluster API provider options
core: {}
# cluster-api: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# cluster-api: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
bootstrap: {}
# kubeadm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# kubeadm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
controlPlane: {}
# kubeadm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# kubeadm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
infrastructure: {}
# docker: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# docker: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
addon: {}
# helm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# helm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
ipam: {}
# in-cluster: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# in-cluster: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
# createNamespace: true # Optional
manager.featureGates: {}
fetchConfig: {}
# ---
Expand Down
Loading