Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Yuan <[email protected]>
  • Loading branch information
SamYuan1990 committed Apr 27, 2024
1 parent 46924a8 commit b8a2a10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prometheus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ _setup_dashboard(){
if [ -f "$DASHBOARD_DIR/grafana-dashboards/kepler-exporter-configmap.yaml" ]; then
return 0
else
header "Setup Dashboard"
header "Setup Dashboard base on $DASHBOARD_DIR"
mkdir -p "$DASHBOARD_DIR/grafana-dashboards/"
cat - > "$DASHBOARD_DIR/grafana-dashboards/kepler-exporter-configmap.yaml" << EOF
apiVersion: v1
Expand Down
1 change: 1 addition & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ print_config() {
Monitoring
* Install Prometheus : $prom_install_msg
* Install Grafana : $GRAFANA_ENABLE
if Grafana been enabled, the kepler dashboard will be installed.
Tekton
* Install Tekton : $TEKTON_ENABLE
Expand Down
3 changes: 3 additions & 0 deletions verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ containerruntime() {


run_yq(){
if [ -f "$DASHBOARD_DIR/grafana-dashboards/kepler-exporter-configmap.yaml" ]; then
return 0
fi
f="$DASHBOARD_DIR/grafana-dashboards/kepler-exporter-configmap.yaml" \
yq -i e '.items += [load(env(f))]' "$KUBE_PROM_DIR"/manifests/grafana-dashboardDefinitions.yaml;
yq -i e '.spec.template.spec.containers.0.volumeMounts += [ {"mountPath": "/grafana-dashboard-definitions/0/kepler-exporter", "name": "grafana-dashboard-kepler-exporter", "readOnly": false} ]' "$KUBE_PROM_DIR"/manifests/grafana-deployment.yaml
Expand Down

0 comments on commit b8a2a10

Please sign in to comment.