diff --git a/k8s/dataset-knowledge-graph/cronjob.yml b/k8s/dataset-knowledge-graph/cronjob.yml index 7a4cb38..78c7d60 100644 --- a/k8s/dataset-knowledge-graph/cronjob.yml +++ b/k8s/dataset-knowledge-graph/cronjob.yml @@ -14,16 +14,16 @@ spec: imagePullPolicy: Always env: - name: GRAPHDB_URL - value: "http://graphdb" + value: "http://dataset-knowledge-graph-graphdb" - name: GRAPHDB_USERNAME valueFrom: secretKeyRef: - name: graphdb + name: dataset-knowledge-graph-graphdb key: username - name: GRAPHDB_PASSWORD valueFrom: secretKeyRef: - name: graphdb + name: dataset-knowledge-graph-graphdb key: password restartPolicy: OnFailure imagePullSecrets: diff --git a/k8s/dataset-knowledge-graph/graphdb-service.yml b/k8s/dataset-knowledge-graph/graphdb-service.yml new file mode 100644 index 0000000..28b7628 --- /dev/null +++ b/k8s/dataset-knowledge-graph/graphdb-service.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: dataset-knowledge-graph-graphdb +spec: + ports: + - port: 80 + targetPort: 7200 + selector: + app: dataset-knowledge-graph-graphdb diff --git a/k8s/dataset-knowledge-graph/graphdb-stateful-set.yml b/k8s/dataset-knowledge-graph/graphdb-stateful-set.yml new file mode 100644 index 0000000..ef78072 --- /dev/null +++ b/k8s/dataset-knowledge-graph/graphdb-stateful-set.yml @@ -0,0 +1,47 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: dataset-knowledge-graph-graphdb +spec: + replicas: 1 + selector: + matchLabels: + app: dataset-knowledge-graph-graphdb + serviceName: dataset-knowledge-graph-graphdb + template: + metadata: + labels: + app: dataset-knowledge-graph-graphdb + spec: + containers: + - name: database + image: ontotext/graphdb:10.5.0 + resources: + requests: + memory: 1.5Gi + limits: + memory: 6Gi + env: + - name: GDB_JAVA_OPTS + value: | + -Dgraphdb.workbench.cors.enable=true + -Dgraphdb.engine.parallel-import=false + - name: GDB_HEAP_SIZE + value: 3g + volumeMounts: + - mountPath: "/opt/graphdb/home" + name: data + ports: + - containerPort: 7200 + imagePullSecrets: + - name: ghcr + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi + storageClassName: do-block-storage diff --git a/k8s/graphdb/graphdb-stateful-set.yml b/k8s/graphdb/graphdb-stateful-set.yml index d89b3f6..725992a 100644 --- a/k8s/graphdb/graphdb-stateful-set.yml +++ b/k8s/graphdb/graphdb-stateful-set.yml @@ -27,7 +27,7 @@ spec: -Dgraphdb.workbench.cors.enable=true -Dgraphdb.engine.parallel-import=false - name: GDB_HEAP_SIZE - value: 8g + value: 9g volumeMounts: - mountPath: "/opt/graphdb/home" name: data @@ -43,5 +43,5 @@ spec: - ReadWriteOnce resources: requests: - storage: 8Gi # Changed to 20Gi. + storage: 8Gi # Changed to 200Gi. storageClassName: do-block-storage