Skip to content

Commit

Permalink
feat: Remove support for postgresql user
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Do not support anymore postgresql user. Switch to postgresqluserrole is now mandatory
  • Loading branch information
oxyno-zeta committed Mar 2, 2024
1 parent c8c9a02 commit 6438093
Show file tree
Hide file tree
Showing 19 changed files with 6 additions and 2,095 deletions.
9 changes: 0 additions & 9 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ resources:
kind: PostgresqlDatabase
path: github.com/easymile/postgresql-operator/apis/postgresql/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: easymile.com
group: postgresql
kind: PostgresqlUser
path: github.com/easymile/postgresql-operator/apis/postgresql/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Moreover, a single User can only have rights to one Database.
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [PostgresqlEngineConfiguration](docs/crds/PostgresqlEngineConfiguration.md) | Represents a PostgreSQL Engine Configuration with all necessary data to connect it |
| [PostgresqlDatabase](docs/crds/PostgresqlDatabase.md) | Represents a PostgreSQL Database |
| DEPRECATED [PostgresqlUser](docs/crds/PostgresqlUser.md) | Represents a PostgreSQL User |
| [PostgresqlUserRole](docs/crds/PostgresqlUserRole.md) | Represents a PostgreSQL User Role |

## How to deploy ?
Expand Down
135 changes: 0 additions & 135 deletions api/postgresql/v1alpha1/postgresqluser_types.go

This file was deleted.

6 changes: 6 additions & 0 deletions api/postgresql/v1alpha1/postgresqluserrole_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

type PrivilegesSpecEnum string

const OwnerPrivilege PrivilegesSpecEnum = "OWNER"
const ReaderPrivilege PrivilegesSpecEnum = "READER"
const WriterPrivilege PrivilegesSpecEnum = "WRITER"

type ConnectionTypesSpecEnum string

const PrimaryConnectionType ConnectionTypesSpecEnum = "PRIMARY"
Expand Down
94 changes: 0 additions & 94 deletions api/postgresql/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,6 @@ func main() {
os.Exit(1)
}

if err = (&postgresqlcontrollers.PostgresqlUserReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("postgresqluser-controller"),
Log: ctrl.Log.WithValues(
"controller",
"postgresqluser",
"controllerKind",
"PostgresqlUser",
"controllerGroup",
"postgresql.easymile.com",
),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "PostgresqlUser")
os.Exit(1)
}

if err = (&postgresqlcontrollers.PostgresqlUserRoleReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Expand Down
26 changes: 0 additions & 26 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,3 @@ rules:
- get
- patch
- update
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlusers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlusers/finalizers
verbs:
- update
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlusers/status
verbs:
- get
- patch
- update
21 changes: 0 additions & 21 deletions config/samples/postgresql_v1alpha1_postgresqluser.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions config/samples/user/full.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions config/samples/user/simple.yaml

This file was deleted.

Loading

0 comments on commit 6438093

Please sign in to comment.