Skip to content
Open
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
23 changes: 13 additions & 10 deletions charts/sonarqube-dce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,10 @@ The following table lists the configurable parameters of the SonarQube chart and
| `applicationNodes.prometheusExporter.downloadURL` | Alternative full download URL for the jmx_prometheus_javaagent.jar (overrides `prometheusExporter.version`) | `""` |
| `applicationNodes.prometheusExporter.config` | Prometheus JMX exporter config yaml for the web process, and the CE process if `prometheusExporter.ceConfig` is not set | see `values.yaml` |
| `applicationNodes.prometheusExporter.ceConfig` | Prometheus JMX exporter config yaml for the CE process (by default, `prometheusExporter.config` is used | `None` |
| `applicationNodes.prometheusExporter.httpProxy` | HTTP proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.httpsProxy` | HTTPS proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.noProxy` | No proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.proxy.enabled` | Enable Proxy for downloading JMX agent. When set to `true` | `false` |
| `applicationNodes.prometheusExporter.proxy.httpProxy` | HTTP proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.proxy.httpsProxy` | HTTPS proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.proxy.noProxy` | No proxy for downloading JMX agent | `""` |
| `applicationNodes.prometheusExporter.securityContext` | Security context for downloading the jmx agent | see `values.yaml` |
| `applicationNodes.prometheusMonitoring.podMonitor.enabled` | Enable Prometheus PodMonitor | `false` |
| `applicationNodes.prometheusMonitoring.podMonitor.namespace` | (DEPRECATED) This value should not be set, as the PodMonitor's namespace has to match the Release Namespace | `{{ .Release.Namespace }}` |
Expand All @@ -561,9 +562,10 @@ The following table lists the configurable parameters of the SonarQube chart and
| `applicationNodes.prometheusMonitoring.podMonitor.labels` | Additional labels to add to the PodMonitor | `{}` |
| `applicationNodes.plugins.install` | Link(s) to the plugin JARs to download and install | `[]` |
| `applicationNodes.plugins.resources` | Plugin Pod resource requests & limits | `{}` |
| `applicationNodes.plugins.httpProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.httpsProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.noProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.proxy.enabled` | Enable Proxy for install plugins. When set to `true` | `false` |
| `applicationNodes.plugins.proxy.httpProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.proxy.httpsProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.proxy.noProxy` | For use behind a corporate proxy when downloading plugins | `""` |
| `applicationNodes.plugins.image` | Image for plugins container | `"image.repository":"image.tag"` |
| `applicationNodes.plugins.resources` | Resources for plugins container | `""` |
| `applicationNodes.plugins.netrcCreds` | Name of the secret containing .netrc file to use creds when downloading plugins | `""` |
Expand Down Expand Up @@ -601,10 +603,11 @@ The following table lists the configurable parameters of the SonarQube chart and
| `env` | Environment variables to attach to the pods | `{}` |
| `annotations` | Map of annotations to add to the pods | `{}` |
| `sonarWebContext` | SonarQube web context, also serve as default value for `ingress.path`, `account.sonarWebContext` and probes path. | `` |
| `httpProxySecret` | Should contain `http_proxy`, `https_proxy` and `no_proxy` keys, will superseed every other proxy variables | `` |
| `httpProxy` | HTTP proxy for downloading JMX agent and install plugins, will superseed initContainer specific http proxy variables | `` |
| `httpsProxy` | HTTPS proxy for downloading JMX agent and install plugins, will superseed initContainer specific https proxy variable | `` |
| `noProxy` | No proxy for downloading JMX agent and install plugins, will superseed initContainer specific no proxy variables | `` |
| `proxy.enabled` | Enable Proxy for downloading JMX agent and install plugins. When set to `true` | `false` | |
| `proxy.httpProxySecret` | Should contain `http_proxy`, `https_proxy` and `no_proxy` keys, will superseed every other proxy variables | `` |
| `proxy.httpProxy` | HTTP proxy for downloading JMX agent and install plugins, will superseed initContainer specific http proxy variables | `` |
| `proxy.httpsProxy` | HTTPS proxy for downloading JMX agent and install plugins, will superseed initContainer specific https proxy variable | `` |
| `proxy.noProxy` | No proxy for downloading JMX agent and install plugins, will superseed initContainer specific no proxy variables | `` |
| `nodeEncryption.enabled` | Secure the communication between Application and Search nodes using TLS | `false` |
| `ingress-nginx.enabled` | (DEPRECATED) Install Nginx Ingress Helm | `false` |

Expand Down
12 changes: 6 additions & 6 deletions charts/sonarqube-dce/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -383,29 +383,29 @@ Set combined_search_env, ensuring we don't have any duplicates with our features
{{/*
generate Proxy env var from httpProxySecret
*/}}
{{- define "sonarqube.proxyFromSecret" -}}
{{- define "sonarqube.proxy.proxyFromSecret" -}}
- name: http_proxy
valueFrom:
secretKeyRef:
name: {{ .Values.httpProxySecret }}
name: {{ .Values.proxy.httpProxySecret }}
key: http_proxy
- name: https_proxy
valueFrom:
secretKeyRef:
name: {{ .Values.httpProxySecret }}
name: {{ .Values.proxy.httpProxySecret }}
key: https_proxy
- name: no_proxy
valueFrom:
secretKeyRef:
name: {{ .Values.httpProxySecret }}
name: {{ .Values.proxy.httpProxySecret }}
key: no_proxy
{{- end -}}

{{/*
generate prometheusExporter proxy env var
*/}}
{{- define "sonarqube.prometheusExporterProxy.env" -}}
{{- if .Values.httpProxySecret -}}
{{- if .Values.proxy.httpProxySecret -}}
{{- include "sonarqube.proxyFromSecret" . }}
{{- else -}}
- name: http_proxy
Expand All @@ -430,7 +430,7 @@ Set combined_search_env, ensuring we don't have any duplicates with our features
generate install-plugins proxy env var
*/}}
{{- define "sonarqube.install-plugins-proxy.env" -}}
{{- if .Values.httpProxySecret -}}
{{- if .Values.proxy.httpProxySecret -}}
{{- include "sonarqube.proxyFromSecret" . }}
{{- else -}}
- name: http_proxy
Expand Down
12 changes: 6 additions & 6 deletions charts/sonarqube-dce/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ metadata:
heritage: {{ .Release.Service }}
type: Opaque
stringData:
PLUGINS-HTTP-PROXY: {{ default .Values.httpProxy .Values.ApplicationNodes.plugins.httpProxy | quote }}
PLUGINS-HTTPS-PROXY: {{ default .Values.httpsProxy .Values.ApplicationNodes.plugins.httpsProxy | quote }}
PLUGINS-NO-PROXY: {{ default .Values.noProxy .Values.ApplicationNodes.plugins.noProxy | quote }}
PROMETHEUS-EXPORTER-HTTP-PROXY: {{ default .Values.httpProxy .Values.ApplicationNodes.prometheusExporter.httpProxy | quote }}
PROMETHEUS-EXPORTER-HTTPS-PROXY: {{ default .Values.httpsProxy .Values.ApplicationNodes.prometheusExporter.httpsProxy | quote }}
PROMETHEUS-EXPORTER-NO-PROXY: {{ default .Values.noProxy .Values.ApplicationNodes.prometheusExporter.noProxy | quote }}
PLUGINS-HTTP-PROXY: {{ default .Values.proxy.httpProxy .Values.ApplicationNodes.plugins.proxy.httpProxy | quote }}
PLUGINS-HTTPS-PROXY: {{ default .Values.proxy.httpsProxy .Values.ApplicationNodes.plugins.proxy.httpsProxy | quote }}
PLUGINS-NO-PROXY: {{ default .Values.proxy.noProxy .Values.ApplicationNodes.plugins.proxy.noProxy | quote }}
PROMETHEUS-EXPORTER-HTTP-PROXY: {{ default .Values.proxy.httpProxy .Values.ApplicationNodes.prometheusExporter.proxy.httpProxy | quote }}
PROMETHEUS-EXPORTER-HTTPS-PROXY: {{ default .Values.proxy.httpsProxy .Values.ApplicationNodes.prometheusExporter.proxy.httpsProxy | quote }}
PROMETHEUS-EXPORTER-NO-PROXY: {{ default .Values.proxy.noProxy .Values.ApplicationNodes.prometheusExporter.proxy.noProxy | quote }}
4 changes: 4 additions & 0 deletions charts/sonarqube-dce/templates/sonarqube-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ spec:
name: sonarqube
subPath: data
env:
{{- if or .Values.proxy.enabled .Values.applicationNodes.prometheusExporter.proxy.enabled }}
{{- with (include "sonarqube.prometheusExporterProxy.env" .) }}
{{- . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.env }}
{{- . | toYaml | trim | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -178,9 +180,11 @@ spec:
resources:
{{ toYaml (default .Values.initContainers.resources .Values.ApplicationNodes.plugins.resource) | indent 12 }}
env:
{{- if or .Values.proxy.enabled .Values.ApplicationNodes.plugins.proxy.enabled }}
{{- with (include "sonarqube.install-plugins-proxy.env" .) }}
{{- . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.env }}
{{- . | toYaml | trim | nindent 12 }}
{{- end }}
Expand Down
26 changes: 16 additions & 10 deletions charts/sonarqube-dce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ applicationNodes:
# - pattern: ".*"
# image: curlimages/curl:8.2.1
# For use behind a corporate proxy when downloading prometheus
# httpProxy: ""
# httpsProxy: ""
# noProxy: ""
proxy:
enabled: false
# httpProxy: ""
# httpsProxy: ""
# noProxy: ""
# Setting the security context to the default sonarqube user 1000/0
# Reuse default initcontainers.securityContext that match restricted pod security standard
# securityContext: {}
Expand Down Expand Up @@ -327,9 +329,11 @@ applicationNodes:
install: []

# For use behind a corporate proxy when downloading plugins
# httpProxy: ""
# httpsProxy: ""
# noProxy: ""
proxy:
enabled: false
# httpProxy: ""
# httpsProxy: ""
# noProxy: ""

# image: curlimages/curl:8.2.1
# resources: {}
Expand Down Expand Up @@ -500,10 +504,12 @@ service:
# Those proxy settings will be propagated to the install-plugin and prometheus-exporter init containers
# if httpProxySecret is set the other one will be ignored
# the secret should contain exactly the keys http_proxy, https_proxy and no_proxy
httpProxySecret: ""
httpProxy: ""
httpsProxy: ""
noProxy: ""
proxy:
enabled: false
# httpProxySecret: ""
# httpProxy: ""
# httpsProxy: ""
# noProxy: ""

ingress:
enabled: false
Expand Down
Loading