Skip to content

Commit

Permalink
Add values documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mawandm committed Apr 6, 2024
1 parent f371445 commit 04c1618
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 23 deletions.
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version: 0.1.2
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.1"
appVersion: "0.0.1"

dependencies:
- name: postgresql
Expand Down
156 changes: 156 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# nesis

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)

A Helm chart for Nesis Enterprise Knowledge Discovery

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | memcached | 6.12.1 |
| https://charts.bitnami.com/bitnami | postgresql | 12.12.7 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Global affinity |
| api.autoscaling.enabled | bool | `false` | |
| api.autoscaling.maxReplicas | int | `11` | |
| api.autoscaling.minReplicas | int | `3` | |
| api.autoscaling.targetCPU | string | `""` | |
| api.autoscaling.targetMemory | string | `""` | |
| api.config | object | `{}` | |
| api.customLivenessProbe | object | `{}` | |
| api.customReadinessProbe | object | `{}` | |
| api.existingSecret | string | `""` | |
| api.extraEnvs[0].name | string | `"KUBE_NAMESPACE"` | |
| api.extraEnvs[0].valueFrom.fieldRef.fieldPath | string | `"metadata.namespace"` | |
| api.image.pullPolicy | string | `"Always"` | |
| api.image.repository | string | `"ametnes/nesis"` | |
| api.image.tag | string | `"latest-api"` | |
| api.ingress.annotations | object | `{}` | |
| api.ingress.className | string | `""` | |
| api.ingress.enabled | bool | `false` | |
| api.ingress.hosts[0].host | string | `"chart-example.local"` | |
| api.ingress.hosts[0].paths[0].path | string | `"/"` | |
| api.ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| api.ingress.tls | list | `[]` | |
| api.livenessProbe.enabled | bool | `true` | |
| api.livenessProbe.initialDelaySeconds | int | `5` | |
| api.livenessProbe.port | string | `"http-api"` | |
| api.livenessProbe.timeoutSeconds | int | `10` | |
| api.readinessProbe.enabled | bool | `true` | |
| api.readinessProbe.initialDelaySeconds | int | `5` | |
| api.readinessProbe.port | string | `"http-api"` | |
| api.readinessProbe.timeoutSeconds | int | `1` | |
| api.replicaCount | int | `1` | |
| api.resources.limits.cpu | string | `"512m"` | |
| api.resources.limits.memory | string | `"512Mi"` | |
| api.resources.requests.cpu | string | `"512m"` | |
| api.resources.requests.memory | string | `"512Mi"` | |
| api.secrets | object | `{}` | |
| api.service.annotations | object | `{}` | |
| api.service.port | int | `6000` | |
| api.service.type | string | `"ClusterIP"` | |
| frontend.autoscaling.enabled | bool | `false` | Enable/disable frontend autoscaling |
| frontend.autoscaling.maxReplicas | int | `11` | |
| frontend.autoscaling.minReplicas | int | `3` | |
| frontend.autoscaling.targetCPU | string | `""` | |
| frontend.autoscaling.targetMemory | string | `""` | |
| frontend.config | object | `{}` | config: Default configuration for optim as environment variables. These get injected directly in the container. |
| frontend.customLivenessProbe | object | `{}` | |
| frontend.customReadinessProbe | object | `{}` | |
| frontend.existingSecret | string | `""` | existingSecret: Specifies an existing secret to be used as environment variables. These get injected directly in the container. |
| frontend.extraEnvs | list | `[{"name":"KUBE_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | extraEnvs: Extra environment variables |
| frontend.image.pullPolicy | string | `"Always"` | |
| frontend.image.repository | string | `"ametnes/nesis"` | |
| frontend.image.tag | string | `"latest-frontend"` | |
| frontend.ingress.annotations | object | `{}` | |
| frontend.ingress.className | string | `""` | |
| frontend.ingress.enabled | bool | `false` | |
| frontend.ingress.hosts[0].host | string | `"chart-example.local"` | |
| frontend.ingress.hosts[0].paths[0].path | string | `"/"` | |
| frontend.ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| frontend.ingress.tls | list | `[]` | |
| frontend.livenessProbe.enabled | bool | `true` | |
| frontend.livenessProbe.initialDelaySeconds | int | `5` | |
| frontend.livenessProbe.port | string | `"http-frontend"` | |
| frontend.livenessProbe.timeoutSeconds | int | `10` | |
| frontend.readinessProbe.enabled | bool | `true` | |
| frontend.readinessProbe.initialDelaySeconds | int | `5` | |
| frontend.readinessProbe.port | string | `"http-frontend"` | |
| frontend.readinessProbe.timeoutSeconds | int | `1` | |
| frontend.replicaCount | int | `1` | Frontend replica count |
| frontend.resources.limits.cpu | string | `"256m"` | |
| frontend.resources.limits.memory | string | `"512Mi"` | |
| frontend.resources.requests.cpu | string | `"256m"` | |
| frontend.resources.requests.memory | string | `"512Mi"` | |
| frontend.service.annotations | object | `{}` | |
| frontend.service.port | int | `8000` | |
| frontend.service.type | string | `"ClusterIP"` | |
| fullnameOverride | string | `""` | Fullname override |
| imagePullSecrets | list | `[]` | Global image pull secrets |
| memcached.enabled | bool | `true` | |
| memcached.resources.limits.cpu | string | `"250m"` | |
| memcached.resources.limits.memory | string | `"256Mi"` | |
| memcached.resources.requests.cpu | string | `"250m"` | |
| memcached.resources.requests.memory | string | `"256Mi"` | |
| nameOverride | string | `""` | Override the charts name partially |
| nodeSelector | object | `{}` | Global node selector |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| postgresql.auth.postgresPassword | string | `"password"` | |
| postgresql.enabled | bool | `true` | |
| postgresql.primary.initdb.password | string | `"password"` | |
| postgresql.primary.initdb.scripts."createdb.sql" | string | `"CREATE DATABASE nesis;\nCREATE DATABASE embeddings;"` | |
| postgresql.primary.initdb.user | string | `"postgres"` | |
| postgresql.primary.persistence.enabled | bool | `true` | |
| postgresql.primary.persistence.size | string | `"1Gi"` | |
| postgresql.primary.resources.limits.cpu | string | `"250m"` | |
| postgresql.primary.resources.limits.memory | string | `"256Mi"` | |
| postgresql.primary.resources.requests.cpu | string | `"250m"` | |
| postgresql.primary.resources.requests.memory | string | `"256Mi"` | |
| rag.autoscaling.enabled | bool | `false` | |
| rag.autoscaling.maxReplicas | int | `11` | |
| rag.autoscaling.minReplicas | int | `3` | |
| rag.autoscaling.targetCPU | string | `""` | |
| rag.autoscaling.targetMemory | string | `""` | |
| rag.config | string | `nil` | |
| rag.enabled | bool | `true` | |
| rag.extraEnv[0].name | string | `"PYTORCH_MPS_HIGH_WATERMARK_RATIO"` | |
| rag.extraEnv[0].value | string | `"0.0"` | |
| rag.extraEnv[1].name | string | `"HF_HUB_CACHE"` | |
| rag.extraEnv[1].value | string | `"/app/nesis/local_data/models"` | |
| rag.extraEnv[2].name | string | `"HF_HOME"` | |
| rag.extraEnv[2].value | string | `"/app/nesis/local_data/models"` | |
| rag.extraEnv[3].name | string | `"NESIS_RAG_DATA_MODELS_FOLDER"` | |
| rag.extraEnv[3].value | string | `"/app/nesis/local_data/models"` | |
| rag.image.pullPolicy | string | `"Always"` | |
| rag.image.repository | string | `"ametnes/nesis"` | |
| rag.image.tag | string | `"latest-rag"` | |
| rag.persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
| rag.persistence.enabled | bool | `true` | |
| rag.persistence.path | string | `"/app/nesis/local_data"` | |
| rag.persistence.size | string | `"10Gi"` | |
| rag.persistence.storageClass | string | `nil` | |
| rag.podSecurityContext.fsGroup | int | `7554` | |
| rag.replicaCount | int | `1` | |
| rag.resources.limits.cpu | int | `1` | |
| rag.resources.limits.memory | string | `"1Gi"` | |
| rag.resources.requests.cpu | int | `1` | |
| rag.resources.requests.memory | string | `"1Gi"` | |
| rag.securityContext.runAsGroup | int | `7554` | |
| rag.securityContext.runAsUser | int | `7554` | |
| rag.service.annotations | string | `nil` | |
| rag.service.loadBalancerSourceRanges | list | `[]` | |
| rag.service.port | int | `8080` | |
| rag.service.type | string | `"ClusterIP"` | |
| securityContext | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| tolerations | list | `[]` | Global tolerations |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
24 changes: 20 additions & 4 deletions helm/templates/api/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ spec:
{{- include "nesis.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: api
spec:
{{- with .Values.api.imagePullSecrets }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else if .Values.api.imagePullSecrets }}
imagePullSecrets:
{{- with .Values.api.imagePullSecrets }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.api.podSecurityContext | nindent 8 }}
initContainers:
Expand Down Expand Up @@ -111,16 +118,25 @@ spec:
{{if .Values.api.extraVolumeMounts }}
{{- toYaml .Values.api.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- with .Values.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.api.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.api.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- with .Values.api.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
Expand Down
26 changes: 21 additions & 5 deletions helm/templates/frontend/deployment-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ spec:
{{- include "nesis.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: frontend
spec:
{{- with .Values.frontend.imagePullSecrets }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else if .Values.frontend.imagePullSecrets }}
imagePullSecrets:
{{- with .Values.frontend.imagePullSecrets }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.frontend.podSecurityContext | nindent 8 }}
containers:
Expand Down Expand Up @@ -77,7 +84,7 @@ spec:
{{- end }}
env:
- name: API_URL
value: http://{{ $fullname }}-api:{{ .Values.api.service.port }}
value: http://{{ $fullname }}-api:{{ .Values.frontend.service.port }}
{{- if .Values.frontend.env }}
{{- toYaml .Values.frontend.env | nindent 12 }}
{{- else if .Values.frontend.extraEnvs }}
Expand All @@ -87,16 +94,25 @@ spec:
{{if .Values.frontend.extraVolumeMounts }}
{{- toYaml .Values.frontend.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- with .Values.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- with .Values.frontend.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
Expand Down
24 changes: 20 additions & 4 deletions helm/templates/rag/deployment-rag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ spec:
{{- include "nesis.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: rag
spec:
{{- with .Values.rag.imagePullSecrets }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else if .Values.rag.imagePullSecrets }}
imagePullSecrets:
{{- with .Values.rag.imagePullSecrets }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "nesis.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.rag.podSecurityContext | nindent 8 }}
Expand Down Expand Up @@ -91,15 +98,24 @@ spec:
configMap:
name: {{ $fullname }}
{{- end }}
{{- with .Values.rag.nodeSelector }}
nodeSelector:
{{- with .Values.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.rag.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.rag.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.rag.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.rag.tolerations }}
tolerations:
{{- with .Values.rag.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
19 changes: 12 additions & 7 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Override the charts name partially
nameOverride: ""

# -- Fullname override
fullnameOverride: ""

# -- Global image pull secrets
imagePullSecrets: []

# -- Global node selector
nodeSelector: {}

# -- Global tolerations
tolerations: []

# -- Global affinity
affinity: {}

serviceAccount:
Expand All @@ -37,8 +44,10 @@ securityContext: {}


frontend:
# -- Frontend replica count
replicaCount: 1
autoscaling:
# -- Enable/disable frontend autoscaling
enabled: false
minReplicas: 3
maxReplicas: 11
Expand Down Expand Up @@ -112,17 +121,13 @@ frontend:
cpu: 256m
memory: 512Mi

# config: Default configuration for optim as environment variables. These get injected directly in the container.
# -- config: Default configuration for optim as environment variables. These get injected directly in the container.
config: {}

# existingSecret: Spcifies an existing secret to be used as environment variables. These get injected directly in the container.
# -- existingSecret: Specifies an existing secret to be used as environment variables. These get injected directly in the container.
existingSecret: ""

# secrets: Default secrets for optim as environment variables. These get injected directly in the container.
# Consider using a secret manager first, before sourcing secrets as environment variables.
secrets: {}

# extraEnvs: Extra environment variables
# -- extraEnvs: Extra environment variables
extraEnvs:
- name: KUBE_NAMESPACE
valueFrom:
Expand Down
1 change: 0 additions & 1 deletion nesis/frontend/client/src/utils/httpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,5 @@ export { Client };
// local
export const API_PREFIX = `/api`;
//deployment
// export const API_PREFIX = `/optim/api`;
const client = new Client(API_PREFIX);
export default client;
1 change: 0 additions & 1 deletion nesis/frontend/server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ async function init() {
// Serve the static files from the React app
// const home = process.env.APP_HOME || __dirname + '../';
// logger.info(`Running server from ${home}`);
// app.use('/optim', express.static(path.join(home, '/client')));
// app.use(express.static(path.join(home, '/static-client')));

const API = {
Expand Down

0 comments on commit 04c1618

Please sign in to comment.