Skip to content

Commit 9483c4f

Browse files
authored
Merge pull request #2561 from 89luca89/main
feat: add patches to kubectl deployments
2 parents e810ce8 + 684efc4 commit 9483c4f

37 files changed

Lines changed: 1015 additions & 93 deletions

devspace-schema.json

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,15 @@
745745
"type": "array",
746746
"description": "TemplateArgs are additional arguments to pass to `helm template`"
747747
},
748-
"disableDependencyUpdate" : {
748+
"disableDependencyUpdate": {
749749
"type": "boolean",
750-
"description" : "DisableDependencyUpdate disables helm dependencies update"
750+
"description": "DisableDependencyUpdate disables helm dependencies update, default to false"
751751
}
752752
},
753753
"type": "object",
754+
"required": [
755+
"disableDependencyUpdate"
756+
],
754757
"description": "HelmConfig defines the specific helm options used during deployment"
755758
},
756759
"Image": {
@@ -1188,7 +1191,7 @@
11881191
},
11891192
"inlineManifest": {
11901193
"type": "string",
1191-
"description": "InlineManists is a block containing the manifest to deploy"
1194+
"description": "InlineManifests is a block containing the manifest to deploy"
11921195
},
11931196
"kustomize": {
11941197
"type": "boolean",
@@ -1208,6 +1211,14 @@
12081211
"type": "string",
12091212
"description": "KustomizeBinaryPath is the optional path where to find the kustomize binary",
12101213
"group": "kustomize"
1214+
},
1215+
"patches": {
1216+
"items": {
1217+
"$ref": "#/$defs/PatchTarget"
1218+
},
1219+
"type": "array",
1220+
"description": "Patches are additional changes to the pod spec that should be applied",
1221+
"group": "modifications"
12111222
}
12121223
},
12131224
"type": "object",
@@ -1309,6 +1320,32 @@
13091320
],
13101321
"description": "PatchConfig describes a config patch and how it should be applied"
13111322
},
1323+
"PatchTarget": {
1324+
"properties": {
1325+
"target": {
1326+
"$ref": "#/$defs/Target",
1327+
"description": "Target describes where to apply a config patch"
1328+
},
1329+
"op": {
1330+
"type": "string",
1331+
"description": "Operation is the path operation to do. Can be either replace, add or remove"
1332+
},
1333+
"path": {
1334+
"type": "string",
1335+
"description": "Path is the config path to apply the patch to"
1336+
},
1337+
"value": {
1338+
"description": "Value is the value to use for this patch."
1339+
}
1340+
},
1341+
"type": "object",
1342+
"required": [
1343+
"target",
1344+
"op",
1345+
"path"
1346+
],
1347+
"description": "PatchTarget describes a config patch and how it should be applied"
1348+
},
13121349
"PersistenceOptions": {
13131350
"properties": {
13141351
"size": {
@@ -1810,6 +1847,29 @@
18101847
"type": "object",
18111848
"description": "SyncOnUpload defines the struct for the command that should be executed when files / folders are uploaded"
18121849
},
1850+
"Target": {
1851+
"properties": {
1852+
"apiVersion": {
1853+
"type": "string",
1854+
"description": "ApiVersion is the Kubernetes api of the target resource"
1855+
},
1856+
"kind": {
1857+
"type": "string",
1858+
"description": "Kind is the kind of the target resource (eg: Deployment, Service ...)"
1859+
},
1860+
"name": {
1861+
"type": "string",
1862+
"description": "Name is the name of the target resource"
1863+
}
1864+
},
1865+
"type": "object",
1866+
"required": [
1867+
"apiVersion",
1868+
"kind",
1869+
"name"
1870+
],
1871+
"description": "Target describes where to apply a config patch"
1872+
},
18131873
"Terminal": {
18141874
"properties": {
18151875
"command": {

docs/pages/cli/devspace_build.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ Builds all defined images and pushes them
3434
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3535
--pipeline string The pipeline to execute (default "build")
3636
--render If true will render manifests and print them instead of actually deploying them
37+
--sequential-dependencies If set set true dependencies will run sequentially
3738
--show-ui Shows the ui server
3839
--skip-build Skips building of images
3940
--skip-dependency strings Skips the following dependencies for deployment
4041
--skip-deploy If enabled will skip deploying
4142
--skip-push Skips image pushing, useful for minikube deployment
42-
--skip-push-local-kube Skips image pushing, if a local kubernetes environment is detected
43+
--skip-push-local-kube Skips image pushing, if a local kubernetes environment is detected (default true)
4344
-t, --tag strings Use the given tag for all built images
4445
```
4546

docs/pages/cli/devspace_deploy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ devspace deploy --kube-context=deploy-context
3838
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3939
--pipeline string The pipeline to execute (default "deploy")
4040
--render If true will render manifests and print them instead of actually deploying them
41+
--sequential-dependencies If set set true dependencies will run sequentially
4142
--show-ui Shows the ui server
4243
--skip-build Skips building of images
4344
--skip-dependency strings Skips the following dependencies for deployment

docs/pages/cli/devspace_dev.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Starts your project in development mode
3434
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3535
--pipeline string The pipeline to execute (default "dev")
3636
--render If true will render manifests and print them instead of actually deploying them
37+
--sequential-dependencies If set set true dependencies will run sequentially
3738
--show-ui Shows the ui server
3839
--skip-build Skips building of images
3940
--skip-dependency strings Skips the following dependencies for deployment

docs/pages/cli/devspace_purge.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ devspace purge
3636
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3737
--pipeline string The pipeline to execute (default "purge")
3838
--render If true will render manifests and print them instead of actually deploying them
39+
--sequential-dependencies If set set true dependencies will run sequentially
3940
--show-ui Shows the ui server
4041
--skip-build Skips building of images
4142
--skip-dependency strings Skips the following dependencies for deployment

docs/pages/cli/devspace_render.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ deployment.
3636
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3737
--pipeline string The pipeline to execute (default "deploy")
3838
--render If true will render manifests and print them instead of actually deploying them (default true)
39+
--sequential-dependencies If set set true dependencies will run sequentially
3940
--show-ui Shows the ui server
4041
--skip-build Skips building of images
4142
--skip-dependency strings Skips the following dependencies for deployment

docs/pages/cli/devspace_run-pipeline.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ devspace run-pipeline dev
3636
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
3737
--pipeline string The pipeline to execute
3838
--render If true will render manifests and print them instead of actually deploying them
39+
--sequential-dependencies If set set true dependencies will run sequentially
3940
--show-ui Shows the ui server
4041
--skip-build Skips building of images
4142
--skip-dependency strings Skips the following dependencies for deployment

docs/pages/cli/devspace_sync.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ devspace sync --path=.:/app # localPath is current dir and remotePath is /app
2424
devspace sync --path=.:/app --image-selector nginx:latest
2525
devspace sync --path=.:/app --exclude=node_modules,test
2626
devspace sync --path=.:/app --pod=my-pod --container=my-container
27-
#############################################################################`
27+
#############################################################################
2828
```
2929

3030

@@ -65,3 +65,4 @@ devspace sync --path=.:/app --pod=my-pod --container=my-container
6565
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
6666
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
6767
```
68+

docs/pages/configuration/_partials/v2beta1/deployments/helm/disableDependencyUpdate.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
#### `disableDependencyUpdate` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">boolean</span> <span className="config-field-default">false</span> <span className="config-field-enum"></span> {#deployments-helm-disableDependencyUpdate}
66

7-
DisableDependencyUpdate disables helm dependencies update
7+
DisableDependencyUpdate disables helm dependencies update, default to false
88

99
</summary>
1010

1111

12+
1213
</details>

docs/pages/configuration/_partials/v2beta1/deployments/helm_reference.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ Chart holds the chart configuration and where DevSpace can find the chart
4141

4242
<PartialTemplateArgs />
4343

44+
4445
<PartialDisableDependencyUpdate />

0 commit comments

Comments
 (0)