latestOpenAPI 3.0.02026-08-2045003.8 MB

72813baf8d47

Ocean Automatic Rightsizing

Create Ocean Rightsizing Rule

post/ocean/{oceanId}/rightSizing/rule

Parameters

#/paths/~1ocean~1%7BoceanId%7D~1rightSizing~1rule/get/parameters/0 — unresolved $ref
#/paths/~1azure~1costs/get/parameters/0 — unresolved $ref

Request body

ruleNamestring

The unique name of the rule

restartReplicas'MORE_THAN_ONE_REPLICA' | 'ALL_MANIFEST' | 'NO_RESTART'

Enable to sequentially restart pod batches according to recommendations, for all pods, only more than 1 replica, or not any pod.

excludePreliminaryRecommendationsboolean

Exclude preliminary recommendations (recommendations based on less than 4 full days of data).

cpuPercentileinteger

vCPU percentile for calculating recommendations.

memoryPercentileinteger

Memory percentile for calculating recommendations.

downsideOnlyboolean

When set to 'true', only downscale recommendations will be applied.

Example request

{
  "ruleName": "dev-rule",
  "restartReplicas": "ALL_MANIFEST",
  "recommendationApplicationIntervals": [
    {
      "repetitionBasis": "WEEKLY",
      "weeklyRepetitionBasis": {
        "intervalDays": [
          "MONDAY",
          "WEDNESDAY"
        ],
        "intervalHours": {
          "startTime": "12:00",
          "endTime": "14:00"
        }
      }
    },
    {
      "repetitionBasis": "MONTHLY",
      "monthlyRepetitionBasis": {
        "intervalMonths": [
          2,
          4,
          6
        ],
        "weekOfTheMonth": [
          "FIRST",
          "LAST"
        ],
        "weeklyRepetitionBasis": {
          "intervalDays": [
            "MONDAY"
          ],
          "intervalHours": {
            "startTime": "03:00",
            "endTime": "04:00"
          }
        }
      }
    }
  ],
  "recommendationApplicationMinThreshold": {
    "cpuPercentage": 0.412,
    "memoryPercentage": 0.36
  },
  "recommendationApplicationBoundaries": {
    "cpu": {
      "max": 100
    },
    "memory": {
      "min": 1,
      "max": 80
    }
  },
  "recommendationApplicationOverheadValues": {
    "cpuPercentage": 0.8,
    "memoryPercentage": 0.5
  },
  "recommendationApplicationHPA": {
    "allowHPARecommendations": true
  },
  "autoApplyDefinition": {
    "enabled": true,
    "namespaces": [
      "namespace1",
      "namespace2",
      "namespace3"
    ],
    "labels": {
      "app": "my-app",
      "environment": "production"
    }
  },
  "cpuPercentile": 95,
  "memoryPercentile": 90
}