You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are trying to create ManifestWork with cluster scoped resources where namespace is set. In that case the resource is not properly synced/created on the spoke cluster.
Expected behavior
In Kubernetes, if users set metadata.namespace field for a cluster scoped resource and then kubectl apply that, everything still works. I am expecting ManifestWork to work the same way. The work controller should auto discover that a given resource is cluster scoped and act accordingly.
Environment ie: OCM version, Kubernetes version and provider:
Additional context
The reason this is important to us is because we are trying to use helm charts to generate addon agent manifests. Some helm charts don't set the metdata.namespace field in the templates and let helm configure that based on --namespace flag. I would like to be able to use such helm charts as is to generate addon manifests. To that end, I created open-cluster-management-io/addon-framework#220 . This pr always sets the namespace field in the generated ManifestWork because there is no way to know if a resource is cluster scoped or not at the hub cluster. But due to the above mentioned issue, such ManifestWorks are not syncing properly. It should be possible for a work agent to use the spoke clusters discovery api to detect if a resource is cluster scoped or not and sync properly.
The text was updated successfully, but these errors were encountered:
Describe the bug
We are trying to create ManifestWork with cluster scoped resources where namespace is set. In that case the resource is not properly synced/created on the spoke cluster.
To Reproduce
On the spoke cluster c1, I see
Expected behavior
In Kubernetes, if users set metadata.namespace field for a cluster scoped resource and then kubectl apply that, everything still works. I am expecting ManifestWork to work the same way. The work controller should auto discover that a given resource is cluster scoped and act accordingly.
Environment ie: OCM version, Kubernetes version and provider:
Additional context
The reason this is important to us is because we are trying to use helm charts to generate addon agent manifests. Some helm charts don't set the metdata.namespace field in the templates and let helm configure that based on --namespace flag. I would like to be able to use such helm charts as is to generate addon manifests. To that end, I created open-cluster-management-io/addon-framework#220 . This pr always sets the namespace field in the generated
ManifestWork
because there is no way to know if a resource is cluster scoped or not at the hub cluster. But due to the above mentioned issue, such ManifestWorks are not syncing properly. It should be possible for a work agent to use the spoke clusters discovery api to detect if a resource is cluster scoped or not and sync properly.The text was updated successfully, but these errors were encountered: