making pgTeamMap a pointer (#1349)

* making pgTeamMap a pointer
* init empty map
* add e2e test for additional teams and members
* update test_min_resource_limits
* add more waiting in node_affinity_test
* no need for pointers in map of postgresTeamMebership
* another minor update on node affinity test
* refactor and fix fetching additional members
This commit is contained in:
Felix Kunde
2021-02-16 10:38:20 +01:00
committed by GitHub
parent 137fbbf41e
commit 41858a702c
7 changed files with 185 additions and 95 deletions
+3
View File
@@ -94,6 +94,9 @@ func (ptm *PostgresTeamMap) GetAdditionalSuperuserTeams(team string, transitive
// Load function to import data from PostgresTeam CRD
func (ptm *PostgresTeamMap) Load(pgTeams *acidv1.PostgresTeamList) {
// reset the team map
*ptm = make(PostgresTeamMap, 0)
superuserTeamSet := teamHashSet{}
teamSet := teamHashSet{}
teamMemberSet := teamHashSet{}