Add BundleNamespaceMapping
generation
#217
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a CAPI
Cluster
references aClusterClass
in a different namespace, a correspondingClusterGroup
is created in theCluster
namespace. This ensures that all clusters within the namespace sharing the sameClusterClass
from other namespace are grouped together.This
ClusterGroup
inheritsClusterClass
labels, as well as applies twoCAAPF
specific labels to uniquely identify the group pointing to thisClusterClass
in the cluster scope:clusterclass-name.fleet.addons.cluster.x-k8s.io: <class-name>
clusterclass-namespace.fleet.addons.cluster.x-k8s.io: <class-ns>
Additionally, this configuration enables the creation of a
BundleNamespaceMapping
. The mapping selects all available bundles and establishes a link between the namespace of theCluster
and the namespace of the referencedClusterClass
. This allows FleetCluster
to be evaluated as a target for application sources such asBundles
,HelmApps
, orGitRepos
, located in theClusterClass
namespace.To configure this behavior,
FleetAddonConfig
should contain the following:Setting
applyClassGroup: true
ensures that Fleet automatically createsClusterGroup
object forCluster
resource and applies the necessaryBundleNamespaceMapping
for the cross-namespace bundle access.Fixes #216