Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Commit ff86e3e

Browse files
helm-feast-python-server add feast-python-server helm chart (feast-dev#2177)
Signed-off-by: Michelle Rascati <[email protected]>
1 parent 89eb3a5 commit ff86e3e

File tree

7 files changed

+291
-0
lines changed

7 files changed

+291
-0
lines changed
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/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: feast-python-server
3+
description: Feast Feature Server in Python
4+
type: application
5+
version: 0.1.0
6+
keywords:
7+
- machine learning
8+
- big data
9+
- mlops
10+
home: https://feast.dev/
11+
sources:
12+
- https://github.com/feast-dev/feast
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# feast-python-server
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
Feast Feature Server in Python
6+
7+
**Homepage:** <https://feast.dev/>
8+
9+
## Source Code
10+
11+
* <https://github.com/feast-dev/feast>
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|-----|------|---------|-------------|
17+
| affinity | object | `{}` | |
18+
| fullnameOverride | string | `""` | |
19+
| image.pullPolicy | string | `"IfNotPresent"` | |
20+
| image.repository | string | `""` | [required] The repository for the Docker image |
21+
| image.tag | string | `""` | [required] The Docker image tag |
22+
| imagePullSecrets | list | `[]` | |
23+
| livenessProbe.initialDelaySeconds | int | `30` | |
24+
| livenessProbe.periodSeconds | int | `30` | |
25+
| nameOverride | string | `""` | |
26+
| nodeSelector | object | `{}` | |
27+
| podAnnotations | object | `{}` | |
28+
| podSecurityContext | object | `{}` | |
29+
| readinessProbe.initialDelaySeconds | int | `20` | |
30+
| readinessProbe.periodSeconds | int | `10` | |
31+
| replicaCount | int | `1` | |
32+
| resources | object | `{}` | |
33+
| securityContext | object | `{}` | |
34+
| service.port | int | `80` | |
35+
| service.type | string | `"ClusterIP"` | |
36+
| tolerations | list | `[]` | |
37+
38+
----------------------------------------------
39+
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
40+
41+
42+
Docker repository and tag are required. Helm install example:
43+
```
44+
helm install feast-python-server . --set image.repository=REPO --set image.tag=TAG
45+
```
46+
47+
Deployment assumes that `feature_store.yaml` exists on docker image. Example docker image:
48+
```
49+
FROM python:3.7
50+
51+
RUN apt update && \
52+
apt install -y jq
53+
54+
RUN pip install pip --upgrade
55+
56+
RUN pip install feast
57+
58+
COPY feature_store.yaml /feature_store.yaml
59+
```
60+
61+
Make sure that you have enabled the flags for the python server. Example `feature_store.yaml`:
62+
```
63+
project: feature_repo
64+
registry: data/registry.db
65+
provider: local
66+
online_store:
67+
path: data/online_store.db
68+
flags:
69+
alpha_features: true
70+
python_feature_server: true
71+
```
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "feast-python-server.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7+
{{- end }}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "feast-python-server.fullname" -}}
15+
{{- if .Values.fullnameOverride }}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17+
{{- else }}
18+
{{- $name := default .Chart.Name .Values.nameOverride }}
19+
{{- if contains $name .Release.Name }}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21+
{{- else }}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "feast-python-server.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "feast-python-server.labels" -}}
38+
helm.sh/chart: {{ include "feast-python-server.chart" . }}
39+
{{ include "feast-python-server.selectorLabels" . }}
40+
{{- if .Chart.AppVersion }}
41+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42+
{{- end }}
43+
app.kubernetes.io/managed-by: {{ .Release.Service }}
44+
{{- end }}
45+
46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "feast-python-server.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "feast-python-server.name" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- end }}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "feast-python-server.fullname" . }}
5+
labels:
6+
{{- include "feast-python-server.labels" . | nindent 4 }}
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
{{- include "feast-python-server.selectorLabels" . | nindent 6 }}
12+
template:
13+
metadata:
14+
{{- with .Values.podAnnotations }}
15+
annotations:
16+
{{- toYaml . | nindent 8 }}
17+
{{- end }}
18+
labels:
19+
{{- include "feast-python-server.selectorLabels" . | nindent 8 }}
20+
spec:
21+
{{- with .Values.imagePullSecrets }}
22+
imagePullSecrets:
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
securityContext:
26+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
27+
containers:
28+
- name: {{ .Chart.Name }}
29+
securityContext:
30+
{{- toYaml .Values.securityContext | nindent 12 }}
31+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
32+
imagePullPolicy: {{ .Values.image.pullPolicy }}
33+
command: ["feast", "serve", "-h", "0.0.0.0"]
34+
ports:
35+
- name: http
36+
containerPort: 6566
37+
protocol: TCP
38+
livenessProbe:
39+
tcpSocket:
40+
port: http
41+
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
42+
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
43+
readinessProbe:
44+
tcpSocket:
45+
port: http
46+
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
47+
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
48+
resources:
49+
{{- toYaml .Values.resources | nindent 12 }}
50+
{{- with .Values.nodeSelector }}
51+
nodeSelector:
52+
{{- toYaml . | nindent 8 }}
53+
{{- end }}
54+
{{- with .Values.affinity }}
55+
affinity:
56+
{{- toYaml . | nindent 8 }}
57+
{{- end }}
58+
{{- with .Values.tolerations }}
59+
tolerations:
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "feast-python-server.name" . }}
5+
labels:
6+
{{- include "feast-python-server.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
selector:
15+
{{- include "feast-python-server.selectorLabels" . | nindent 4 }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Default values for feast.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
replicaCount: 1
6+
7+
image:
8+
repository: ""
9+
pullPolicy: IfNotPresent
10+
tag: ""
11+
12+
imagePullSecrets: []
13+
nameOverride: ""
14+
fullnameOverride: ""
15+
16+
podAnnotations: {}
17+
18+
podSecurityContext: {}
19+
# fsGroup: 2000
20+
21+
securityContext: {}
22+
# capabilities:
23+
# drop:
24+
# - ALL
25+
# readOnlyRootFilesystem: true
26+
# runAsNonRoot: true
27+
# runAsUser: 1000
28+
29+
service:
30+
type: ClusterIP
31+
port: 80
32+
33+
resources: {}
34+
# We usually recommend not to specify default resources and to leave this as a conscious
35+
# choice for the user. This also increases chances charts run on environments with little
36+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
37+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
38+
# limits:
39+
# cpu: 100m
40+
# memory: 128Mi
41+
# requests:
42+
# cpu: 100m
43+
# memory: 128Mi
44+
45+
nodeSelector: {}
46+
47+
tolerations: []
48+
49+
affinity: {}
50+
51+
livenessProbe:
52+
initialDelaySeconds: 30
53+
periodSeconds: 30
54+
55+
readinessProbe:
56+
initialDelaySeconds: 20
57+
periodSeconds: 10

0 commit comments

Comments
 (0)