-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PostgresTeam CRD for advanced team management #1165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9f0e1f7
PostgresTeamCRD for advanced team management
FxKu 0f86eff
rework internal structure to be closer to CRD
FxKu 4cd8222
superusers instead of admin
FxKu 354f568
add more util functions and unit tests
FxKu 8372c00
fix initHumanUsers
FxKu d246e84
check for superusers when creating normal teams
FxKu c4ee9f9
polishing and fixes
FxKu 7add4dc
adding the essential missing pieces
FxKu 3e7e990
add documentation and update rbac
FxKu 6122599
reflect some feedback
FxKu 65f1b35
reflect more feedback
FxKu ed2b323
fixing debug logs and raise QueueResyncPeriodTPR
FxKu 130504b
add two more flags to disable CRD and its superuser support
FxKu 6fc5c72
fix chart
FxKu dfd3f1f
update go modules
FxKu c7de686
move to client 1.19.3 and update codegen
FxKu 7324142
merge with master
FxKu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: postgresteams.acid.zalan.do | ||
| labels: | ||
| app.kubernetes.io/name: postgres-operator | ||
| annotations: | ||
| "helm.sh/hook": crd-install | ||
| spec: | ||
| group: acid.zalan.do | ||
| names: | ||
| kind: PostgresTeam | ||
| listKind: PostgresTeamList | ||
| plural: postgresteams | ||
| singular: postgresteam | ||
| shortNames: | ||
| - pgteam | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| version: v1 | ||
| validation: | ||
| openAPIV3Schema: | ||
| type: object | ||
| required: | ||
| - kind | ||
| - apiVersion | ||
| - spec | ||
| properties: | ||
| kind: | ||
| type: string | ||
| enum: | ||
| - PostgresTeam | ||
| apiVersion: | ||
| type: string | ||
| enum: | ||
| - acid.zalan.do/v1 | ||
| spec: | ||
| type: object | ||
| properties: | ||
| additionalSuperuserTeams: | ||
| type: object | ||
| description: "Map for teamId and associated additional superuser teams" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of teams to become Postgres superusers" | ||
FxKu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| items: | ||
| type: string | ||
| additionalTeams: | ||
| type: object | ||
| description: "Map for teamId and associated additional teams" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of teams whose members will also be added to the Postgres cluster" | ||
| items: | ||
| type: string | ||
| additionalMembers: | ||
| type: object | ||
| description: "Map for teamId and associated additional users" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of users who will also be added to the Postgres cluster" | ||
| items: | ||
| type: string | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: "acid.zalan.do/v1" | ||
| kind: PostgresTeam | ||
| metadata: | ||
| name: custom-team-membership | ||
| spec: | ||
| additionalSuperuserTeams: | ||
| acid: | ||
| - "postgres_superusers" | ||
| additionalTeams: | ||
| acid: [] | ||
| additionalMembers: | ||
| acid: | ||
| - "elephant" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: postgresteams.acid.zalan.do | ||
| spec: | ||
| group: acid.zalan.do | ||
| names: | ||
| kind: PostgresTeam | ||
| listKind: PostgresTeamList | ||
| plural: postgresteams | ||
| singular: postgresteam | ||
| shortNames: | ||
| - pgteam | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| version: v1 | ||
| validation: | ||
| openAPIV3Schema: | ||
| type: object | ||
| required: | ||
| - kind | ||
| - apiVersion | ||
| - spec | ||
| properties: | ||
| kind: | ||
| type: string | ||
| enum: | ||
| - PostgresTeam | ||
| apiVersion: | ||
| type: string | ||
| enum: | ||
| - acid.zalan.do/v1 | ||
| spec: | ||
| type: object | ||
| properties: | ||
| additionalSuperuserTeams: | ||
| type: object | ||
| description: "Map for teamId and associated additional superuser teams" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of teams to become Postgres superusers" | ||
| items: | ||
| type: string | ||
| additionalTeams: | ||
| type: object | ||
| description: "Map for teamId and associated additional teams" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of teams whose members will also be added to the Postgres cluster" | ||
| items: | ||
| type: string | ||
| additionalMembers: | ||
| type: object | ||
| description: "Map for teamId and associated additional users" | ||
| additionalProperties: | ||
| type: array | ||
| nullable: true | ||
| description: "List of users who will also be added to the Postgres cluster" | ||
| items: | ||
| type: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.