-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconcile loop for Aggregated ClusterRoles #6060
Comments
Hi @a7i, thanks for your feedback. This is a special example of the propagation. What the user wants is to propagate the ClusterRole before aggregation to the member cluster, not the ClusterRole after aggregation. Do I understand correctly? |
Hi @XiShanYongYe-Chang -- not necessarily, this seems to happen with any ClusterRole having |
|
Can this conflict between the control plane and member clusters be resolved by implementing a retention policy? cat <<EOF | kubectl --context karmada-apiserver --kubeconfig ~/.kube/karmada.config apply -f -
apiVersion: config.karmada.io/v1alpha1
kind: ResourceInterpreterCustomization
metadata:
name: clusterrole-rules-retention
spec:
target:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
customizations:
retention:
luaScript: >
function Retain(desiredObj, observedObj)
if desiredObj.aggregationRule == nil then
return desiredObj
end
desiredObj.rules = observedObj.rules
return desiredObj
end
EOF
|
I prefer to solve this problem internally. If you leave it to the resource interpreter, the ric resources may be overwritten or deleted by the user. |
That is correct!
Yes, that's how we're getting around it today. Similar to how you implemented it.
I agree and happy to contribute, if you suggest |
Thank you. I'm not sure if it's the final solution, but maybe we can try it. |
@a7i Just as a reminder, this retention policy will completely prevent the re-overwriting of modifications to Aggregated ClusterRoles in member clusters by the control plane, not sure if this is what you want. For example, when modifying the |
What would you like to be added:
Ability to have ClusterRole with aggregated rules across member clusters.
If one of the member clusters has an Aggregated ClusterRole that the Karmada control plane lacks, it leads to a reconciliation conflict between the Karmada control plane and the member cluster controller-manager.
Why is this needed:
karmada control-plane installation comes with extra kinds, which aggregate to view [ref] -- these kinds do not exist in the member clusters. This issue also applies to any other components aggregating to view.
reproduce:
./hack/local-up-karmada.sh
ClusterPropagationPolicy
to propagate a ClusterRoleClusterRole
sThe text was updated successfully, but these errors were encountered: