no need for pointers in map of postgresTeamMebership
This commit is contained in:
		
							parent
							
								
									ba955305f9
								
							
						
					
					
						commit
						9fd3b2cffb
					
				| 
						 | 
					@ -400,6 +400,7 @@ func (c *Controller) loadPostgresTeams() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	c.pgTeamMap.Load(pgTeams)
 | 
						c.pgTeamMap.Load(pgTeams)
 | 
				
			||||||
 | 
						c.logger.Debugf("Internal Postgres Team Cache: %#v", c.pgTeamMap)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Controller) postgresTeamAdd(obj interface{}) {
 | 
					func (c *Controller) postgresTeamAdd(obj interface{}) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ import (
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// PostgresTeamMap is the operator's internal representation of all PostgresTeam CRDs
 | 
					// PostgresTeamMap is the operator's internal representation of all PostgresTeam CRDs
 | 
				
			||||||
type PostgresTeamMap map[string]*postgresTeamMembership
 | 
					type PostgresTeamMap map[string]postgresTeamMembership
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type postgresTeamMembership struct {
 | 
					type postgresTeamMembership struct {
 | 
				
			||||||
	AdditionalSuperuserTeams []string
 | 
						AdditionalSuperuserTeams []string
 | 
				
			||||||
| 
						 | 
					@ -113,7 +113,7 @@ func (ptm *PostgresTeamMap) Load(pgTeams *acidv1.PostgresTeamList) {
 | 
				
			||||||
	fetchTeams(&teamIDs, teamMemberSet)
 | 
						fetchTeams(&teamIDs, teamMemberSet)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for teamID := range teamIDs {
 | 
						for teamID := range teamIDs {
 | 
				
			||||||
		(*ptm)[teamID] = &postgresTeamMembership{
 | 
							(*ptm)[teamID] = postgresTeamMembership{
 | 
				
			||||||
			AdditionalSuperuserTeams: util.CoalesceStrArr(superuserTeamSet.toMap()[teamID], []string{}),
 | 
								AdditionalSuperuserTeams: util.CoalesceStrArr(superuserTeamSet.toMap()[teamID], []string{}),
 | 
				
			||||||
			AdditionalTeams:          util.CoalesceStrArr(teamSet.toMap()[teamID], []string{}),
 | 
								AdditionalTeams:          util.CoalesceStrArr(teamSet.toMap()[teamID], []string{}),
 | 
				
			||||||
			AdditionalMembers:        util.CoalesceStrArr(teamMemberSet.toMap()[teamID], []string{}),
 | 
								AdditionalMembers:        util.CoalesceStrArr(teamMemberSet.toMap()[teamID], []string{}),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue