Compare commits

...

7 Commits

Author SHA1 Message Date
Gitea Actions Bot
036b96fda6 Auto-update README with current k8s applications
All checks were successful
Terraform / Terraform (pull_request) Successful in 1m49s
Generated by CI/CD workflow on 2025-11-18 20:24:16

This PR updates the README.md file with the current list of applications found in the k8s/ directory structure.
2025-11-18 20:24:16 +00:00
Ultradesu
57d517af77 Fixed iperf3 monitor
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 58s
Check with kubeconform / lint (push) Successful in 1m20s
Auto-update README / Generate README and Create MR (push) Successful in 23s
2025-11-18 22:21:17 +02:00
Ultradesu
1f7d9e41c8 Fixed iperf3 monitor
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 30s
Check with kubeconform / lint (push) Successful in 1m8s
Auto-update README / Generate README and Create MR (push) Successful in 37s
2025-11-18 22:16:11 +02:00
Ultradesu
39a27c596f Fixed iperf3
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 12s
Check with kubeconform / lint (push) Successful in 20s
Auto-update README / Generate README and Create MR (push) Successful in 11s
2025-11-18 22:13:12 +02:00
Ultradesu
353bb877be Fixed iperf3
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 12s
Check with kubeconform / lint (push) Successful in 14s
Auto-update README / Generate README and Create MR (push) Successful in 15s
2025-11-18 21:45:26 +02:00
Ultradesu
e523bb8bea Fixed iperf3
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 12s
Check with kubeconform / lint (push) Successful in 14s
Auto-update README / Generate README and Create MR (push) Successful in 12s
2025-11-18 21:44:00 +02:00
Ultradesu
b433373725 Fixed iperf3
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 13s
Check with kubeconform / lint (push) Successful in 13s
Auto-update README / Generate README and Create MR (push) Successful in 12s
2025-11-18 21:40:53 +02:00
6 changed files with 162 additions and 9 deletions

View File

