Skip to content

Commit

Permalink
feat(mlp, merlin): Add extra deployment configuration to MLP and Merl…
Browse files Browse the repository at this point in the history
…in Mlflow chart (#426)
  • Loading branch information
deadlycoconuts authored Dec 17, 2024
1 parent fb169ee commit d36445f
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chart-bumper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.13.1

- name: install pyaml
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.13.1

- name: Set up chart-testing
uses: helm/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.13.1

- name: Set up chart-testing
uses: helm/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/merlin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ maintainers:
- email: [email protected]
name: caraml-dev
name: merlin
version: 0.13.19
version: 0.13.20
2 changes: 1 addition & 1 deletion charts/merlin/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# merlin

---
![Version: 0.13.19](https://img.shields.io/badge/Version-0.13.19-informational?style=flat-square)
![Version: 0.13.20](https://img.shields.io/badge/Version-0.13.20-informational?style=flat-square)
![AppVersion: v0.42.0](https://img.shields.io/badge/AppVersion-v0.42.0-informational?style=flat-square)

Kubernetes-friendly ML model management, deployment, and serving.
Expand Down
9 changes: 6 additions & 3 deletions charts/merlin/templates/merlin-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ rules:
resources:
- inferenceservices
- predictors
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
- apiGroups:
- networking.istio.io
resources:
- virtualservices
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
- apiGroups:
- sparkoperator.k8s.io
resources:
- sparkapplications
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
{{- end }}
20 changes: 18 additions & 2 deletions charts/merlin/templates/mlflow-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,27 @@ spec:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/gcp_service_account/service-account.json
{{- end }}
{{- with .Values.mlflow.extraEnvs }}
{{- toYaml . | nindent 8 }}
{{- end }}

{{- if .Values.gcpServiceAccount }}
{{- if or .Values.gcpServiceAccount .Values.mlflow.extraVolumeMounts }}
volumeMounts:
{{- end }}
{{- if .Values.gcpServiceAccount }}
- name: gcp-service-account
mountPath: "/etc/gcp_service_account"
readOnly: true
{{- end }}
{{- with .Values.mlflow.extraVolumeMounts }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.mlflowExternalPostgresql.enableProxySidecar }}
{{- tpl (toYaml (index .Values.mlflowExternalPostgresql.sidecarSpec .Values.mlflowExternalPostgresql.proxyType "spec")) . | nindent 6 }}
{{- end }}
{{- with .Values.mlflow.extraContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.mlflow.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.mlflow.imagePullSecrets | indent 6 }}
Expand All @@ -103,15 +114,20 @@ spec:
{{- if and .Values.mlflow.serviceAccount.create }}
serviceAccountName: {{ default "mlflow" .Values.mlflow.serviceAccount.name }}
{{- end }}
{{- if .Values.gcpServiceAccount }}
{{- if or .Values.gcpServiceAccount .Values.mlflow.extraVolumes }}
volumes:
{{- end }}
{{- if .Values.gcpServiceAccount }}
- name: gcp-service-account
secret:
secretName: {{ .Values.gcpServiceAccount.secretName }}
items:
- key: {{ .Values.gcpServiceAccount.secretKey }}
path: service-account.json
{{- end }}
{{- with .Values.mlflow.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.mlflow.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/mlp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ maintainers:
- email: [email protected]
name: caraml-dev
name: mlp
version: 0.6.5
version: 0.6.6
2 changes: 1 addition & 1 deletion charts/mlp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mlp

![Version: 0.6.5](https://img.shields.io/badge/Version-0.6.5-informational?style=flat-square) ![AppVersion: v1.10.0](https://img.shields.io/badge/AppVersion-v1.10.0-informational?style=flat-square)
![Version: 0.6.6](https://img.shields.io/badge/Version-0.6.6-informational?style=flat-square) ![AppVersion: v1.10.0](https://img.shields.io/badge/AppVersion-v1.10.0-informational?style=flat-square)

MLP API

Expand Down
16 changes: 14 additions & 2 deletions charts/mlp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ spec:
- serve
- --config
- /etc/caraml/mlp-config.yaml
{{- if .Values.deployment.args }}
{{ toYaml .Values.deployment.args | indent 12 -}}
{{- if .Values.deployment.extraArgs }}
{{ toYaml .Values.deployment.extraArgs | indent 12 -}}
{{ end }}
{{- if .Values.deployment.command }}
command:
Expand All @@ -77,11 +77,20 @@ spec:
secretKeyRef:
name: {{ include "common.postgres-password-secret-name" (list .Values.postgresql .Values.externalPostgresql .Release .Chart ) }}
key: {{ include "common.postgres-password-secret-key" (list .Values.externalPostgresql) }}
{{- with .Values.deployment.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /etc/caraml
name: config
{{- with .Values.deployment.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.externalPostgresql.enableProxySidecar }}
{{- tpl (toYaml (index .Values.externalPostgresql.sidecarSpec .Values.externalPostgresql.proxyType "spec")) . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.serviceAccount.create }}
serviceAccountName: {{ default "mlp" .Values.serviceAccount.name }}
Expand All @@ -99,6 +108,9 @@ spec:
- name: config
configMap:
name: {{ template "mlp.config-cm-name" . }}
{{- with .Values.deployment.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/turing/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ maintainers:
- email: [email protected]
name: caraml-dev
name: turing
version: 0.3.22
version: 0.3.23
2 changes: 1 addition & 1 deletion charts/turing/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# turing

---
![Version: 0.3.22](https://img.shields.io/badge/Version-0.3.22-informational?style=flat-square)
![Version: 0.3.23](https://img.shields.io/badge/Version-0.3.23-informational?style=flat-square)
![AppVersion: v1.17.2](https://img.shields.io/badge/AppVersion-v1.17.2-informational?style=flat-square)

Kubernetes-friendly multi-model orchestration and experimentation system.
Expand Down
9 changes: 6 additions & 3 deletions charts/turing/templates/turing-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@ rules:
- serving.knative.dev
resources:
- services
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
- apiGroups:
- networking.istio.io
resources:
- virtualservices
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
- apiGroups:
- sparkoperator.k8s.io
resources:
- sparkapplications
verbs: ["get", "create", "delete", "update"]
verbs:
- "*"
{{- end }}

0 comments on commit d36445f

Please sign in to comment.