Skip to content

Commit

Permalink
chore: ensure chart is easy to install with default configuration (#1765
Browse files Browse the repository at this point in the history
)
  • Loading branch information
drpebcak authored Feb 18, 2025
1 parent d4c4a66 commit 17ad3d6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
11 changes: 11 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
port: http
failureThreshold: 5
periodSeconds: 10
{{- if and (eq .Values.config.obotWorkspaceProviderType "directory") .Values.persistence.enabled }}
volumeMounts:
- mountPath: {{ .Values.persistence.path }}
name: data
{{- end }}
env:
- name: "OBOT_SERVER_ENABLE_AUTHENTICATION"
value: {{ .Values.config.obotServerEnableAuthentication | quote }}
Expand Down Expand Up @@ -159,3 +164,9 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if and (eq .Values.config.obotWorkspaceProviderType "directory") .Values.persistence.enabled }}
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ ternary .Values.persistence.existingClaim (print .Release.Name "-pvc") (ne .Values.persistence.existingClaim "") }}
{{- end }}
14 changes: 14 additions & 0 deletions chart/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if and (eq .Values.config.obotWorkspaceProviderType "directory") .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-pvc
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end }}
22 changes: 20 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
replicaCount: 1

image:
# image.repository -- The name of the docker repository for Obot
# image.repository -- The name of the docker repository for Obot. `ghcr.io/obot-platform/obot` for open-source or `ghcr.io/obot-platform/obot-enterprise` for enterprise.
# Please note that for enterprise you will need to set an `imagePullSecret`
repository: ghcr.io/obot-platform/obot-enterprise
# image.tag -- The docker tag to pull for obot. If blank, will default to the chart appVersion
tag: ""
Expand Down Expand Up @@ -84,7 +85,7 @@ config:
# config.obotServerHostname -- The hostname of your Obot instance, including protocol
obotServerHostname: ""
# config.obotWorkspaceProviderType -- Configures the storage backend for workspaces in Obot. Can be 's3' or 'directory'
obotWorkspaceProviderType: "s3"
obotWorkspaceProviderType: "directory"
# config.openaiApiKey -- An OpenAI API Key used to configure access to OpenAI models, which are the default in Obot.
openaiApiKey: ""
# config.workspaceProviderS3BaseEndpoint -- If config.obotWorkspaceProviderType is 's3' and you are not using AWS S3, this needs to be set to the S3 api endpoint of your provider.
Expand All @@ -98,6 +99,23 @@ extraEnv: { }
# resources -- Resource requests and limits to use for Obot
resources: { }

persistence:
#persistence.enabled -- Enables persistence of workspaces using a PVC when config.obotWorkspaceProviderType is `directory`
enabled: true
# persistence.path -- The path the volume will be mounted
path: /data
# persistence.storageClass -- Persistent Volume storage class
# If defined, storageClassName: <storageClass>
# If set to "-", storageClassName: "", which disables dynamic provisioning
# If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
storageClass: ""
# persistence.accessModes -- Persistent Volume access modes
accessModes:
- ReadWriteOnce
# persistence.size --e Persistent Volume size
size: 8Gi
existingClaim: ""

serviceAccount:
# serviceAccount.create - Specifies whether a service account should be created
create: false
Expand Down

0 comments on commit 17ad3d6

Please sign in to comment.