Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(vscode): 🎉 add proxy support #146

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/vscode-python/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.11.35
version: 1.11.36

dependencies:
- name: library-chart
version: 1.5.23
version: 1.5.24
repository: https://inseefrlab.github.io/helm-charts-interactive-services
1 change: 1 addition & 0 deletions charts/vscode-python/templates/configmap-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ include "library-chart.configMapProxy" . }}
34 changes: 33 additions & 1 deletion charts/vscode-python/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ spec:
secret:
secretName: {{ include "library-chart.secretNameMetaflow" . }}
{{- end }}
{{- if .Values.proxyInjection }}
- name: cm-proxy
configMap:
name: {{ printf "%s-configmapproxy" (include "library-chart.fullname" .) }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand All @@ -94,6 +99,10 @@ spec:
mkdir /dest/metaflow;
cp /src/metaflow/config.json /dest/metaflow/config.json;
{{- end }}
{{- if .Values.proxyInjection }}
mkdir /dest/environment;
cp /src/environment/environment /dest/environment/environment;
{{- end }}
volumeMounts:
- name: config-files
mountPath: /dest
Expand All @@ -105,6 +114,10 @@ spec:
- name : secret-metaflow
mountPath: /src/metaflow
{{- end }}
{{- if .Values.proxyInjection }}
- name: cm-proxy
mountPath: /src/environment/
{{- end }}
resources:
limits:
cpu: 50m
Expand Down Expand Up @@ -140,6 +153,20 @@ spec:
- name: PERSONAL_INIT_ARGS
value: {{ .Values.init.personalInitArgs }}
{{- end }}
{{- if .Values.proxyInjection }}
{{- if .Values.proxyInjection.httpProxyUrl }}
- name: http_proxy
value: {{ .Values.proxyInjection.httpProxyUrl }}
{{- end }}
{{- if .Values.proxyInjection.httpsProxyUrl }}
- name: https_proxy
value: {{ .Values.proxyInjection.httpsProxyUrl }}
{{- end }}
{{- if .Values.proxyInjection.noProxy }}
- name: no_proxy
value: {{ .Values.proxyInjection.noProxy }}
{{- end }}
{{- end }}
- name: PROJECT_USER
value: {{ .Values.environment.user }}
- name: PROJECT_GROUP
Expand Down Expand Up @@ -198,7 +225,12 @@ spec:
- name: config-files
mountPath: /home/{{ .Values.environment.user}}/.metaflowconfig
subPath: metaflow
{{- end }}
{{- end }}
{{- if .Values.proxyInjection }}
- name: config-files
mountPath: /etc/environment
subPath: environment/environment
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
33 changes: 33 additions & 0 deletions charts/vscode-python/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,39 @@
}
}
},
"proxyInjection": {
"description": "It can be used to inject proxy settings in the services",
"type": "object",
"properties": {
"httpProxyUrl": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTP.",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.httpProxyUrl}}"
}
},
"httpsProxyUrl": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTPS.",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.httpsProxyUrl}}"
}
},
"noProxy": {
"type": "string",
"description": "enterprise local domain that should not take proxy comma separated",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.noProxy}}"
}
}
}
},
"init": {
"description": "Init parameters",
"type": "object",
Expand Down
Loading