From 4f4f14f24b4595a2eafa8b7ed4a8a306d42988a0 Mon Sep 17 00:00:00 2001 From: Taylor Price Date: Thu, 13 Feb 2025 15:21:07 -0700 Subject: [PATCH 1/3] chore: use appVersion unless value is set Signed-off-by: Taylor Price --- chart/templates/deployment.yaml | 2 +- chart/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index a8c9e9c1e..cd115aa87 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/chart/values.yaml b/chart/values.yaml index 1df83244e..6b06438c3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -4,8 +4,8 @@ replicaCount: 1 image: # image.repository -- The name of the docker repository for Obot repository: ghcr.io/obot-platform/obot-enterprise - # image.tag -- The docker tag to pull for obot - tag: latest + # image.tag -- The docker tag to pull for obot. If blank, will default to the chart appVersion + tag: "" # image.pullPolicy -- Kubernetes image pullPolicy to use for Obot pullPolicy: IfNotPresent From 265cdd7aa4566d7fee3d86199887b77b03284216 Mon Sep 17 00:00:00 2001 From: Taylor Price Date: Tue, 28 Jan 2025 10:26:03 -0700 Subject: [PATCH 2/3] chore: release helm chart Signed-off-by: Taylor Price --- .github/workflows/helm.yml | 27 ++++++++++++++++ .github/workflows/release.yml | 44 +++++++++++++++++++++++++- .gitignore | 3 ++ chart/README.md | 58 ----------------------------------- chart/values.yaml | 18 +++++++++++ ui/admin/.gitignore | 4 ++- 6 files changed, 94 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/helm.yml delete mode 100644 chart/README.md diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml new file mode 100644 index 000000000..b0e81cceb --- /dev/null +++ b/.github/workflows/helm.yml @@ -0,0 +1,27 @@ +name: Helm Chart + +on: + push: + branches: + - main + paths: + - chart/** + pull_request: + branches: + - main + paths: + - chart/** + +jobs: + lint: + runs-on: depot-ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Helm + uses: azure/setup-helm@v4 + + - name: Lint Helm chart + run: helm lint chart \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 858e5474e..20eabb26e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,4 +58,46 @@ jobs: - name: Create WinGet Package Update Pull Request run: | $url = "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/obot_${{ github.ref_name }}_windows_amd64.zip" - ./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.ref_name }}" obot-platform.obot \ No newline at end of file + ./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.ref_name }}" obot-platform.obot + chart-release: + needs: release-tag + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Helm + uses: azure/setup-helm@v4 + + - name: Package Helm chart + run: helm package chart --destination ./.packaged --version ${{ github.ref_name }} --app-version ${{ github.ref_name }} + + - name: Checkout GitHub Pages Repository + uses: actions/checkout@v4 + with: + repository: obot-platform/charts + token: ${{ secrets.CHARTS_REPO_TOKEN }} + path: gh-pages + + - name: Run helm-docs + uses: losisin/helm-docs-github-action@v1 + with: + chart-search-root: './chart' + output-file: '../gh-pages/README.md' + template-files: '../gh-pages/README.md.gotmpl' + + - name: Update Helm Repo Index + run: | + cd gh-pages + mkdir -p charts + mv ../.packaged/* charts/ + helm repo index . --url https://charts.obot.ai/ --merge index.yaml + + - name: Commit and Push Changes + run: | + cd gh-pages + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add --all + git commit -m "Release new Helm chart version ${{ github.ref_name }}" || echo "No changes to commit" + git push diff --git a/.gitignore b/.gitignore index d2de4f814..6807eec25 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ kubeconfig *.test *.out +# Ignore packed helm chart +.packaged/ + # Ignore dependency directories vendor/ diff --git a/chart/README.md b/chart/README.md deleted file mode 100644 index 3ed402d39..000000000 --- a/chart/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Obot Helm Chart - -This Helm chart is used to deploy the Obot server on a Kubernetes cluster. It provides a variety of configuration options to customize the deployment according to your needs. - -## Installation - -To install the chart with the release name `my-release`: - -```Shell -helm install my-release . -``` - -## Configuration - -The following table lists the configurable parameters of the Obot chart and their default values. - -### General Configuration - -| Parameter | Description | Default | -|------------------------------------------|----------------------------------------------------------------|-----------------------------------------| -| `replicaCount` | Number of Obot server instances to run | `1` | -| `image.repository` | Docker repository for Obot | `ghcr.io/obot-platform/obot-enterprise` | -| `image.tag` | Docker tag to pull for Obot | `latest` | -| `image.pullPolicy` | Kubernetes image pull policy | `IfNotPresent` | -| `imagePullSecrets` | Kubernetes secrets for pulling private images | `[]` | -| `updateStrategy` | Update strategy for the deployment (Recreate or RollingUpdate) | `RollingUpdate` | -| `service.type` | Type of Kubernetes service | `ClusterIP` | -| `service.port` | Port for the Kubernetes service | `80` | -| `ingress.enabled` | Enables ingress creation for Obot | `false` | -| `ingress.className` | Preexisting ingress class to use | `~` | -| `config.existingSecret` | Name of an existing secret for config | `""` | -| `config.awsAccessKeyID` | AWS Access Key ID for S3 provider | `""` | -| `config.awsRegion` | AWS Region for S3 provider | `""` | -| `config.awsSecretAccessKey` | AWS Secret Access Key for S3 provider | `""` | -| `config.nahThreadiness` | Threadiness setting for Obot | `"100"` | -| `config.knowledgeFileWorkers` | Threadiness setting for Knowledge Files | `"5"` | -| `config.githubAuthToken` | GitHub authentication token | `""` | -| `config.obotServerEnableAuthentication` | Enable authentication for Obot server | `true` | -| `config.obotBootstrapToken` | Bootstrap token for Obot server | `""` | -| `config.obotServerAuthAdminEmails` | Admin emails for Obot server authentication | `""` | -| `config.obotServerDSN` | Data Source Name for Obot server database | `""` | -| `config.obotServerHostname` | Hostname for Obot server | `""` | -| `config.obotWorkspaceProviderType` | Workspace provider type (`directory` or `s3`) | `"s3"` | -| `config.openaiApiKey` | OpenAI API key | `""` | -| `config.workspaceProviderS3BaseEndpoint` | Base endpoint for S3 provider | `""` | -| `config.workspaceProviderS3Bucket` | S3 bucket for workspace provider | `""` | -| `extraEnv` | Additional environment variables to set | `{}` | -| `resources` | Resource requests and limits for Obot | `{}` | -| `serviceAccount.create` | Specifies whether a service account should be created | `false` | -| `serviceAccount.name` | Name of the service account to use | `""` | - -### Configuration Options - -[See obot configuration docs](https://docs.obot.ai/configuration/general). - -#### Workspace Provider - -[See Workspace provider docs](https://docs.obot.ai/configuration/workspace-provider) diff --git a/chart/values.yaml b/chart/values.yaml index 6b06438c3..2b631b560 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -54,24 +54,42 @@ config: # config.existingSecret -- The name of an existing secret to use for config instead of creating a new one existingSecret: "" + # config.awsAccessKeyID -- An AWS access key with permissions for AWS KMS, used for encryption awsAccessKeyID: "" + # config.awsRegion -- An AWS region, used to access AWS KMS awsRegion: "" + # config.awsAccessKeyID -- An AWS secret access key with permissions for AWS KMS, used for encryption awsSecretAccessKey: "" + + # config.gcpKMSKeyURI -- The URI of a Google Cloud KMS key, used for encryption gcpKMSKeyURI: "" + # config.nahThreadiness -- Advanced - sets the number of concurrent threads that can run in the Obot controller nahThreadiness: "10000" + # config.knowledgeFileWorkers -- Advanced - sets the number of workers for knowledge knowledgeFileWorkers: "5" + # config.githubAuthToken -- A github PAT, used to authenticate tool pulls to avoid github ratelimiting githubAuthToken: "" + # config.obotServerEnableAuthentication -- Enables authentication for Obot obotServerEnableAuthentication: true + # config.obotServerEncryptionProvider -- Configures an encryption provider for credentials in Obot obotServerEncryptionProvider: "None" # "None", "AWS", "GCP" + # config.obotBootstrapToken -- Sets a bootstrap token. If authentication is enabled, one will be autogenerated for you if this is not set. obotBootstrapToken: "" + # config.obotServerAuthAdminEmails -- A comma separated list of email addresses that will have the Admin role in Obot. obotServerAuthAdminEmails: "" + # config.obotServerDSN -- The DSN for your database. For example: postgres://:@/ obotServerDSN: "" + # 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" + # 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. workspaceProviderS3BaseEndpoint: "" + # config.workspaceProviderS3Bucket -- The name of the S3 bucket to store workspaces in. Only used if config.obotWorkspaceProviderType is 's3' workspaceProviderS3Bucket: "" # extraEnv -- A map of additional environment variables to set diff --git a/ui/admin/.gitignore b/ui/admin/.gitignore index fd6a7fb45..68c8c3db1 100644 --- a/ui/admin/.gitignore +++ b/ui/admin/.gitignore @@ -13,4 +13,6 @@ coverage-ts/ # Ignore all files in .vscode except settings.json !.vscode .vscode/* -!.vscode/settings.json \ No newline at end of file +!.vscode/settings.json + +.packaged \ No newline at end of file From a7819863cba029d4c3a83398f63d18a38058ce2d Mon Sep 17 00:00:00 2001 From: Taylor Price Date: Thu, 13 Feb 2025 15:40:59 -0700 Subject: [PATCH 3/3] chore: udpate link to chart Signed-off-by: Taylor Price --- docs/docs/05-installation/00-Installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/05-installation/00-Installation.md b/docs/docs/05-installation/00-Installation.md index 44b6c9977..4aec3526a 100644 --- a/docs/docs/05-installation/00-Installation.md +++ b/docs/docs/05-installation/00-Installation.md @@ -77,7 +77,7 @@ docker logs -f ### Helm -If you would like to install Obot on a Kubernetes cluster, you can use the Helm chart. We are currently working on the Helm chart and have made it available for testing here: [obot-helm](https://github.com/obot-platform/obot/tree/main/chart) +If you would like to install Obot on a Kubernetes cluster, you can use the Helm chart. We are currently working on the Helm chart and have made it available for testing here: [obot-helm](https://charts.obot.ai/) ## Next Steps