Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #11 from Oteemo/community-updates
Browse files Browse the repository at this point in the history
Community updates for sonarqube and sonatype-nexus
  • Loading branch information
rjkernick authored Jan 27, 2020
2 parents 69dad19 + 2233f2c commit 629c93f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: SonarQube is an open sourced code quality scanning tool
version: 3.3.0
version: 3.4.0
appVersion: 7.9.2
keywords:
- coverage
Expand Down
1 change: 1 addition & 0 deletions charts/sonarqube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ The following table lists the configurable parameters of the Sonarqube chart and
| `hostAliases` | Aliases for IPs in /etc/hosts | `[]` |
| `tolerations` | List of node taints to tolerate | `[]` |
| `plugins.install` | List of plugins to install | `[]` |
| `plugins.lib` | List of plugins to install to `lib/common`| `[]` |
| `plugins.resources` | Plugin Pod resource requests & limits | `{}` |
| `plugins.initContainerImage` | Change init container image | `alpine:3.10.3` |
| `plugins.initSysctlContainerImage` | Change init sysctl container image | `busybox:1.31` |
Expand Down
9 changes: 7 additions & 2 deletions charts/sonarqube/templates/copy-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ data:
{{- end }}
for f in {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/*.jar
do
file=${f##*/} && file=${file%-[0-9]*}
file=${f##*/} && file=${file%-[0-9]*}
for original in {{ .Values.sonarqubeFolder }}/extensions/plugins/*.jar
do
originalfile=${original##*/} && originalfile=${originalfile%-[0-9]*}
originalfile=${original##*/} && originalfile=${originalfile%-[0-9]*}
if [ "$originalfile" = "$file" ]; then
rm -f "$original"
fi
done
done
cp {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/*.jar {{ .Values.sonarqubeFolder }}/extensions/plugins/
{{- if .Values.plugins.lib }}
{{- range $index, $val := .Values.plugins.lib }}
cp -f {{ $.Values.sonarqubeFolder }}/extensions/plugins/{{ $val }} {{ $.Values.sonarqubeFolder }}/lib/common/
{{- end }}
{{- end }}
{{ .Values.sonarqubeFolder }}/bin/run.sh
7 changes: 4 additions & 3 deletions charts/sonarqube/templates/install-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ data:
install_plugins.sh: |-
cd {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp
{{- if .Values.plugins.install }}
{{- range $index, $val := .Values.plugins.install }}
wget {{ $val }} --no-check-certificate
{{- end }}
{{ range $index, $val := .Values.plugins.install }}echo {{ $val | quote }} >> plugins.txt
{{ end }}
cat plugins.txt | xargs -n 1 -P 8 wget --no-check-certificate
rm plugins.txt
{{- end }}
1 change: 1 addition & 0 deletions charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ persistence:
# - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar"
plugins:
install: []
lib: []

# initContainerImage: alpine:3.10.3
# deleteDefaultPlugins: true
Expand Down
2 changes: 1 addition & 1 deletion charts/sonatype-nexus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: sonatype-nexus
version: 1.21.5
version: 1.21.6
appVersion: 3.20.1-01
description: Sonatype Nexus is an open source repository manager
keywords:
Expand Down
12 changes: 8 additions & 4 deletions charts/sonatype-nexus/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ metadata:
{{- end }}
spec:
rules:
{{- if .Values.nexusProxy.enabled -}}
{{- if .Values.nexusProxy.env.nexusHttpHost }}
{{- if .Values.nexusProxy.env.nexusHttpHost }}
- host: {{ .Values.nexusProxy.env.nexusHttpHost }}
http:
paths:
Expand All @@ -22,9 +21,14 @@ spec:
{{- else }}
serviceName: {{ template "nexus.fullname" . }}
{{- end }}
{{- if .Values.nexusProxy.enabled }}
servicePort: {{ .Values.nexusProxy.port }}
{{- else }}
servicePort: {{ .Values.nexus.nexusPort }}
{{- end }}
path: {{ .Values.ingress.path }}
{{- end }}
{{- end }}
{{- if .Values.nexusProxy.enabled -}}
{{- if .Values.nexusProxy.env.nexusDockerHost }}
- host: {{ .Values.nexusProxy.env.nexusDockerHost }}
http:
Expand All @@ -38,7 +42,7 @@ spec:
servicePort: {{ .Values.nexusProxy.port }}
path: {{ .Values.ingress.path }}
{{- end }}
{{- end -}}
{{- end -}}
{{- with .Values.ingress.rules }}
{{ toYaml . | indent 2 }}
{{- end -}}
Expand Down
10 changes: 9 additions & 1 deletion charts/sonatype-nexus/templates/proxy-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.nexusProxy.enabled }}
{{- if or .Values.nexusProxy.enabled .Values.ingress.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -21,14 +21,22 @@ metadata:
{{- end }}
spec:
ports:
{{- if .Values.nexusProxy.enabled }}
- port: {{ .Values.nexusProxy.port }}
{{- else }}
- port: {{ .Values.nexus.nexusPort }}
{{- end }}
{{- if .Values.nexusProxy.svcName }}
name: {{ .Values.nexusProxy.svcName }}
{{- else }}
name: {{ template "nexus.fullname" . }}
{{- end }}
protocol: TCP
{{- if .Values.nexusProxy.enabled }}
targetPort: {{ .Values.nexusProxy.targetPort }}
{{- else }}
targetPort: {{ .Values.nexus.nexusPort }}
{{- end }}
selector:
app: {{ template "nexus.name" . }}
release: {{ .Release.Name }}
Expand Down

0 comments on commit 629c93f

Please sign in to comment.