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

try installing prometheus-stack instead of prometheus and grafana

TRIGGER_JOBS=ci-test-image-build
parent bc6fd7c9
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,8 @@
- name: Tasks pertaining to nginx
import_tasks: nginx.yml
- name: Tasks pertaining to prometheus
import_tasks: prometheus.yml
- name: Tasks pertaining to prometheus and grafana
import_tasks: prometheus-stack.yml
- name: Tasks pertaining to loki-stack
import_tasks: loki-stack.yml
......@@ -21,9 +21,6 @@
- name: Tasks pertaining to eventrouter
import_tasks: eventrouter.yml
- name: Tasks pertaining to grafana
import_tasks: grafana.yml
- name: Tasks pertaining to Single sign-on
import_tasks: single-sign-on.yml
......
---
- name: Create auth secret for basic auth
tags:
- prometheus
- prometheus-stack
- config
- secret
k8s:
......@@ -15,12 +15,13 @@
data:
auth: "{{ ('admin:' + (prometheus_basic_auth | password_hash('apr_md5_crypt')) + '\n') | b64encode }}"
when: prometheus_enable_ingress is defined and prometheus_enable_ingress is true
- name: Create Kubernetes secret with prometheus settings
tags:
- config
- flux
- monitoring
- prometheus
- prometheus-stack
vars:
flux_secret:
name: "prometheus"
......@@ -38,7 +39,7 @@
tags:
- config
- monitoring
- prometheus
- prometheus-stack
vars:
pvc:
name: "{{ item.name }}"
......@@ -54,5 +55,5 @@
loop:
- name: "alertmanager"
size: "2Gi"
- name: "prometheus-server"
size: "5Gi"
- name: "grafana"
size: "2Gi"
---
adminPassword: "{{ grafana_admin_password }}"
grafana.ini:
server:
root_url: "https://grafana.{{ domain }}"
auth.generic_oauth:
name: OpenAppStack
enabled: true
client_id: grafana
client_secret: "{{ grafana_oauth_client_secret }}"
scopes: "openid profile email openappstack_roles"
auth_url: "https://sso.{{ domain }}/oauth2/auth"
token_url: "https://sso.{{ domain }}/oauth2/token"
api_url: "https://sso.{{ domain }}/userinfo"
role_attribute_path: contains(openappstack_roles[*], 'admin') && 'Admin' || 'Editor'
ingress:
enabled: true
annotations:
kubernetes.io/tls-acme: "true"
hosts:
- "grafana.{{ domain }}"
tls:
- secretName: grafana-tls
hosts:
- "grafana.{{ domain }}"
persistence:
enabled: true
existingClaim: "grafana"
podAnnotations:
backup.velero.io/backup-volumes: "storage"
# This allows us to pick up the Loki datasource
sidecar:
datasources:
enabled: true
label: grafana_datasource
# Make a configmap with the label `grafana_dashboard` to add dashboards to
# Grafana.
dashboards:
enabled: true
lablel: grafana_dashboard
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards
dashboards:
default:
apiserver:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/apiserver.json
datasource: Prometheus
cluster-total:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/cluster-total.json
datasource: Prometheus
controller-manager:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/controller-manager.json
datasource: Prometheus
k8s-resources-cluster:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-cluster.json
datasource: Prometheus
k8s-resources-namespace:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-namespace.json
datasource: Prometheus
k8s-resources-node:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-node.json
datasource: Prometheus
k8s-resources-pod:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-pod.json
datasource: Prometheus
k8s-resources-workload:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-workload.json
datasource: Prometheus
k8s-resources-workloads-namespace:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/k8s-resources-workloads-namespace.json
datasource: Prometheus
kubelet:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/kubelet.json
datasource: Prometheus
namespace-by-pod:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/namespace-by-pod.json
datasource: Prometheus
namespace-by-workload:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/namespace-by-workload.json
datasource: Prometheus
persistaentvolumeusage:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/persistentvolumeusage.json
datasource: Prometheus
pod-total:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/pod-total.json
datasource: Prometheus
proxy:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/proxy.json
datasource: Prometheus
scheduler:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/scheduler.json
datasource: Prometheus
statefulset:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/statefulset.json
datasource: Prometheus
workload-total:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/kubernetes/dashboards/workload-total.json
datasource: Prometheus
node-rsrc-use:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/prometheus/dashboards/node-rsrc-use.json
datasource: Prometheus
nodes:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/prometheus/dashboards/nodes.json
datasource: Prometheus
loki-logs:
url: https://raw.githubusercontent.com/monitoring-mixins/website/c0854f204e600dbc77e2c345dd7e4c0ff114270e/assets/loki/dashboards/loki-logs.json
# This datasource is added by the loki-stack helm chart
datasource: Loki
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-server
access: proxy
isDefault: true
This diff is collapsed.
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