-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDB-10778 Add GraphDB configuring examples
- Loading branch information
Vladislav Nikolov
committed
Sep 2, 2024
1 parent
d97e4a0
commit 1938110
Showing
2 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,77 @@ | ||
Configuring GraphDB | ||
=== | ||
|
||
## Note | ||
|
||
All GraphDB configuration options can be found [here](https://graphdb.ontotext.com/documentation/10.0/configuring-graphdb.html#configuration-properties). | ||
|
||
## Properties | ||
|
||
```yaml | ||
configuration: | ||
properties: | ||
graphdb.workbench.importDirectory: "/opt/graphdb/home/graphdb-import" | ||
graphdb.cluster.sync.timeoutS: 600 | ||
graphdb.workbench.maxConnections: 10 | ||
``` | ||
## Secret Properties | ||
```yaml | ||
configuration: | ||
secretProperties: | ||
graphdb.connector.keystorePass: "xxxx" | ||
``` | ||
**Note: This method of configuring GraphDB is strongly discouraged, as it may lead to secrets being exposed or stored insecurely!** | ||
## Extra Properties | ||
The resources mentioned in this section can be found in the [resources.yaml](./resources.yaml) file. | ||
The appropriate resources are used for each specific case. | ||
### Using existing configmap | ||
```yaml | ||
configuration: | ||
extraProperties: | ||
existingConfigmap: custom-graphdb-properties | ||
# configmapKey: graphdb.properties # Default key | ||
``` | ||
|
||
### Using existing secret | ||
|
||
```yaml | ||
configuration: | ||
extraProperties: | ||
existingSecret: custom-graphdb-secret-properties | ||
secretKey: graphdb-secrets.properties | ||
``` | ||
## Java Arguments | ||
```yaml | ||
configuration: | ||
javaArguments: "-Xms4G -Xmx4G" | ||
``` | ||
## Extra Environment Variables from a source | ||
The resources mentioned in this section can be found in the [resources.yaml](./resources.yaml) file. | ||
```yaml | ||
extraEnvFrom: | ||
- configMapRef: | ||
name: "connector-properties" | ||
- secretRef: | ||
name: "connector-secret-properties" | ||
``` | ||
## Extra Environment Variables | ||
```yaml | ||
extraEnv: | ||
- name: "graphdb.workbench.importDirectory" | ||
value: "/opt/graphdb/home/graphdb-import" | ||
``` |
This file contains 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,40 @@ | ||
# This YAML defines two ConfigMaps and two Secrets for a Kubernetes cluster. | ||
# - ConfigMap "custom-graphdb-properties" stores non-sensitive properties for GraphDB. | ||
# - Secret "custom-graphdb-secret-properties" stores sensitive properties for GraphDB, base64-encoded. | ||
# - ConfigMap "connector-properties" stores non-sensitive properties for a connector, including GPT model settings. | ||
# - Secret "connector-secret-properties" stores a sensitive token for the connector, base64-encoded. | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: custom-graphdb-properties | ||
data: | ||
graphdb.properties: |- | ||
graphdb.connector.port=7200 | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: custom-graphdb-secret-properties | ||
data: | ||
graphdb-secrets.properties: {{ "graphdb.connector.keystorePass: xxxx" | b64enc }} | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: connector-properties | ||
data: | ||
graphdb.connector.port: "7201" | ||
graphdb.gpt.model: "gpt-3.5-turbo" | ||
graphdb.gpt.timeout: "180" | ||
graphdb.gpt.url: "https://api.openai.com/v1/chat/completions" | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: connector-secret-properties | ||
data: | ||
graphdb.gpt.token: {{ "<secret-token>" | b64enc }} |