Skip to content
Snippets Groups Projects
Commit 1fe70240 authored by Philippe Lagardère's avatar Philippe Lagardère
Browse files

Premiet jet pour gestion "proxy repository" bis

parent 0d35cbb9
No related branches found
No related tags found
No related merge requests found
...@@ -27,4 +27,7 @@ version: 1.4.0 ...@@ -27,4 +27,7 @@ version: 1.4.0
dependencies: dependencies:
- name: library-chart - name: library-chart
version: 1.0.3 version: 1.0.3
repository: https://inseefrlab.github.io/helm-charts-interactive-services # repository: https://inseefrlab.github.io/helm-charts-interactive-services
# Pour dev en local (requiert helm dependency update)
# repository: "file://../library_chart/"
repository: "file:///Users/ozp6kz/pl/git/_datascience/lskube/helm-charts-interactive-services/charts/library-chart/"
...@@ -25,6 +25,9 @@ spec: ...@@ -25,6 +25,9 @@ spec:
{{- if .Values.vault.enabled }} {{- if .Values.vault.enabled }}
checksum/vault: {{ include (print $.Template.BasePath "/configmap-vault.yaml") . | sha256sum }} checksum/vault: {{ include (print $.Template.BasePath "/configmap-vault.yaml") . | sha256sum }}
{{- end }} {{- end }}
{{- if .Values.proxyRepository.enabled }}
checksum/proxyRepository: {{ include (print $.Template.BasePath "/configmap-proxy-repository.yaml") . | sha256sum }}
{{- end }}
{{- if not (empty (trim (include "library-chart.configMapMLFlow" .)))}} {{- if not (empty (trim (include "library-chart.configMapMLFlow" .)))}}
checksum/mlflow: {{ include (print $.Template.BasePath "/configmap-mlflow.yaml") . | sha256sum }} checksum/mlflow: {{ include (print $.Template.BasePath "/configmap-mlflow.yaml") . | sha256sum }}
{{- end }} {{- end }}
...@@ -121,6 +124,10 @@ spec: ...@@ -121,6 +124,10 @@ spec:
- configMapRef: - configMapRef:
name: {{ include "library-chart.configMapNameGit" . }} name: {{ include "library-chart.configMapNameGit" . }}
{{- end }} {{- end }}
{{- if .Values.proxyRepository.enabled }}
- configMapRef:
name: {{ include "library-chart.configMapNameProxyRepository" . }}
{{- end }}
{{- if not (empty (trim (include "library-chart.configMapMLFlow" .)))}} {{- if not (empty (trim (include "library-chart.configMapMLFlow" .)))}}
- configMapRef: - configMapRef:
name: {{ include "library-chart.configMapNameMLFlow" . }} name: {{ include "library-chart.configMapNameMLFlow" . }}
......
...@@ -17,6 +17,15 @@ security: ...@@ -17,6 +17,15 @@ security:
enabled: true enabled: true
ip: "0.0.0.0/0" ip: "0.0.0.0/0"
proxyRepository:
enabled: true
configMapName: ""
# TODO : vérifier si on peut utiliser une seule URL pour global.index et global.index-url
pipRepository: "https://nexus.insee.fr/repository/pypi-public/simple"
condaRepository: "https://nexus.insee.fr/repository/conda-proxy/main"
# TODO : vérifier valeur pour proxy R, peut-être limité à nexus.insee.fr/
rRepository: "https://nexus.insee.fr/repository/r_public/main"
init: init:
standardInitPath: "/opt/onyxia-init.sh" standardInitPath: "/opt/onyxia-init.sh"
regionInit: "" regionInit: ""
...@@ -151,7 +160,7 @@ resources: {} ...@@ -151,7 +160,7 @@ resources: {}
# memory: 128Mi # memory: 128Mi
persistence: persistence:
enabled: true enabled: false
## database data Persistent Volume Storage Class ## database data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass> ## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning ## If set to "-", storageClassName: "", which disables dynamic provisioning
......
...@@ -270,3 +270,30 @@ data: ...@@ -270,3 +270,30 @@ data:
{{- include "library-chart.sparkConf" . | nindent 4 }} {{- include "library-chart.sparkConf" . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{/* Create the name of the config map Proxy Repository to use */}}
{{- define "library-chart.configMapNameProxyRepository" -}}
{{- if .Values.proxyRepository.enabled }}
{{- $name:= (printf "%s-configmapproxyrepository" (include "library-chart.fullname" .) ) }}
{{- default $name .Values.proxyRepository.configMapName }}
{{- else }}
{{- default "default" .Values.proxyRepository.configMapName }}
{{- end }}
{{- end }}
{{/* Template to generate a ConfigMap for proxy repositories */}}
{{- define "library-chart.configMapProxyRepository" -}}
{{- if .Values.proxyRepository.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "library-chart.configMapNameProxyRepository" . }}
labels:
{{- include "library-chart.labels" . | nindent 4 }}
data:
# TODO : si valeur manquante, ne pas définir les varenv
PIP_REPOSITORY: "{{ .Values.proxyRepository.pipRepository }}"
CONDA_REPOSITORY: "{{ .Values.proxyRepository.condaRepository }}"
R_REPOSITORY: "{{ .Values.proxyRepository.rRepository }}"
{{- end }}
{{- end }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment