-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-pull charts in vessl package. (#55)
* Add pre-pull charts in vessl package. * Add newline in files. * Remove default registry. * Change chart name * Change chart value. * Change chart dir name. * Apply code review. * Add eod. * Change image pull policy to always.
- Loading branch information
Showing
7 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
name: image-prepull | ||
description: A Helm chart for pre-pulling images | ||
version: 0.1.0 | ||
type: application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{/* | ||
Truncate and clean image name for use in container names | ||
*/}} | ||
|
||
{{- define "imagePrepull.truncateImageName" -}} | ||
{{- $parts := splitList "/" . -}} | ||
{{- $name := last $parts -}} | ||
{{- $truncated := trunc 40 $name -}} | ||
{{- $cleaned := regexReplaceAll "[^a-zA-Z0-9-]" $truncated "-" -}} | ||
{{- $cleaned | lower -}} | ||
{{- end -}} |
33 changes: 33 additions & 0 deletions
33
charts/vessl/charts/image-prepull/templates/daemonset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ .Release.Name }}-image-prepull | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: image-prepull | ||
template: | ||
metadata: | ||
labels: | ||
app: image-prepull | ||
spec: | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
tolerations: | ||
- key: nvidia.com/gpu | ||
operator: Exists | ||
initContainers: | ||
{{- range .Values.images }} | ||
{{- $imageName := .name }} | ||
{{- range .tags }} | ||
- name: pull-{{ include "imagePrepull.truncateImageName" $imageName }}-{{ . | replace ":" "-" | replace "." "-" }} | ||
image: {{ $imageName }}:{{ . }} | ||
command: ['sh', '-c', 'echo Image {{ $imageName }}:{{ . }} pulled'] | ||
imagePullPolicy: {{ $.Values.imagePullPolicy }} | ||
{{- end }} | ||
{{- end }} | ||
containers: | ||
- name: pause | ||
image: k8s.gcr.io/pause:3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
images: | ||
- name: vllm/vllm-openai | ||
tags: | ||
- v0.5.2 | ||
- v0.5.1 | ||
- v0.5.0 | ||
- v0.4.3 | ||
- v0.4.2 | ||
- name: ghcr.io/huggingface/text-generation-inference | ||
tags: | ||
- 2.1.1 | ||
- 2.1.0 | ||
- 2.0.4 | ||
- 2.0.3 | ||
- 2.0.2 | ||
imagePullPolicy: Always | ||
nodeSelector: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters