UNCLASSIFIED

Commit 9fb36871 authored by Branden Cobb's avatar Branden Cobb
Browse files

bats doesn't work. switching back to busybox and disabling initSysctl....

bats doesn't work. switching back to busybox and disabling initSysctl. initContainer is only used to wait for DB
parent 6d246e7f
# Changelog # Changelog
## Initial Helm Chart Release - 2020-01-22 ## 9.2.6-bb.3 - 2021-03-16
Plugins have been preinstalled into the container and made available at registry.dso.mil.
InitContainers have also been pushed into registry.dso.mil until ironbank equivalents can be found.
## Initial Helm Chart Release - 2021-01-22
Added SAML sso integration Added SAML sso integration
Added istio virtual service Added istio virtual service
......
# Start with the IronBank Image
FROM registry1.dso.mil/ironbank/sonarsource/sonarqube/sonarqube8-community:8.6-community
# Add needed Plugins
ADD https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/1.2.6/sonar-dependency-check-plugin-1.2.6.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-c-plugin-1.3.2.1853.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-cxx-plugin-1.3.2.1853.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/vaulttec/sonar-auth-oidc/releases/download/v2.0.0/sonar-auth-oidc-plugin-2.0.0.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/OtherDevOpsGene/zap-sonar-plugin/releases/download/sonar-zap-plugin-2.0.2/sonar-zap-plugin-2.0.2.jar /opt/sonarqube/extensions/plugins/
USER root
RUN chown -R sonarqube:sonarqube /opt/sonarqube/extensions/plugins
USER sonarqube
...@@ -2,7 +2,7 @@ apiVersion: v1 ...@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 8.6-community appVersion: 8.6-community
name: sonarqube name: sonarqube
description: SonarQube is an open sourced code quality scanning tool description: SonarQube is an open sourced code quality scanning tool
version: 9.2.6-bb.2 version: 9.2.6-bb.3
keywords: keywords:
- coverage - coverage
- security - security
......
dependencies:
- name: postgresql
version: 8.6.4
repository: file://charts/postgresql
condition: postgresql.enabled
...@@ -84,7 +84,7 @@ spec: ...@@ -84,7 +84,7 @@ spec:
{{- end }} {{- end }}
{{- if or .Values.initSysctl.enabled .Values.elasticsearch.configureNode }} {{- if or .Values.initSysctl.enabled .Values.elasticsearch.configureNode }}
- name: init-sysctl - name: init-sysctl
image: {{ default "busybox:1.32" .Values.initSysctl.image }} image: {{ default "registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/busybox:1.32" .Values.initSysctl.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $securityContext := (default .Values.initContainers.securityContext .Values.initSysctl.securityContext) }} {{- if $securityContext := (default .Values.initContainers.securityContext .Values.initSysctl.securityContext) }}
securityContext: securityContext:
...@@ -105,7 +105,7 @@ spec: ...@@ -105,7 +105,7 @@ spec:
{{- end }} {{- end }}
{{- if .Values.plugins.install }} {{- if .Values.plugins.install }}
- name: install-plugins - name: install-plugins
image: {{ default "rjkernick/alpine-wget:latest" .Values.plugins.image }} image: {{ default "registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/alpine-wget:latest" .Values.plugins.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["sh", command: ["sh",
"-e", "-e",
...@@ -136,7 +136,7 @@ spec: ...@@ -136,7 +136,7 @@ spec:
{{- end }} {{- end }}
{{- if and .Values.sonarProperties .Values.sonarSecretProperties }} {{- if and .Values.sonarProperties .Values.sonarSecretProperties }}
- name: concat-properties - name: concat-properties
image: {{ default "busybox:1.32" .Values.initContainers.image }} image: {{ default "registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/busybox:1.32" .Values.initContainers.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["sh", command: ["sh",
"-c", "-c",
...@@ -163,12 +163,15 @@ spec: ...@@ -163,12 +163,15 @@ spec:
{{- end }} {{- end }}
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
- name: "wait-for-db" - name: "wait-for-db"
image: {{ default "busybox:1.32" .Values.initContainers.image }} image: registry1.dso.mil/ironbank/opensource/postgres/postgresql96:9.6.20
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
resources: resources:
{{ toYaml .Values.initContainers.resources | indent 12 }} {{ toYaml .Values.initContainers.resources | indent 12 }}
command: ["/bin/sh", "-c", "for i in $(seq 1 200); do nc -z -w3 {{ .Release.Name}}-postgresql 5432 && exit 0 || sleep 2; done; exit 1"] command: ["/bin/sh", "-c", "until pg_isready -h {{ .Release.Name}}-postgresql -p 5432 -U {{ .Values.postgresql.postgresqlUsername }}; do sleep 2; done"]
{{- end }} {{- end }}
env:
- name: POSTGRES_HOST_AUTH_METHOD
value: "trust"
{{- if .Values.priorityClassName }} {{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }}
{{- end }} {{- end }}
......
...@@ -13,7 +13,7 @@ metadata: ...@@ -13,7 +13,7 @@ metadata:
spec: spec:
initContainers: initContainers:
- name: "bats" - name: "bats"
image: "bats/bats:1.2.1" image: "registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/bats:1.2.1"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["bash", "-c"] command: ["bash", "-c"]
args: args:
...@@ -25,7 +25,7 @@ spec: ...@@ -25,7 +25,7 @@ spec:
name: tools name: tools
containers: containers:
- name: {{ .Release.Name }}-ui-test - name: {{ .Release.Name }}-ui-test
image: {{ default "bitnami/minideb-extras" .Values.tests.image }} image: {{ default "registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/minideb-extras:latest" .Values.tests.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ command: [
"/tools/bats/bin/bats", "/tools/bats/bin/bats",
......
...@@ -19,8 +19,8 @@ OpenShift: ...@@ -19,8 +19,8 @@ OpenShift:
createSCC: true createSCC: true
image: image:
repository: registry1.dso.mil/ironbank/sonarsource/sonarqube/sonarqube8-community repository: registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/sonarqube8-community-bb
tag: 8.6-community tag: 8.6-community-bb
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# If using a private repository, the name of the imagePullSecret to use # If using a private repository, the name of the imagePullSecret to use
pullSecret: [] pullSecret: []
...@@ -37,7 +37,7 @@ containerSecurityContext: ...@@ -37,7 +37,7 @@ containerSecurityContext:
# Settings to configure elasticsearch host requirements # Settings to configure elasticsearch host requirements
elasticsearch: elasticsearch:
# DEPRECATED: Use initSysctl.enabled instead # DEPRECATED: Use initSysctl.enabled instead
configureNode: true configureNode: false
bootstrapChecks: true bootstrapChecks: true
service: service:
...@@ -115,7 +115,7 @@ livenessProbe: ...@@ -115,7 +115,7 @@ livenessProbe:
# sonar.web.context: /sonarqube # sonar.web.context: /sonarqube
initContainers: initContainers:
# image: busybox:1.32 # image: registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/busybox:1.32
# We allow the init containers to have a separate security context declaration because # We allow the init containers to have a separate security context declaration because
# the initContainer may not require the same as SonarQube. # the initContainer may not require the same as SonarQube.
# securityContext: {} # securityContext: {}
...@@ -131,12 +131,12 @@ initContainers: ...@@ -131,12 +131,12 @@ initContainers:
# secret: my-secret # secret: my-secret
initSysctl: initSysctl:
enabled: true enabled: false
vmMaxMapCount: 524288 vmMaxMapCount: 524288
fsFileMax: 131072 fsFileMax: 131072
nofile: 131072 nofile: 131072
nproc: 8192 nproc: 8192
# image: busybox:1.32 # image: registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/busybox:1.32
securityContext: securityContext:
privileged: true privileged: true
# resources: {} # resources: {}
...@@ -149,10 +149,10 @@ initSysctl: ...@@ -149,10 +149,10 @@ initSysctl:
# - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar" # - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar"
plugins: plugins:
install: install:
- https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/1.2.6/sonar-dependency-check-plugin-1.2.6.jar # - https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/1.2.6/sonar-dependency-check-plugin-1.2.6.jar
- https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-c-plugin-1.3.2.1853.jar # - https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-c-plugin-1.3.2.1853.jar
- https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-cxx-plugin-1.3.2.1853.jar # - https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-1.3.2/sonar-cxx-plugin-1.3.2.1853.jar
- https://github.com/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar # - https://github.com/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar
lib: [] lib: []
# For use behind a corporate proxy when downloading plugins # For use behind a corporate proxy when downloading plugins
...@@ -160,7 +160,7 @@ plugins: ...@@ -160,7 +160,7 @@ plugins:
# httpsProxy: "" # httpsProxy: ""
# noProxy: "" # noProxy: ""
# image: rjkernick/alpine-wget:latest # image: registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/alpine-wget:latest
# resources: {} # resources: {}
# .netrc secret file with a key "netrc" to use basic auth while downloading plugins # .netrc secret file with a key "netrc" to use basic auth while downloading plugins
...@@ -314,8 +314,8 @@ podLabels: {} ...@@ -314,8 +314,8 @@ podLabels: {}
sonarqubeFolder: /opt/sonarqube sonarqubeFolder: /opt/sonarqube
tests: tests:
enabled: true enabled: false
# image: bitnami/minideb-extras # image: registry.dso.mil/platform-one/big-bang/apps/developer-tools/sonarqube/minideb-extras:latest
serviceAccount: serviceAccount:
create: false create: false
......
...@@ -3,3 +3,4 @@ image: ...@@ -3,3 +3,4 @@ image:
istio: istio:
enabled: true enabled: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment