diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 31a42e132a83b4e6e35e6d6433b74ce9e27329ec..3cd16167d6e4f482f5a5a830ca34e3cbe486e164 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 8.6-community name: sonarqube description: SonarQube is an open sourced code quality scanning tool -version: 9.2.6-bb.0 +version: 9.2.6-bb.1 keywords: - coverage - security diff --git a/chart/templates/bigbang/monitoring.yaml b/chart/templates/bigbang/monitoring.yaml new file mode 100644 index 0000000000000000000000000000000000000000..66155c2e711d8f4ba6dd40c0df87ca0e1e2c5cb6 --- /dev/null +++ b/chart/templates/bigbang/monitoring.yaml @@ -0,0 +1,66 @@ +{{- if .Values.monitoring.enabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +items: +- apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: {{ .Release.Namespace }} + rules: + - apiGroups: + - "" + resources: + - services + - endpoints + - pods + verbs: + - get + - list + - watch +kind: RoleList + +--- +apiVersion: rbac.authorization.k8s.io/v1 +items: +- apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: {{ .Release.Namespace }} + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring +kind: RoleBindingList + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + prometheus: k8s + name: {{ template "sonarqube.fullname" . }} +spec: + selector: + matchLabels: + app: {{ template "sonarqube.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + endpoints: + - interval: 30s + basicAuth: + password: admin +# name: login +# key: username + username: admin +# name: login +# key: password + path: /api/prometheus/metrics + port: http + jobLabel: sonarqube +{{- end }} diff --git a/chart/templates/virtualservice.yaml b/chart/templates/bigbang/virtualservice.yaml similarity index 100% rename from chart/templates/virtualservice.yaml rename to chart/templates/bigbang/virtualservice.yaml diff --git a/chart/values.yaml b/chart/values.yaml index 527bbcc5dd85c8d6e2ee5b2342a4c8f04c611e69..7f0a2b84e663a4eb5a247e6b0e60a66ed2ad0e5b 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -148,7 +148,11 @@ initSysctl: # - "https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar" # - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar" 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/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/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar lib: [] # For use behind a corporate proxy when downloading plugins @@ -353,3 +357,5 @@ terminationGracePeriodSeconds: 60 hostname: bigbang.dev istio: enabled: true +monitoring: + enabled: false diff --git a/tests/test-values.yml b/tests/test-values.yml index 0a6dca533983fabc4d6b2a6d87c4ccb2db6b1311..af9d6e248c00a8aad61c6b2c977f3da2163db835 100644 --- a/tests/test-values.yml +++ b/tests/test-values.yml @@ -148,7 +148,11 @@ initSysctl: # - "https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar" # - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar" 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/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/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar lib: [] # For use behind a corporate proxy when downloading plugins @@ -353,3 +357,5 @@ terminationGracePeriodSeconds: 60 hostname: bigbang.dev istio: enabled: true +monitoring: + enabled: false