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

GDB-7988: Avoid hardcoded classes #89

Merged
merged 9 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ TODO: short info about being decoupled from GraphDB

- Added `annotations` for common annotations across resources
- Added `graphdb.serviceAccount` allowing you to create or use an existing service account for GraphDB pods.
- Values in `labels` and `annotations` are now evaluated as templates
- Added separate `labels` and `annotations` for the cluster proxy
- Added GraphDB and GraphDB proxy hostnames resolution in the init containers
- Added `properties` for inserting additional GraphDB configurations in the properties configmap
- Added `images.graphdb.sha` to optionally provide an expected SHA checksum of the image
- Added `graphdb.node.persistence.enabled` toggle flag for enabling or disabling the persistence of GraphDB
- Added new configuration options for the default ingress `deployment.ingress`:
- Ability to override the `host` and `path` for GraphDB from `deployment.host` and `graphdb.workbench.subpath`
- Changing the `pathType`
- Inserting additional hosts and TLS configurations with `extraHosts` and `extraTLS`
- Added `labels` for each service resource for insertion of additional labels
- Added `containerPorts` and `proxy.containerPorts` for mapping the ports on which GraphDB listens on
- Added `ports` mappings in each service
- Added `extraContainerPorts` and `proxy.extraContainerPorts`

### Updates

- GraphDB properties and logback configuration configmaps are now applied by default
- Values in `labels`, `annotations` and `imagePullSecrets` are now evaluated as templates
- Removed unused busybox image configurations from `images.busybox`
- Updated the ingress resource to be agnostic to the ingress implementation. It will no longer assume that NGINX is the ingress controller in the
cluster
- Service resources and probes now refer to the target ports by their nicknames

### Breaking

Expand All @@ -24,6 +39,16 @@ TODO: short info about being decoupled from GraphDB
- Resource names are no longer hardcoded and are using the templates for `nameOverride` and `fullnameOverride`
- Removed setting FQDN as hostnames in GraphDB and the proxy in favor of dynamically resolving and configuring the hostnames in the init containers
- Configmaps from `graphdb.configs` are now under `configuration` and with a different structure allowing better reuse of existing configmaps
- Updated `workbench.subpath` to serve GraphDB at context path `/` by default
- Updated `deployment.imagePullSecret` to be a list, e.g. `deployment.imagePullSecrets`
- Removed the default value from `global.imageRegistry`, the chart now uses the value from `images.graphdb.registry`
- Removed `global.storageClass` in favor of using by default the default storage class in the cluster. Templates will no longer
use `global.storageClass`.
- Renamed `graphdb.clusterProxy.persistence.enablePersistence` toggle to just `enabled`
- Removed `maxRequestSize` and `timeout` configurations from `deployment.ingress` as they were specific to the ingress controller implementation of
nginx
- Renamed the port mappings of GraphDB and GraphDB proxy to `http` and `rpc`
- Renamed `graphdb.node.service` to `headlessService`

## Version 10.6.0-R2

Expand Down Expand Up @@ -59,7 +84,8 @@ TODO: short info about being decoupled from GraphDB

## Version 10.4.1

- Added configurations for specifying resource values for all remaining containers, see `graphdb.node.initContainerResources` and `graphdb.jobResources`.
- Added configurations for specifying resource values for all remaining containers, see `graphdb.node.initContainerResources`
and `graphdb.jobResources`.

