| ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ---
|
|
|
| apiVersion: v1
|
| kind: ConfigMap
|
| metadata:
|
| name: aegislm-gpu-config
|
| namespace: aegislm
|
| labels:
|
| app: aegislm
|
| component: gpu-pool
|
| data:
|
|
|
| node-selector.json: |
|
| {
|
| "workload": "benchmark",
|
| "accelerator": "nvidia"
|
| }
|
|
|
|
|
| gpu-tolerations.json: |
|
| [
|
| {
|
| "key": "nvidia.com/gpu",
|
| "operator": "Exists",
|
| "effect": "NoSchedule"
|
| }
|
| ]
|
|
|
|
|
| resource-limits.json: |
|
| {
|
| "nvidia.com/gpu": 1,
|
| "cpu": "4",
|
| "memory": "16Gi"
|
| }
|
|
|
| ---
|
|
|
|
|
| apiVersion: v1
|
| kind: ConfigMap
|
| metadata:
|
| name: cluster-autoscaler-status
|
| namespace: kube-system
|
| labels:
|
| app: cluster-autoscaler
|
| data:
|
|
|
|
|
| gpu-scaling-rules.yaml: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ---
|
|
|
| apiVersion: v1
|
| kind: ConfigMap
|
| metadata:
|
| name: node-labels
|
| namespace: aegislm
|
| labels:
|
| app: aegislm
|
| data:
|
|
|
|
|
|
|
|
|
|
|
| label-commands.sh: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ---
|
|
|
| apiVersion: v1
|
| kind: ResourceQuota
|
| metadata:
|
| name: gpu-quota
|
| namespace: aegislm
|
| labels:
|
| app: aegislm
|
| spec:
|
| hard:
|
|
|
| nvidia.com/gpu: "10"
|
|
|
| requests.cpu: "40"
|
| requests.memory: "64Gi"
|
| limits.cpu: "80"
|
| limits.memory: "128Gi"
|
| scopeSelector:
|
| matchExpressions:
|
| - operator: In
|
| scopeName: PriorityClass
|
| values: ["high-priority", "normal-priority"]
|
|
|
| ---
|
|
|
| apiVersion: v1
|
| kind: LimitRange
|
| metadata:
|
| name: gpu-limits
|
| namespace: aegislm
|
| labels:
|
| app: aegislm
|
| spec:
|
| limits:
|
|
|
| - type: Container
|
| default:
|
| nvidia.com/gpu: "1"
|
| cpu: "4"
|
| memory: "16Gi"
|
| defaultRequest:
|
| nvidia.com/gpu: "1"
|
| cpu: "2"
|
| memory: "8Gi"
|
| max:
|
| nvidia.com/gpu: "2"
|
| cpu: "8"
|
| memory: "32Gi"
|
| min:
|
| nvidia.com/gpu: "0"
|
| cpu: "100m"
|
| memory: "128Mi"
|
|
|
|
|
| - type: Pod
|
| max:
|
| nvidia.com/gpu: "2"
|
| cpu: "16"
|
| memory: "64Gi"
|
|
|
| ---
|
|
|
| apiVersion: scheduling.k8s.io/v1
|
| kind: PriorityClass
|
| metadata:
|
| name: high-priority
|
| labels:
|
| app: aegislm
|
| value: 1000000
|
| globalDefault: false
|
| description: "High priority for GPU-accelerated benchmark jobs"
|
|
|
| ---
|
|
|
| apiVersion: scheduling.k8s.io/v1
|
| kind: PriorityClass
|
| metadata:
|
| name: normal-priority
|
| labels:
|
| app: aegislm
|
| value: 0
|
| globalDefault: true
|
| description: "Normal priority for standard workloads"
|
|
|
| ---
|
|
|
| apiVersion: autoscaling/v2
|
| kind: HorizontalPodAutoscaler
|
| metadata:
|
| name: aegislm-gpu-hpa
|
| namespace: aegislm
|
| labels:
|
| app: aegislm
|
| spec:
|
| scaleTargetRef:
|
| apiVersion: apps/v1
|
| kind: Deployment
|
| name: aegislm-worker
|
| minReplicas: 0
|
| maxReplicas: 10
|
| metrics:
|
| - type: Resource
|
| resource:
|
| name: nvidia.com/gpu
|
| target:
|
| type: Utilization
|
| averageUtilization: 70
|
| behavior:
|
| scaleDown:
|
| stabilizationWindowSeconds: 300
|
| policies:
|
| - type: Percent
|
| value: 50
|
| periodSeconds: 60
|
| scaleUp:
|
| stabilizationWindowSeconds: 60
|
| policies:
|
| - type: Percent
|
| value: 100
|
| periodSeconds: 15
|
| - type: Pods
|
| value: 2
|
| periodSeconds: 15
|
| selectPolicy: Max
|
|
|