Skip to content

Commit

Permalink
Merge pull request #72 from Ontotext-AD/GDB-8287-extensibility-updates
Browse files Browse the repository at this point in the history
GDB-8287: Extensibility updates
  • Loading branch information
mihailradkov authored Jan 29, 2024
2 parents 172681f + 7dd8e5f commit b97f015
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 395 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# GraphDB Helm chart release notes

## Version 10.6.0

### New

- Added `graphdb.node.licenseFilename` for cases where the default filename is not "graphdb.license"

### Improvements

- Updated the default ingress's path type to `ImplementationSpecific`
- Updated graphdb.properties example file
- Templates will now use `Chart.AppVersion` by default unless `images.graphdb.tag` is specified.
- Updated busybox image to version 1.36.1

## Version 10.5.1-R2

- Fixed `graphdb-cluster-proxy-configmap` to use the correct java_args configuration from [values.yaml](values.yaml).
Expand Down
426 changes: 58 additions & 368 deletions files/config/graphdb.properties

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions templates/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ Otherwise it is left blank and cluster default will be used.
{{- end }}

{{/*
Renders full name of the graphdb pod
Render the container image for GraphDB
*/}}
{{- define "graphdb.renderFullImageName" -}}
{{- $fullImageName := .image.repository -}}

{{- if or .globalRegistry .image.registry -}}
{{- $fullImageName = printf "%s/%s" ( .image.registry | default .globalRegistry) .image.repository -}}
{{- define "graphdb.image" -}}
{{- $registry := .Values.images.graphdb.registry -}}
{{- $repository := .Values.images.graphdb.repository -}}
{{- $tag := .Values.images.graphdb.tag | default .Chart.AppVersion | toString -}}
{{- if and .Values.global .Values.global.imageRegistry -}}
{{- $registry = .Values.global.imageRegistry -}}
{{- end -}}

{{- if .image.tag -}}
{{- printf "%s:%s" $fullImageName .image.tag -}}
{{- if $registry -}}
{{- printf "%s/%s:%s" $registry $repository $tag -}}
{{- else -}}
{{- print $fullImageName -}}
{{- printf "%s:%s" $repository $tag -}}
{{- end -}}
{{- end -}}
{{- end }}
2 changes: 1 addition & 1 deletion templates/gateway/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- else }}
- path: {{ $.Values.graphdb.workbench.subpath }}(/|$)(.*)
{{- end }}
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
{{- if gt (int $.Values.graphdb.clusterConfig.nodesCount) 1 }}
Expand Down
2 changes: 1 addition & 1 deletion templates/graphdb-cluster-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
{{- include "graphdb.combinedImagePullSecrets" $ | nindent 8 }}
containers:
- name: graphdb-proxy
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
imagePullPolicy: {{ $.Values.deployment.imagePullPolicy }}
command: ["/opt/graphdb/dist/bin/cluster-proxy"]
envFrom:
Expand Down
12 changes: 6 additions & 6 deletions templates/graphdb-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ spec:
setHostnameAsFQDN: true
terminationGracePeriodSeconds: {{ .Values.graphdb.node.terminationGracePeriodSeconds }}
volumes:
{{- if $.Values.graphdb.node.license }}
{{- if .Values.graphdb.node.license }}
- name: graphdb-license
secret:
secretName: {{ $.Values.graphdb.node.license }}
secretName: {{ .Values.graphdb.node.license }}
{{- end }}
{{- if or $configs.settingsConfigMap $.Values.graphdb.security.enabled }}
- name: graphdb-settings-config
Expand Down Expand Up @@ -95,7 +95,7 @@ spec:
{{- include "graphdb.combinedImagePullSecrets" $ | nindent 8 }}
containers:
- name: graphdb-node
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
imagePullPolicy: {{ $.Values.deployment.imagePullPolicy }}
{{- with .Values.graphdb.node.command }}
command: {{ toYaml . | nindent 12 }}
Expand Down Expand Up @@ -124,10 +124,10 @@ spec:
- name: graphdb-node-data-dynamic-pvc
mountPath: /opt/graphdb/home
{{- end }}
{{- if $.Values.graphdb.node.license }}
{{- if .Values.graphdb.node.license }}
- name: graphdb-license
mountPath: /opt/graphdb/home/conf/graphdb.license
subPath: graphdb.license
subPath: {{ .Values.graphdb.node.licenseFilename }}
{{- end }}
{{- if $.Values.graphdb.import_directory_mount.enabled }}
- name: graphdb-server-import-dir
Expand All @@ -154,7 +154,7 @@ spec:
initContainers:
# PROVISION SETTINGS AND SECURITY
- name: provision-settings
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.busybox) }}
image: {{ include "graphdb.image" . }}
imagePullPolicy: {{ $.Values.deployment.imagePullPolicy }}
volumeMounts:
{{- if hasKey $.Values.graphdb.node.persistence "volumeClaimTemplateSpec" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/patch-cluster-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{- $.Values.graphdb.jobPodSecurityContext | toYaml | nindent 8 }}
containers:
- name: patch-cluster
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
envFrom:
- secretRef:
name: graphdb-provision-user
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/post-start-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{- $.Values.graphdb.jobPodSecurityContext | toYaml | nindent 8 }}
containers:
- name: create-graphdb-cluster
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
envFrom:
- secretRef:
name: graphdb-provision-user
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/provision-repositories-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
{{- $.Values.graphdb.jobPodSecurityContext | toYaml | nindent 8 }}
containers:
- name: provision-repositories
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
envFrom:
- secretRef:
name: graphdb-provision-user
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/scale-down-cluster-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
{{- $.Values.graphdb.jobPodSecurityContext | toYaml | nindent 8 }}
containers:
- name: scale-down-cluster
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
envFrom:
- secretRef:
name: graphdb-provision-user
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/scale-up-cluster-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{- $.Values.graphdb.jobPodSecurityContext | toYaml | nindent 8 }}
containers:
- name: scale-up-cluster
image: {{ include "graphdb.renderFullImageName" (dict "globalRegistry" $.Values.global.imageRegistry "image" $.Values.images.graphdb) }}
image: {{ include "graphdb.image" . }}
envFrom:
- secretRef:
name: graphdb-provision-user
Expand Down
2 changes: 1 addition & 1 deletion trivy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
timeout: 5m
exit-code: 1
severity:
- HIGH
- CRITICAL
- HIGH
- MEDIUM
format: table
8 changes: 6 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ global:
# Top lvl flat for easier maintenance
images:
graphdb:
registry: docker.io
repository: ontotext/graphdb
tag: "10.5.1"
# If specified, overrides Chart.AppVersion
tag: ""
busybox:
repository: busybox
tag: "1.31"
tag: "1.36.1"

# Extra labels for the deployed resources
extraLabels: {}
Expand Down Expand Up @@ -116,6 +118,8 @@ graphdb:
# -- Reference to a secret containing 'graphdb.license' file to be used by the nodes.
# Important: Must be created beforehand
license:
# -- File name of the GraphDB license file in the existing license secret. Default is graphdb.license
licenseFilename: graphdb.license
# -- Java arguments with which node instances will be launched. GraphDB configuration properties can also be passed here in the format -Dprop=value
java_args: "-XX:MaxRAMPercentage=70 -Ddefault.min.distinct.threshold=100m -XX:+UseContainerSupport"
# Node scheduling options such as nodeSelector, affinity, tolerations, topologySpreadConstraints can be set here for ALL nodes.
Expand Down

0 comments on commit b97f015

Please sign in to comment.