Skip to content

Commit c00da33

Browse files
tobbberdisrupted
andauthored
Feat: Make helm flags timeout and force configurable (#648)
Co-authored-by: Salomon Popp <hi@salomonpopp.me>
1 parent dc1c51d commit c00da33

15 files changed

Lines changed: 397 additions & 50 deletions

File tree

docs/docs/resources/pipeline-components/dependencies/kpops_structure.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ kpops_components_fields:
1010
- repo_config
1111
- diff_config
1212
- version
13+
- timeout
1314
helm-app:
1415
- name
1516
- enabled
@@ -21,6 +22,7 @@ kpops_components_fields:
2122
- repo_config
2223
- diff_config
2324
- version
25+
- timeout
2426
kafka-app:
2527
- name
2628
- enabled
@@ -83,6 +85,7 @@ kpops_components_fields:
8385
- repo_config
8486
- diff_config
8587
- version
88+
- timeout
8689
producer-app-v2:
8790
- name
8891
- enabled
@@ -94,6 +97,7 @@ kpops_components_fields:
9497
- repo_config
9598
- diff_config
9699
- version
100+
- timeout
97101
streams-app:
98102
- name
99103
- enabled
@@ -105,6 +109,7 @@ kpops_components_fields:
105109
- repo_config
106110
- diff_config
107111
- version
112+
- timeout
108113
streams-app-v2:
109114
- name
110115
- enabled
@@ -116,6 +121,7 @@ kpops_components_fields:
116121
- repo_config
117122
- diff_config
118123
- version
124+
- timeout
119125
streams-bootstrap:
120126
- name
121127
- enabled
@@ -127,6 +133,7 @@ kpops_components_fields:
127133
- repo_config
128134
- diff_config
129135
- version
136+
- timeout
130137
streams-bootstrap-v2:
131138
- name
132139
- enabled
@@ -138,6 +145,7 @@ kpops_components_fields:
138145
- repo_config
139146
- diff_config
140147
- version
148+
- timeout
141149
kpops_components_inheritance_ref:
142150
consumer-app:
143151
bases:

docs/docs/resources/variables/config_env_vars.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ KPOPS_HELM_CONFIG__DEBUG=False
5151
# helm_config.api_version
5252
# Kubernetes API version used for `Capabilities.APIVersions`
5353
KPOPS_HELM_CONFIG__API_VERSION # No default value, not required
54+
# helm_config.timeout
55+
# Helm flag --timeout. Duration to wait for any individual Kubernetes
56+
# operation
57+
KPOPS_HELM_CONFIG__TIMEOUT # No default value, not required
58+
# helm_config.force_replace
59+
# Helm flag --force-replace. Forces resource updates by replacement
60+
KPOPS_HELM_CONFIG__FORCE_REPLACE=False
5461
# retain_clean_jobs
5562
# Whether to retain clean up jobs in the cluster or uninstall the,
5663
# after completion.

docs/docs/resources/variables/config_env_vars.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ These variables take precedence over the settings in `config.yaml`. Variables ma
1717
|KPOPS_HELM_CONFIG__CONTEXT | |False |Name of kubeconfig context (`--kube-context`) |helm_config.context |
1818
|KPOPS_HELM_CONFIG__DEBUG |False |False |Run Helm in Debug mode |helm_config.debug |
1919
|KPOPS_HELM_CONFIG__API_VERSION | |False |Kubernetes API version used for `Capabilities.APIVersions` |helm_config.api_version |
20+
|KPOPS_HELM_CONFIG__TIMEOUT | |False |Helm flag --timeout. Duration to wait for any individual Kubernetes operation |helm_config.timeout |
21+
|KPOPS_HELM_CONFIG__FORCE_REPLACE |False |False |Helm flag --force-replace. Forces resource updates by replacement |helm_config.force_replace |
2022
|KPOPS_RETAIN_CLEAN_JOBS |False |False |Whether to retain clean up jobs in the cluster or uninstall the, after completion.|retain_clean_jobs |
2123
|KPOPS_STRIMZI_TOPIC | |False |Configuration for Strimzi Kafka Topics. |strimzi_topic |
2224
|KPOPS_OPERATION_MODE |managed |False |The operation mode of KPOps (managed, manifest, argo). |operation_mode |

docs/docs/schema/config.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,25 @@
3737
"description": "Run Helm in Debug mode",
3838
"title": "Debug",
3939
"type": "boolean"
40+
},
41+
"force_replace": {
42+
"default": false,
43+
"description": "Helm flag --force-replace. Forces resource updates by replacement",
44+
"title": "Force Upgrade",
45+
"type": "boolean"
46+
},
47+
"timeout": {
48+
"anyOf": [
49+
{
50+
"type": "string"
51+
},
52+
{
53+
"type": "null"
54+
}
55+
],
56+
"default": null,
57+
"description": "Helm flag --timeout. Duration to wait for any individual Kubernetes operation",
58+
"title": "Helm flag --timeout"
4059
}
4160
},
4261
"title": "HelmConfig",
@@ -202,7 +221,9 @@
202221
"default": {
203222
"api_version": null,
204223
"context": null,
205-
"debug": false
224+
"debug": false,
225+
"force_replace": false,
226+
"timeout": null
206227
},
207228
"description": "Global flags for Helm."
208229
},

