Spaces:
Sleeping
Sleeping
File size: 1,493 Bytes
cda147c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | TASK_ID = "task5_k8s"
DIFFICULTY = "hard"
FILE_TYPE = "kubernetes"
NUM_BUGS = 3
DESCRIPTION = (
"A Kubernetes Deployment manifest with multi-step bugs. Requires fixing replicas type, "
"containerPort type, and CPU resource units. Each fix provides intermediate feedback."
)
# Bug 1 (Type): replicas = "three" (string, should be integer)
# Bug 2 (Type): containerPort = "80" (string, should be integer)
# Bug 3 (Domain): cpu = "500" (missing 'm' suffix, should be "500m")
BROKEN_CONFIG = """apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: "three"
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: nginx
ports:
- containerPort: "80"
resources:
limits:
cpu: "500"
"""
ERROR_MESSAGE = (
"Kubernetes manifest has type and unit errors: replicas must be integer, "
"containerPort must be integer, and cpu must include millicores unit (e.g., 500m)."
)
GROUND_TRUTH = """apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: nginx
ports:
- containerPort: 80
resources:
limits:
cpu: "500m"
"""
|