Add exporter to gitea
This commit is contained in:
parent
2c84d02a8e
commit
2d68590860
21
argocd-apps/gitea-exporter.yaml
Normal file
21
argocd-apps/gitea-exporter.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: gitea-exporter
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: exporters
|
||||||
|
source:
|
||||||
|
repoURL: https://git.dvirlabs.com/dvirlabs/dev-tools.git
|
||||||
|
targetRevision: master
|
||||||
|
path: charts/gitea-exporter
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- ../../manifests/exporters/gitea-exporter/values.yaml
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: dev-tools
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
5
charts/gitea-exporter/Chart.yaml
Normal file
5
charts/gitea-exporter/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: gitea-exporter
|
||||||
|
description: A Helm chart for deploying the Gitea Prometheus exporter
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: latest
|
||||||
31
charts/gitea-exporter/templates/deployment.yaml
Normal file
31
charts/gitea-exporter/templates/deployment.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gitea-exporter
|
||||||
|
labels:
|
||||||
|
app: gitea-exporter
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gitea-exporter
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: gitea-exporter
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: exporter
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.service.port }}
|
||||||
|
name: metrics
|
||||||
|
env:
|
||||||
|
- name: GITEA_BASE_URL
|
||||||
|
value: {{ .Values.gitea.baseUrl | quote }}
|
||||||
|
- name: GITEA_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: gitea-exporter-secret
|
||||||
|
key: token
|
||||||
15
charts/gitea-exporter/templates/podmonitor.yaml
Normal file
15
charts/gitea-exporter/templates/podmonitor.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{{- if .Values.monitoring.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: gitea-exporter
|
||||||
|
labels:
|
||||||
|
{{- toYaml .Values.monitoring.labels | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gitea-exporter
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: metrics
|
||||||
|
interval: 30s
|
||||||
|
{{- end }}
|
||||||
7
charts/gitea-exporter/templates/secret.yaml
Normal file
7
charts/gitea-exporter/templates/secret.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: gitea-exporter-secret
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
token: {{ .Values.gitea.token | quote }}
|
||||||
13
charts/gitea-exporter/templates/service.yaml
Normal file
13
charts/gitea-exporter/templates/service.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: gitea-exporter
|
||||||
|
labels:
|
||||||
|
app: gitea-exporter
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: metrics
|
||||||
|
selector:
|
||||||
|
app: gitea-exporter
|
||||||
20
charts/gitea-exporter/values.yaml
Normal file
20
charts/gitea-exporter/values.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: quay.io/mook/gitea-exporter
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
gitea:
|
||||||
|
baseUrl: "https://git.dvirlabs.com"
|
||||||
|
token: "REPLACE_ME"
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 9421
|
||||||
|
|
||||||
|
monitoring:
|
||||||
|
enabled: true
|
||||||
|
labels:
|
||||||
|
release: prometheus
|
||||||
|
|
||||||
|
resources: {}
|
||||||
3
manifests/exporters/gitea-exporter/values.yaml
Normal file
3
manifests/exporters/gitea-exporter/values.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
gitea:
|
||||||
|
baseUrl: "https://git.dvirlabs.com"
|
||||||
|
token: "your-gitea-api-token-here"
|
||||||
Loading…
x
Reference in New Issue
Block a user