docs/docs/schema/defaults.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@
112112
},
113113
"description": "Configuration of the Helm chart repo to be used for deploying the component"
114114
},
115+
"timeout": {
116+
"anyOf": [
117+
{
118+
"type": "string"
119+
},
120+
{
121+
"type": "null"
122+
}
123+
],
124+
"default": null,
125+
"description": "Timeout for Helm operations to finish",
126+
"title": "Timeout"
127+
},
115128
"to": {
116129
"default": null,
117130
"title": "To",
@@ -837,6 +850,19 @@
837850
"default": null,
838851
"description": "Configuration of the Helm chart repo to be used for deploying the component"
839852
},
853+
"timeout": {
854+
"anyOf": [
855+
{
856+
"type": "string"
857+
},
858+
{
859+
"type": "null"
860+
}
861+
],
862+
"default": null,
863+
"description": "Timeout for Helm operations to finish",
864+
"title": "Timeout"
865+
},
840866
"to": {
841867
"anyOf": [
842868
{
@@ -2371,6 +2397,19 @@
23712397
},
23722398
"description": "Configuration of the Helm chart repo to be used for deploying the component"
23732399
},
2400+
"timeout": {
2401+
"anyOf": [
2402+
{
2403+
"type": "string"
2404+
},
2405+
{
2406+
"type": "null"
2407+
}
2408+
],
2409+
"default": null,
2410+
"description": "Timeout for Helm operations to finish",
2411+
"title": "Timeout"
2412+
},
23742413
"to": {
23752414
"anyOf": [
23762415
{
@@ -2464,6 +2503,19 @@
24642503
},
24652504
"description": "Configuration of the Helm chart repo to be used for deploying the component"
24662505
},
2506+
"timeout": {
2507+
"anyOf": [
2508+
{
2509+
"type": "string"
2510+
},
2511+
{
2512+
"type": "null"
2513+
}
2514+
],
2515+
"default": null,
2516+
"description": "Timeout for Helm operations to finish",
2517+
"title": "Timeout"
2518+
},
24672519
"to": {
24682520
"anyOf": [
24692521
{
@@ -3546,6 +3598,19 @@
35463598
},
35473599
"description": "Configuration of the Helm chart repo to be used for deploying the component"
35483600
},
3601+
"timeout": {
3602+
"anyOf": [
3603+
{
3604+
"type": "string"
3605+
},
3606+
{
3607+
"type": "null"
3608+
}
3609+
],
3610+
"default": null,
3611+
"description": "Timeout for Helm operations to finish",
3612+
"title": "Timeout"
3613+
},
35493614
"to": {
35503615
"anyOf": [
35513616
{
@@ -3646,6 +3711,19 @@
36463711
},
36473712
"description": "Configuration of the Helm chart repo to be used for deploying the component"
36483713
},
3714+
"timeout": {
3715+
"anyOf": [
3716+
{
3717+
"type": "string"
3718+
},
3719+
{
3720+
"type": "null"
3721+
}
3722+
],
3723+
"default": null,
3724+
"description": "Timeout for Helm operations to finish",
3725+
"title": "Timeout"
3726+
},
36493727
"to": {
36503728
"anyOf": [
36513729
{
@@ -4279,6 +4357,19 @@
42794357
},
42804358
"description": "Configuration of the Helm chart repo to be used for deploying the component"
42814359
},
4360+
"timeout": {
4361+
"anyOf": [
4362+
{
4363+
"type": "string"
4364+
},
4365+
{
4366+
"type": "null"
4367+
}
4368+
],
4369+
"default": null,
4370+
"description": "Timeout for Helm operations to finish",
4371+
"title": "Timeout"
4372+
},
42824373
"to": {
42834374
"anyOf": [
42844375
{
@@ -4373,6 +4464,19 @@
43734464
},
43744465
"description": "Configuration of the Helm chart repo to be used for deploying the component"
43754466
},
4467+
"timeout": {
4468+
"anyOf": [
4469+
{
4470+
"type": "string"
4471+
},
4472+
{
4473+
"type": "null"
4474+
}
4475+
],
4476+
"default": null,
4477+
"description": "Timeout for Helm operations to finish",
4478+
"title": "Timeout"
4479+
},
43764480
"to": {
43774481
"anyOf": [
43784482
{

0 commit comments

Comments
 (0)