Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- prometheus helm2to3 #539

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pipeline {
sh 'helm repo add nfs https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner'
sh "helm repo add airflow https://airflow-helm.github.io/charts"
sh "helm repo add grafana https://grafana.github.io/helm-charts"
sh "helm repo add prometheus-community https://prometheus-community.github.io/helm-charts"
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions charts/molgenis-prometheus/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 18.4.0
- name: prometheus-blackbox-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 7.5.0
digest: sha256:7584eabe09a9c5543fd693aac7a796c05f5767308770bc3e11f53981314c1a33
generated: "2023-02-17T14:42:04.557024+01:00"
13 changes: 10 additions & 3 deletions charts/molgenis-prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
apiVersion: v1
apiVersion: v2
name: molgenis-prometheus
home: https://prometheus.io/
version: 1.3.21
appVersion: 2.13.1
version: 2.0.0
appVersion: 2.39.1
description: Molgenis installation for the Prometheus chart.
dependencies:
- name: prometheus
version: 18.4.0
repository: https://prometheus-community.github.io/helm-charts
- name: prometheus-blackbox-exporter
version: 7.5.0
repository: https://prometheus-community.github.io/helm-charts
sources:
- https://github.com/molgenis/molgenis-ops-helm.git
icon: https://raw.githubusercontent.com/molgenis/molgenis-ops-helm/master/charts/molgenis-prometheus/catalogIcon-molgenis-prometheus.png
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 14 additions & 25 deletions charts/molgenis-prometheus/questions.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
questions:
- variable: 'environment'
- variable: "secret.githubtoken"
required: true
label: environment
default: "development"
type: enum
options:
- production
- development
description: "Cluster"
show_subquestion_if: production
subquestions:
- variable: "secret.githubtoken"
required: true
label: "Github token"
description: "Github token for MOLGENIS deployments. Only if cluster is set to production. Otherwise set xxxx"
type: string
- variable: "secret.serverlistuser"
required: true
label: "Serverlist username"
description: "Username for the serverlist server to request token to do the api calls."
type: string
- variable: "secret.serverlistpassword"
required: true
label: "Serverlist password"
description: "Password from the username for the serverlist server to request token to do the api calls."
type: string
label: "Github token"
description: "Github token for MOLGENIS deployments. Only if cluster is set to production. Otherwise set xxxx"
type: string
- variable: "secret.serverlistuser"
required: true
label: "Serverlist username"
description: "Username for the serverlist server to request token to do the api calls."
type: string
- variable: "secret.serverlistpassword"
required: true
label: "Serverlist password"
description: "Password from the username for the serverlist server to request token to do the api calls."
type: string
- variable: 'prometheus.alertmanagerFiles.alertmanager\.yml.global.slack_api_url'
required: true
default: "https://hooks.slack.com/services/..."
Expand Down
9 changes: 0 additions & 9 deletions charts/molgenis-prometheus/requirements.lock

This file was deleted.

7 changes: 0 additions & 7 deletions charts/molgenis-prometheus/requirements.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion charts/molgenis-prometheus/scripts/serverlistRequester.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def iterateServerlistWeb():
def writeToFile():
with open('node-targets.yml', 'w') as outputFile:
outputFile.write("\n".join(str(item) for item in node_exporter_targets))
with open('blackbox-targets.yml', 'w') as outputFile:
with open('website-targets.yml', 'w') as outputFile:
outputFile.write("\n".join(str(item) for item in blackbox_exporter_urls))

def closeConnection():
Expand Down
6 changes: 2 additions & 4 deletions charts/molgenis-prometheus/templates/getTargets-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- if eq .Values.environment "production" -}}
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: molgenis-prometheus-cronjob
Expand Down Expand Up @@ -49,8 +48,7 @@ spec:
token=$(cat /run/secrets/kubernetes.io/serviceaccount/token) &&
wget {{ .Values.secret.githubtoken }}@raw.githubusercontent.com/molgenis/molgenis-ops-helm/master/charts/molgenis-prometheus/scripts/serverlistRequester.py &&
python serverlistRequester.py $(echo $serverlistuser | base64 -d ) $(echo $serverlistpassword | base64 -d ) &&
kubectl --token=$token create configmap targets-configmap --from-file node-targets.yml --from-file blackbox-targets.yml -o yaml --dry-run | kubectl --token=$token replace -f - &&
kubectl --token=$token create configmap targets-configmap --from-file node-targets.yml --from-file website-targets.yml -o yaml --dry-run | kubectl --token=$token replace -f - &&
rm -rf /tmp/*"]
serviceAccountName: update-configmap-bot
restartPolicy: OnFailure
{{- end -}}
Loading