Skip to content

Commit

Permalink
support external database (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz authored Feb 20, 2023
1 parent a2491bb commit f88c544
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 176 deletions.
8 changes: 4 additions & 4 deletions charts/gorse/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.2.2
version: 2.2.3
- name: mongodb
repository: https://charts.bitnami.com/bitnami
version: 13.6.4
digest: sha256:ffc0f887387f562061296e07ad5131d792221d0417caf88013f87028a9f86b17
generated: "2023-01-20T05:51:12.221182326Z"
version: 13.6.7
digest: sha256:2bcc7bb407c51ec18acf303544893c832cfa0f16d26ae2693abfb4ff500d3ce3
generated: "2023-02-20T15:16:42.513017012+08:00"
5 changes: 3 additions & 2 deletions charts/gorse/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v2
name: gorse
description: Gorse Recommender System Engine
icon: https://gorse.io/logo.png

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.0-alpha.3
version: 0.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -33,6 +34,6 @@ dependencies:
- bitnami-common
version: 2.x.x
- name: mongodb
condition: mongdb.enabled
condition: mongodb.enabled
version: 13.x.x
repository: "https://charts.bitnami.com/bitnami"
58 changes: 31 additions & 27 deletions charts/gorse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,14 @@ The command removes all the Kubernetes components associated with the chart and
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |


### Gorse Configuration
### Gorse Configuration parameters

| Name | Description | Value |
| -------------------------------------------- | ----------------------------------------------------------------------------- | ------------ |
| `gorse.cache.uri` | URI used to connect Gorse to the cache | `""` |
| `gorse.cache.prefix` | Table prefix of cache | `""` |
| `gorse.database.uri` | URI used to connect Gorse to the database | `""` |
| `gorse.database.prefix` | Table prefix of database and cache | `""` |
| `gorse.auth.dashboard.enabled` | Enable login in Gorse dashboard | `false` |
| `gorse.auth.dashboard.username` | Password for the custom user to dashboard. | `gorse` |
| `gorse.auth.dashboard.password` | Password for the custom user to create. | `""` |
| `gorse.auth.api.enabled` | Enable API security via token | `false` |
| `gorse.auth.api.key` | The key to secure the API andpoint | `""` |
| `gorse.dashboard.username` | Username for the dashboard. | `gorse` |
| `gorse.dashboard.password` | Password for the dashboard. | `""` |
| `gorse.dashboard.authServer` | Token server for the dashboard. | `""` |
| `gorse.api.key` | The key to secure the API endpoint | `""` |
| `gorse.master.http.cors.domains` | List of allowed values for Http Origin | `[]` |
| `gorse.master.http.cors.methods` | List of http methods names. Checking is case-insensitive. | `[]` |
| `gorse.master.jobs` | Number of working jobs in the master node | `1` |
Expand Down Expand Up @@ -213,11 +208,12 @@ The command removes all the Kubernetes components associated with the chart and
| `server.ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
| `server.ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
| `server.ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
| `server.replicaCount` | Number of servers replicas to deploy | `1` |
| `server.autoscaling.enabled` | Enable replica autoscaling settings | `false` |
| `server.autoscaling.minReplicas` | Minimum replicas for the pod autoscaling | `1` |
| `server.autoscaling.maxReplicas` | Maximum replicas for the pod autoscaling | `11` |
| `server.autoscaling.targetCPU` | Percentage of CPU to consider when autoscaling | `""` |
| `server.autoscaling.targetMemory` | Percentage of Memory to consider when autoscaling | `""` |
| `server.autoscaling.targetCPU` | Percentage of CPU to consider when autoscaling | `50` |
| `server.autoscaling.targetMemory` | Percentage of Memory to consider when autoscaling | `50` |
| `server.resources.limits` | The resources limits for the Gorse replicas containers | `{}` |
| `server.resources.requests` | The requested resources for the Gorse replicas containers | `{}` |
| `server.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
Expand Down Expand Up @@ -256,11 +252,12 @@ The command removes all the Kubernetes components associated with the chart and
| `worker.service.annotations` | Additional custom annotations for Gorse worker service | `{}` |
| `worker.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
| `worker.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `worker.replicaCount` | Number of workers replicas to deploy | `1` |
| `worker.autoscaling.enabled` | Enable replica autoscaling settings | `false` |
| `worker.autoscaling.minReplicas` | Minimum replicas for the pod autoscaling | `1` |
| `worker.autoscaling.maxReplicas` | Maximum replicas for the pod autoscaling | `11` |
| `worker.autoscaling.targetCPU` | Percentage of CPU to consider when autoscaling | `""` |
| `worker.autoscaling.targetMemory` | Percentage of Memory to consider when autoscaling | `""` |
| `worker.autoscaling.targetCPU` | Percentage of CPU to consider when autoscaling | `50` |
| `worker.autoscaling.targetMemory` | Percentage of Memory to consider when autoscaling | `50` |
| `worker.resources.limits` | The resources limits for the Gorse replicas containers | `{}` |
| `worker.resources.requests` | The requested resources for the Gorse replicas containers | `{}` |
| `worker.podAffinityPreset` | Pod affinity preset. Ignored if `worker.affinity` is set. Allowed values: `soft` or `hard` | `""` |
Expand All @@ -278,19 +275,26 @@ The command removes all the Kubernetes components associated with the chart and

### Database Parameters

| Name | Description | Value |
| ---------------------------------- | ------------------------------------------------------------------------- | ------------------------------ |
| `mongodb.enabled` | Deploy a MongoDB server to satisfy the applications database requirements | `true` |
| `mongodb.architecture` | MongoDB(®) architecture (`standalone` or `replicaset`) | `standalone` |
| `mongodb.auth.rootUser` | MongoDB(®) root user | `root` |
| `mongodb.auth.rootPassword` | MongoDB(®) root password | `""` |
| `mongodb.auth.usernames` | List of custom users to be created during the initialization | `["gorse_username"]` |
| `mongodb.auth.passwords` | List of passwords for the custom users set at `auth.usernames` | `["gorse_password"]` |
| `mongodb.auth.databases` | List of custom databases to be created during the initialization | `["gorse_cache","gorse_data"]` |
| `mongodb.persistence.enabled` | Enable MongoDB(®) data persistence using PVC | `true` |
| `mongodb.persistence.storageClass` | PVC Storage Class for MongoDB(®) data volume | `""` |
| `mongodb.persistence.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
| `mongodb.persistence.size` | PVC Storage Request for MongoDB(®) data volume | `8Gi` |
| Name | Description | Value |
| -------------------------------------------- | ------------------------------------------------------------------------- | ------------------- |
| `mongodb.enabled` | Deploy a MongoDB server to satisfy the applications database requirements | `true` |
| `mongodb.architecture` | MongoDB(®) architecture (`standalone` or `replicaset`) | `standalone` |
| `mongodb.auth.rootUser` | MongoDB(®) root user | `root` |
| `mongodb.auth.rootPassword` | MongoDB(®) root password | `""` |
| `mongodb.auth.username` | Custom user to be created during the initialization | `gorse` |
| `mongodb.auth.password` | Password for the custom users set at `auth.usernames` | `""` |
| `mongodb.auth.database` | Custom databases to be created during the initialization | `gorse` |
| `mongodb.persistence.enabled` | Enable MongoDB(®) data persistence using PVC | `true` |
| `mongodb.persistence.storageClass` | PVC Storage Class for MongoDB(®) data volume | `""` |
| `mongodb.persistence.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
| `mongodb.persistence.size` | PVC Storage Request for MongoDB(®) data volume | `8Gi` |
| `externalDatabase.host` | Database host | `localhost` |
| `externalDatabase.port` | Database port number | `27017` |
| `externalDatabase.username` | Non-root username for Gorse | `gorse` |
| `externalDatabase.password` | Password for the non-root username for Gorse | `""` |
| `externalDatabase.database` | Gorse database name | `gorse` |
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `mongodb-passwords` |


## Configuration
Expand Down
Loading

0 comments on commit f88c544

Please sign in to comment.