# Previous tasks remain the same until CPU deployments # Apply CPU intensive deployments - name: Apply CPU intensive deployments on cas kubernetes.core.k8s: definition: apiVersion: apps/v1 kind: Deployment metadata: name: "cpu-intensive-{{ item.size }}" namespace: heterogeneous-workload spec: replicas: "{{ deployment_replicas[item.size] }}" selector: matchLabels: app: "cpu-intensive-{{ item.size }}" template: metadata: labels: app: "cpu-intensive-{{ item.size }}" spec: containers: - name: cpu-intensive-container image: ghcr.io/vish/stress:latest resources: requests: cpu: "{{ item.cpu }}" memory: "{{ item.memory_request }}" limits: cpu: "{{ item.cpu }}" memory: "{{ item.memory_limit }}" command: ["stress"] args: "{{ item.args }}" state: present loop: - { size: 'l', cpu: '4000m', memory_request: '512Mi', memory_limit: '1Gi', args: ['--cpu', '4', '--timeout', '3600', '--vm', '2', '--vm-bytes', '256M', '--vm-hang', '1'] } - { size: 'm', cpu: '2000m', memory_request: '256Mi', memory_limit: '512Mi', args: ['--cpu', '2', '--timeout', '3600', '--vm', '1', '--vm-bytes', '128M', '--io', '2'] } - { size: 's', cpu: '1000m', memory_request: '128Mi', memory_limit: '256Mi', args: ['--cpu', '1', '--timeout', '3600', '--vm', '1', '--vm-bytes', '64M', '--vm-stride', '128', '--hdd', '1', '--hdd-bytes', '128M'] } environment: KUBECONFIG: "{{ lookup('vars', 'KUBECONFIG_IKS_CAS') }}" # Rest of the tasks remain the same