← All recipes
Moderne licensed

Find container resource coverage

Recipe IDorg.openrewrite.kubernetes.search.FindContainerResourceCoverageArtifactorg.openrewrite.recipe:rewrite-kubernetes

Profile the compute resources and probes every container of every workload declares. Quantities are reported both as written and normalized to millicores and bytes, and each row carries the quality of service class the kubelet would give the pod the container belongs to.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.kubernetes.search.FindContainerResourceCoverage

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:RELEASE

Options

NameTypeDescription
resourceKindStringOnly profile containers belonging to this kind of workload. This is a glob expression. When omitted, every workload kind that has a pod spec is profiled.
e.g. Deployment
containerTypesSetWhich container lists to profile. Defaults to all of containers, initContainers and ephemeralContainers.
e.g. containers
markEveryContainerBooleanMark every container rather than only those missing a request or a limit. The data table holds every container either way. Default false.
fileMatcherStringMatching files will be searched. This is a glob expression.
e.g. **/*.yml

Data tables

Structured output this recipe can produce.

  • Container resource profilesEvery container of every workload, with the compute resources and probes it declares. The raw columns answer what to change; the normalized columns answer what a cluster is being asked for.org.openrewrite.kubernetes.table.ContainerProfiles
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats