Skip to content

Commit 0dd1042

Browse files
initial version
1 parent f8dd53a commit 0dd1042

15 files changed

Lines changed: 1272 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# activeloop-helm-charts
2-
Official Helm charts for deploying Activeloop services on Kubernetes
2+
3+
```bash
4+
helm repo add activeloop https://charts.activeloop.ai
5+
helm repo update activeloop
6+
```

activeloop-neohorizon/.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/

activeloop-neohorizon/Chart.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v2
2+
name: activeloop-neohorizon
3+
description: Activeloop NeoHorizon Deployment Chart
4+
type: application
5+
version: 0.1.0
6+
appVersion: "v0.0.4"
7+
kubeVersion: ">= 1.24.0-0 <= 1.33.0-0"
8+
9+
maintainers:
10+
- name: Activeloop SRE
11+
email: sre@activeloop.dev
12+
13+
sources:
14+
- https://github.com/activeloopai/activeloop-helm-charts
15+
home: https://activeloop.ai
16+
icon: https://static.activeloop.io/logos/SVG/activeloop-logo-256x256.svg
17+
18+
keywords:
19+
- activeloop
20+
- neohorizon
21+
- deeplake
22+
23+
dependencies:
24+
- name: postgresql
25+
version: 16.7.16
26+
repository: oci://registry-1.docker.io/bitnamicharts
27+
condition: postgresql.create
28+
29+
- name: rabbitmq
30+
version: 16.0.10
31+
repository: oci://registry-1.docker.io/bitnamicharts
32+
condition: rabbitmq.create
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
Thank you for installing the Activeloop NeoHorizon Helm chart!
2+
3+
To access your deployed APIs, follow the instructions below for each enabled API:
4+
5+
{{- range $api := .Values.apis }}
6+
{{- if $api.enabled }}
7+
--------------------------------------------------------------------------------
8+
API: {{ $api.name }}
9+
10+
{{- if $api.ingress.enabled }}
11+
Ingress is enabled for this API.
12+
Access it at:
13+
{{- range $host := $api.ingress.hosts }}
14+
{{- range $path := $host.paths }}
15+
http{{ if $api.ingress.tls }}s{{ end }}://{{ $host.host }}{{ $path.path }}
16+
{{- end }}
17+
{{- end }}
18+
{{- else if eq ($api.service.type | default "ClusterIP") "NodePort" }}
19+
NodePort service is enabled.
20+
Run the following to get the service URL:
21+
export NODE_PORT=$(kubectl get --namespace {{ include "final.namespace" $ }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ printf "%s-%s-svc" (include "final.namespace" $) $api.name }})
22+
export NODE_IP=$(kubectl get nodes --namespace {{ include "final.namespace" $ }} -o jsonpath="{.items[0].status.addresses[0].address}")
23+
echo http://$NODE_IP:$NODE_PORT
24+
{{- else if eq ($api.service.type | default "ClusterIP") "LoadBalancer" }}
25+
LoadBalancer service is enabled.
26+
It may take a few minutes for the external IP to be available.
27+
Watch status with:
28+
kubectl get --namespace {{ include "final.namespace" $ }} svc -w {{ printf "%s-%s-svc" (include "final.namespace" $) $api.name }}
29+
Once ready, get the external IP and access the service:
30+
export SERVICE_IP=$(kubectl get svc --namespace {{ include "final.namespace" $ }} {{ printf "%s-%s-svc" (include "final.namespace" $) $api.name }} -o jsonpath="{.status.loadBalancer.ingress[0].ip}")
31+
echo http://$SERVICE_IP:{{ $api.service.port | default 80 }}
32+
{{- else }}
33+
ClusterIP service is enabled.
34+
To access the API locally, run:
35+
export POD_NAME=$(kubectl get pods --namespace {{ include "final.namespace" $ }} -l "app.kubernetes.io/name={{ $api.name }},app.kubernetes.io/instance={{ $.Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
36+
export CONTAINER_PORT={{ $api.port | default 8000 }}
37+
kubectl --namespace {{ include "final.namespace" $ }} port-forward $POD_NAME 8080:$CONTAINER_PORT
38+
Then visit: http://127.0.0.1:8080
39+
{{- end }}
40+
--------------------------------------------------------------------------------
41+
{{- end }}
42+
{{- end }}
43+
44+
For troubleshooting, check the status of your pods:
45+
kubectl get pods --namespace {{ include "final.namespace" $ }}
46+
47+
For logs:
48+
kubectl logs --namespace {{ include "final.namespace" $ }} <pod-name>
49+
50+
Thank you for using Activeloop NeoHorizon!
51+
52+
________ ________ _________ ___ ___ ___ _______ ___ ________ ________ ________
53+
|\ __ \ |\ ____\ |\___ ___\ |\ \ |\ \ / /||\ ___ \ |\ \ |\ __ \ |\ __ \ |\ __ \
54+
\ \ \|\ \ \ \ \___| \|___ \ \_| \ \ \ \ \ \ / / /\ \ __/| \ \ \ \ \ \|\ \ \ \ \|\ \ \ \ \|\ \
55+
\ \ __ \ \ \ \ \ \ \ \ \ \ \ \ \/ / / \ \ \_|/__ \ \ \ \ \ \\\ \ \ \ \\\ \ \ \ ____\
56+
\ \ \ \ \ \ \ \____ \ \ \ \ \ \ \ \ / / \ \ \_|\ \ \ \ \____ \ \ \\\ \ \ \ \\\ \ \ \ \___|
57+
\ \__\ \__\ \ \_______\ \ \__\ \ \__\ \ \__/ / \ \_______\ \ \_______\ \ \_______\ \ \_______\ \ \__\
58+
\|__|\|__| \|_______| \|__| \|__| \|__|/ \|_______| \|_______| \|_______| \|_______| \|__|
59+
60+
________ _______ ________ ___ ___ ________ ________ ___ ________ ________ ________
61+
|\ ___ \ |\ ___ \ |\ __ \ |\ \|\ \ |\ __ \ |\ __ \ |\ \ |\_____ \ |\ __ \ |\ ___ \
62+
\ \ \\ \ \ \ \ __/| \ \ \|\ \ \ \ \\\ \ \ \ \|\ \ \ \ \|\ \ \ \ \ \|___/ /| \ \ \|\ \ \ \ \\ \ \
63+
\ \ \\ \ \ \ \ \_|/__ \ \ \\\ \ \ \ __ \ \ \ \\\ \ \ \ _ _\ \ \ \ / / / \ \ \\\ \ \ \ \\ \ \
64+
\ \ \\ \ \ \ \ \_|\ \ \ \ \\\ \ \ \ \ \ \ \ \ \\\ \ \ \ \\ \| \ \ \ / /_/__ \ \ \\\ \ \ \ \\ \ \
65+
\ \__\\ \__\ \ \_______\ \ \_______\ \ \__\ \__\ \ \_______\ \ \__\\ _\ \ \__\ |\________\ \ \_______\ \ \__\\ \__\
66+
\|__| \|__| \|_______| \|_______| \|__|\|__| \|_______| \|__|\|__| \|__| \|_______| \|_______| \|__| \|__|
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "chart.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
{{- define "activeloop-neohorizon.name" -}}
8+
{{ include "chart.name" . }}
9+
{{- end }}
10+
11+
{{/*
12+
Create a default fully qualified app name.
13+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
14+
If release name contains chart name it will be used as a full name.
15+
*/}}
16+
{{- define "activeloop-neohorizon.fullname" -}}
17+
{{- if .Values.fullnameOverride }}
18+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
19+
{{- else }}
20+
{{- $name := default .Chart.Name .Values.nameOverride }}
21+
{{- if contains $name .Release.Name }}
22+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
23+
{{- else }}
24+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
25+
{{- end }}
26+
{{- end }}
27+
{{- end }}
28+
29+
{{/*
30+
Create chart name and version as used by the chart label.
31+
*/}}
32+
{{- define "activeloop-neohorizon.chart" -}}
33+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
34+
{{- end }}
35+
36+
{{/*
37+
Common labels
38+
*/}}
39+
{{- define "activeloop-neohorizon.labels" -}}
40+
helm.sh/chart: {{ include "activeloop-neohorizon.chart" . }}
41+
{{ include "activeloop-neohorizon.selectorLabels" . }}
42+
{{- if .Chart.AppVersion }}
43+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
44+
{{- end }}
45+
app.kubernetes.io/managed-by: {{ .Release.Service }}
46+
{{- end }}
47+
48+
{{/*
49+
Selector labels
50+
*/}}
51+
{{- define "activeloop-neohorizon.selectorLabels" -}}
52+
app.kubernetes.io/name: {{ include "activeloop-neohorizon.name" . }}
53+
app.kubernetes.io/instance: {{ .Release.Name }}
54+
{{- end }}
55+
56+
{{/*
57+
Create the name of the service account to use
58+
*/}}
59+
{{- define "activeloop-neohorizon.serviceAccountName" -}}
60+
{{- if .Values.serviceAccount.create }}
61+
{{- default (include "activeloop-neohorizon.fullname" .) .Values.serviceAccount.name }}
62+
{{- else }}
63+
{{- default "default" .Values.serviceAccount.name }}
64+
{{- end }}
65+
{{- end }}
66+
67+
{{/*
68+
Define the final namespace to be deployed into
69+
*/}}
70+
{{- define "final.namespace" -}}
71+
{{- $vals := $.Values | default dict }}
72+
{{- $global := get $vals "global" | default dict }}
73+
{{- get $global "namespace" | default $.Release.Namespace }}
74+
{{- end }}
75+
76+
{{/* Return RabbitMQ connection string */}}
77+
{{- define "activeloop-neohorizon.rabbitmqConnection" -}}
78+
{{- if .Values.global.env.rabbitmqConnection }}
79+
{{ .Values.global.env.rabbitmqConnection }}
80+
{{- else if .Values.rabbitmq.create }}
81+
amqp://{{ .Values.rabbitmq.auth.username }}:{{ .Values.rabbitmq.auth.password }}@{{ .Release.Name }}-rabbitmq.{{ include "final.namespace" $ }}:5672/
82+
{{- else }}
83+
"" {{/* fallback */}}
84+
{{- end }}
85+
{{- end }}
86+
87+
{{/* Return PostgreSQL connection string */}}
88+
{{- define "activeloop-neohorizon.postgresqlHost" -}}
89+
{{- if .Values.global.env.POSTGRES_HOST }}
90+
{{ .Values.global.env.POSTGRES_HOST }}
91+
{{- else if .Values.postgresql.create }}
92+
{{ .Release.Name }}-postgresql.{{ include "final.namespace" $ }}
93+
{{- else }}
94+
"" {{/* fallback */}}
95+
{{- end }}
96+
{{- end }}
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
{{- range $api := .Values.apis }}
2+
{{- if $api.enabled }}
3+
---
4+
apiVersion: apps/v1
5+
kind: Deployment
6+
metadata:
7+
name: {{ printf "%s-%s" (include "chart.name" $) $api.name }}
8+
namespace: {{ $.Values.global.namespace | default $.Release.Namespace }}
9+
labels:
10+
app.kubernetes.io/name: {{ $api.name }}
11+
app.kubernetes.io/component: api
12+
app.kubernetes.io/instance: {{ $.Release.Name }}
13+
app.kubernetes.io/managed-by: {{ $.Release.Service }}
14+
app.kubernetes.io/part-of: {{ include "chart.name" $ }}
15+
helm.sh/chart: {{ $.Chart.Name }}
16+
{{- with $api.labels }}
17+
{{- toYaml . | nindent 4 }}
18+
{{- end }}
19+
{{- with $api.annotations }}
20+
annotations:
21+
{{- toYaml . | nindent 4 }}
22+
{{- end }}
23+
spec:
24+
replicas: {{ $api.replicas | default 1 }}
25+
{{- with $api.strategy }}
26+
strategy:
27+
{{- toYaml . | nindent 4 }}
28+
{{- end }}
29+
selector:
30+
matchLabels:
31+
app.kubernetes.io/name: {{ $api.name }}
32+
app.kubernetes.io/component: api
33+
app.kubernetes.io/instance: {{ $.Release.Name }}
34+
35+
template:
36+
metadata:
37+
labels:
38+
app.kubernetes.io/name: {{ $api.name }}
39+
app.kubernetes.io/component: api
40+
app.kubernetes.io/instance: {{ $.Release.Name }}
41+
app.kubernetes.io/managed-by: {{ $.Release.Service }}
42+
app.kubernetes.io/part-of: {{ include "chart.name" $ }}
43+
helm.sh/chart: {{ $.Chart.Name }}
44+
{{- with $api.labels }}
45+
{{- toYaml . | nindent 8 }}
46+
{{- end }}
47+
{{- with $api.podAnnotations }}
48+
annotations:
49+
{{- toYaml . | nindent 8 }}
50+
{{- end }}
51+
52+
spec:
53+
serviceAccountName: {{ $api.serviceAccount.name | default "default" }}
54+
{{- with $api.imagePullSecrets }}
55+
imagePullSecrets:
56+
{{- toYaml . | nindent 8 }}
57+
{{- end }}
58+
59+
containers:
60+
- name: {{ $api.name }}
61+
{{- $image := get $api "image" | default dict }}
62+
image: "{{ get $image "registry" | default $.Values.global.image.registry }}/{{ get $image "repository" | default $.Values.global.image.repository }}:{{ get $image "tag" | default $.Values.global.image.tag | default $.Chart.AppVersion }}"
63+
imagePullPolicy: {{ $api.imagePullPolicy | default "IfNotPresent" }}
64+
65+
ports:
66+
- name: http
67+
containerPort: {{ $api.port | default 8000 }}
68+
protocol: TCP
69+
{{- with $api.additionalPorts }}
70+
{{- toYaml . | nindent 12 }}
71+
{{- end }}
72+
73+
{{- with $api.command }}
74+
command:
75+
{{- toYaml . | nindent 12 }}
76+
{{- end }}
77+
78+
{{- with $api.args }}
79+
args:
80+
{{- toYaml . | nindent 12 }}
81+
{{- end }}
82+
83+
{{- if or $.Values.global.env $api.env }}
84+
env:
85+
{{- with $.Values.global.env }}
86+
{{- range $key, $val := . }}
87+
- name: {{ $key }}
88+
value: {{ $val | quote }}
89+
{{- end }}
90+
{{- end }}
91+
{{- with $api.env }}
92+
{{- range . }}
93+
- name: {{ .name }}
94+
value: {{ .value | quote }}
95+
{{- end }}
96+
{{- end }}
97+
{{- end }}
98+
99+
{{- if or $api.envFrom (not (empty $.Values.global.env)) }}
100+
envFrom:
101+
- secretRef:
102+
name: {{ include "activeloop-neohorizon.fullname" $ }}-secrets
103+
{{- with $api.envFrom }}
104+
{{- toYaml . | nindent 12 }}
105+
{{- end }}
106+
{{- end }}
107+
108+
{{- with $api.probes }}
109+
{{- if .enabled }}
110+
{{- with .readinessProbe }}
111+
readinessProbe:
112+
{{- toYaml . | nindent 12 }}
113+
{{- end }}
114+
115+
{{- with .livenessProbe }}
116+
livenessProbe:
117+
{{- toYaml . | nindent 12 }}
118+
{{- end }}
119+
120+
{{- with .startupProbe }}
121+
startupProbe:
122+
{{- toYaml . | nindent 12 }}
123+
{{- end }}
124+
{{- end }}
125+
{{- end }} # closes “with $api.probes”
126+
127+
{{- with $api.resources }}
128+
resources:
129+
{{- toYaml . | nindent 12 }}
130+
{{- end }}
131+
132+
{{- with $api.securityContext | default $.Values.global.securityContext }}
133+
securityContext:
134+
{{- toYaml . | nindent 12 }}
135+
{{- end }}
136+
137+
{{- with $api.nodeSelector | default $.Values.global.nodeSelector }}
138+
nodeSelector:
139+
{{- toYaml . | nindent 8 }}
140+
{{- end }}
141+
142+
{{- with $api.affinity | default $.Values.global.affinity }}
143+
affinity:
144+
{{- toYaml . | nindent 8 }}
145+
{{- end }}
146+
147+
{{- with $api.tolerations | default $.Values.global.tolerations }}
148+
tolerations:
149+
{{- toYaml . | nindent 8 }}
150+
{{- end }}
151+
152+
{{- with $api.podSecurityContext | default $.Values.global.podSecurityContext }}
153+
securityContext:
154+
{{- toYaml . | nindent 8 }}
155+
{{- end }}
156+
{{- end }}
157+
{{- end }}

0 commit comments

Comments
 (0)