Add Kubernetes pod spec configuration
Recipe ID
org.openrewrite.kubernetes.AddPodSpecConfigurationArtifactorg.openrewrite.recipe:rewrite-kubernetesAdd default required configuration to a workload's pod spec when it is missing. The pod spec is located by kind, so a Deployment, StatefulSet, DaemonSet, ReplicaSet, ReplicationController, Job or CronJob is configured as well as a bare Pod.
Single recipeProprietary
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.kubernetes.AddPodSpecConfiguration --recipe-option "value=privileged: false"If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:RELEASEOptions
| Name | Type | Description |
|---|---|---|
configurationPath | String | A dot-separated path relative to the pod spec. Omit to configure the pod spec itself; use containers to configure every container in it.e.g. containers |
valuerequired | String | The configuration that is added when necessary, including the key. e.g. privileged: false |
resourceKind | String | Only configure workloads of this kind. This is a glob expression. When omitted, every workload kind that has a pod spec is configured. e.g. Deployment |
fileMatcher | String | Matching files will be modified. This is a glob expression. e.g. **/pod-*.yml |
Data tables
Structured output this recipe can produce.
- 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