Skip to content

Commit

Permalink
Rstudio add proxy support (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihiverlet authored Sep 13, 2024
1 parent ccba3ac commit 98e381d
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 19 deletions.
4 changes: 2 additions & 2 deletions charts/rstudio-sparkr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.3
version: 2.0.4

dependencies:
- name: library-chart
version: 1.5.23
version: 1.5.25
repository: https://inseefrlab.github.io/helm-charts-interactive-services
1 change: 1 addition & 0 deletions charts/rstudio-sparkr/templates/secret-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ include "library-chart.secretProxy" . }}
9 changes: 9 additions & 0 deletions charts/rstudio-sparkr/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ spec:
secret:
secretName: {{ include "library-chart.secretNameCoreSite" . }}
{{- end }}
{{- if (.Values.proxy).enabled }}
- name: secret-proxy
secret:
secretName: {{ include "library-chart.secretNameProxy" . }}
{{- end }}
{{- if .Values.spark.default }}
- name: secret-sparkconf
secret:
Expand Down Expand Up @@ -206,6 +211,10 @@ spec:
- secretRef:
name: {{ include "library-chart.secretNameGit" . }}
{{- end }}
{{- if (.Values.proxy).enabled }}
- secretRef:
name: {{ include "library-chart.secretNameProxy" . }}
{{- end }}
{{- if (include "library-chart.repository.enabled" .) }}
- configMapRef:
name: {{ include "library-chart.configMapNameRepository" . }}
Expand Down
81 changes: 68 additions & 13 deletions charts/rstudio-sparkr/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -708,34 +708,42 @@
}
},
"proxy": {
"description": "Proxy configuration",
"description": "It can be used to inject proxy settings in the services",
"type": "object",
"x-onyxia": {
"overwriteSchemaWith": "proxy.json"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Inject proxy settings",
"default": "false"
},
"httpProxy": {
"type": "string",
"description": "Proxy URL for HTTP requests",
"description": "URL of the enterprise proxy for the region for HTTP.",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.httpProxyUrl}}"
"hidden": {
"value": false,
"path": "proxy/enabled"
}
},
"httpsProxy": {
"type": "string",
"description": "Proxy URL for HTTPS requests",
"description": "URL of the enterprise proxy for the region for HTTPS.",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.httpsProxyUrl}}"
"hidden": {
"value": false,
"path": "proxy/enabled"
}
},
"noProxy": {
"type": "string",
"description": "Comma separated list of hosts for which proxy is bypassed",
"description": "enterprise local domain that should not take proxy comma separated",
"default": "",
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{proxyInjection.noProxy}}"
"hidden": {
"value": false,
"path": "proxy/enabled"
}
}
}
Expand Down Expand Up @@ -798,6 +806,53 @@
}
}
},
"proxy": {
"description": "It can be used to inject proxy settings in the services",
"type": "object",
"x-onyxia": {
"overwriteSchemaWith": "proxy.json"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Inject proxy settings",
"default": "false"
},
"httpProxy": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTP.",
"default": "",
"x-onyxia": {
"hidden": {
"value": true,
"path": "proxy/enabled"
}
}
},
"httpsProxy": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTPS.",
"default": "",
"x-onyxia": {
"hidden": {
"value": true,
"path": "proxy/enabled"
}
}
},
"noProxy": {
"type": "string",
"description": "enterprise local domain that should not take proxy comma separated",
"default": "",
"x-onyxia": {
"hidden": {
"value": true,
"path": "proxy/enabled"
}
}
}
}
},
"message": {
"type": "object",
"description": "Warning message",
Expand Down
3 changes: 2 additions & 1 deletion charts/rstudio-sparkr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ tolerations: []
affinity: {}

proxy:
enabled: false
noProxy: ""
httpProxy: ""
httpsProxy: ""
Expand All @@ -237,4 +238,4 @@ userPreferences:

message:
fr: ""
en: ""
en: ""
4 changes: 2 additions & 2 deletions charts/rstudio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.3
version: 2.0.4

dependencies:
- name: library-chart
version: 1.5.23
version: 1.5.25
repository: https://inseefrlab.github.io/helm-charts-interactive-services
1 change: 1 addition & 0 deletions charts/rstudio/templates/secret-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ include "library-chart.secretProxy" . }}
9 changes: 9 additions & 0 deletions charts/rstudio/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ spec:
emptyDir:
medium: Memory
sizeLimit: 10Gi
{{- if (.Values.proxy).enabled }}
- name: secret-proxy
secret:
secretName: {{ include "library-chart.secretNameProxy" . }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -109,6 +114,10 @@ spec:
- secretRef:
name: {{ include "library-chart.secretNameS3" . }}
{{- end }}
{{- if (.Values.proxy).enabled }}
- secretRef:
name: {{ include "library-chart.secretNameProxy" . }}
{{- end }}
{{- if .Values.vault.enabled }}
- secretRef:
name: {{ include "library-chart.secretNameVault" . }}
Expand Down
41 changes: 41 additions & 0 deletions charts/rstudio/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,47 @@
}
}
},
"proxy": {
"description": "It can be used to inject proxy settings in the services",
"type": "object",
"x-onyxia": {
"overwriteSchemaWith": "proxy.json"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Inject proxy settings",
"default": "false"
},
"httpProxy": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTP.",
"default": "",
"hidden": {
"value": false,
"path": "proxy/enabled"
}
},
"httpsProxy": {
"type": "string",
"description": "URL of the enterprise proxy for the region for HTTPS.",
"default": "",
"hidden": {
"value": false,
"path": "proxy/enabled"
}
},
"noProxy": {
"type": "string",
"description": "enterprise local domain that should not take proxy comma separated",
"default": "",
"hidden": {
"value": false,
"path": "proxy/enabled"
}
}
}
},
"message": {
"type": "object",
"description": "Warning message",
Expand Down
8 changes: 7 additions & 1 deletion charts/rstudio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ userPreferences:
darkMode: false
language: "en"

proxy:
enabled: false
noProxy: ""
httpProxy: ""
httpsProxy: ""

message:
fr: ""
en: ""
en: ""

0 comments on commit 98e381d

Please sign in to comment.