Skip to content

Conversation

@FxKu
Copy link
Member

@FxKu FxKu commented Feb 5, 2021

when a PostgresTeam map is updated with more teams/users, it's immediately reflected in the controller's pgTeamMap (can be seen from logs). However, initUsers function do not seem to pick them up. Only after the operator is restarted, it seems to work.

Essential change 1: Make cluster's PgTeamMap a pointer:

--- PgTeamMap                    pgteams.PostgresTeamMap
+++ PgTeamMap                    *pgteams.PostgresTeamMap

Essential change 2: Additional teams and members are only fetched if the feature is enabled and the PgTeamMap is not nil

OpConfig config.Config
RestConfig *rest.Config
PgTeamMap pgteams.PostgresTeamMap
PgTeamMap *pgteams.PostgresTeamMap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we not say that we could just not use this var at all and always just use

cluster: c.opconfig.pgteams?

@FxKu FxKu added the bug label Feb 11, 2021
@FxKu FxKu added this to the 1.7 milestone Feb 11, 2021
@FxKu FxKu self-assigned this Feb 12, 2021
@FxKu
Copy link
Member Author

FxKu commented Feb 12, 2021

👍

@FxKu FxKu added the zalando label Feb 12, 2021
@Jan-M
Copy link
Member

Jan-M commented Feb 16, 2021

👍

@FxKu FxKu merged commit 41858a7 into master Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants