Skip to content
All articles

Component Showcase (internal — do not publish)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: recommender
spec:
  replicas: 3
  template:
    spec:
      containers:
        - name: engine
          image: scaleops/engine:1.4.2
          resources:
            requests:
              cpu: "250m"
              memory: "512Mi"
# Install and verify the agent
helm repo add scaleops https://charts.scaleops.com
helm install scaleops scaleops/scaleops -n scaleops --create-namespace
kubectl get pods -n scaleops --watch
async function getRecommendation(workloadId) {
  const res = await fetch(`/api/recommend/${workloadId}`);
  if (!res.ok) throw new Error('Recommendation failed');
  const { plan, savings } = await res.json();
  return savings > 0.1 ? plan : null;
}
{
  "workload": "checkout-api",
  "current": { "cpu": "2000m", "memory": "4Gi" },
  "recommended": { "cpu": "750m", "memory": "1.5Gi" },
  "monthlySavings": 1840.50
}
resources:
    requests:
-     cpu: "2000m"
-     memory: "4Gi"
+     cpu: "750m"
+     memory: "1.5Gi"
    limits:
+     cpu: "1000m"
graph TD
    A[User request] --> B{Authenticated?}
    B -->|No| C[Redirect to login]
    B -->|Yes| D[Load workload data]
    D --> E[Recommendation engine]
    E --> F{Savings > 10%?}
    F -->|Yes| G[Apply rightsizing]
    F -->|No| H[Keep current]
    G --> I[Done]
    H --> I[Done]
sequenceDiagram
    participant User
    participant API
    participant Engine
    User->>API: Request recommendation
    API->>Engine: Fetch workload metrics
    Engine-->>API: Rightsizing plan
    API-->>User: 200 OK + plan
    Note over API,Engine: Cached for 5 min