Skip to content

Instantly share code, notes, and snippets.

View eumel8's full-sized avatar
๐Ÿ™‚

Frank Kloeker eumel8

๐Ÿ™‚
View GitHub Profile
@eumel8
eumel8 / gist:60a2d96aad4d6938625f0d535578fd3f
Last active April 21, 2023 07:55
prometheus-auth fix token
# This behaviour comes in Kubernetes 1.21 with a change of Serviceaccount token format. Bound tokens become default, legacy
# token still alive. In prometheus-auth, a middleware
# for bearer token auth in front of prometheus, a SubjectAccessReview will looking for a token, provided by the federated
# prometheus instance via http endpoint. This token is searched in a list of secrets cluster-wide and if there is a match,
# comparing process started for ServiceAccount and Namespace. After success, a hijack federate will provide access to the
# related cluster metrics. Normaly, the token in the federate call and the content of the related secret of the
# ServiceAccount is equal. In newer Kubernetes version this format is rewritten and internally the new format of bound token
# is stored.
รค With this difference, the SubjectAccessReview is denied and no metrics are accessable. Unfortunatelly the related
# ServiceMonitor for federate is UP, no errors are visiable.
@eumel8
eumel8 / check-mon-cron.yaml
Last active April 5, 2023 20:28
Check Project Monitoring
apiVersion: v1
kind: ConfigMap
metadata:
name: fix-project-monitoring
data:
fix-project-monitoring.sh: |
#!/usr/bin/env bash
set -e
@eumel8
eumel8 / project-monitoring-pvc-backup.yaml
Created February 9, 2023 15:49
Backup Rancher V1 Monitoring
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-project-monitoring-backup
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
@eumel8
eumel8 / federator-values.yaml
Last active January 28, 2023 18:27
Project Monitoring Rancher 2.7
global:
cattle:
clusterId: ""
clusterName: ""
rkePathPrefix: ""
rkeWindowsPathPrefix: ""
systemDefaultRegistry: mtr.devops.telekom.de
systemProjectId: ""
url: ""
image:
@eumel8
eumel8 / 00_vcluster_crossplane.md
Last active March 14, 2024 21:52
vcluster crossplane

Install kubectl crossplane plugin

curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
sudo mv kubectl-crossplane /usr/local/bin
kubectl crossplane --help

Install Crossplane

@eumel8
eumel8 / sheets.json
Created December 13, 2022 01:52
JSON object exported by the 'Sheets to JSON' Google Sheets addon.
{}
@eumel8
eumel8 / sheets.json
Created December 13, 2022 01:51
JSON object exported by the 'Sheets to JSON' Google Sheets addon.
{}
@eumel8
eumel8 / gist:7ed9759fbe757131bf01df9887a1caef
Created August 7, 2022 17:06
cyberpower-raspberry.md
# Setup Raspberry PI to monitor CybperPower USV and send alarm SMS
# Connect CyberPower USV and Raspberry with USB cable
# Install Software on Raspberry (Ubuntu):
# apt-get update && apt-get install nut nut-client nut-server
# Adjust config:
```
/etc/nut/nut.conf
MODE=netserver
@eumel8
eumel8 / otc-rds-nextflavor.go
Last active May 21, 2022 15:33
otc-rds-nextflavor.go
// show the next available rds flavor on OTC
package main
import (
"fmt"
"sort"
"strconv"
"strings"
"net/http"
@eumel8
eumel8 / otc-rds-alarm.go
Last active May 10, 2022 17:26
otc-rds-alarm.go
package main
import (
"fmt"
"net/http"
"os"
"github.com/gophercloud/utils/client"
golangsdk "github.com/opentelekomcloud/gophertelekomcloud"
"github.com/opentelekomcloud/gophertelekomcloud/openstack"