@@ -40,6 +40,7 @@ ArgoCD homelab project
| **greece-notifier** | [![greece-notifier](https://ag.hexor.cy/api/badge?name=greece-notifier&revision=true)](https://ag.hexor.cy/applications/argocd/greece-notifier) | | **greece-notifier** | [![greece-notifier](https://ag.hexor.cy/api/badge?name=greece-notifier&revision=true)](https://ag.hexor.cy/applications/argocd/greece-notifier) |
| **hexound** | [![hexound](https://ag.hexor.cy/api/badge?name=hexound&revision=true)](https://ag.hexor.cy/applications/argocd/hexound) | | **hexound** | [![hexound](https://ag.hexor.cy/api/badge?name=hexound&revision=true)](https://ag.hexor.cy/applications/argocd/hexound) |
| **immich** | [![immich](https://ag.hexor.cy/api/badge?name=immich&revision=true)](https://ag.hexor.cy/applications/argocd/immich) | | **immich** | [![immich](https://ag.hexor.cy/api/badge?name=immich&revision=true)](https://ag.hexor.cy/applications/argocd/immich) |
| **iperf3** | [![iperf3](https://ag.hexor.cy/api/badge?name=iperf3&revision=true)](https://ag.hexor.cy/applications/argocd/iperf3) |
| **jellyfin** | [![jellyfin](https://ag.hexor.cy/api/badge?name=jellyfin&revision=true)](https://ag.hexor.cy/applications/argocd/jellyfin) | | **jellyfin** | [![jellyfin](https://ag.hexor.cy/api/badge?name=jellyfin&revision=true)](https://ag.hexor.cy/applications/argocd/jellyfin) |
| **k8s-secrets** | [![k8s-secrets](https://ag.hexor.cy/api/badge?name=k8s-secrets&revision=true)](https://ag.hexor.cy/applications/argocd/k8s-secrets) | | **k8s-secrets** | [![k8s-secrets](https://ag.hexor.cy/api/badge?name=k8s-secrets&revision=true)](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
| **khm** | [![khm](https://ag.hexor.cy/api/badge?name=khm&revision=true)](https://ag.hexor.cy/applications/argocd/khm) | | **khm** | [![khm](https://ag.hexor.cy/api/badge?name=khm&revision=true)](https://ag.hexor.cy/applications/argocd/khm) |

View File

@@ -11,8 +11,61 @@ spec:
labels: labels:
app: iperf3-server app: iperf3-server
spec: spec:
hostname: iperf3-$(NODE_NAME) serviceAccountName: iperf3-server
subdomain: iperf3 subdomain: iperf3
initContainers:
- name: create-service
image: bitnami/kubectl:latest
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
command:
- /bin/bash
- -c
- |
# Clean node name for service name
NODE_CLEAN=$(echo "$NODE_NAME" | cut -d'.' -f1 | tr '[:upper:]' '[:lower:]' | tr '_' '-')
SERVICE_NAME="iperf3-${NODE_CLEAN}"
# Create service for this pod
kubectl apply -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: ${SERVICE_NAME}
namespace: iperf3
labels:
app: iperf3-node-service
target-node: "${NODE_NAME}"
spec:
type: ClusterIP
ports:
- name: iperf3
port: 5201
protocol: TCP
---
apiVersion: v1
kind: Endpoints
metadata:
name: ${SERVICE_NAME}
namespace: iperf3
labels:
app: iperf3-node-service
target-node: "${NODE_NAME}"
subsets:
- addresses:
- ip: ${POD_IP}
ports:
- name: iperf3
port: 5201
protocol: TCP
EOF
containers: containers:
- name: iperf3-server - name: iperf3-server
image: networkstatic/iperf3:latest image: networkstatic/iperf3:latest

View File

@@ -14,6 +14,60 @@ spec:
labels: labels:
app: iperf3-exporter app: iperf3-exporter
spec: spec:
serviceAccountName: iperf3-server
initContainers:
- name: create-exporter-service
image: bitnami/kubectl:latest
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
command:
- /bin/bash
- -c
- |
# Clean node name for service name
NODE_CLEAN=$(echo "$NODE_NAME" | cut -d'.' -f1 | tr '[:upper:]' '[:lower:]' | tr '_' '-')
SERVICE_NAME="iperf3-exporter-${NODE_CLEAN}"
# Create service for this exporter pod
kubectl apply -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: ${SERVICE_NAME}
namespace: iperf3
labels:
app: iperf3-exporter-service
target-node: "${NODE_NAME}"
spec:
type: ClusterIP
ports:
- name: metrics
port: 9579
protocol: TCP
---
apiVersion: v1
kind: Endpoints
metadata:
name: ${SERVICE_NAME}
namespace: iperf3
labels:
app: iperf3-exporter-service
target-node: "${NODE_NAME}"
subsets:
- addresses:
- ip: ${POD_IP}
ports:
- name: metrics
port: 9579
protocol: TCP
EOF
containers: containers:
- name: iperf3-exporter - name: iperf3-exporter
image: ghcr.io/edgard/iperf3_exporter:1.2.2 image: ghcr.io/edgard/iperf3_exporter:1.2.2

View File

@@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- rbac.yaml
- daemonset.yaml - daemonset.yaml
- service-headless.yaml - service-headless.yaml
- iperf3-exporter-daemonset.yaml - iperf3-exporter-daemonset.yaml

36
k8s/apps/iperf3/rbac.yaml Normal file
View File

@@ -0,0 +1,36 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: iperf3-server
namespace: iperf3
labels:
app: iperf3-server
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: iperf3-service-manager
namespace: iperf3
labels:
app: iperf3-server
rules:
- apiGroups: [""]
resources: ["services", "endpoints"]
verbs: ["get", "list", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: iperf3-service-manager
namespace: iperf3
labels:
app: iperf3-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: iperf3-service-manager
subjects:
- kind: ServiceAccount
name: iperf3-server
namespace: iperf3

View File

@@ -3,7 +3,6 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
metadata: metadata:
name: iperf3-exporter name: iperf3-exporter
namespace: default
labels: labels:
app: iperf3-exporter app: iperf3-exporter
release: prometheus release: prometheus
@@ -17,21 +16,30 @@ spec:
interval: 5m interval: 5m
scrapeTimeout: 30s scrapeTimeout: 30s
params: params:
target:
- "iperf3-ch.iperf3.svc.cluster.local:5201"
- "iperf3-us.iperf3.svc.cluster.local:5201"
- "iperf3-iris.iperf3.svc.cluster.local:5201"
- "iperf3-home.iperf3.svc.cluster.local:5201"
- "iperf3-master.iperf3.svc.cluster.local:5201"
- "iperf3-it.iperf3.svc.cluster.local:5201"
- "iperf3-nas.iperf3.svc.cluster.local:5201"
- "iperf3-spb.iperf3.svc.cluster.local:5201"
duration: duration:
- "10" - "10"
streams: streams:
- "4" - "4"
relabelings: relabelings:
- sourceLabels: [__address__]
targetLabel: __param_target
regex: (.+):9579
replacement: iperf3-${1}.iperf3.default.svc.cluster.local:5201
- sourceLabels: [__param_target] - sourceLabels: [__param_target]
targetLabel: instance targetLabel: instance
- targetLabel: __address__ - sourceLabels: [__param_target]
replacement: iperf3-exporter.default.svc.cluster.local:9579 targetLabel: __param_target
- sourceLabels: [__param_target]
targetLabel: __address__
regex: iperf3-(.+)\.iperf3\.svc\.cluster\.local:5201
replacement: iperf3-exporter-${1}.iperf3.svc.cluster.local:9579
metricRelabelings: metricRelabelings:
- sourceLabels: [__name__] - sourceLabels: [__name__]
regex: iperf3_(.+) regex: iperf3_(.+)
targetLabel: __name__ targetLabel: __name__
replacement: network_${1} replacement: network_${1}