Skip to content

Commit 8770d09

Browse files
committed
test adding cudo support
Signed-off-by: David Young <[email protected]>
1 parent 4cd31e2 commit 8770d09

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

charts/stable/skypilot/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: skypilot
33
description: A Helm chart for deploying SkyPilot API server on Kubernetes
44
icon: "https://raw.githubusercontent.com/skypilot-org/skypilot/master/charts/skypilot/skypilot.svg"
55
type: application
6-
version: 0.0.0
6+
version: 0.0.1-pre-08
77
appVersion: "0.0"
88
dependencies:
99
- name: ingress-nginx

charts/stable/skypilot/templates/api-deployment.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ spec:
303303
mountPath: /root/.runpod
304304
readOnly: true
305305
{{- end }}
306+
{{- if .Values.cudoCredentials.enabled }}
307+
- name: cudo-config
308+
mountPath: /root/.config/cudo
309+
readOnly: true
310+
{{- end }}
306311
{{- if .Values.lambdaCredentials.enabled }}
307312
- name: lambda-config
308313
mountPath: /root/.lambda_cloud
@@ -455,6 +460,37 @@ spec:
455460
- name: runpod-config
456461
mountPath: /root/.runpod
457462
{{- end }}
463+
{{- if .Values.cudoCredentials.enabled }}
464+
- name: create-cudo-credentials
465+
{{- with .Values.securityContext }}
466+
securityContext:
467+
{{- toYaml . | nindent 10 }}
468+
{{- end }}
469+
image: {{ .Values.apiService.image }}
470+
command: ["/bin/sh", "-c"]
471+
args:
472+
- |
473+
echo "Setting up CUDO credentials..."
474+
if [ -n "$CUDO_CREDENTIALS" ]; then
475+
echo "CUDO credentials found in environment variable."
476+
mkdir -p /root/.config/cudo/
477+
cat > /root/.config/cudo/cudo.yml <<'EOF'
478+
$CUDO_CREDENTIALS
479+
EOF
480+
else
481+
echo "CUDO credentials not found in environment variables. Skipping credentials setup."
482+
sleep 600
483+
fi
484+
env:
485+
- name: CUDO_CREDENTIALS
486+
valueFrom:
487+
secretKeyRef:
488+
name: {{ .Values.cudoCredentials.cudoSecretName }}
489+
key: api_key
490+
volumeMounts:
491+
- name: cudo-config
492+
mountPath: /root/.config/cudo
493+
{{- end }}
458494
{{- if .Values.lambdaCredentials.enabled }}
459495
- name: create-lambda-credentials
460496
{{- with .Values.securityContext }}

charts/stable/skypilot/values.schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@
232232
}
233233
}
234234
},
235+
"cudoCredentials": {
236+
"type": "object",
237+
"properties": {
238+
"enabled": {
239+
"type": "boolean"
240+
},
241+
"cudoSecretName": {
242+
"type": "string"
243+
}
244+
}
245+
},
235246
"extraInitContainers": {
236247
"type": [
237248
"array",

charts/stable/skypilot/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,12 @@ runpodCredentials:
460460
# Name of the secret containing the RunPod credentials. Only used if enabled is true.
461461
runpodSecretName: runpod-credentials
462462

463+
# Populate CUDO credentials from the secret with key `api_key`
464+
cudoCredentials:
465+
enabled: false
466+
# Name of the secret containing the CUDO credentials. Only used if enabled is true.
467+
cudoSecretName: cudo-credentials
468+
463469
# Populate Lambda credentials from the secret with key `api_key`
464470
lambdaCredentials:
465471
enabled: false

0 commit comments

Comments
 (0)