Pruning groups in OKTA is buggy
Randomly we are seeing groups get pruned. I wrote the pruning feature but haven't had a chance yet to look at why it is pruning our groups.
Just wanted to point it out so others know of the issue until I get a chance to debug it
Same behavoir with Keycloak prune function:
2022-04-07T11:30:03.328Z INFO controllers.GroupSync Beginning Sync {"groupsync": "group-sync-operator/company-keycloak-groupsync", "Provider": "company-keycloak"} 2022-04-07T11:30:03.445Z INFO syncer_keycloak Successfully Authenticated with Keycloak Provider 2022-04-07T11:30:05.986Z INFO controllers.GroupSync Start Pruning Groups {"groupsync": "group-sync-operator/company-keycloak-groupsync"} 2022-04-07T11:30:05.986Z INFO controllers.GroupSync pruneGroups {"groupsync": "group-sync-operator/company-keycloak-groupsync", "Delete Group": "company-group1"} 2022-04-07T11:30:05.995Z INFO controllers.GroupSync pruneGroups {"groupsync": "group-sync-operator/company-keycloak-groupsync", "Delete Group": "company-group2"} 2022-04-07T11:30:06.016Z INFO controllers.GroupSync pruneGroups {"groupsync": "group-sync-operator/company-keycloak-groupsync", "Delete Group": "company-group3"} 2022-04-07T11:30:06.026Z INFO controllers.GroupSync Pruning Completed {"groupsync": "group-sync-operator/company-keycloak-groupsync"} 2022-04-07T11:30:06.026Z INFO controllers.GroupSync Sync Completed Successfully {"groupsync": "group-sync-operator/company-keycloak-groupsync", "Provider": "company-keycloak", "Groups Created or Updated": 3, "Groups Pruned": 3}
The 3 groups are still present in keycloak, but with prune=true they will deleted... :-(
I see this happening with version 0.0.20. One group in particular seems to come and go. Usually upon pod restart, all groups are synced. About 5 syncs later, the group is deleted, until the next sync when its added back. We sync every 5 minutes.