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

chore: ensure chart is easy to install with default configuration #1765

Merged
merged 2 commits into from
Feb 18, 2025
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
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