Bug 2019564

Summary: User settings resources (ConfigMap, Role, RB) should be deleted when a user is deleted
Product: OpenShift Container Platform Reporter: Christoph Jerolimov <cjerolim>
Component: Dev ConsoleAssignee: Jaivardhan Kumar <jakumar>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: low Docs Contact: Olivia Payne <opayne>
Priority: low    
Version: 4.8CC: alkazako, aos-bugs, cbremble, nmukherj
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The resources(ConfigMap, Role, RB) created for user settings don't get cleaned up if the user gets deleted. Consequence: The three created resources(ConfigMap, Role, RB) in namespace "openshift-console-user-settings" stays forever Fix: At the time of the creation of the resources for a User, an ownerReference referencing the User object is added to their metadata which makes the resources dependent on the User. This allows garbage collection to automatically delete the resources when the user no longer exists. Result: The three created resources(ConfigMap, Role, RB) in namespace "openshift-console-user-settings" should be automatically removed
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:39:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christoph Jerolimov 2021-11-02 20:08:52 UTC
Description of problem:
On OpenShift Dev Sandbox users are automatically deleted after a month. Also on other clusters we should cleanup resources when the user are deleted.

Version-Release number of selected component (if applicable):
4.8+

How reproducible:
Always

Steps to Reproduce:
1. Create a user
2. Use console (this should automatically create 3 resources in the namespace "openshift-console-user-settings" (a Role, a RoleBinding and a ConfigMap)
3. Delete the user

Actual results:
The three created resources in namespace "openshift-console-user-settings" stays forever

Expected results:
The three created resources in namespace "openshift-console-user-settings" should be automatically removed

Additional info:
None

Comment 4 Christoph Jerolimov 2022-04-06 10:24:49 UTC
Verified on 4.11.0-0.nightly-2022-04-01-172551

Comment 9 errata-xmlrpc 2022-08-10 10:39:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069