Add `namespace` field for `managementCluster` object
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
In the cluster config for new workload clusters, we only reference the associated management cluster by its name
```
managementCluster
name: my-management-cluster
```
This forces us to assume that the management cluster and the additional workload clusters are in the same namespace, which is probably ideal for most cases, but we should more explicit about that. We should either:
1) Add a namespace field to the managementCluster object
```
managementCluster
name: my-management-cluster
namespace: my-namespace
```
This allows us to be more flexible, and the user could define their clusters in different namespaces if desired.
2) If we decide that those clusters should always be in the same namespace, we should add a validation when creating a new workload cluster to ensure that it is in the same namespace as its management cluster.
Contributor guide
Research direction
Start by locating the cluster configuration schema and the code that creates new workload clusters. Determine whether management and workload clusters may use different namespaces, then implement either the namespace field or same-namespace validation and verify the chosen behavior with the relevant existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100