Compare commits

..

3 Commits

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

This PR updates the README.md file with the current list of applications found in the k8s/ directory structure.
2025-11-18 20:18:34 +00: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
4 changed files with 96 additions and 16 deletions

View File

@@ -11,23 +11,61 @@ spec:
labels:
app: iperf3-server
spec:
serviceAccountName: iperf3-server
subdomain: iperf3
initContainers:
- name: set-hostname
image: busybox:1.35
command: ['sh', '-c']
args:
- |
NODE_NAME=$(echo $NODE_NAME | cut -d'.' -f1 | tr '[:upper:]' '[:lower:]')
echo "iperf3-${NODE_NAME}" > /etc/hostname
hostname "iperf3-${NODE_NAME}"
securityContext:
privileged: true
- 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:
- name: iperf3-server
image: networkstatic/iperf3:latest
@@ -40,8 +78,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: HOSTNAME
value: $(NODE_NAME)
resources:
requests:
memory: "64Mi"

View File

@@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- rbac.yaml
- daemonset.yaml
- service-headless.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

@@ -16,17 +16,24 @@ spec:
interval: 5m
scrapeTimeout: 30s
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:
- "10"
streams:
- "4"
relabelings:
- sourceLabels: [__address__]
targetLabel: __param_target
regex: (.+):9579
replacement: iperf3-${1}.iperf3.iperf3.svc.cluster.local:5201
- sourceLabels: [__param_target]
targetLabel: instance
- sourceLabels: [__param_target]
targetLabel: __param_target
- targetLabel: __address__
replacement: iperf3-exporter.iperf3.svc.cluster.local:9579
metricRelabelings: