commit 4317b2202b6d741ac29d41e9c32cd2587721c9ec
parent 45dcffac07958be8de288e393770f3f810734ae5
Author: MTRNord <MTRNord@users.noreply.github.com>
Date: Mon, 4 Aug 2025 15:06:49 +0200
Migrate connectivity-tester
Diffstat:
1 file changed, 85 insertions(+), 85 deletions(-)
diff --git a/apps/talos_cluster/connectivity-tester/deployment.yaml b/apps/talos_cluster/connectivity-tester/deployment.yaml
@@ -21,11 +21,11 @@ spec:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - connectivity-tester
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - connectivity-tester
topologyKey: "kubernetes.io/hostname"
imagePullSecrets:
- name: ghcr-pull
@@ -35,48 +35,48 @@ spec:
image: ghcr.io/mtrnord/matrix-connection-tester-ui:v0.2.0
imagePullPolicy: Always
lifecycle:
- preStop:
- exec:
- command:
- - sleep
- - "10"
+ preStop:
+ exec:
+ command:
+ - sleep
+ - "10"
resources:
- limits: {}
- requests:
- memory: "344Mi"
- cpu: "252m"
+ limits: {}
+ requests:
+ memory: "100Mi"
+ cpu: "100m"
ports:
- - containerPort: 3000
- name: web
- protocol: TCP
+ - containerPort: 3000
+ name: web
+ protocol: TCP
volumeMounts:
- - name: configs
- mountPath: "/usr/share/nginx/html/config.json"
- subPath: config.json
- readOnly: true
- - mountPath: /tmp
- name: tmp
+ - name: configs
+ mountPath: "/usr/share/nginx/html/config.json"
+ subPath: config.json
+ readOnly: true
+ - mountPath: /tmp
+ name: tmp
livenessProbe:
- httpGet:
- path: /
- port: web
- scheme: HTTP
+ httpGet:
+ path: /
+ port: web
+ scheme: HTTP
readinessProbe:
- httpGet:
- path: /
- port: web
- scheme: HTTP
+ httpGet:
+ path: /
+ port: web
+ scheme: HTTP
startupProbe:
- httpGet:
- path: /
- port: web
+ httpGet:
+ path: /
+ port: web
volumes:
- name: configs
configMap:
- name: connectivity-tester-config
+ name: connectivity-tester-config
- name: tmp
emptyDir:
- sizeLimit: 2048Mi
+ sizeLimit: 2048Mi
---
apiVersion: apps/v1
kind: Deployment
@@ -101,11 +101,11 @@ spec:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - connectivity-tester-api
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - connectivity-tester-api
topologyKey: "kubernetes.io/hostname"
imagePullSecrets:
- name: ghcr-pull
@@ -116,41 +116,41 @@ spec:
image: ghcr.io/mtrnord/rust-federation-tester:v0.2.2
imagePullPolicy: IfNotPresent
resources:
- limits: {}
- requests:
- memory: "344Mi"
- cpu: "252m"
+ limits: {}
+ requests:
+ memory: "344Mi"
+ cpu: "252m"
volumeMounts:
- - name: api-config
- mountPath: /app/config.yaml
- subPath: config.yaml
- readOnly: true
+ - name: api-config
+ mountPath: /app/config.yaml
+ subPath: config.yaml
+ readOnly: true
securityContext:
- runAsUser: 1000
- runAsGroup: 1000
- readOnlyRootFilesystem: true
+ runAsUser: 1000
+ runAsGroup: 1000
+ readOnlyRootFilesystem: true
ports:
- - containerPort: 8080
- name: api
- protocol: TCP
+ - containerPort: 8080
+ name: api
+ protocol: TCP
readinessProbe:
- httpGet:
- path: /healthz
- port: api
- scheme: HTTP
+ httpGet:
+ path: /healthz
+ port: api
+ scheme: HTTP
livenessProbe:
- httpGet:
- path: /healthz
- port: api
- scheme: HTTP
+ httpGet:
+ path: /healthz
+ port: api
+ scheme: HTTP
startupProbe:
- httpGet:
- path: /healthz
- port: api
+ httpGet:
+ path: /healthz
+ port: api
volumes:
- name: api-config
secret:
- secretName: connectivity-tester-config
+ secretName: connectivity-tester-config
---
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
@@ -251,18 +251,18 @@ spec:
# max error rate (5xx responses)
# percentage (0-100)
templateRef:
- name: connectivity-tester-error-rate
- namespace: matrix
+ name: connectivity-tester-error-rate
+ namespace: matrix
thresholdRange:
- max: 2
+ max: 2
interval: 1m
- name: latency
templateRef:
- name: connectivity-tester-latency
- namespace: matrix
+ name: connectivity-tester-latency
+ namespace: matrix
# seconds
thresholdRange:
- max: 1
+ max: 1
interval: 30s
sessionAffinity:
cookieName: flagger-cookie
@@ -273,13 +273,13 @@ spec:
url: http://flagger-loadtester.flagger-system/
timeout: 15s
metadata:
- type: bash
- cmd: "curl -s http://connectivity-tester-canary.matrix:3000"
+ type: bash
+ cmd: "curl -s http://connectivity-tester-canary.matrix:3000"
- name: load-test
url: http://flagger-loadtester.flagger-system/
timeout: 10m
metadata:
- cmd: "hey -z 10m -q 10 -c 2 http://connectivity-tester-canary.matrix/?serverName=mtrnord.blog"
+ cmd: "hey -z 10m -q 10 -c 2 http://connectivity-tester-canary.matrix/?serverName=mtrnord.blog"
---
apiVersion: flagger.app/v1beta1
kind: Canary
@@ -332,18 +332,18 @@ spec:
# max error rate (5xx responses)
# percentage (0-100)
templateRef:
- name: connectivity-tester-error-rate
- namespace: matrix
+ name: connectivity-tester-error-rate
+ namespace: matrix
thresholdRange:
- max: 2
+ max: 2
interval: 1m
- name: latency
templateRef:
- name: connectivity-tester-latency
- namespace: matrix
+ name: connectivity-tester-latency
+ namespace: matrix
# seconds
thresholdRange:
- max: 1
+ max: 1
interval: 30s
sessionAffinity:
cookieName: flagger-cookie
@@ -354,10 +354,10 @@ spec:
url: http://flagger-loadtester.flagger-system/
timeout: 15s
metadata:
- type: bash
- cmd: "curl -s http://connectivity-tester-api-canary.matrix:8080/healthz | grep 'ok'"
+ type: bash
+ cmd: "curl -s http://connectivity-tester-api-canary.matrix:8080/healthz | grep 'ok'"
- name: load-test
url: http://flagger-loadtester.flagger-system/
timeout: 10m
metadata:
- cmd: "hey -z 10m -q 10 -c 2 http://connectivity-tester-api-canary.matrix/api/federation/federation-ok?serverName=mtrnord.blog&no_cache=true"
+ cmd: "hey -z 10m -q 10 -c 2 http://connectivity-tester-api-canary.matrix/api/federation/federation-ok?serverName=mtrnord.blog&no_cache=true"