diff --git a/charts/db-instances/Chart.yaml b/charts/db-instances/Chart.yaml index 29395f0..4058ca0 100644 --- a/charts/db-instances/Chart.yaml +++ b/charts/db-instances/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: Database Instances for db operator name: db-instances -version: 2.4.0 +version: 2.5.0 diff --git a/charts/db-instances/templates/dbinstance.yaml b/charts/db-instances/templates/dbinstance.yaml index 9081233..277d1e0 100644 --- a/charts/db-instances/templates/dbinstance.yaml +++ b/charts/db-instances/templates/dbinstance.yaml @@ -38,6 +38,9 @@ spec: enabled: {{ $value.sslConnection.enabled }} skip-verify: {{ $value.sslConnection.skipVerify }} {{- end }} + {{- with $value.allowExtraGrants }} + allowExtraGrants: {{ . }} + {{- end }} {{- if $value.google }} google: instance: {{ $value.google.instanceName }} diff --git a/charts/db-operator/Chart.yaml b/charts/db-operator/Chart.yaml index 3429b88..8cd33db 100644 --- a/charts/db-operator/Chart.yaml +++ b/charts/db-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: db-operator -version: 2.0.0 +version: 2.1.0 # --------------------------------------------------------------------------------- # -- All supported k8s versions are in the test: diff --git a/charts/db-operator/templates/crds/kinda.rocks_databases.yaml b/charts/db-operator/templates/crds/kinda.rocks_databases.yaml index a48179b..03540b3 100644 --- a/charts/db-operator/templates/crds/kinda.rocks_databases.yaml +++ b/charts/db-operator/templates/crds/kinda.rocks_databases.yaml @@ -88,8 +88,7 @@ spec: description: DatabaseSpec defines the desired state of Database properties: backup: - description: DatabaseBackup defines the desired state of backup and - schedule + description: DatabaseBackup defines the desired state of backup and schedule properties: cron: type: string @@ -117,16 +116,13 @@ spec: instance: type: string postgres: - description: Postgres struct should be used to provide resource that - only applicable to postgres + description: Postgres struct should be used to provide resource that only applicable to postgres properties: dropPublicSchema: - description: If set to true, the public schema will be dropped - after the database creation + description: If set to true, the public schema will be dropped after the database creation type: boolean schemas: - description: Specify schemas to be created. The user created by - db-operator will have all access on them. + description: Specify schemas to be created. The user created by db-operator will have all access on them. items: type: string type: array @@ -185,9 +181,7 @@ spec: - Namespace type: object backup: - description: DbInstanceBackup defines name of google bucket - to use for storing database dumps for backup when backup - is enabled + description: DbInstanceBackup defines name of google bucket to use for storing database dumps for backup when backup is enabled properties: bucket: type: string @@ -195,8 +189,7 @@ spec: - bucket type: object engine: - description: 'Important: Run "make generate" to regenerate - code after modifying this file' + description: 'Important: Run "make generate" to regenerate code after modifying this file' type: string generic: description: |- @@ -268,14 +261,12 @@ spec: - enabled type: object sslConnection: - description: DbInstanceSSLConnection defines weather connection - from db-operator to instance has to be ssl or not + description: DbInstanceSSLConnection defines weather connection from db-operator to instance has to be ssl or not properties: enabled: type: boolean skip-verify: - description: SkipVerity use SSL connection, but don't - check against a CA + description: SkipVerity use SSL connection, but don't check against a CA type: boolean required: - enabled @@ -297,8 +288,7 @@ spec: type: string type: object phase: - description: 'Important: Run "make generate" to regenerate - code after modifying this file' + description: 'Important: Run "make generate" to regenerate code after modifying this file' type: string status: type: boolean @@ -394,8 +384,7 @@ spec: description: DatabaseSpec defines the desired state of Database properties: backup: - description: DatabaseBackup defines the desired state of backup and - schedule + description: DatabaseBackup defines the desired state of backup and schedule properties: cron: type: string @@ -413,11 +402,9 @@ spec: TODO(@allanger): Field .spec.secretName should be moved here in the v1beta2 version properties: templates: - description: Templates to add custom entries to ConfigMaps and - Secrets + description: Templates to add custom entries to ConfigMaps and Secrets items: - description: Tempaltes to add custom entries to ConfigMaps and - Secrets + description: Tempaltes to add custom entries to ConfigMaps and Secrets properties: name: type: string @@ -434,23 +421,32 @@ spec: type: object deletionProtected: type: boolean + extraGrants: + items: + properties: + accessType: + type: string + user: + type: string + required: + - accessType + - user + type: object + type: array instance: type: string postgres: - description: Postgres struct should be used to provide resource that - only applicable to postgres + description: Postgres struct should be used to provide resource that only applicable to postgres properties: dropPublicSchema: - description: If set to true, the public schema will be dropped - after the database creation + description: If set to true, the public schema will be dropped after the database creation type: boolean extensions: items: type: string type: array schemas: - description: Specify schemas to be created. The user created by - db-operator will have all access on them. + description: Specify schemas to be created. The user created by db-operator will have all access on them. items: type: string type: array @@ -477,6 +473,18 @@ spec: type: string engine: type: string + extraGrants: + items: + properties: + accessType: + type: string + user: + type: string + required: + - accessType + - user + type: object + type: array monitorUserSecret: type: string operatorVersion: diff --git a/charts/db-operator/templates/crds/kinda.rocks_dbinstances.yaml b/charts/db-operator/templates/crds/kinda.rocks_dbinstances.yaml index 4b8e25a..511ffbf 100644 --- a/charts/db-operator/templates/crds/kinda.rocks_dbinstances.yaml +++ b/charts/db-operator/templates/crds/kinda.rocks_dbinstances.yaml @@ -256,6 +256,11 @@ spec: - Name - Namespace type: object + allowExtraGrants: + description: |- + If set to true, extra grants are enabled on the databases + making it possible to provide access to any user on the database instance + type: boolean allowedPrivileges: description: A list of privileges that are allowed to be set as Dbuser's extra privileges items: @@ -275,7 +280,7 @@ spec: generic: description: |- GenericInstance is used when instance type is generic - and describes necessary informations to use instance + and describes necessary information to use instance generic instance can be any backend, it must be reachable by described address and port properties: backupHost: @@ -387,12 +392,12 @@ spec: - enabled type: object sslConnection: - description: DbInstanceSSLConnection defines weather connection from db-operator to instance has to be ssl or not + description: DbInstanceSSLConnection defines whether connection from db-operator to instance has to be ssl or not properties: enabled: type: boolean skip-verify: - description: SkipVerity use SSL connection, but don't check against a CA + description: SkipVerify use SSL connection, but don't check against a CA type: boolean required: - enabled