Skip to content
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

Deploy and configure cloudbeaver #85

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/config/cloudbeaver.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
server: {
serverPort: 8978,

workspaceLocation: "workspace",
contentRoot: "web",
driversLocation: "drivers",

rootURI: "/",
serviceURI: "/api/",

productConfiguration: "conf/product.conf",

expireSessionAfterPeriod: 1800000,

develMode: false,

enableSecurityManager: false,

database: {
driver="h2_embedded",
url: "jdbc:h2:${workspace}/.data/cb.h2.dat",

createDatabase: true,

initialDataConfiguration: "conf/initial-data.conf",

pool: {
minIdleConnections: 4,
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
}
}

},
app: {
anonymousAccessEnabled: false,
anonymousUserRole: "user",
supportsCustomConnections: false,

forwardProxy: false,

publicCredentialsSaveEnabled: false,
adminCredentialsSaveEnabled: false,

resourceManagerEnabled: true,

resourceQuotas: {
dataExportFileSizeLimit: 10000000,
resourceManagerFileSizeLimit: 500000,
sqlMaxRunningQueries: 100,
sqlResultSetRowsLimit: 100000,
sqlResultSetMemoryLimit: 2000000,
sqlTextPreviewMaxLength: 4096,
sqlBinaryPreviewMaxLength: 261120
},
enabledAuthProviders: [
"local"
],

enabledDrivers: [
Copy link

Choose a reason for hiding this comment

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

looks like this should have org.postgresql in the list?

"sqlite:sqlite_jdbc",
"h2:h2_embedded",
"clickhouse:yandex_clickhouse"
]

}
}
29 changes: 29 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/config/data-sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"folders": {
"My DBs": {}
},
"connections": {
"DB-example-01": {
"provider": "postgresql",
"driver": "postgres-jdbc",
"name": "DB-example-01",
"description": "Postgre connection",
"save-password": false,
"show-system-objects": true,
"read-only": false,
"folder": "My DBs",
"configuration": {
"user": "my-db-user",
"host": "postgres",
"port": "5432",
"database": "my-postgre-db",
"url": "jdbc:postgresql://postgres:5432/my-postgre-db",
"type": "dev",
"provider-properties": {
"@dbeaver-show-non-default-db@": "true"
},
"auth-model": "native"
}
}
}
}
34 changes: 34 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/config/product.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Product configuration. Customized web application behavior
// It is in JSONC format
{
// Global properties
core: {
// User defaults
user: {
defaultTheme: "dark",
defaultLanguage: "en"
},
app: {
// Log viewer config
logViewer: {
refreshTimeout: 3000,
logBatchSize: 1000,
maxLogRecords: 2000,
maxFailedRequests: 3
}
},
authentication: {
anonymousAccessEnabled: false
}
},
// Notifications config
core_events: {
notificationsPool: 5
},
plugin_data_spreadsheet_new: {
hidden: false
},
plugin_data_export: {
disabled: false
}
}
32 changes: 32 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,38 @@ spec:
port: 8978
initialDelaySeconds: 40
periodSeconds: 10
volumeMounts:
- name: dbeaver-product
mountPath: /opt/cloudbeaver/conf/product.conf
subPath: product.conf
- name: dbeaver-sources-user
mountPath: /opt/cloudbeaver/workspace/user-projects/admin.dbeaver/.dbeaver/data-sources.json
subPath: data-sources.json
- name: dbeaver-sources-global
mountPath: /opt/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/data-sources.json
subPath: data-sources.json
- name: dbeaver-server
mountPath: /opt/cloudbeaver/conf/cloudbeaver.conf
subPath: cloudbeaver.conf
- name: dbeaver-initial-data
mountPath: /opt/cloudbeaver/conf/initial-data.conf
subPath: initial-data.conf
volumes:
- name: dbeaver-product
configMap:
name: dbeaver-product-configmap-76t74t24mh
- name: dbeaver-sources-user
configMap:
name: dbeaver-sources-user-configmap-t8m94c4gb7
- name: dbeaver-sources-global
configMap:
name: dbeaver-sources-global-configmap-t8m94c4gb7
- name: dbeaver-server
configMap:
name: dbeaver-server-configmap-9tgdffkdbb
- name: dbeaver-initial-data
configMap:
name: dbeaver-initial-data-configmap-t58fgmffkg

---
apiVersion: v1
Expand Down
25 changes: 25 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yaml
- ingress.yaml
- namespace.yaml

configMapGenerator:
- name: dbeaver-product-configmap
files:
- config/product.conf
- name: dbeaver-sources-user-configmap
files:
- config/data-sources.json
- name: dbeaver-sources-global-configmap
files:
- config/data-sources.json
- name: dbeaver-server-configmap
files:
- config/cloudbeaver.conf
- name: dbeaver-initial-data-configmap
files:
- config/initial-data.conf
6 changes: 6 additions & 0 deletions kubernetes/aks/system/cloudbeaver/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1

Check warning on line 1 in kubernetes/aks/system/cloudbeaver/base/namespace.yaml

View workflow job for this annotation

GitHub Actions / yaml-check / yaml-lint-check

1:1 [document-start] missing document start "---"
kind: Namespace
metadata:
name: cloudbeaver
labels:
name: cloudbeaver
Loading