Skip to content

Commit b1a2bf1

Browse files
authored
TEAMENG-824: add helm charts for AI and discovery satellites
2 parents fd02846 + 2b0a70f commit b1a2bf1

File tree

15 files changed

+412
-0
lines changed

15 files changed

+412
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This repository contains Helm Charts to deploy Formal on your Kubernetes cluster
1313
| Charts | Description |
1414
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
1515
| [connector](charts/connector) | Formal Connector base Helm chart. |
16+
| [data-discovery-satellite](charts/data-discovery-satellite) | Data Discovery Satellite Helm chart. |
17+
| [ai-satellite](charts/ai-satellite) | AI Satellite Helm chart (requires NVIDIA GPU). |
1618
| [ecr-cred](charts/ecr-cred) | ECR credentials job. Required for non-AWS environments. Requires `pullWithCredentials=true` in the Connector Helm chart values. |
1719

1820
## Using the Helm Repository
@@ -41,6 +43,13 @@ Finally, install the Connector chart using:
4143
$ helm install formal-connector formal/connector -f values.yaml
4244
```
4345

46+
The satellites can be installed similarly:
47+
48+
```
49+
$ helm install formal-data-discovery-satellite formal/data-discovery-satellite -f values.yaml
50+
$ helm install formal-ai-satellite formal/ai-satellite -f values.yaml
51+
```
52+
4453
## Questions
4554

4655
Our team always welcomes any and all questions -- don't hesitate to reach out to a team member directly.

charts/ai-satellite/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: ai-satellite
3+
description: The Formal AI Satellite serves AI features and inference inside your environment.
4+
type: application
5+
version: 0.10.0
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "ai-satellite.name" -}}
5+
{{- printf "formal-%s" (default .Chart.Name .Values.nameOverride | trunc 57 | 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 "ai-satellite.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- printf "formal-%s" (.Values.fullnameOverride | trunc 57 | trimSuffix "-") }}
16+
{{- else }}
17+
{{- printf "formal-ai-satellite" }}
18+
{{- end }}
19+
{{- end }}
20+
21+
{{/*
22+
Create chart name and version as used by the chart label.
23+
*/}}
24+
{{- define "ai-satellite.chart" -}}
25+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
26+
{{- end }}
27+
28+
{{/*
29+
Common labels
30+
*/}}
31+
{{- define "ai-satellite.labels" -}}
32+
helm.sh/chart: {{ include "ai-satellite.chart" . }}
33+
{{ include "ai-satellite.selectorLabels" . }}
34+
{{- if .Chart.AppVersion }}
35+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
36+
{{- end }}
37+
app.kubernetes.io/managed-by: {{ .Release.Service }}
38+
{{- end }}
39+
40+
{{/*
41+
Selector labels
42+
*/}}
43+
{{- define "ai-satellite.selectorLabels" -}}
44+
app.kubernetes.io/name: {{ include "ai-satellite.name" . }}
45+
app.kubernetes.io/instance: {{ .Release.Name }}
46+
{{- end }}
47+
48+
{{/*
49+
Create the name of the service account to use
50+
*/}}
51+
{{- define "ai-satellite.serviceAccountName" -}}
52+
{{- if .Values.serviceAccount.name }}
53+
{{- .Values.serviceAccount.name }}
54+
{{- else if .Values.serviceAccount.create }}
55+
{{- include "ai-satellite.fullname" . }}
56+
{{- else }}
57+
{{- fail "Cannot determine service account name. Either set serviceAccount.create=true or provide serviceAccount.name" }}
58+
{{- end }}
59+
{{- end }}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "ai-satellite.fullname" . }}
5+
labels:
6+
{{- include "ai-satellite.labels" . | nindent 4 }}
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
{{- include "ai-satellite.selectorLabels" . | nindent 6 }}
12+
template:
13+
metadata:
14+
labels:
15+
{{- include "ai-satellite.selectorLabels" . | nindent 8 }}
16+
{{- with .Values.podLabels }}
17+
{{- toYaml . | nindent 8 }}
18+
{{- end }}
19+
annotations:
20+
{{- with .Values.podAnnotations }}
21+
{{- toYaml . | nindent 8 }}
22+
{{- end }}
23+
spec:
24+
securityContext:
25+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
26+
containers:
27+
- name: {{ .Chart.Name }}
28+
securityContext:
29+
{{- toYaml .Values.securityContext | nindent 12 }}
30+
{{- if .Values.image.digest }}
31+
image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
32+
{{- else }}
33+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
34+
{{- end }}
35+
imagePullPolicy: {{ .Values.image.pullPolicy }}
36+
ports:
37+
- name: grpc
38+
containerPort: 50055
39+
- name: health
40+
containerPort: 8080
41+
env:
42+
- name: FORMAL_CONTROL_PLANE_API_KEY
43+
valueFrom:
44+
secretKeyRef:
45+
name: {{ include "ai-satellite.fullname" . }}
46+
key: formal-api-key
47+
{{- range $key, $value := .Values.env }}
48+
- name: {{ $key }}
49+
value: {{ $value | quote }}
50+
{{- end }}
51+
resources:
52+
{{- toYaml .Values.resources | nindent 12 }}
53+
{{- with .Values.sidecars }}
54+
{{- toYaml . | nindent 8 }}
55+
{{- end }}
56+
{{- if .Values.pullWithCredentials }}
57+
imagePullSecrets:
58+
- name: formal-ecr-secret
59+
{{- end }}
60+
{{- with .Values.tolerations }}
61+
tolerations:
62+
{{- toYaml . | nindent 8 }}
63+
{{- end }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{- range .Values.extraManifests }}
2+
---
3+
{{ toYaml . }}
4+
{{- end }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if .Values.formalAPIKey }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: {{ include "ai-satellite.fullname" . }}
6+
labels:
7+
{{- include "ai-satellite.labels" . | nindent 4 }}
8+
type: Opaque
9+
data:
10+
formal-api-key: {{ .Values.formalAPIKey | b64enc }}
11+
{{- end }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "ai-satellite.fullname" . }}
5+
labels:
6+
{{- include "ai-satellite.labels" . | nindent 4 }}
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- port: 50055
11+
targetPort: grpc
12+
protocol: TCP
13+
name: grpc
14+
- port: 8080
15+
targetPort: health
16+
protocol: TCP
17+
name: health
18+
selector:
19+
{{- include "ai-satellite.selectorLabels" . | nindent 4 }}

charts/ai-satellite/values.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
nameOverride: ""
2+
fullnameOverride: ""
3+
4+
# API key for the AI Satellite configured in Formal Control Plane
5+
formalAPIKey: ""
6+
7+
# Set to true if you're deploying outside AWS and use the ECR
8+
# credentials job (ecr-cred Helm chart) to fetch ECR credentials
9+
pullWithCredentials: false
10+
11+
image:
12+
repository: 654654333078.dkr.ecr.us-east-1.amazonaws.com/formalco-prod-ai-satellite
13+
pullPolicy: Always
14+
tag: "latest"
15+
16+
replicaCount: 1
17+
resources:
18+
requests:
19+
cpu: 4
20+
memory: 8Gi
21+
nvidia.com/gpu: 1
22+
limits:
23+
cpu: 8
24+
memory: 16Gi
25+
# Requires a NVIDIA GPU with at least 48GB VRAM.
26+
nvidia.com/gpu: 1
27+
28+
securityContext: {}
29+
podSecurityContext: {}
30+
env: {}
31+
podAnnotations:
32+
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
33+
tolerations: []
34+
35+
# Extra manifests to deploy as an array of objects
36+
extraManifests: []
37+
# - apiVersion: v1
38+
# kind: ConfigMap
39+
# metadata:
40+
# name: example-configmap
41+
# data:
42+
# key: value
43+
44+
# Additional containers to run in the same pod as the main satellite container
45+
sidecars: []
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: data-discovery-satellite
3+
description: The Formal Data Discovery Satellite indexes the schemas of datastores within your environment.
4+
type: application
5+
version: 0.1.0
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "data-discovery-satellite.name" -}}
5+
{{- printf "formal-%s" (default .Chart.Name .Values.nameOverride | trunc 57 | 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 "data-discovery-satellite.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- printf "formal-%s" (.Values.fullnameOverride | trunc 57 | trimSuffix "-") }}
16+
{{- else }}
17+
{{- printf "formal-data-discovery-satellite" }}
18+
{{- end }}
19+
{{- end }}
20+
21+
{{/*
22+
Create chart name and version as used by the chart label.
23+
*/}}
24+
{{- define "data-discovery-satellite.chart" -}}
25+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
26+
{{- end }}
27+
28+
{{/*
29+
Common labels
30+
*/}}
31+
{{- define "data-discovery-satellite.labels" -}}
32+
helm.sh/chart: {{ include "data-discovery-satellite.chart" . }}
33+
{{ include "data-discovery-satellite.selectorLabels" . }}
34+
{{- if .Chart.AppVersion }}
35+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
36+
{{- end }}
37+
app.kubernetes.io/managed-by: {{ .Release.Service }}
38+
{{- end }}
39+
40+
{{/*
41+
Selector labels
42+
*/}}
43+
{{- define "data-discovery-satellite.selectorLabels" -}}
44+
app.kubernetes.io/name: {{ include "data-discovery-satellite.name" . }}
45+
app.kubernetes.io/instance: {{ .Release.Name }}
46+
{{- end }}
47+
48+
{{/*
49+
Create the name of the service account to use
50+
*/}}
51+
{{- define "data-discovery-satellite.serviceAccountName" -}}
52+
{{- if .Values.serviceAccount.name }}
53+
{{- .Values.serviceAccount.name }}
54+
{{- else if .Values.serviceAccount.create }}
55+
{{- include "data-discovery-satellite.fullname" . }}
56+
{{- else }}
57+
{{- fail "Cannot determine service account name. Either set serviceAccount.create=true or provide serviceAccount.name" }}
58+
{{- end }}
59+
{{- end }}

0 commit comments

Comments
 (0)