@@ -303,6 +303,11 @@ spec:
303303          mountPath : /root/.runpod 
304304          readOnly : true 
305305        {{- end }} 
306+         {{- if .Values.paperspaceCredentials.enabled }} 
307+         - name : paperspace-config 
308+           mountPath : /root/.paperspace 
309+           readOnly : true 
310+         {{- end }} 
306311        {{- if .Values.cudoCredentials.enabled }} 
307312        - name : cudo-config 
308313          mountPath : /root/.config/cudo 
@@ -460,6 +465,35 @@ spec:
460465        - name : runpod-config 
461466          mountPath : /root/.runpod 
462467      {{- end }} 
468+       {{- if .Values.paperspaceCredentials.enabled }} 
469+       - name : create-paperspace-credentials 
470+         {{- with .Values.securityContext }} 
471+         securityContext :
472+           {{- toYaml . | nindent 10 }} 
473+         {{- end }} 
474+         image : {{ .Values.apiService.image }} 
475+         command : ["/bin/sh", "-c"] 
476+         args :
477+         - | 
478+           echo "Setting up Paperspace credentials..." 
479+           if [ -n "$PAPERSPACE_API_KEY" ]; then 
480+             echo "Paperspace credentials found in environment variable." 
481+             mkdir -p /root/.paperspace 
482+             echo "{\"apiKey\":\"$PAPERSPACE_API_KEY\"}" > /root/.paperspace/config.json 
483+           else 
484+             echo "Paperspace credentials not found in environment variables. Skipping credentials setup." 
485+             sleep 600 
486+           fi 
487+ env :
488+         - name : PAPERSPACE_API_KEY 
489+           valueFrom :
490+             secretKeyRef :
491+               name : {{ .Values.paperspaceCredentials.paperspaceSecretName }} 
492+               key : api_key 
493+         volumeMounts :
494+         - name : paperspace-config 
495+           mountPath : /root/.paperspace 
496+       {{- end }} 
463497      {{- if .Values.cudoCredentials.enabled }} 
464498      - name : create-cudo-credentials 
465499        {{- with .Values.securityContext }} 
@@ -577,6 +611,10 @@ spec:
577611      - name : runpod-config 
578612        emptyDir : {} 
579613      {{- end }} 
614+       {{- if .Values.paperspaceCredentials.enabled }} 
615+       - name : paperspace-config 
616+         emptyDir : {} 
617+       {{- end }}       
580618      {{- if .Values.cudoCredentials.enabled }} 
581619      - name : cudo-config 
582620        emptyDir : {} 
0 commit comments