forked from mtusi2026/mtusi2026lab3
Исправить заголовок 413 и дополнить проверку отказов и масштабирования lab3
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Исключённый прогон
|
||||
|
||||
Чтение состояния Job через Kubernetes API завершилось TLS handshake timeout. Восстановление обычной конфигурации могло пересечься с нагрузкой, поэтому этот growing1 не включается в матрицу. Следующий запуск ограниченно повторяет только чтение статуса Job; при неуспехе останавливает свой Job перед восстановлением Helm-конфигурации.
|
||||
@@ -0,0 +1 @@
|
||||
7b7e23fd029beea47e6f625a96cb98d2fe04bafb
|
||||
@@ -0,0 +1 @@
|
||||
2026-10-29T11:19:19Z
|
||||
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"deployment.kubernetes.io/revision": "14",
|
||||
"meta.helm.sh/release-name": "lab2",
|
||||
"meta.helm.sh/release-namespace": "highload-applications"
|
||||
},
|
||||
"creationTimestamp": "2026-10-16T07:38:22Z",
|
||||
"generation": 24,
|
||||
"labels": {
|
||||
"app.kubernetes.io/managed-by": "Helm"
|
||||
},
|
||||
"name": "api",
|
||||
"namespace": "highload-applications",
|
||||
"resourceVersion": "60162236",
|
||||
"uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc"
|
||||
},
|
||||
"spec": {
|
||||
"progressDeadlineSeconds": 600,
|
||||
"replicas": 1,
|
||||
"revisionHistoryLimit": 10,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"app": "api"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"rollingUpdate": {
|
||||
"maxSurge": 1,
|
||||
"maxUnavailable": 0
|
||||
},
|
||||
"type": "RollingUpdate"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77",
|
||||
"kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00"
|
||||
},
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"app": "api"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"env": [
|
||||
{
|
||||
"name": "INSTANCE_ID",
|
||||
"valueFrom": {
|
||||
"fieldRef": {
|
||||
"apiVersion": "v1",
|
||||
"fieldPath": "metadata.name"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CURSOR_SIGNING_KEY",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"key": "cursor-key",
|
||||
"name": "messenger-secrets"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DATABASE_URL",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"key": "database-url",
|
||||
"name": "messenger-secrets"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"envFrom": [
|
||||
{
|
||||
"configMapRef": {
|
||||
"name": "messenger-config"
|
||||
}
|
||||
}
|
||||
],
|
||||
"image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3",
|
||||
"imagePullPolicy": "IfNotPresent",
|
||||
"lifecycle": {
|
||||
"preStop": {
|
||||
"sleep": {
|
||||
"seconds": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"livenessProbe": {
|
||||
"failureThreshold": 3,
|
||||
"httpGet": {
|
||||
"path": "/health/live",
|
||||
"port": 8080,
|
||||
"scheme": "HTTP"
|
||||
},
|
||||
"periodSeconds": 5,
|
||||
"successThreshold": 1,
|
||||
"timeoutSeconds": 1
|
||||
},
|
||||
"name": "api",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"readinessProbe": {
|
||||
"failureThreshold": 2,
|
||||
"httpGet": {
|
||||
"path": "/health/ready",
|
||||
"port": 8080,
|
||||
"scheme": "HTTP"
|
||||
},
|
||||
"periodSeconds": 2,
|
||||
"successThreshold": 1,
|
||||
"timeoutSeconds": 2
|
||||
},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"cpu": "250m",
|
||||
"memory": "128Mi"
|
||||
},
|
||||
"requests": {
|
||||
"cpu": "250m",
|
||||
"memory": "128Mi"
|
||||
}
|
||||
},
|
||||
"securityContext": {
|
||||
"allowPrivilegeEscalation": false,
|
||||
"capabilities": {
|
||||
"drop": [
|
||||
"ALL"
|
||||
]
|
||||
},
|
||||
"readOnlyRootFilesystem": true
|
||||
},
|
||||
"startupProbe": {
|
||||
"failureThreshold": 30,
|
||||
"httpGet": {
|
||||
"path": "/health/ready",
|
||||
"port": 8080,
|
||||
"scheme": "HTTP"
|
||||
},
|
||||
"periodSeconds": 2,
|
||||
"successThreshold": 1,
|
||||
"timeoutSeconds": 1
|
||||
},
|
||||
"terminationMessagePath": "/dev/termination-log",
|
||||
"terminationMessagePolicy": "File"
|
||||
}
|
||||
],
|
||||
"dnsPolicy": "ClusterFirst",
|
||||
"imagePullSecrets": [
|
||||
{
|
||||
"name": "registry-pull"
|
||||
}
|
||||
],
|
||||
"nodeSelector": {
|
||||
"kubernetes.io/hostname": "dev.asisti.tech"
|
||||
},
|
||||
"restartPolicy": "Always",
|
||||
"schedulerName": "default-scheduler",
|
||||
"securityContext": {
|
||||
"runAsNonRoot": true,
|
||||
"runAsUser": 65532,
|
||||
"seccompProfile": {
|
||||
"type": "RuntimeDefault"
|
||||
}
|
||||
},
|
||||
"terminationGracePeriodSeconds": 20,
|
||||
"topologySpreadConstraints": [
|
||||
{
|
||||
"labelSelector": {
|
||||
"matchLabels": {
|
||||
"app": "api"
|
||||
}
|
||||
},
|
||||
"maxSkew": 1,
|
||||
"topologyKey": "kubernetes.io/hostname",
|
||||
"whenUnsatisfiable": "ScheduleAnyway"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"availableReplicas": 1,
|
||||
"conditions": [
|
||||
{
|
||||
"lastTransitionTime": "2026-10-29T11:19:28Z",
|
||||
"lastUpdateTime": "2026-10-29T11:19:28Z",
|
||||
"message": "Deployment has minimum availability.",
|
||||
"reason": "MinimumReplicasAvailable",
|
||||
"status": "True",
|
||||
"type": "Available"
|
||||
},
|
||||
{
|
||||
"lastTransitionTime": "2026-10-16T07:38:22Z",
|
||||
"lastUpdateTime": "2026-10-29T11:19:31Z",
|
||||
"message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.",
|
||||
"reason": "NewReplicaSetAvailable",
|
||||
"status": "True",
|
||||
"type": "Progressing"
|
||||
}
|
||||
],
|
||||
"observedGeneration": 24,
|
||||
"readyReplicas": 1,
|
||||
"replicas": 1,
|
||||
"updatedReplicas": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
|
||||
dev.asisti.tech Ready <none> 252d v1.33.13 100.99.166.40 <none> Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29
|
||||
marlosrv0 Ready <none> 254d v1.33.13 192.168.1.37 <none> Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29
|
||||
srv0.agapov.space Ready <none> 246d v1.33.13 100.108.186.94 <none> Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29
|
||||
@@ -0,0 +1,2 @@
|
||||
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
|
||||
api-577bffc7b-c9wsv 1/1 Running 0 43s 10.1.25.118 dev.asisti.tech <none> <none>
|
||||
@@ -0,0 +1,2 @@
|
||||
profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration
|
||||
growing1,growing1-20261029111920,1,250,128,8,32,30
|
||||
|
@@ -0,0 +1,51 @@
|
||||
UTC 2026-10-29T11:20:07Z
|
||||
NAME CPU(cores) MEMORY(bytes)
|
||||
api-577bffc7b-c9wsv 22m 22Mi
|
||||
postgres-0 5m 41Mi
|
||||
valkey-0 7m 10Mi
|
||||
valkey-1 6m 14Mi
|
||||
valkey-2 6m 3Mi
|
||||
active|||1
|
||||
idle|Client|ClientRead|1
|
||||
idle in transaction|Client|ClientRead|1
|
||||
UTC 2026-10-29T11:20:13Z
|
||||
NAME CPU(cores) MEMORY(bytes)
|
||||
api-577bffc7b-c9wsv 22m 22Mi
|
||||
postgres-0 5m 41Mi
|
||||
valkey-0 7m 10Mi
|
||||
valkey-1 6m 14Mi
|
||||
valkey-2 6m 3Mi
|
||||
active|||1
|
||||
idle|Client|ClientRead|1
|
||||
idle in transaction|Client|ClientRead|1
|
||||
UTC 2026-10-29T11:20:20Z
|
||||
NAME CPU(cores) MEMORY(bytes)
|
||||
api-577bffc7b-c9wsv 3m 22Mi
|
||||
postgres-0 10m 41Mi
|
||||
valkey-0 8m 10Mi
|
||||
valkey-1 6m 14Mi
|
||||
valkey-2 6m 3Mi
|
||||
active|||1
|
||||
idle|Client|ClientRead|2
|
||||
idle in transaction|Client|ClientRead|1
|
||||
UTC 2026-10-29T11:20:28Z
|
||||
NAME CPU(cores) MEMORY(bytes)
|
||||
api-577bffc7b-c9wsv 3m 22Mi
|
||||
postgres-0 10m 41Mi
|
||||
valkey-0 8m 10Mi
|
||||
valkey-1 6m 14Mi
|
||||
valkey-2 6m 3Mi
|
||||
active|||1
|
||||
idle|Client|ClientRead|2
|
||||
idle in transaction|Client|ClientRead|1
|
||||
UTC 2026-10-29T11:20:35Z
|
||||
NAME CPU(cores) MEMORY(bytes)
|
||||
api-577bffc7b-c9wsv 113m 11Mi
|
||||
load-growing1-20261029111920-qrwb8 34m 17Mi
|
||||
postgres-0 34m 44Mi
|
||||
valkey-0 14m 9Mi
|
||||
valkey-1 5m 14Mi
|
||||
valkey-2 8m 4Mi
|
||||
active|||1
|
||||
idle|Client|ClientRead|8
|
||||
idle in transaction|Client|ClientRead|1
|
||||
@@ -0,0 +1,61 @@
|
||||
api:
|
||||
env:
|
||||
DEPENDENCY_POOL_SIZE: "8"
|
||||
DEPENDENCY_TIMEOUT_MS: "2000"
|
||||
GOMEMLIMIT: 160MiB
|
||||
REQUEST_TIMEOUT_SECONDS: "4"
|
||||
SESSION_TTL_SECONDS: "3600"
|
||||
SHUTDOWN_TIMEOUT_SECONDS: "5"
|
||||
replicas: 2
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128Mi
|
||||
autoscaling:
|
||||
cpuPercent: 60
|
||||
enabled: true
|
||||
maxReplicas: 4
|
||||
minReplicas: 2
|
||||
databaseSecret: messenger-secrets
|
||||
image:
|
||||
digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3
|
||||
repository: asisti.registry.twcstorage.ru/mtusi2026lab3
|
||||
imagePullSecret: registry-pull
|
||||
ingress:
|
||||
className: traefik
|
||||
clusterIssuer: letsencrypt-prod
|
||||
host: hl.agapov.space
|
||||
load:
|
||||
duration: 30
|
||||
enabled: false
|
||||
run: manual
|
||||
script: scaling.js
|
||||
vus: 32
|
||||
monitoring:
|
||||
serviceMonitor: false
|
||||
postgres:
|
||||
image: postgres:17.6-alpine
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
storage: 2Gi
|
||||
storageClass: ""
|
||||
valkey:
|
||||
image: valkey/valkey:8.1.3-alpine
|
||||
maxmemory: 64mb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 96Mi
|
||||
shards: 3
|
||||
storage: 1Gi
|
||||
@@ -0,0 +1,8 @@
|
||||
Release "lab2" has been upgraded. Happy Helming!
|
||||
NAME: lab2
|
||||
LAST DEPLOYED: Thu Oct 29 14:20:49 2026
|
||||
NAMESPACE: highload-applications
|
||||
STATUS: deployed
|
||||
REVISION: 17
|
||||
DESCRIPTION: Upgrade complete
|
||||
TEST SUITE: None
|
||||
@@ -0,0 +1,8 @@
|
||||
Release "lab2" has been upgraded. Happy Helming!
|
||||
NAME: lab2
|
||||
LAST DEPLOYED: Thu Oct 29 14:19:21 2026
|
||||
NAMESPACE: highload-applications
|
||||
STATUS: deployed
|
||||
REVISION: 16
|
||||
DESCRIPTION: Upgrade complete
|
||||
TEST SUITE: None
|
||||
@@ -0,0 +1,3 @@
|
||||
614623b626103627eea3d8946b9b22474be13a49115ffbb9e68e2d883ff1e4d4 student-tests/load/scaling.js
|
||||
dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml
|
||||
60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go
|
||||
Reference in New Issue
Block a user