Skip to content

Commit c75f08a

Browse files
committed
Refactor metaflow charts with no functional changes
1 parent 975445d commit c75f08a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+532
-316
lines changed

.github/workflows/publish_helm_charts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
- name: Run chart-releaser
3030
uses: helm/[email protected]
3131
with:
32-
charts_dir: k8s/helm/metaflow
32+
charts_dir: charts/metaflow
3333
env:
3434
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

charts/metaflow/.DS_Store

6 KB
Binary file not shown.
File renamed without changes.

charts/metaflow/Chart.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: v2
2+
appVersion: v2.4.13
3+
dependencies:
4+
- name: metaflow-service
5+
repository: ""
6+
version: 0.2.0
7+
condition: metaflow-service.enabled
8+
- name: metaflow-ui
9+
repository: ""
10+
version: 0.3.0
11+
condition: metaflow-ui.enabled
12+
- name: postgresql
13+
repository: https://charts.bitnami.com/bitnami
14+
version: "^14"
15+
condition: postgresql.enabled
16+
description: Machine Learning platform
17+
home: https://metaflow.org
18+
keywords:
19+
- mlops
20+
- metaflow
21+
- metadata service
22+
- metaflow ui
23+
name: metaflow
24+
sources:
25+
- https://github.com/Netflix/metaflow
26+
- https://github.com/outerbounds/metaflow-tools
27+
type: application
28+
version: 0.0.2
File renamed without changes.

charts/metaflow/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Helm Chart for Metaflow Services
2+
3+
This Helm chart provides a comprehensive deployment solution for Metaflow Services in a Kubernetes cluster. It includes three main components:
4+
5+
* Metaflow Metadata Service - Manages workflow metadata and execution state
6+
* Metaflow UI (Frontend and Backend) - Provides web-based visualization and monitoring
7+
* PostgreSQL Database - Stores metadata for Metaflow services
8+
9+
While the included PostgreSQL sub-chart enables quick evaluation and development setups, for production environments we strongly recommend using a managed PostgreSQL service (like AWS RDS). To use an external database, disable the PostgreSQL sub-chart by setting `postgresql.enabled: false`.
10+

k8s/helm/metaflow/charts/metaflow-ui/.helmignore renamed to charts/metaflow/charts/metaflow-service/.helmignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# This supports shell glob matching, relative path matching, and
33
# negation (prefixed with !). Only one pattern per line.
44
.DS_Store
5+
Thumbs.db
6+
ehthumbs.db
7+
58
# Common VCS dirs
69
.git/
710
.gitignore
@@ -10,14 +13,40 @@
1013
.hg/
1114
.hgignore
1215
.svn/
16+
1317
# Common backup files
1418
*.swp
1519
*.bak
1620
*.tmp
1721
*.orig
1822
*~
23+
1924
# Various IDEs
2025
.project
2126
.idea/
2227
*.tmproj
2328
.vscode/
29+
*.suo
30+
*.user
31+
*.userossc
32+
*.sln.docstates
33+
34+
# Logs
35+
*.log
36+
37+
# Node.js
38+
node_modules/
39+
npm-debug.log
40+
yarn-error.log
41+
42+
# Python
43+
__pycache__/
44+
*.py[cod]
45+
*.pyo
46+
*.pyd
47+
.Python
48+
env/
49+
venv/
50+
ENV/
51+
env.bak/
52+
venv.bak/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v2
2+
appVersion: v2.4.13
3+
description: A Helm chart to deploy Metadata Service for Metaflow
4+
name: metaflow-service
5+
type: application
6+
version: 0.2.0
7+
maintainers:
8+
- name: Savin Goyal
9+
10+
- name: Oleg Avdeev
11+
12+
keywords:
13+
- metaflow
14+
- metadata
15+
- service
16+
sources:
17+
- https://github.com/Netflix/metaflow
18+
- https://github.com/outerbounds/metaflow-tools
19+
icon: https://metaflow.org/images/metaflow.svg
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
1. Get the application URL by running these commands:
22
{{- if .Values.ingress.enabled }}
3-
{{- range $host := .Values.ingress.hosts }}
4-
{{- range .paths }}
5-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
3+
{{- range $host := .Values.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
6+
{{- end }}
67
{{- end }}
7-
{{- end }}
88
{{- else if contains "NodePort" .Values.service.type }}
99
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "metaflow-service.fullname" . }})
1010
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11-
echo http://$NODE_IP:$NODE_PORT
11+
if [ -z "$NODE_PORT" ] || [ -z "$NODE_IP" ]; then
12+
echo "Error: Unable to retrieve NodePort or Node IP."
13+
else
14+
echo http://$NODE_IP:$NODE_PORT
15+
fi
1216
{{- else if contains "LoadBalancer" .Values.service.type }}
13-
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14-
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "metaflow-service.fullname" . }}'
17+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
18+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "metaflow-service.fullname" . }}'
1519
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "metaflow-service.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16-
echo http://$SERVICE_IP:{{ .Values.service.port }}
20+
if [ -z "$SERVICE_IP" ]; then
21+
echo "Error: Unable to retrieve LoadBalancer IP."
22+
else
23+
echo http://$SERVICE_IP:{{ .Values.service.port }}
24+
fi
1725
{{- else if contains "ClusterIP" .Values.service.type }}
1826
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "metaflow-service.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
1927
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20-
echo "Visit http://127.0.0.1:8080 to use your application"
21-
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
28+
if [ -z "$POD_NAME" ] || [ -z "$CONTAINER_PORT" ]; then
29+
echo "Error: Unable to retrieve Pod name or Container port."
30+
else
31+
echo "Visit http://127.0.0.1:8080 to use your application"
32+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
33+
fi
2234
{{- end }}

0 commit comments

Comments
 (0)