Skip to content

Commit ef40c69

Browse files
authored
Merge pull request #1 from stackhpc/feat/azimuth-helm
Add Azimuth Helm chart
2 parents 92ab7ef + 801949e commit ef40c69

File tree

12 files changed

+225
-1
lines changed

12 files changed

+225
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Helm chart
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build_push_chart:
8+
name: Build and push Helm chart
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the repository
12+
uses: actions/checkout@v4
13+
with:
14+
# This is important for the semver action to work correctly
15+
# when determining the number of commits since the last tag
16+
fetch-depth: 0
17+
18+
- name: Get SemVer version for current commit
19+
id: semver
20+
uses: azimuth-cloud/github-actions/semver@master
21+
22+
- name: Publish Helm charts
23+
uses: azimuth-cloud/github-actions/helm-publish@master
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
version: ${{ steps.semver.outputs.version }}
27+
app-version: ${{ steps.semver.outputs.short-sha }}

helm-azimuth/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
charts/
2+
Chart.lock

helm-azimuth/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

helm-azimuth/Chart.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v2
2+
name: ragflow-azimuth
3+
description: A self-service Retrieval-Augmented Generation (RAG) environment for working with Large Language Models.
4+
icon: https://raw.githubusercontent.com/infiniflow/ragflow/refs/heads/main/web/src/assets/logo-with-text.png
5+
6+
# A chart can be either an 'application' or a 'library' chart.
7+
#
8+
# Application charts are a collection of templates that can be packaged into versioned archives
9+
# to be deployed.
10+
#
11+
# Library charts provide useful utilities or functions for the chart developer. They're included as
12+
# a dependency of application charts to inject those utilities and functions into the rendering
13+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
14+
type: application
15+
16+
# This is the chart version. This version number should be incremented each time you make changes
17+
# to the chart and its templates, including the app version.
18+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19+
version: 0.1.0
20+
21+
# This is the version number of the application being deployed. This version number should be
22+
# incremented each time you make changes to the application. Versions are not expected to
23+
# follow Semantic Versioning. They should reflect the version the application is using.
24+
# It is recommended to use it with quotes.
25+
appVersion: "dev"
26+
27+
dependencies:
28+
- name: ragflow
29+
repository: "file://../helm"
30+
version: ">=0-0"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generate random passwords for backend services
2+
controls:
3+
/ragflow/env/MYSQL_PASSWORD:
4+
visuallyHidden: true
5+
/ragflow/env/MINIO_PASSWORD:
6+
visuallyHidden: true
7+
/ragflow/env/REDIS_PASSWORD:
8+
visuallyHidden: true
9+
/ragflow/env/ELASTIC_PASSWORD:
10+
visuallyHidden: true
11+
defaultGenerators:
12+
/ragflow/env/MYSQL_PASSWORD:
13+
type: random
14+
length: 32
15+
/ragflow/env/MINIO_PASSWORD:
16+
type: random
17+
length: 32
18+
/ragflow/env/REDIS_PASSWORD:
19+
type: random
20+
length: 32
21+
/ragflow/env/ELASTIC_PASSWORD:
22+
type: random
23+
length: 32

helm-azimuth/templates/NOTES.txt

Whitespace-only changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "ragflow-azimuth.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "ragflow-azimuth.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "ragflow-azimuth.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "ragflow-azimuth.labels" -}}
37+
helm.sh/chart: {{ include "ragflow-azimuth.chart" . }}
38+
{{ include "ragflow-azimuth.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "ragflow-azimuth.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "ragflow-azimuth.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}

helm-azimuth/templates/client.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: zenith.stackhpc.com/v1alpha1
2+
kind: Client
3+
metadata:
4+
name: {{ include "ragflow-azimuth.fullname" . }}
5+
labels: {{ include "ragflow-azimuth.labels" . | nindent 4 }}
6+
spec:
7+
reservationName: {{ include "ragflow-azimuth.fullname" . }}
8+
upstream:
9+
serviceName: {{ .Release.Name }}
10+
auth:
11+
skip: {{ .Values.zenithClient.skipAuth }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: zenith.stackhpc.com/v1alpha1
2+
kind: Reservation
3+
metadata:
4+
name: {{ include "ragflow-azimuth.fullname" . }}
5+
labels: {{ include "ragflow-azimuth.labels" . | nindent 4 }}
6+
annotations:
7+
azimuth.stackhpc.com/service-label: {{ quote .Values.zenithClient.label }}
8+
azimuth.stackhpc.com/service-icon-url: {{ .Values.zenithClient.iconUrl }}
9+
{{- with .Values.zenithClient.description }}
10+
azimuth.stackhpc.com/service-description: {{ quote . }}
11+
{{- end }}
12+
spec:
13+
credentialSecretName: {{ include "ragflow-azimuth.fullname" . }}-credential

helm-azimuth/values.schema.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "http://json-schema.org/schema#",
3+
"type": "object",
4+
"properties": {
5+
"ragflow": {
6+
"type": "object",
7+
"properties": {
8+
"env": {
9+
"type": "object",
10+
"properties": {
11+
"MYSQL_PASSWORD": {
12+
"type": "string"
13+
},
14+
"MINIO_PASSWORD": {
15+
"type": "string"
16+
},
17+
"REDIS_PASSWORD": {
18+
"type": "string"
19+
},
20+
"ELASTIC_PASSWORD": {
21+
"type": "string"
22+
}
23+
},
24+
"required": ["MYSQL_PASSWORD", "MINIO_PASSWORD", "REDIS_PASSWORD", "ELASTIC_PASSWORD"]
25+
}
26+
},
27+
"required": ["env"]
28+
}
29+
},
30+
"required": ["ragflow"]
31+
}

0 commit comments

Comments
 (0)