## Version 10.3.1-R2

Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,19 +475,22 @@ about defining resource limits.
| configuration.logback.existingConfigmap | string | `""` | |
| configuration.properties.configmapKey | string | `"graphdb.properties"` | |
| configuration.properties.existingConfigmap | string | `""` | |
| containerPorts.http | int | `7200` | |
| containerPorts.rpc | int | `7300` | |
| deployment.host | string | `"localhost"` | |
| deployment.imagePullPolicy | string | `"IfNotPresent"` | Defines the policy with which components will request their image. |
| deployment.ingress | object | `{"annotations":{},"class":"nginx","enabled":true,"maxRequestSize":"512M","timeout":{"connect":5,"read":600,"send":600}}` | Ingress related configurations |
| deployment.imagePullSecrets | list | `[]` | Secrets used to pull Docker images. |
| deployment.ingress | object | `{"annotations":{},"className":"","enabled":true,"extraHosts":[],"extraTLS":[],"host":"","labels":{},"path":"","pathType":"Prefix"}` | Ingress related configurations |
| deployment.ingress.annotations | object | `{}` | Sets extra ingress annotations |
| deployment.ingress.maxRequestSize | string | `"512M"` | Sets the maximum size for all requests to the underlying Nginx |
| deployment.ingress.timeout | object | `{"connect":5,"read":600,"send":600}` | Default timeouts in seconds for the underlying Nginx. |
| deployment.ingress.className | string | `""` | Specifies the ingress controller implementation that will deploy this ingress. Not defining this would result in using the default ingress controller in the cluster, if there is one. |
| deployment.ingress.enabled | bool | `true` | Toggles the deployment of the default ingress |
| deployment.protocol | string | `"http"` | The hostname and protocol at which the graphdb will be accessible. Needed to configure ingress as well as some components require it to properly render their UIs |
| deployment.tls.enabled | bool | `false` | Feature toggle for SSL termination. Disabled by default. If TLS is enabled, the protocol should also be updated (https) |
| deployment.tls.secretName | string | `nil` | Name of a Kubernetes secret object with the key and certificate. If TLS is enabled, it's required to be provided, depending on the deployment. |
| extraContainerPorts | object | `{}` | |
| fullnameOverride | string | `""` | |
| global.imagePullSecrets | list | `[]` | |
| global.imageRegistry | string | `"docker.io"` | |
| global.storageClass | string | `"standard"` | |
| global.imageRegistry | string | `""` | |
| graphdb.clusterConfig.clusterCreationTimeout | int | `60` | Timeout for the cluster creation CURL query. Note: By default helm waits for Kubernetes commands to complete for 5 minutes. You can increase that by adding "--timeout 10m" to the helm command. |
| graphdb.clusterConfig.clusterSecret | string | `"s3cr37"` | A secret used for secure communication amongst the nodes in the cluster. |
| graphdb.clusterConfig.electionMinTimeout | int | `8000` | Cluster configuration parameters: Refer to https://graphdb.ontotext.com/documentation/10.6/creating-a-cluster.html#creation-parameters The minimum wait time in milliseconds for a heartbeat from a leader. |
Expand All @@ -499,27 +502,29 @@ about defining resource limits.
| graphdb.clusterConfig.transactionLogMaximumSizeGB | int | `50` | |
| graphdb.clusterConfig.verificationTimeout | int | `1500` | |
| graphdb.clusterProxy.affinity | object | `{}` | |
| graphdb.clusterProxy.containerPorts.http | int | `7200` | |
| graphdb.clusterProxy.containerPorts.rpc | int | `7300` | |
| graphdb.clusterProxy.extraEnv | list | `[]` | |
| graphdb.clusterProxy.extraEnvFrom | list | `[]` | |
| graphdb.clusterProxy.extraInitContainers | list | `[]` | |
| graphdb.clusterProxy.extraVolumeMounts | list | `[]` | |
| graphdb.clusterProxy.extraVolumes | list | `[]` | |
| graphdb.clusterProxy.headlessService | object | `{"annotations":{}}` | GraphDB cluster proxy headless service configurations |
| graphdb.clusterProxy.headlessService | object | `{"annotations":{},"labels":{},"ports":{"http":7200,"rpc":7300}}` | GraphDB cluster proxy headless service configurations |
| graphdb.clusterProxy.java_args | string | `"-XX:MaxRAMPercentage=70 -Ddefault.min.distinct.threshold=100m -XX:+UseContainerSupport"` | Java arguments with which the cluster proxy instances will be launched. GraphDB configuration properties can also be passed here in the format -Dprop=value |
| graphdb.clusterProxy.livenessProbe | object | `{"httpGet":{"path":"/proxy/health","port":"gdb-proxy-port"},"initialDelaySeconds":120,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB cluster proxy liveness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.livenessProbe | object | `{"httpGet":{"path":"/proxy/health","port":"http"},"initialDelaySeconds":120,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB cluster proxy liveness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.nodeSelector | object | `{}` | |
| graphdb.clusterProxy.persistence | object | `{"enablePersistence":true,"volumeClaimTemplateSpec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"500Mi"}}}}` | Persistence configurations. By default, Helm will use a PV that reads and writes to the host file system. |
| graphdb.clusterProxy.persistence | object | `{"enabled":true,"volumeClaimTemplateSpec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"500Mi"}}}}` | Persistence configurations. By default, Helm will use a PV that reads and writes to the host file system. |
| graphdb.clusterProxy.podAnnotations | object | `{}` | |
| graphdb.clusterProxy.podLabels | object | `{}` | |
| graphdb.clusterProxy.podSecurityContext | object | `{}` | |
| graphdb.clusterProxy.readinessProbe | object | `{"httpGet":{"path":"/proxy/ready","port":"gdb-proxy-port"},"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB cluster proxy readiness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.readinessProbe | object | `{"httpGet":{"path":"/proxy/ready","port":"http"},"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB cluster proxy readiness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.replicas | int | `1` | Number of cluster proxies used to access the GraphDB cluster |
| graphdb.clusterProxy.resources | object | `{"limits":{"memory":"1500Mi"},"requests":{"cpu":"100m","memory":"1500Mi"}}` | Minimum requirements for a successfully running GraphDB cluster proxy |
| graphdb.clusterProxy.revisionHistoryLimit | int | `10` | |
| graphdb.clusterProxy.securityContext | object | `{}` | |
| graphdb.clusterProxy.service | object | `{"annotations":{}}` | GraphDB cluster proxy service configurations |
| graphdb.clusterProxy.service | object | `{"annotations":{},"labels":{},"nodePort":"","ports":{"http":7200,"rpc":7300}}` | GraphDB cluster proxy service configurations |
| graphdb.clusterProxy.serviceType | string | `"LoadBalancer"` | Service type used by the graphdb-cluster-proxy service Note: If using ALB in AWS EKS this will default to being on the public internet |
| graphdb.clusterProxy.startupProbe | object | `{"failureThreshold":60,"httpGet":{"path":"/proxy/ready","port":"gdb-proxy-port"},"periodSeconds":5,"timeoutSeconds":3}` | Configurations for the GraphDB cluster proxy startup probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.startupProbe | object | `{"failureThreshold":60,"httpGet":{"path":"/proxy/ready","port":"http"},"periodSeconds":5,"timeoutSeconds":3}` | Configurations for the GraphDB cluster proxy startup probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.clusterProxy.terminationGracePeriodSeconds | int | `30` | |
| graphdb.clusterProxy.tolerations | list | `[]` | |
| graphdb.clusterProxy.topologySpreadConstraints | list | `[]` | |
Expand All @@ -538,23 +543,23 @@ about defining resource limits.
| graphdb.node.extraInitContainers | list | `[]` | |
| graphdb.node.extraVolumeMounts | list | `[]` | |
| graphdb.node.extraVolumes | list | `[]` | |
| graphdb.node.headlessService | object | `{"annotations":{},"labels":{},"ports":{"http":7200,"rpc":7300}}` | GraphDB node headless service configurations |
| graphdb.node.initContainerResources | object | `{}` | |
| graphdb.node.initContainerSecurityContext | object | `{}` | |
| graphdb.node.java_args | string | `"-XX:MaxRAMPercentage=70 -Ddefault.min.distinct.threshold=100m -XX:+UseContainerSupport"` | Java arguments with which node instances will be launched. GraphDB configuration properties can also be passed here in the format -Dprop=value |
| graphdb.node.license | string | `nil` | Reference to a secret containing 'graphdb.license' file to be used by the nodes. Important: Must be created beforehand |
| graphdb.node.licenseFilename | string | `"graphdb.license"` | File name of the GraphDB license file in the existing license secret. Default is graphdb.license |
| graphdb.node.livenessProbe | object | `{"httpGet":{"path":"/protocol","port":"graphdb"},"initialDelaySeconds":60,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node liveness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.livenessProbe | object | `{"httpGet":{"path":"/protocol","port":"http"},"initialDelaySeconds":60,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node liveness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.nodeSelector | object | `{}` | |
| graphdb.node.persistence | object | `{"volumeClaimTemplateSpec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}}}}` | Persistence configurations. By default, Helm will use a PV that reads and writes to the host file system. |
| graphdb.node.persistence | object | `{"enabled":true,"volumeClaimTemplateSpec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}}}}` | Persistence configurations. By default, Helm will use a PV that reads and writes to the host file system. |
| graphdb.node.podAnnotations | object | `{}` | |
| graphdb.node.podLabels | object | `{}` | |
| graphdb.node.podSecurityContext | object | `{}` | |
| graphdb.node.readinessProbe | object | `{"httpGet":{"path":"/protocol","port":"graphdb"},"initialDelaySeconds":5,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node readiness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.readinessProbe | object | `{"httpGet":{"path":"/protocol","port":"http"},"initialDelaySeconds":5,"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node readiness probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.resources | object | `{"limits":{"memory":"2Gi"},"requests":{"cpu":0.5,"memory":"2Gi"}}` | Below are minimum requirements for data sets of up to 50 million RDF triples For resizing, refer according to the GraphDB documentation https://graphdb.ontotext.com/documentation/10.6/requirements.html |
| graphdb.node.revisionHistoryLimit | int | `10` | |
| graphdb.node.securityContext | object | `{}` | |
| graphdb.node.service | object | `{"annotations":{}}` | GraphDB node service configurations |
| graphdb.node.startupProbe | object | `{"failureThreshold":30,"httpGet":{"path":"/protocol","port":"graphdb"},"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node startup probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.startupProbe | object | `{"failureThreshold":30,"httpGet":{"path":"/protocol","port":"http"},"periodSeconds":10,"timeoutSeconds":5}` | Configurations for the GraphDB node startup probe. Misconfigured probe can lead to a failing cluster. |
| graphdb.node.terminationGracePeriodSeconds | int | `120` | |
| graphdb.node.tolerations | list | `[]` | |
| graphdb.node.topologySpreadConstraints | list | `[]` | |
Expand All @@ -567,19 +572,22 @@ about defining resource limits.
| graphdb.serviceAccount.annotations | object | `{}` | |
| graphdb.serviceAccount.create | bool | `true` | |
| graphdb.serviceAccount.name | string | `""` | |
| graphdb.workbench.subpath | string | `"/graphdb"` | This is the sub path at which GraphDB workbench can be opened. Should be configured in the API gateway (or any other proxy in front) |
| images.busybox.repository | string | `"busybox"` | |
| images.busybox.tag | string | `"1.36.1"` | |
| graphdb.workbench.subpath | string | `"/"` | This is the sub path at which GraphDB workbench can be opened. |
| images.graphdb.registry | string | `"docker.io"` | |
| images.graphdb.repository | string | `"ontotext/graphdb"` | |
| images.graphdb.sha | string | `""` | |
| images.graphdb.tag | string | `""` | |
| labels | object | `{}` | |
| nameOverride | string | `""` | |
| properties | object | `{}` | |
| provision.settings.configmapKey | string | `"settings.js"` | |
| provision.settings.existingConfigmap | string | `""` | |
| provision.users.configmapKey | string | `"users.js"` | |
| provision.users.existingConfigmap | string | `""` | |
| proxy.annotations | object | `{}` | |
| proxy.containerPorts.http | int | `7200` | |
| proxy.containerPorts.rpc | int | `7300` | |
| proxy.extraContainerPorts | object | `{}` | |
| proxy.fullnameOverride | string | `""` | |
| proxy.labels | object | `{}` | |
| proxy.nameOverride | string | `""` | |
Expand Down
4 changes: 1 addition & 3 deletions files/config/cluster-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
"verificationTimeout": {{ .Values.graphdb.clusterConfig.verificationTimeout | int }},
"messageSizeKB": {{ .Values.graphdb.clusterConfig.messageSize | int }},
"transactionLogMaximumSizeGB": {{ .Values.graphdb.clusterConfig.transactionLogMaximumSizeGB | quote }},
"nodes": [
{{- include "graphdb.cluster.nodes.json" . | nindent 4 }}
]
"nodes": {{- include "graphdb.cluster.nodes.json" . | indent 2 }}
}
Loading