diff --git a/hack/charts/cluster-api-operator/templates/addon.yaml b/hack/charts/cluster-api-operator/templates/addon.yaml index 6a341496..43a705c3 100644 --- a/hack/charts/cluster-api-operator/templates/addon.yaml +++ b/hack/charts/cluster-api-operator/templates/addon.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $addonNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider diff --git a/hack/charts/cluster-api-operator/templates/bootstrap.yaml b/hack/charts/cluster-api-operator/templates/bootstrap.yaml index 78dad47e..65378bed 100644 --- a/hack/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/hack/charts/cluster-api-operator/templates/bootstrap.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $bootstrapNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider diff --git a/hack/charts/cluster-api-operator/templates/control-plane.yaml b/hack/charts/cluster-api-operator/templates/control-plane.yaml index 8a020afd..33794af9 100644 --- a/hack/charts/cluster-api-operator/templates/control-plane.yaml +++ b/hack/charts/cluster-api-operator/templates/control-plane.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $controlPlaneNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider diff --git a/hack/charts/cluster-api-operator/templates/core.yaml b/hack/charts/cluster-api-operator/templates/core.yaml index 648e1b60..57629497 100644 --- a/hack/charts/cluster-api-operator/templates/core.yaml +++ b/hack/charts/cluster-api-operator/templates/core.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $coreNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider diff --git a/hack/charts/cluster-api-operator/templates/infra.yaml b/hack/charts/cluster-api-operator/templates/infra.yaml index 835607d4..8e68b3bf 100644 --- a/hack/charts/cluster-api-operator/templates/infra.yaml +++ b/hack/charts/cluster-api-operator/templates/infra.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $infrastructureNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider diff --git a/hack/charts/cluster-api-operator/templates/ipam.yaml b/hack/charts/cluster-api-operator/templates/ipam.yaml index 4a33c42f..e7d33100 100644 --- a/hack/charts/cluster-api-operator/templates/ipam.yaml +++ b/hack/charts/cluster-api-operator/templates/ipam.yaml @@ -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 @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $ipamNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index 32f5f439..2e1ac638 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -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: {} # ---