Skip to content
Snippets Groups Projects
Verified Commit 2f8bbe12 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

grafana or prometheus renamed both to prometheus-stack

parent 7f2ef8f2
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
# - A pipeline gets started from the UI and the job name is included in the # - A pipeline gets started from the UI and the job name is included in the
# CI variable `TRIGGER_JOBS` # CI variable `TRIGGER_JOBS`
# - A commit is pushed containing the pattern TRIGGER_JOBS=.*<job name> # - A commit is pushed containing the pattern TRIGGER_JOBS=.*<job name>
# (i.e. TRIGGER_JOBS=ci-test-image-build,enable-grafana) # (i.e. TRIGGER_JOBS=ci-test-image-build,enable-nextcloud)
# #
# Gitlab CI allows pushing CI vars via `git push` but a bug prevents this when # Gitlab CI allows pushing CI vars via `git push` but a bug prevents this when
# using merge request pipelines (see https://gitlab.com/gitlab-org/gitlab/-/issues/326098) # using merge request pipelines (see https://gitlab.com/gitlab-org/gitlab/-/issues/326098)
...@@ -407,15 +407,6 @@ eventrouter-ready: ...@@ -407,15 +407,6 @@ eventrouter-ready:
- .apps-ready - .apps-ready
- .eventrouter_rules - .eventrouter_rules
grafana-ready:
variables:
APP: "grafana"
needs:
- job: prometheus-stack-helm-release
extends:
- .apps-ready
- .prometheus_stack_rules
nextcloud-ready: nextcloud-ready:
variables: variables:
APP: "nextcloud" APP: "nextcloud"
...@@ -480,15 +471,6 @@ wordpress-ready: ...@@ -480,15 +471,6 @@ wordpress-ready:
extends: extends:
- .ssh_setup - .ssh_setup
grafana-cert:
variables:
APP: "grafana"
needs:
- job: grafana-ready
extends:
- .apps-cert
- .prometheus_stack_rules
nextcloud-cert: nextcloud-cert:
variables: variables:
APP: "nextcloud" APP: "nextcloud"
...@@ -593,11 +575,11 @@ prometheus-stack-alerts: ...@@ -593,11 +575,11 @@ prometheus-stack-alerts:
extends: extends:
- .ssh_setup - .ssh_setup
grafana-behave: prometheus-stack-behave:
variables: variables:
APP: "grafana" APP: "prometheus-stack"
needs: needs:
- job: grafana-cert - job: prometheus-stack-cert
extends: extends:
- .behave - .behave
- .prometheus_stack_rules - .prometheus_stack_rules
......
---
- name: Create Kubernetes secret with grafana settings
tags:
- config
- flux
- monitoring
- grafana
vars:
flux_secret:
name: "grafana"
namespace: "oas"
include_tasks:
file: flux_secret.yml
apply:
tags:
- config
- flux
- monitoring
- grafana
- name: Create monitoring-related persistent volumes
tags:
- config
- monitoring
- grafana
vars:
pvc:
name: "{{ item.name }}"
namespace: "oas"
size: "{{ item.size }}"
include_tasks:
file: pvc.yml
apply:
tags:
- config
- monitoring
- grafana
loop:
- name: "grafana"
size: "2Gi"
...@@ -83,6 +83,21 @@ alertmanager: ...@@ -83,6 +83,21 @@ alertmanager:
prometheus: prometheus:
prometheusSpec:
scrapeInterval: "3m"
evaluationInterval: "3m"
retention: "10d"
# replicas: 2
# podAntiAffinity: "hard"
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
{% if prometheus_enable_ingress is defined and prometheus_enable_ingress %} {% if prometheus_enable_ingress is defined and prometheus_enable_ingress %}
ingress: ingress:
enabled: true enabled: true
...@@ -98,20 +113,6 @@ prometheus: ...@@ -98,20 +113,6 @@ prometheus:
hosts: hosts:
- "prometheus.{{ domain }}" - "prometheus.{{ domain }}"
{% endif %} {% endif %}
prometheusSpec:
scrapeInterval: "3m"
evaluationInterval: "3m"
retention: "10d"
# replicas: 2
# podAntiAffinity: "hard"
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
# resources: # resources:
# limits: # limits:
...@@ -158,48 +159,48 @@ grafana: ...@@ -158,48 +159,48 @@ grafana:
backup.velero.io/backup-volumes: "storage" backup.velero.io/backup-volumes: "storage"
# This allows us to pick up the Loki datasource # This allows us to pick up the Loki datasource
sidecar: # sidecar:
datasources: # datasources:
enabled: true # enabled: true
label: grafana_datasource # label: grafana_datasource
# Make a configmap with the label `grafana_dashboard` to add dashboards to # # Make a configmap with the label `grafana_dashboard` to add dashboards to
# Grafana. # # Grafana.
dashboards: # dashboards:
enabled: true # enabled: true
lablel: grafana_dashboard # lablel: grafana_dashboard
dashboardProviders: # dashboardProviders:
dashboardproviders.yaml: # dashboardproviders.yaml:
apiVersion: 1 # apiVersion: 1
providers: # providers:
- name: 'default' # - name: 'default'
orgId: 1 # orgId: 1
folder: '' # folder: ''
type: file # type: file
disableDeletion: false # disableDeletion: false
editable: true # editable: true
options: # options:
path: /var/lib/grafana/dashboards # path: /var/lib/grafana/dashboards
dashboards: # dashboards:
default: # default:
kube-dash: # kube-dash:
gnetId: 11074 # gnetId: 11074
revision: 2 # revision: 2
datasource: Prometheus # datasource: Prometheus
loki-dash: # loki-dash:
gnetId: 10880 # gnetId: 10880
revision: 1 # revision: 1
datasource: Loki # datasource: Loki
datasources: # datasources:
datasources.yaml: # datasources.yaml:
apiVersion: 1 # apiVersion: 1
datasources: # datasources:
- name: Prometheus # - name: Prometheus
type: prometheus # type: prometheus
url: http://prometheus-server # url: http://prometheus-server
access: proxy # access: proxy
isDefault: true # isDefault: true
plugins: plugins:
- grafana-piechart-panel - grafana-piechart-panel
......
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: grafana
namespace: oas
annotations:
flux.weave.works/automated: "false"
spec:
releaseName: grafana
chart:
repository: https://grafana.github.io/helm-charts
name: grafana
version: 6.2.1
valuesFrom:
- secretKeyRef:
name: grafana-settings
key: values.yaml
@grafana @prometheus-stack
Feature: Test grafana admin login Feature: Test grafana admin login
As an OAS admin As an OAS admin
I want to be able to login to grafana as the user admin I want to be able to login to grafana as the user admin
......
...@@ -17,7 +17,6 @@ EXPECTED_RELEASES = { ...@@ -17,7 +17,6 @@ EXPECTED_RELEASES = {
'oas': [ 'oas': [
'ingress', 'ingress',
'prometheus', 'prometheus',
'grafana',
'loki-stack', 'loki-stack',
'eventrouter', 'eventrouter',
'single-sign-on' 'single-sign-on'
...@@ -35,15 +34,12 @@ EXPECTED_APP_LABELS = { ...@@ -35,15 +34,12 @@ EXPECTED_APP_LABELS = {
'rocketchat': { 'rocketchat': {
'namespace': 'oas-apps', 'namespace': 'oas-apps',
'label_selector': 'app.kubernetes.io/instance=rocketchat'}, 'label_selector': 'app.kubernetes.io/instance=rocketchat'},
'grafana': { 'prometheus-stack': {
'namespace': 'oas', 'namespace': 'oas',
'label_selector': 'app=grafana'}, 'label_selector': 'app in (grafana,prometheus)'},
'eventrouter': { 'eventrouter': {
'namespace': 'oas', 'namespace': 'oas',
'label_selector': 'app=eventrouter'}, 'label_selector': 'app=eventrouter'},
'prometheus': {
'namespace': 'oas',
'label_selector': 'app=prometheus'},
'single-sign-on': { 'single-sign-on': {
'namespace': 'oas', 'namespace': 'oas',
'label_selector': 'app.kubernetes.io/name in (hydra,hydra-maester,single-sign-on-userbackend,single-sign-on-consent,single-sign-on-userpanel,single-sign-on-login)'} 'label_selector': 'app.kubernetes.io/name in (hydra,hydra-maester,single-sign-on-userbackend,single-sign-on-consent,single-sign-on-userpanel,single-sign-on-login)'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment