Skip to content

Commit 2e5a2b9

Browse files
committed
feat: Configure namespace sync in helm chart
- Adds configuration fields and passes them to manager as flags. - Documents configuration fields and their default values.
1 parent 655c75b commit 2e5a2b9

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

charts/cluster-api-runtime-extensions-nutanix/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ A Helm chart for cluster-api-runtime-extensions-nutanix
7070
| image.repository | string | `"ghcr.io/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix"` | |
7171
| image.tag | string | `""` | |
7272
| imagePullSecrets | list | `[]` | Optional secrets used for pulling the container image |
73+
| namespaceSync.sourceNamespace | string | `"default"` | |
74+
| namespaceSync.targetNamespaceLabelKey | string | `"caren.nutanix.com/namespace-sync"` | |
7375
| nodeSelector | object | `{}` | |
7476
| priorityClassName | string | `"system-cluster-critical"` | Priority class to be used for the pod. |
7577
| resources.limits.cpu | string | `"100m"` | |

charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ spec:
3030
args:
3131
- --webhook-cert-dir=/runtimehooks-certs/
3232
- --defaults-namespace=$(POD_NAMESPACE)
33+
- --namespacesync-source-namespace={{ .Values.namespaceSync.sourceNamespace }}
34+
- --namespacesync-target-namespace-label-key={{ .Values.namespaceSync.targetNamespaceLabelKey }}
3335
- --helm-addons-configmap={{ .Values.helmAddonsConfigMap }}
3436
- --cni.cilium.helm-addon.default-values-template-configmap-name={{ .Values.hooks.cni.cilium.helmAddonStrategy.defaultValueTemplateConfigMap.name }}
3537
- --nfd.helm-addon.default-values-template-configmap-name={{ .Values.hooks.nfd.helmAddonStrategy.defaultValueTemplateConfigMap.name }}

charts/cluster-api-runtime-extensions-nutanix/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ helmAddonsConfigMap: default-helm-addons-config
8686

8787
deployDefaultClusterClasses: true
8888

89+
# The ClusterClass and the Templates it references must be in the same namespace
90+
# as the Cluster. To enable cluster creation in user-defined namespaces, CAREN
91+
# will copy all ClusterClasses and Templates from the source namespace to every
92+
# target namespace, i.e., every namespace that has a label with a matching key.
93+
namespaceSync:
94+
sourceNamespace: default
95+
targetNamespaceLabelKey: caren.nutanix.com/namespace-sync
96+
8997
deployment:
9098
replicas: 1
9199

0 commit comments

Comments
 (0)