Skip to content

Commit

Permalink
add helm linting and releasing (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 authored Aug 29, 2024
1 parent 3f964ed commit 1c86bb2
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 12 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint and Test Charts

on:
pull_request:

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.14.4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
35 changes: 35 additions & 0 deletions .github/workflows/release-helm-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"
26 changes: 17 additions & 9 deletions charts/kubeai/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ apiVersion: v2
name: kubeai
description: Private Open AI Platform for Kubernetes.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
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.1.2
version: 0.1.3

# 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 @@ -28,12 +20,28 @@ dependencies:
# https://docs.openwebui.com/
- name: openwebui
condition: openwebui.enabled
version: 0.1.0
# Custom Resource Definitions are cluster scoped. Sometimes cluster admins need to install
# these resources as a separate step.
# https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
- name: crds
condition: crds.enabled
version: 0.1.0
# Models are the machine learning models that kubeai will serve.
# These are instances of the Model custom resource.
- name: models
condition: models.enabled
version: 0.1.0


keywords: ["LLM", "AI"]

# TODO replace with kubeai.org once live
home: https://www.substratus.ai

maintainers:
- name: nstogner
email: [email protected]
- name: samos123
email: [email protected]
url: https://www.linkedin.com/in/samstoelinga/
5 changes: 2 additions & 3 deletions charts/kubeai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ secrets:
huggingface:
create: true
token: ""
# The name of the secret to use.
# The name of the secret to use.
# If not set, and create is true, the name is generated using the fullname template.
# The token value is pulled from the key, "token".
name: ""
Expand Down Expand Up @@ -48,7 +48,7 @@ openwebui:
value: "False"
- name: OPENAI_API_KEYS
value: "not-used"
#- name: OPENAI_API_BASE_URL
# - name: OPENAI_API_BASE_URL
# # TODO: This changes with .fullnameOverride and .service.port, make this more robust.
# value: "http://kubeai/openai/v1"
- name: OPENAI_API_BASE_URLS
Expand Down Expand Up @@ -174,4 +174,3 @@ nodeSelector: {}
tolerations: []

affinity: {}

0 comments on commit 1c86bb2

Please sign in to comment.