qontract-reconcile 0.10.2.dev215__py3-none-any.whl → 0.10.2.dev217__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qontract_reconcile-0.10.2.dev215.dist-info → qontract_reconcile-0.10.2.dev217.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev215.dist-info → qontract_reconcile-0.10.2.dev217.dist-info}/RECORD +20 -20
- reconcile/automated_actions/config/integration.py +15 -5
- reconcile/cli.py +620 -505
- reconcile/gitlab_housekeeping.py +57 -58
- reconcile/gitlab_permissions.py +13 -5
- reconcile/gitlab_projects.py +5 -3
- reconcile/gql_definitions/automated_actions/instance.py +41 -2
- reconcile/gql_definitions/introspection.json +177 -1
- reconcile/integrations_manager.py +32 -41
- reconcile/jenkins_job_builder.py +1 -1
- reconcile/jenkins_job_builds_cleaner.py +10 -5
- reconcile/jenkins_job_cleaner.py +6 -3
- reconcile/jenkins_roles.py +15 -8
- reconcile/jenkins_webhooks.py +6 -3
- reconcile/jenkins_webhooks_cleaner.py +3 -2
- reconcile/jira_watcher.py +25 -9
- reconcile/utils/jira_client.py +1 -1
- {qontract_reconcile-0.10.2.dev215.dist-info → qontract_reconcile-0.10.2.dev217.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev215.dist-info → qontract_reconcile-0.10.2.dev217.dist-info}/entry_points.txt +0 -0
reconcile/cli.py
CHANGED
@@ -6,9 +6,11 @@ import os
|
|
6
6
|
import re
|
7
7
|
import sys
|
8
8
|
import traceback
|
9
|
-
from collections.abc import Iterable
|
9
|
+
from collections.abc import Callable, Iterable
|
10
|
+
from io import TextIOWrapper
|
10
11
|
from signal import SIGUSR1
|
11
12
|
from types import ModuleType
|
13
|
+
from typing import Any
|
12
14
|
|
13
15
|
import click
|
14
16
|
import sentry_sdk
|
@@ -54,7 +56,7 @@ HELM_VERSIONS = ["3.11.1"]
|
|
54
56
|
HELM_VERSION_REGEX = r"^version.BuildInfo{Version:\"v([\d]+\.[\d]+\.[\d]+)\".*$"
|
55
57
|
|
56
58
|
|
57
|
-
def before_breadcrumb(crumb,
|
59
|
+
def before_breadcrumb(crumb: dict, _: Any) -> dict:
|
58
60
|
# https://docs.sentry.io/platforms/python/configuration/filtering/
|
59
61
|
# Configure breadcrumb to filter error mesage
|
60
62
|
if "category" in crumb and crumb["category"] == "subprocess":
|
@@ -89,7 +91,7 @@ if os.getenv("SENTRY_DSN"):
|
|
89
91
|
)
|
90
92
|
|
91
93
|
|
92
|
-
def config_file(function):
|
94
|
+
def config_file(function: Callable) -> Callable:
|
93
95
|
help_msg = "Path to configuration file in toml format."
|
94
96
|
function = click.option(
|
95
97
|
"--config",
|
@@ -101,7 +103,7 @@ def config_file(function):
|
|
101
103
|
return function
|
102
104
|
|
103
105
|
|
104
|
-
def log_level(function):
|
106
|
+
def log_level(function: Callable) -> Callable:
|
105
107
|
function = click.option(
|
106
108
|
"--log-level",
|
107
109
|
help="log-level of the command. Defaults to INFO.",
|
@@ -110,7 +112,7 @@ def log_level(function):
|
|
110
112
|
return function
|
111
113
|
|
112
114
|
|
113
|
-
def early_exit(function):
|
115
|
+
def early_exit(function: Callable) -> Callable:
|
114
116
|
help_msg = (
|
115
117
|
"Runs integration in early exit mode. If the observed desired state of "
|
116
118
|
"an integration does not change between the provided bundle SHA "
|
@@ -125,7 +127,7 @@ def early_exit(function):
|
|
125
127
|
return function
|
126
128
|
|
127
129
|
|
128
|
-
def check_only_affected_shards(function):
|
130
|
+
def check_only_affected_shards(function: Callable) -> Callable:
|
129
131
|
help_msg = (
|
130
132
|
"Execute a dry-run only for those integration shards where the "
|
131
133
|
"desired state changed. Works only when --early-exit-compare-sha is set"
|
@@ -139,7 +141,7 @@ def check_only_affected_shards(function):
|
|
139
141
|
return function
|
140
142
|
|
141
143
|
|
142
|
-
def dry_run(function):
|
144
|
+
def dry_run(function: Callable) -> Callable:
|
143
145
|
help_msg = (
|
144
146
|
"If `true`, it will only print the planned actions "
|
145
147
|
"that would be performed, without executing them."
|
@@ -151,7 +153,7 @@ def dry_run(function):
|
|
151
153
|
return function
|
152
154
|
|
153
155
|
|
154
|
-
def validate_schemas(function):
|
156
|
+
def validate_schemas(function: Callable) -> Callable:
|
155
157
|
help_msg = "Fail integration if it queries forbidden schemas"
|
156
158
|
|
157
159
|
function = click.option(
|
@@ -160,7 +162,7 @@ def validate_schemas(function):
|
|
160
162
|
return function
|
161
163
|
|
162
164
|
|
163
|
-
def dump_schemas(function):
|
165
|
+
def dump_schemas(function: Callable) -> Callable:
|
164
166
|
help_msg = "Dump schemas to a file"
|
165
167
|
|
166
168
|
function = click.option("--dump-schemas", "dump_schemas_file", help=help_msg)(
|
@@ -169,7 +171,7 @@ def dump_schemas(function):
|
|
169
171
|
return function
|
170
172
|
|
171
173
|
|
172
|
-
def gql_sha_url(function):
|
174
|
+
def gql_sha_url(function: Callable) -> Callable:
|
173
175
|
help_msg = (
|
174
176
|
"If `false`, it will not use the sha_url endpoint "
|
175
177
|
"of graphql (prevent stopping execution on data reload)."
|
@@ -181,7 +183,7 @@ def gql_sha_url(function):
|
|
181
183
|
return function
|
182
184
|
|
183
185
|
|
184
|
-
def gql_url_print(function):
|
186
|
+
def gql_url_print(function: Callable) -> Callable:
|
185
187
|
help_msg = "If `false`, it will not print the url endpoint of graphql."
|
186
188
|
|
187
189
|
function = click.option(
|
@@ -190,20 +192,18 @@ def gql_url_print(function):
|
|
190
192
|
return function
|
191
193
|
|
192
194
|
|
193
|
-
def threaded(
|
194
|
-
def f(function):
|
195
|
+
def threaded(default: int = 10) -> Callable:
|
196
|
+
def f(function: Callable) -> Callable:
|
195
197
|
opt = "--thread-pool-size"
|
196
198
|
msg = "number of threads to run in parallel."
|
197
|
-
function = click.option(opt, default=
|
198
|
-
function
|
199
|
-
)
|
199
|
+
function = click.option(opt, type=int, default=default, help=msg)(function)
|
200
200
|
return function
|
201
201
|
|
202
202
|
return f
|
203
203
|
|
204
204
|
|
205
|
-
def take_over(
|
206
|
-
def f(function):
|
205
|
+
def take_over() -> Callable:
|
206
|
+
def f(function: Callable) -> Callable:
|
207
207
|
help_msg = "manage resources exclusively (take over existing ones)."
|
208
208
|
function = click.option(
|
209
209
|
"--take-over/--no-take-over", help=help_msg, default=True
|
@@ -213,8 +213,8 @@ def take_over(**kwargs):
|
|
213
213
|
return f
|
214
214
|
|
215
215
|
|
216
|
-
def internal(
|
217
|
-
def f(function):
|
216
|
+
def internal() -> Callable:
|
217
|
+
def f(function: Callable) -> Callable:
|
218
218
|
help_msg = "manage resources in internal or external clusters only."
|
219
219
|
function = click.option("--internal/--external", help=help_msg, default=None)(
|
220
220
|
function
|
@@ -224,8 +224,8 @@ def internal(**kwargs):
|
|
224
224
|
return f
|
225
225
|
|
226
226
|
|
227
|
-
def use_jump_host(
|
228
|
-
def f(function):
|
227
|
+
def use_jump_host() -> Callable:
|
228
|
+
def f(function: Callable) -> Callable:
|
229
229
|
help_msg = "use jump host if defined."
|
230
230
|
function = click.option(
|
231
231
|
"--use-jump-host/--no-use-jump-host", help=help_msg, default=False
|
@@ -235,7 +235,7 @@ def use_jump_host(**kwargs):
|
|
235
235
|
return f
|
236
236
|
|
237
237
|
|
238
|
-
def print_only(function):
|
238
|
+
def print_only(function: Callable) -> Callable:
|
239
239
|
function = click.option(
|
240
240
|
"--print-only/--no-print-only",
|
241
241
|
help="only print the config file.",
|
@@ -245,7 +245,7 @@ def print_only(function):
|
|
245
245
|
return function
|
246
246
|
|
247
247
|
|
248
|
-
def print_to_file(function):
|
248
|
+
def print_to_file(function: Callable) -> Callable:
|
249
249
|
function = click.option(
|
250
250
|
"--print-to-file", help="print the config to file.", default=None
|
251
251
|
)(function)
|
@@ -253,7 +253,7 @@ def print_to_file(function):
|
|
253
253
|
return function
|
254
254
|
|
255
255
|
|
256
|
-
def config_name(function):
|
256
|
+
def config_name(function: Callable) -> Callable:
|
257
257
|
function = click.option(
|
258
258
|
"--config-name",
|
259
259
|
help="jenkins config name to print out.must works with --print-only mode",
|
@@ -263,7 +263,7 @@ def config_name(function):
|
|
263
263
|
return function
|
264
264
|
|
265
265
|
|
266
|
-
def job_name(function):
|
266
|
+
def job_name(function: Callable) -> Callable:
|
267
267
|
function = click.option(
|
268
268
|
"--job-name", help="jenkins job name to print out.", default=None
|
269
269
|
)(function)
|
@@ -271,7 +271,7 @@ def job_name(function):
|
|
271
271
|
return function
|
272
272
|
|
273
273
|
|
274
|
-
def instance_name(function):
|
274
|
+
def instance_name(function: Callable) -> Callable:
|
275
275
|
function = click.option(
|
276
276
|
"--instance-name", help="jenkins instance name to act on.", default=None
|
277
277
|
)(function)
|
@@ -279,7 +279,7 @@ def instance_name(function):
|
|
279
279
|
return function
|
280
280
|
|
281
281
|
|
282
|
-
def throughput(function):
|
282
|
+
def throughput(function: Callable) -> Callable:
|
283
283
|
function = click.option(
|
284
284
|
"--io-dir", help="directory of input/output files.", default="throughput/"
|
285
285
|
)(function)
|
@@ -287,7 +287,7 @@ def throughput(function):
|
|
287
287
|
return function
|
288
288
|
|
289
289
|
|
290
|
-
def vault_input_path(function):
|
290
|
+
def vault_input_path(function: Callable) -> Callable:
|
291
291
|
function = click.option(
|
292
292
|
"--vault-input-path", help="path in Vault to find input resources.", default=""
|
293
293
|
)(function)
|
@@ -295,7 +295,7 @@ def vault_input_path(function):
|
|
295
295
|
return function
|
296
296
|
|
297
297
|
|
298
|
-
def vault_output_path(function):
|
298
|
+
def vault_output_path(function: Callable) -> Callable:
|
299
299
|
function = click.option(
|
300
300
|
"--vault-output-path",
|
301
301
|
help="path in Vault to store output resources.",
|
@@ -305,17 +305,7 @@ def vault_output_path(function):
|
|
305
305
|
return function
|
306
306
|
|
307
307
|
|
308
|
-
def
|
309
|
-
function = click.option(
|
310
|
-
"--vault-throughput-path",
|
311
|
-
help="path in Vault to find input resources and store output resources.",
|
312
|
-
default="",
|
313
|
-
)(function)
|
314
|
-
|
315
|
-
return function
|
316
|
-
|
317
|
-
|
318
|
-
def cluster_name(function):
|
308
|
+
def cluster_name(function: Callable) -> Callable:
|
319
309
|
"""This option can be used when more than one cluster needs to be passed as argument"""
|
320
310
|
function = click.option(
|
321
311
|
"--cluster-name",
|
@@ -327,7 +317,7 @@ def cluster_name(function):
|
|
327
317
|
return function
|
328
318
|
|
329
319
|
|
330
|
-
def exclude_cluster(function):
|
320
|
+
def exclude_cluster(function: Callable) -> Callable:
|
331
321
|
function = click.option(
|
332
322
|
"--exclude-cluster",
|
333
323
|
multiple=True,
|
@@ -338,7 +328,7 @@ def exclude_cluster(function):
|
|
338
328
|
return function
|
339
329
|
|
340
330
|
|
341
|
-
def namespace_name(function):
|
331
|
+
def namespace_name(function: Callable) -> Callable:
|
342
332
|
function = click.option(
|
343
333
|
"--namespace-name", help="namespace name to act on.", default=None
|
344
334
|
)(function)
|
@@ -346,7 +336,7 @@ def namespace_name(function):
|
|
346
336
|
return function
|
347
337
|
|
348
338
|
|
349
|
-
def environment_name(function):
|
339
|
+
def environment_name(function: Callable) -> Callable:
|
350
340
|
function = click.option(
|
351
341
|
"--environment-name",
|
352
342
|
help="environment name to act on.",
|
@@ -356,7 +346,7 @@ def environment_name(function):
|
|
356
346
|
return function
|
357
347
|
|
358
348
|
|
359
|
-
def resource_kind(function):
|
349
|
+
def resource_kind(function: Callable) -> Callable:
|
360
350
|
function = click.option("--resource-kind", help="kind to act on.", default=None)(
|
361
351
|
function
|
362
352
|
)
|
@@ -364,7 +354,7 @@ def resource_kind(function):
|
|
364
354
|
return function
|
365
355
|
|
366
356
|
|
367
|
-
def account_name(function):
|
357
|
+
def account_name(function: Callable) -> Callable:
|
368
358
|
function = click.option(
|
369
359
|
"--account-name", help="aws account name to act on.", default=None
|
370
360
|
)(function)
|
@@ -372,13 +362,13 @@ def account_name(function):
|
|
372
362
|
return function
|
373
363
|
|
374
364
|
|
375
|
-
def cloudflare_zone_name(function):
|
365
|
+
def cloudflare_zone_name(function: Callable) -> Callable:
|
376
366
|
function = click.option("--zone-name", default=None)(function)
|
377
367
|
|
378
368
|
return function
|
379
369
|
|
380
370
|
|
381
|
-
def account_name_multiple(function):
|
371
|
+
def account_name_multiple(function: Callable) -> Callable:
|
382
372
|
"""This option can be used when more than one account needs to be passed as argument"""
|
383
373
|
function = click.option(
|
384
374
|
"--account-name",
|
@@ -390,7 +380,7 @@ def account_name_multiple(function):
|
|
390
380
|
return function
|
391
381
|
|
392
382
|
|
393
|
-
def exclude_aws_accounts(function):
|
383
|
+
def exclude_aws_accounts(function: Callable) -> Callable:
|
394
384
|
function = click.option(
|
395
385
|
"--exclude-accounts",
|
396
386
|
multiple=True,
|
@@ -401,11 +391,11 @@ def exclude_aws_accounts(function):
|
|
401
391
|
return function
|
402
392
|
|
403
393
|
|
404
|
-
def org_id_multiple(function):
|
394
|
+
def org_id_multiple(function: Callable) -> Callable:
|
405
395
|
"""This option can be used when more than one OCM organization ID needs to be passed as argument"""
|
406
396
|
function = click.option(
|
407
397
|
"--org-id",
|
408
|
-
default=
|
398
|
+
default=[],
|
409
399
|
multiple=True,
|
410
400
|
help="OCM organization IDs to act on",
|
411
401
|
)(function)
|
@@ -413,7 +403,7 @@ def org_id_multiple(function):
|
|
413
403
|
return function
|
414
404
|
|
415
405
|
|
416
|
-
def exclude_org_id(function):
|
406
|
+
def exclude_org_id(function: Callable) -> Callable:
|
417
407
|
function = click.option(
|
418
408
|
"--exclude-org-id",
|
419
409
|
multiple=True,
|
@@ -424,7 +414,7 @@ def exclude_org_id(function):
|
|
424
414
|
return function
|
425
415
|
|
426
416
|
|
427
|
-
def workspace_name(function):
|
417
|
+
def workspace_name(function: Callable) -> Callable:
|
428
418
|
function = click.option(
|
429
419
|
"--workspace-name", help="slack workspace name to act on.", default=None
|
430
420
|
)(function)
|
@@ -432,7 +422,7 @@ def workspace_name(function):
|
|
432
422
|
return function
|
433
423
|
|
434
424
|
|
435
|
-
def usergroup_name(function):
|
425
|
+
def usergroup_name(function: Callable) -> Callable:
|
436
426
|
function = click.option(
|
437
427
|
"--usergroup-name", help="slack usergroup name to act on.", default=None
|
438
428
|
)(function)
|
@@ -440,7 +430,7 @@ def usergroup_name(function):
|
|
440
430
|
return function
|
441
431
|
|
442
432
|
|
443
|
-
def gitlab_project_id(function):
|
433
|
+
def gitlab_project_id(function: Callable) -> Callable:
|
444
434
|
function = click.option(
|
445
435
|
"--gitlab-project-id",
|
446
436
|
help="gitlab project id to submit PRs to. "
|
@@ -452,7 +442,7 @@ def gitlab_project_id(function):
|
|
452
442
|
return function
|
453
443
|
|
454
444
|
|
455
|
-
def saas_file_name(function):
|
445
|
+
def saas_file_name(function: Callable) -> Callable:
|
456
446
|
function = click.option(
|
457
447
|
"--saas-file-name", help="saas-file to act on.", default=None
|
458
448
|
)(function)
|
@@ -460,43 +450,27 @@ def saas_file_name(function):
|
|
460
450
|
return function
|
461
451
|
|
462
452
|
|
463
|
-
def enable_deletion(
|
464
|
-
def f(function):
|
453
|
+
def enable_deletion(default: bool = True) -> Callable:
|
454
|
+
def f(function: Callable) -> Callable:
|
465
455
|
opt = "--enable-deletion/--no-enable-deletion"
|
466
456
|
msg = "enable destroy/replace action."
|
467
|
-
function = click.option(opt, default=
|
468
|
-
function
|
469
|
-
)
|
457
|
+
function = click.option(opt, default=default, help=msg)(function)
|
470
458
|
return function
|
471
459
|
|
472
460
|
return f
|
473
461
|
|
474
462
|
|
475
|
-
def send_mails(
|
476
|
-
def f(function):
|
463
|
+
def send_mails(default: bool = False) -> Callable:
|
464
|
+
def f(function: Callable) -> Callable:
|
477
465
|
opt = "--send-mails/--no-send-mails"
|
478
466
|
msg = "send email notification to users."
|
479
|
-
function = click.option(opt, default=
|
480
|
-
function
|
481
|
-
)
|
482
|
-
return function
|
483
|
-
|
484
|
-
return f
|
485
|
-
|
486
|
-
|
487
|
-
def enable_rebase(**kwargs):
|
488
|
-
def f(function):
|
489
|
-
opt = "--enable-rebase/--no-enable-rebase"
|
490
|
-
msg = "enable the merge request rebase action."
|
491
|
-
function = click.option(opt, default=kwargs.get("default", True), help=msg)(
|
492
|
-
function
|
493
|
-
)
|
467
|
+
function = click.option(opt, default=default, help=msg)(function)
|
494
468
|
return function
|
495
469
|
|
496
470
|
return f
|
497
471
|
|
498
472
|
|
499
|
-
def include_trigger_trace(function):
|
473
|
+
def include_trigger_trace(function: Callable) -> Callable:
|
500
474
|
help_msg = "If `true`, include traces of the triggering integration and reason."
|
501
475
|
|
502
476
|
function = click.option(
|
@@ -507,7 +481,7 @@ def include_trigger_trace(function):
|
|
507
481
|
return function
|
508
482
|
|
509
483
|
|
510
|
-
def trigger_reason(function):
|
484
|
+
def trigger_reason(function: Callable) -> Callable:
|
511
485
|
function = click.option(
|
512
486
|
"--trigger-reason",
|
513
487
|
help="reason deployment was triggered.",
|
@@ -517,7 +491,7 @@ def trigger_reason(function):
|
|
517
491
|
return function
|
518
492
|
|
519
493
|
|
520
|
-
def trigger_integration(function):
|
494
|
+
def trigger_integration(function: Callable) -> Callable:
|
521
495
|
function = click.option(
|
522
496
|
"--trigger-integration",
|
523
497
|
help="integration deployment was triggered.",
|
@@ -527,7 +501,7 @@ def trigger_integration(function):
|
|
527
501
|
return function
|
528
502
|
|
529
503
|
|
530
|
-
def enable_extended_early_exit(function):
|
504
|
+
def enable_extended_early_exit(function: Callable) -> Callable:
|
531
505
|
return click.option(
|
532
506
|
"--enable-extended-early-exit/--no-enable-extended-early-exit",
|
533
507
|
default=False,
|
@@ -535,7 +509,7 @@ def enable_extended_early_exit(function):
|
|
535
509
|
)(function)
|
536
510
|
|
537
511
|
|
538
|
-
def extended_early_exit_cache_ttl_seconds(function):
|
512
|
+
def extended_early_exit_cache_ttl_seconds(function: Callable) -> Callable:
|
539
513
|
return click.option(
|
540
514
|
"--extended-early-exit-cache-ttl-seconds",
|
541
515
|
default=3600,
|
@@ -543,7 +517,7 @@ def extended_early_exit_cache_ttl_seconds(function):
|
|
543
517
|
)(function)
|
544
518
|
|
545
519
|
|
546
|
-
def log_cached_log_output(function):
|
520
|
+
def log_cached_log_output(function: Callable) -> Callable:
|
547
521
|
return click.option(
|
548
522
|
"--log-cached-log-output/--no-log-cached-log-output",
|
549
523
|
default=False,
|
@@ -551,7 +525,7 @@ def log_cached_log_output(function):
|
|
551
525
|
)(function)
|
552
526
|
|
553
527
|
|
554
|
-
def register_faulthandler(fileobj=sys.__stderr__):
|
528
|
+
def register_faulthandler(fileobj: TextIOWrapper | None = sys.__stderr__) -> None:
|
555
529
|
if fileobj:
|
556
530
|
if not faulthandler.is_enabled():
|
557
531
|
try:
|
@@ -575,10 +549,10 @@ class UnknownIntegrationTypeError(Exception):
|
|
575
549
|
|
576
550
|
def run_integration(
|
577
551
|
func_container: ModuleType,
|
578
|
-
ctx,
|
579
|
-
*args,
|
580
|
-
**kwargs,
|
581
|
-
):
|
552
|
+
ctx: click.Context,
|
553
|
+
*args: Any,
|
554
|
+
**kwargs: Any,
|
555
|
+
) -> None:
|
582
556
|
run_class_integration(
|
583
557
|
integration=ModuleBasedQontractReconcileIntegration(
|
584
558
|
ModuleArgsKwargsRunParams(func_container, *args, **kwargs)
|
@@ -589,10 +563,10 @@ def run_integration(
|
|
589
563
|
|
590
564
|
def run_class_integration(
|
591
565
|
integration: QontractReconcileIntegration,
|
592
|
-
ctx,
|
593
|
-
):
|
566
|
+
ctx: click.Context,
|
567
|
+
) -> None:
|
594
568
|
register_faulthandler()
|
595
|
-
dump_schemas_file = ctx.
|
569
|
+
dump_schemas_file = ctx.obj["dump_schemas_file"]
|
596
570
|
try:
|
597
571
|
running_state = RunningState()
|
598
572
|
running_state.integration = integration.name # type: ignore[attr-defined]
|
@@ -603,18 +577,18 @@ def run_class_integration(
|
|
603
577
|
sys.exit(ExitCodes.SUCCESS)
|
604
578
|
|
605
579
|
check_only_affected_shards = (
|
606
|
-
ctx.
|
580
|
+
ctx.obj["check_only_affected_shards"]
|
607
581
|
or os.environ.get("CHECK_ONLY_AFFECTED_SHARDS", "false") == "true"
|
608
582
|
)
|
609
583
|
run_integration_cfg(
|
610
584
|
IntegrationRunConfiguration(
|
611
585
|
integration=integration,
|
612
|
-
valdiate_schemas=ctx["validate_schemas"],
|
613
|
-
dry_run=ctx.
|
614
|
-
early_exit_compare_sha=ctx.
|
586
|
+
valdiate_schemas=ctx.obj["validate_schemas"],
|
587
|
+
dry_run=ctx.obj["dry_run"],
|
588
|
+
early_exit_compare_sha=ctx.obj["early_exit_compare_sha"],
|
615
589
|
check_only_affected_shards=check_only_affected_shards,
|
616
|
-
gql_sha_url=ctx["gql_sha_url"],
|
617
|
-
print_url=ctx["gql_url_print"],
|
590
|
+
gql_sha_url=ctx.obj["gql_sha_url"],
|
591
|
+
print_url=ctx.obj["gql_url_print"],
|
618
592
|
)
|
619
593
|
)
|
620
594
|
except gql.GqlApiIntegrationNotFound as e:
|
@@ -648,18 +622,19 @@ def run_class_integration(
|
|
648
622
|
@log_level
|
649
623
|
@click.pass_context
|
650
624
|
def integration(
|
651
|
-
ctx,
|
652
|
-
configfile,
|
653
|
-
dry_run,
|
654
|
-
early_exit_compare_sha,
|
655
|
-
check_only_affected_shards,
|
656
|
-
validate_schemas,
|
657
|
-
dump_schemas_file,
|
658
|
-
log_level,
|
659
|
-
gql_sha_url,
|
660
|
-
gql_url_print,
|
661
|
-
):
|
625
|
+
ctx: click.Context,
|
626
|
+
configfile: str,
|
627
|
+
dry_run: bool,
|
628
|
+
early_exit_compare_sha: str,
|
629
|
+
check_only_affected_shards: bool,
|
630
|
+
validate_schemas: bool,
|
631
|
+
dump_schemas_file: str | None,
|
632
|
+
log_level: str | None,
|
633
|
+
gql_sha_url: bool,
|
634
|
+
gql_url_print: bool,
|
635
|
+
) -> None:
|
662
636
|
ctx.ensure_object(dict)
|
637
|
+
ctx.obj["gql_url_print"] = not dry_run and gql_url_print
|
663
638
|
|
664
639
|
init_env(
|
665
640
|
log_level=log_level,
|
@@ -667,7 +642,7 @@ def integration(
|
|
667
642
|
dry_run=dry_run,
|
668
643
|
# don't print gql url in dry-run mode - less noisy PR check logs and
|
669
644
|
# the actual SHA is not that important during PR checks
|
670
|
-
print_gql_url=
|
645
|
+
print_gql_url=ctx.obj["gql_url_print"],
|
671
646
|
)
|
672
647
|
|
673
648
|
ctx.obj["dry_run"] = dry_run
|
@@ -675,23 +650,11 @@ def integration(
|
|
675
650
|
ctx.obj["check_only_affected_shards"] = check_only_affected_shards
|
676
651
|
ctx.obj["validate_schemas"] = validate_schemas
|
677
652
|
ctx.obj["gql_sha_url"] = gql_sha_url
|
678
|
-
ctx.obj["gql_url_print"] = not dry_run and bool(gql_url_print)
|
679
653
|
ctx.obj["dump_schemas_file"] = dump_schemas_file
|
680
654
|
|
681
655
|
|
682
656
|
@integration.result_callback()
|
683
|
-
def exit_integration(
|
684
|
-
ctx,
|
685
|
-
configfile,
|
686
|
-
dry_run,
|
687
|
-
early_exit_compare_sha,
|
688
|
-
check_only_affected_shards,
|
689
|
-
validate_schemas,
|
690
|
-
dump_schemas_file,
|
691
|
-
log_level,
|
692
|
-
gql_sha_url,
|
693
|
-
gql_url_print,
|
694
|
-
):
|
657
|
+
def exit_integration(*args: Any, **kwargs: Any) -> None:
|
695
658
|
GqlApiSingleton.close()
|
696
659
|
|
697
660
|
|
@@ -704,8 +667,12 @@ def exit_integration(
|
|
704
667
|
@account_name
|
705
668
|
@click.pass_context
|
706
669
|
def terraform_aws_route53(
|
707
|
-
ctx
|
708
|
-
|
670
|
+
ctx: click.Context,
|
671
|
+
print_to_file: str | None,
|
672
|
+
enable_deletion: bool,
|
673
|
+
thread_pool_size: int,
|
674
|
+
account_name: str | None,
|
675
|
+
) -> None:
|
709
676
|
import reconcile.terraform_aws_route53
|
710
677
|
|
711
678
|
run_integration(
|
@@ -742,17 +709,17 @@ def terraform_aws_route53(
|
|
742
709
|
@log_cached_log_output
|
743
710
|
@click.pass_context
|
744
711
|
def aws_saml_idp(
|
745
|
-
ctx,
|
746
|
-
print_to_file,
|
747
|
-
enable_deletion,
|
748
|
-
thread_pool_size,
|
749
|
-
account_name,
|
750
|
-
saml_idp_name,
|
751
|
-
saml_metadata_url,
|
752
|
-
enable_extended_early_exit,
|
753
|
-
extended_early_exit_cache_ttl_seconds,
|
754
|
-
log_cached_log_output,
|
755
|
-
):
|
712
|
+
ctx: click.Context,
|
713
|
+
print_to_file: str | None,
|
714
|
+
enable_deletion: bool,
|
715
|
+
thread_pool_size: int,
|
716
|
+
account_name: str | None,
|
717
|
+
saml_idp_name: str,
|
718
|
+
saml_metadata_url: str,
|
719
|
+
enable_extended_early_exit: bool,
|
720
|
+
extended_early_exit_cache_ttl_seconds: int,
|
721
|
+
log_cached_log_output: bool,
|
722
|
+
) -> None:
|
756
723
|
from reconcile.aws_saml_idp.integration import (
|
757
724
|
AwsSamlIdpIntegration,
|
758
725
|
AwsSamlIdpIntegrationParams,
|
@@ -778,7 +745,7 @@ def aws_saml_idp(
|
|
778
745
|
|
779
746
|
@integration.command(short_help="Configures the teams and members in a GitHub org.")
|
780
747
|
@click.pass_context
|
781
|
-
def github(ctx):
|
748
|
+
def github(ctx: click.Context) -> None:
|
782
749
|
import reconcile.github_org
|
783
750
|
|
784
751
|
run_integration(reconcile.github_org, ctx.obj)
|
@@ -786,7 +753,7 @@ def github(ctx):
|
|
786
753
|
|
787
754
|
@integration.command(short_help="Configures owners in a GitHub org.")
|
788
755
|
@click.pass_context
|
789
|
-
def github_owners(ctx):
|
756
|
+
def github_owners(ctx: click.Context) -> None:
|
790
757
|
import reconcile.github_owners
|
791
758
|
|
792
759
|
run_integration(reconcile.github_owners, ctx.obj)
|
@@ -798,7 +765,13 @@ def github_owners(ctx):
|
|
798
765
|
@enable_deletion(default=False)
|
799
766
|
@send_mails(default=False)
|
800
767
|
@click.pass_context
|
801
|
-
def github_users(
|
768
|
+
def github_users(
|
769
|
+
ctx: click.Context,
|
770
|
+
gitlab_project_id: str | None,
|
771
|
+
thread_pool_size: int,
|
772
|
+
enable_deletion: bool,
|
773
|
+
send_mails: bool,
|
774
|
+
) -> None:
|
802
775
|
import reconcile.github_users
|
803
776
|
|
804
777
|
run_integration(
|
@@ -813,7 +786,7 @@ def github_users(ctx, gitlab_project_id, thread_pool_size, enable_deletion, send
|
|
813
786
|
|
814
787
|
@integration.command(short_help="Validates GitHub organization settings.")
|
815
788
|
@click.pass_context
|
816
|
-
def github_validator(ctx):
|
789
|
+
def github_validator(ctx: click.Context) -> None:
|
817
790
|
import reconcile.github_validator
|
818
791
|
|
819
792
|
run_integration(reconcile.github_validator, ctx.obj)
|
@@ -826,7 +799,9 @@ def github_validator(ctx):
|
|
826
799
|
@internal()
|
827
800
|
@use_jump_host()
|
828
801
|
@click.pass_context
|
829
|
-
def openshift_clusterrolebindings(
|
802
|
+
def openshift_clusterrolebindings(
|
803
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
804
|
+
) -> None:
|
830
805
|
import reconcile.openshift_clusterrolebindings
|
831
806
|
|
832
807
|
run_integration(
|
@@ -845,7 +820,9 @@ def openshift_clusterrolebindings(ctx, thread_pool_size, internal, use_jump_host
|
|
845
820
|
@internal()
|
846
821
|
@use_jump_host()
|
847
822
|
@click.pass_context
|
848
|
-
def openshift_rolebindings(
|
823
|
+
def openshift_rolebindings(
|
824
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
825
|
+
) -> None:
|
849
826
|
import reconcile.openshift_rolebindings
|
850
827
|
|
851
828
|
run_integration(
|
@@ -864,7 +841,9 @@ def openshift_rolebindings(ctx, thread_pool_size, internal, use_jump_host):
|
|
864
841
|
@internal()
|
865
842
|
@use_jump_host()
|
866
843
|
@click.pass_context
|
867
|
-
def openshift_groups(
|
844
|
+
def openshift_groups(
|
845
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
846
|
+
) -> None:
|
868
847
|
import reconcile.openshift_groups
|
869
848
|
|
870
849
|
run_integration(
|
@@ -879,7 +858,9 @@ def openshift_groups(ctx, thread_pool_size, internal, use_jump_host):
|
|
879
858
|
@internal()
|
880
859
|
@use_jump_host()
|
881
860
|
@click.pass_context
|
882
|
-
def openshift_users(
|
861
|
+
def openshift_users(
|
862
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
863
|
+
) -> None:
|
883
864
|
import reconcile.openshift_users
|
884
865
|
|
885
866
|
run_integration(
|
@@ -898,8 +879,12 @@ def openshift_users(ctx, thread_pool_size, internal, use_jump_host):
|
|
898
879
|
@vault_output_path
|
899
880
|
@click.pass_context
|
900
881
|
def openshift_serviceaccount_tokens(
|
901
|
-
ctx
|
902
|
-
|
882
|
+
ctx: click.Context,
|
883
|
+
thread_pool_size: int,
|
884
|
+
internal: bool,
|
885
|
+
use_jump_host: bool,
|
886
|
+
vault_output_path: str,
|
887
|
+
) -> None:
|
903
888
|
import reconcile.openshift_serviceaccount_tokens
|
904
889
|
|
905
890
|
run_integration(
|
@@ -938,17 +923,17 @@ def openshift_serviceaccount_tokens(
|
|
938
923
|
@log_cached_log_output
|
939
924
|
@click.pass_context
|
940
925
|
def aws_saml_roles(
|
941
|
-
ctx,
|
942
|
-
print_to_file,
|
943
|
-
enable_deletion,
|
944
|
-
thread_pool_size,
|
945
|
-
account_name,
|
946
|
-
saml_idp_name,
|
947
|
-
max_session_duration_hours,
|
948
|
-
enable_extended_early_exit,
|
949
|
-
extended_early_exit_cache_ttl_seconds,
|
950
|
-
log_cached_log_output,
|
951
|
-
):
|
926
|
+
ctx: click.Context,
|
927
|
+
print_to_file: str | None,
|
928
|
+
enable_deletion: bool,
|
929
|
+
thread_pool_size: int,
|
930
|
+
account_name: str | None,
|
931
|
+
saml_idp_name: str,
|
932
|
+
max_session_duration_hours: int,
|
933
|
+
enable_extended_early_exit: bool,
|
934
|
+
extended_early_exit_cache_ttl_seconds: int,
|
935
|
+
log_cached_log_output: bool,
|
936
|
+
) -> None:
|
952
937
|
from reconcile.aws_saml_roles.integration import (
|
953
938
|
AwsSamlRolesIntegration,
|
954
939
|
AwsSamlRolesIntegrationParams,
|
@@ -1019,16 +1004,16 @@ def aws_saml_roles(
|
|
1019
1004
|
)
|
1020
1005
|
@click.pass_context
|
1021
1006
|
def aws_account_manager(
|
1022
|
-
ctx,
|
1023
|
-
account_name,
|
1024
|
-
flavor,
|
1025
|
-
tag,
|
1026
|
-
initial_user_name,
|
1027
|
-
initial_user_policy_arn,
|
1028
|
-
initial_user_secret_vault_path,
|
1029
|
-
account_tmpl_resource,
|
1030
|
-
template_collection_root_path,
|
1031
|
-
):
|
1007
|
+
ctx: click.Context,
|
1008
|
+
account_name: str | None,
|
1009
|
+
flavor: str,
|
1010
|
+
tag: Iterable[tuple[str, str]],
|
1011
|
+
initial_user_name: str,
|
1012
|
+
initial_user_policy_arn: str,
|
1013
|
+
initial_user_secret_vault_path: str,
|
1014
|
+
account_tmpl_resource: str,
|
1015
|
+
template_collection_root_path: str,
|
1016
|
+
) -> None:
|
1032
1017
|
from reconcile.aws_account_manager.integration import (
|
1033
1018
|
AwsAccountMgmtIntegration,
|
1034
1019
|
AwsAccountMgmtIntegrationParams,
|
@@ -1067,8 +1052,11 @@ def aws_account_manager(
|
|
1067
1052
|
)
|
1068
1053
|
@click.pass_context
|
1069
1054
|
def terraform_init(
|
1070
|
-
ctx
|
1071
|
-
|
1055
|
+
ctx: click.Context,
|
1056
|
+
account_name: str | None,
|
1057
|
+
state_tmpl_resource: str,
|
1058
|
+
template_collection_root_path: str,
|
1059
|
+
) -> None:
|
1072
1060
|
from reconcile.terraform_init.integration import (
|
1073
1061
|
TerraformInitIntegration,
|
1074
1062
|
TerraformInitIntegrationParams,
|
@@ -1088,7 +1076,7 @@ def terraform_init(
|
|
1088
1076
|
|
1089
1077
|
@integration.command(short_help="Manage Jenkins roles association via REST API.")
|
1090
1078
|
@click.pass_context
|
1091
|
-
def jenkins_roles(ctx):
|
1079
|
+
def jenkins_roles(ctx: click.Context) -> None:
|
1092
1080
|
import reconcile.jenkins_roles
|
1093
1081
|
|
1094
1082
|
run_integration(reconcile.jenkins_roles, ctx.obj)
|
@@ -1096,7 +1084,7 @@ def jenkins_roles(ctx):
|
|
1096
1084
|
|
1097
1085
|
@integration.command(short_help="Manage Jenkins worker fleets via JCasC.")
|
1098
1086
|
@click.pass_context
|
1099
|
-
def jenkins_worker_fleets(ctx):
|
1087
|
+
def jenkins_worker_fleets(ctx: click.Context) -> None:
|
1100
1088
|
import reconcile.jenkins_worker_fleets
|
1101
1089
|
|
1102
1090
|
run_integration(reconcile.jenkins_worker_fleets, ctx.obj)
|
@@ -1111,7 +1099,14 @@ def jenkins_worker_fleets(ctx):
|
|
1111
1099
|
@instance_name
|
1112
1100
|
@throughput
|
1113
1101
|
@click.pass_context
|
1114
|
-
def jenkins_job_builder(
|
1102
|
+
def jenkins_job_builder(
|
1103
|
+
ctx: click.Context,
|
1104
|
+
io_dir: str,
|
1105
|
+
print_only: bool,
|
1106
|
+
config_name: str | None,
|
1107
|
+
job_name: str | None,
|
1108
|
+
instance_name: str | None,
|
1109
|
+
) -> None:
|
1115
1110
|
import reconcile.jenkins_job_builder
|
1116
1111
|
|
1117
1112
|
run_integration(
|
@@ -1127,7 +1122,7 @@ def jenkins_job_builder(ctx, io_dir, print_only, config_name, job_name, instance
|
|
1127
1122
|
|
1128
1123
|
@integration.command(short_help="Clean up jenkins job history.")
|
1129
1124
|
@click.pass_context
|
1130
|
-
def jenkins_job_builds_cleaner(ctx):
|
1125
|
+
def jenkins_job_builds_cleaner(ctx: click.Context) -> None:
|
1131
1126
|
import reconcile.jenkins_job_builds_cleaner
|
1132
1127
|
|
1133
1128
|
run_integration(reconcile.jenkins_job_builds_cleaner, ctx.obj)
|
@@ -1135,7 +1130,7 @@ def jenkins_job_builds_cleaner(ctx):
|
|
1135
1130
|
|
1136
1131
|
@integration.command(short_help="Delete Jenkins jobs in multiple tenant instances.")
|
1137
1132
|
@click.pass_context
|
1138
|
-
def jenkins_job_cleaner(ctx):
|
1133
|
+
def jenkins_job_cleaner(ctx: click.Context) -> None:
|
1139
1134
|
import reconcile.jenkins_job_cleaner
|
1140
1135
|
|
1141
1136
|
run_integration(reconcile.jenkins_job_cleaner, ctx.obj)
|
@@ -1143,7 +1138,7 @@ def jenkins_job_cleaner(ctx):
|
|
1143
1138
|
|
1144
1139
|
@integration.command(short_help="Manage web hooks to Jenkins jobs.")
|
1145
1140
|
@click.pass_context
|
1146
|
-
def jenkins_webhooks(ctx):
|
1141
|
+
def jenkins_webhooks(ctx: click.Context) -> None:
|
1147
1142
|
import reconcile.jenkins_webhooks
|
1148
1143
|
|
1149
1144
|
run_integration(reconcile.jenkins_webhooks, ctx.obj)
|
@@ -1151,7 +1146,7 @@ def jenkins_webhooks(ctx):
|
|
1151
1146
|
|
1152
1147
|
@integration.command(short_help="Remove webhooks to previous Jenkins instances.")
|
1153
1148
|
@click.pass_context
|
1154
|
-
def jenkins_webhooks_cleaner(ctx):
|
1149
|
+
def jenkins_webhooks_cleaner(ctx: click.Context) -> None:
|
1155
1150
|
import reconcile.jenkins_webhooks_cleaner
|
1156
1151
|
|
1157
1152
|
run_integration(reconcile.jenkins_webhooks_cleaner, ctx.obj)
|
@@ -1163,7 +1158,9 @@ def jenkins_webhooks_cleaner(ctx):
|
|
1163
1158
|
)
|
1164
1159
|
@click.option("--board-check-interval", help="Check interval in minutes", default=120)
|
1165
1160
|
@click.pass_context
|
1166
|
-
def jira_permissions_validator(
|
1161
|
+
def jira_permissions_validator(
|
1162
|
+
ctx: click.Context, jira_board_name: Iterable[str] | None, board_check_interval: int
|
1163
|
+
) -> None:
|
1167
1164
|
import reconcile.jira_permissions_validator
|
1168
1165
|
|
1169
1166
|
run_integration(
|
@@ -1176,7 +1173,7 @@ def jira_permissions_validator(ctx, jira_board_name, board_check_interval):
|
|
1176
1173
|
|
1177
1174
|
@integration.command(short_help="Watch for changes in Jira boards and notify on Slack.")
|
1178
1175
|
@click.pass_context
|
1179
|
-
def jira_watcher(ctx):
|
1176
|
+
def jira_watcher(ctx: click.Context) -> None:
|
1180
1177
|
import reconcile.jira_watcher
|
1181
1178
|
|
1182
1179
|
run_integration(reconcile.jira_watcher, ctx.obj)
|
@@ -1191,7 +1188,9 @@ def jira_watcher(ctx):
|
|
1191
1188
|
@internal()
|
1192
1189
|
@use_jump_host()
|
1193
1190
|
@click.pass_context
|
1194
|
-
def openshift_upgrade_watcher(
|
1191
|
+
def openshift_upgrade_watcher(
|
1192
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
1193
|
+
) -> None:
|
1195
1194
|
import reconcile.openshift_upgrade_watcher
|
1196
1195
|
|
1197
1196
|
run_integration(
|
@@ -1211,13 +1210,13 @@ def openshift_upgrade_watcher(ctx, thread_pool_size, internal, use_jump_host):
|
|
1211
1210
|
@log_cached_log_output
|
1212
1211
|
@click.pass_context
|
1213
1212
|
def slack_usergroups(
|
1214
|
-
ctx,
|
1215
|
-
workspace_name,
|
1216
|
-
usergroup_name,
|
1217
|
-
enable_extended_early_exit,
|
1218
|
-
extended_early_exit_cache_ttl_seconds,
|
1219
|
-
log_cached_log_output,
|
1220
|
-
):
|
1213
|
+
ctx: click.Context,
|
1214
|
+
workspace_name: str | None,
|
1215
|
+
usergroup_name: str | None,
|
1216
|
+
enable_extended_early_exit: bool,
|
1217
|
+
extended_early_exit_cache_ttl_seconds: int,
|
1218
|
+
log_cached_log_output: bool,
|
1219
|
+
) -> None:
|
1221
1220
|
import reconcile.slack_usergroups
|
1222
1221
|
|
1223
1222
|
run_integration(
|
@@ -1234,7 +1233,7 @@ def slack_usergroups(
|
|
1234
1233
|
@integration.command(short_help="Manage permissions on GitLab projects.")
|
1235
1234
|
@threaded()
|
1236
1235
|
@click.pass_context
|
1237
|
-
def gitlab_permissions(ctx, thread_pool_size):
|
1236
|
+
def gitlab_permissions(ctx: click.Context, thread_pool_size: int) -> None:
|
1238
1237
|
import reconcile.gitlab_permissions
|
1239
1238
|
|
1240
1239
|
run_integration(reconcile.gitlab_permissions, ctx.obj, thread_pool_size)
|
@@ -1247,7 +1246,7 @@ def gitlab_permissions(ctx, thread_pool_size):
|
|
1247
1246
|
help="wait for pending/running pipelines before acting.",
|
1248
1247
|
)
|
1249
1248
|
@click.pass_context
|
1250
|
-
def gitlab_housekeeping(ctx, wait_for_pipeline):
|
1249
|
+
def gitlab_housekeeping(ctx: click.Context, wait_for_pipeline: bool) -> None:
|
1251
1250
|
import reconcile.gitlab_housekeeping
|
1252
1251
|
|
1253
1252
|
run_integration(reconcile.gitlab_housekeeping, ctx.obj, wait_for_pipeline)
|
@@ -1256,7 +1255,7 @@ def gitlab_housekeeping(ctx, wait_for_pipeline):
|
|
1256
1255
|
@integration.command(short_help="Listen to SQS and creates MRs out of the messages.")
|
1257
1256
|
@click.argument("gitlab-project-id")
|
1258
1257
|
@click.pass_context
|
1259
|
-
def gitlab_mr_sqs_consumer(ctx, gitlab_project_id):
|
1258
|
+
def gitlab_mr_sqs_consumer(ctx: click.Context, gitlab_project_id: str) -> None:
|
1260
1259
|
import reconcile.gitlab_mr_sqs_consumer
|
1261
1260
|
|
1262
1261
|
run_integration(reconcile.gitlab_mr_sqs_consumer, ctx.obj, gitlab_project_id)
|
@@ -1265,7 +1264,7 @@ def gitlab_mr_sqs_consumer(ctx, gitlab_project_id):
|
|
1265
1264
|
@integration.command(short_help="Delete orphan AWS resources.")
|
1266
1265
|
@threaded()
|
1267
1266
|
@click.pass_context
|
1268
|
-
def aws_garbage_collector(ctx, thread_pool_size):
|
1267
|
+
def aws_garbage_collector(ctx: click.Context, thread_pool_size: int) -> None:
|
1269
1268
|
import reconcile.aws_garbage_collector
|
1270
1269
|
|
1271
1270
|
run_integration(reconcile.aws_garbage_collector, ctx.obj, thread_pool_size)
|
@@ -1275,7 +1274,9 @@ def aws_garbage_collector(ctx, thread_pool_size):
|
|
1275
1274
|
@threaded()
|
1276
1275
|
@account_name
|
1277
1276
|
@click.pass_context
|
1278
|
-
def aws_iam_keys(
|
1277
|
+
def aws_iam_keys(
|
1278
|
+
ctx: click.Context, thread_pool_size: int, account_name: str | None
|
1279
|
+
) -> None:
|
1279
1280
|
import reconcile.aws_iam_keys
|
1280
1281
|
|
1281
1282
|
run_integration(
|
@@ -1285,7 +1286,7 @@ def aws_iam_keys(ctx, thread_pool_size, account_name):
|
|
1285
1286
|
|
1286
1287
|
@integration.command(short_help="Reset IAM user password by user reference.")
|
1287
1288
|
@click.pass_context
|
1288
|
-
def aws_iam_password_reset(ctx):
|
1289
|
+
def aws_iam_password_reset(ctx: click.Context) -> None:
|
1289
1290
|
import reconcile.aws_iam_password_reset
|
1290
1291
|
|
1291
1292
|
run_integration(reconcile.aws_iam_password_reset, ctx.obj)
|
@@ -1293,7 +1294,7 @@ def aws_iam_password_reset(ctx):
|
|
1293
1294
|
|
1294
1295
|
@integration.command(short_help="Share AMI and AMI tags between accounts.")
|
1295
1296
|
@click.pass_context
|
1296
|
-
def aws_ami_share(ctx):
|
1297
|
+
def aws_ami_share(ctx: click.Context) -> None:
|
1297
1298
|
import reconcile.aws_ami_share
|
1298
1299
|
|
1299
1300
|
run_integration(reconcile.aws_ami_share, ctx.obj)
|
@@ -1302,7 +1303,7 @@ def aws_ami_share(ctx):
|
|
1302
1303
|
@integration.command(short_help="Cleanup old and unused AMIs.")
|
1303
1304
|
@threaded()
|
1304
1305
|
@click.pass_context
|
1305
|
-
def aws_ami_cleanup(ctx, thread_pool_size):
|
1306
|
+
def aws_ami_cleanup(ctx: click.Context, thread_pool_size: int) -> None:
|
1306
1307
|
import reconcile.aws_ami_cleanup.integration
|
1307
1308
|
|
1308
1309
|
run_integration(reconcile.aws_ami_cleanup.integration, ctx.obj, thread_pool_size)
|
@@ -1311,7 +1312,7 @@ def aws_ami_cleanup(ctx, thread_pool_size):
|
|
1311
1312
|
@integration.command(short_help="Set up retention period for Cloudwatch logs.")
|
1312
1313
|
@threaded()
|
1313
1314
|
@click.pass_context
|
1314
|
-
def aws_cloudwatch_log_retention(ctx, thread_pool_size):
|
1315
|
+
def aws_cloudwatch_log_retention(ctx: click.Context, thread_pool_size: int) -> None:
|
1315
1316
|
import reconcile.aws_cloudwatch_log_retention.integration
|
1316
1317
|
|
1317
1318
|
run_integration(
|
@@ -1324,7 +1325,7 @@ def aws_cloudwatch_log_retention(ctx, thread_pool_size):
|
|
1324
1325
|
)
|
1325
1326
|
@vault_output_path
|
1326
1327
|
@click.pass_context
|
1327
|
-
def aws_ecr_image_pull_secrets(ctx, vault_output_path):
|
1328
|
+
def aws_ecr_image_pull_secrets(ctx: click.Context, vault_output_path: str) -> None:
|
1328
1329
|
import reconcile.aws_ecr_image_pull_secrets
|
1329
1330
|
|
1330
1331
|
run_integration(reconcile.aws_ecr_image_pull_secrets, ctx.obj, vault_output_path)
|
@@ -1337,7 +1338,9 @@ def aws_ecr_image_pull_secrets(ctx, vault_output_path):
|
|
1337
1338
|
@gitlab_project_id
|
1338
1339
|
@threaded()
|
1339
1340
|
@click.pass_context
|
1340
|
-
def aws_support_cases_sos(
|
1341
|
+
def aws_support_cases_sos(
|
1342
|
+
ctx: click.Context, gitlab_project_id: str | None, thread_pool_size: int
|
1343
|
+
) -> None:
|
1341
1344
|
import reconcile.aws_support_cases_sos
|
1342
1345
|
|
1343
1346
|
run_integration(
|
@@ -1357,14 +1360,14 @@ def aws_support_cases_sos(ctx, gitlab_project_id, thread_pool_size):
|
|
1357
1360
|
@namespace_name
|
1358
1361
|
@click.pass_context
|
1359
1362
|
def openshift_resources(
|
1360
|
-
ctx,
|
1361
|
-
thread_pool_size,
|
1362
|
-
internal,
|
1363
|
-
use_jump_host,
|
1364
|
-
cluster_name,
|
1365
|
-
exclude_cluster,
|
1366
|
-
namespace_name,
|
1367
|
-
):
|
1363
|
+
ctx: click.Context,
|
1364
|
+
thread_pool_size: int,
|
1365
|
+
internal: bool,
|
1366
|
+
use_jump_host: bool,
|
1367
|
+
cluster_name: Iterable[str] | None,
|
1368
|
+
exclude_cluster: Iterable[str],
|
1369
|
+
namespace_name: str | None,
|
1370
|
+
) -> None:
|
1368
1371
|
import reconcile.openshift_resources
|
1369
1372
|
|
1370
1373
|
run_integration(
|
@@ -1392,15 +1395,15 @@ def openshift_resources(
|
|
1392
1395
|
@trigger_reason
|
1393
1396
|
@click.pass_context
|
1394
1397
|
def openshift_saas_deploy(
|
1395
|
-
ctx,
|
1396
|
-
thread_pool_size,
|
1397
|
-
io_dir,
|
1398
|
-
use_jump_host,
|
1399
|
-
saas_file_name,
|
1400
|
-
env_name,
|
1401
|
-
trigger_integration,
|
1402
|
-
trigger_reason,
|
1403
|
-
):
|
1398
|
+
ctx: click.Context,
|
1399
|
+
thread_pool_size: int,
|
1400
|
+
io_dir: str,
|
1401
|
+
use_jump_host: bool,
|
1402
|
+
saas_file_name: str | None,
|
1403
|
+
env_name: str | None,
|
1404
|
+
trigger_integration: str | None,
|
1405
|
+
trigger_reason: str | None,
|
1406
|
+
) -> None:
|
1404
1407
|
import reconcile.openshift_saas_deploy
|
1405
1408
|
|
1406
1409
|
run_integration(
|
@@ -1431,13 +1434,13 @@ def openshift_saas_deploy(
|
|
1431
1434
|
@use_jump_host()
|
1432
1435
|
@click.pass_context
|
1433
1436
|
def openshift_saas_deploy_change_tester(
|
1434
|
-
ctx,
|
1435
|
-
gitlab_project_id,
|
1436
|
-
gitlab_merge_request_id,
|
1437
|
-
thread_pool_size,
|
1438
|
-
comparison_sha,
|
1439
|
-
use_jump_host,
|
1440
|
-
):
|
1437
|
+
ctx: click.Context,
|
1438
|
+
gitlab_project_id: str,
|
1439
|
+
gitlab_merge_request_id: str,
|
1440
|
+
thread_pool_size: int,
|
1441
|
+
comparison_sha: str | None,
|
1442
|
+
use_jump_host: bool,
|
1443
|
+
) -> None:
|
1441
1444
|
import reconcile.openshift_saas_deploy_change_tester
|
1442
1445
|
|
1443
1446
|
run_integration(
|
@@ -1453,7 +1456,7 @@ def openshift_saas_deploy_change_tester(
|
|
1453
1456
|
|
1454
1457
|
@integration.command(short_help="Validates Saas files.")
|
1455
1458
|
@click.pass_context
|
1456
|
-
def saas_file_validator(ctx):
|
1459
|
+
def saas_file_validator(ctx: click.Context) -> None:
|
1457
1460
|
import reconcile.saas_file_validator
|
1458
1461
|
|
1459
1462
|
run_integration(reconcile.saas_file_validator, ctx.obj)
|
@@ -1468,8 +1471,12 @@ def saas_file_validator(ctx):
|
|
1468
1471
|
@include_trigger_trace
|
1469
1472
|
@click.pass_context
|
1470
1473
|
def openshift_saas_deploy_trigger_moving_commits(
|
1471
|
-
ctx
|
1472
|
-
|
1474
|
+
ctx: click.Context,
|
1475
|
+
thread_pool_size: int,
|
1476
|
+
internal: bool,
|
1477
|
+
use_jump_host: bool,
|
1478
|
+
include_trigger_trace: bool,
|
1479
|
+
) -> None:
|
1473
1480
|
import reconcile.openshift_saas_deploy_trigger_moving_commits
|
1474
1481
|
|
1475
1482
|
run_integration(
|
@@ -1491,8 +1498,12 @@ def openshift_saas_deploy_trigger_moving_commits(
|
|
1491
1498
|
@include_trigger_trace
|
1492
1499
|
@click.pass_context
|
1493
1500
|
def openshift_saas_deploy_trigger_upstream_jobs(
|
1494
|
-
ctx
|
1495
|
-
|
1501
|
+
ctx: click.Context,
|
1502
|
+
thread_pool_size: int,
|
1503
|
+
internal: bool,
|
1504
|
+
use_jump_host: bool,
|
1505
|
+
include_trigger_trace: bool,
|
1506
|
+
) -> None:
|
1496
1507
|
import reconcile.openshift_saas_deploy_trigger_upstream_jobs
|
1497
1508
|
|
1498
1509
|
run_integration(
|
@@ -1514,8 +1525,12 @@ def openshift_saas_deploy_trigger_upstream_jobs(
|
|
1514
1525
|
@include_trigger_trace
|
1515
1526
|
@click.pass_context
|
1516
1527
|
def openshift_saas_deploy_trigger_images(
|
1517
|
-
ctx
|
1518
|
-
|
1528
|
+
ctx: click.Context,
|
1529
|
+
thread_pool_size: int,
|
1530
|
+
internal: bool,
|
1531
|
+
use_jump_host: bool,
|
1532
|
+
include_trigger_trace: bool,
|
1533
|
+
) -> None:
|
1519
1534
|
import reconcile.openshift_saas_deploy_trigger_images
|
1520
1535
|
|
1521
1536
|
run_integration(
|
@@ -1537,8 +1552,12 @@ def openshift_saas_deploy_trigger_images(
|
|
1537
1552
|
@include_trigger_trace
|
1538
1553
|
@click.pass_context
|
1539
1554
|
def openshift_saas_deploy_trigger_configs(
|
1540
|
-
ctx
|
1541
|
-
|
1555
|
+
ctx: click.Context,
|
1556
|
+
thread_pool_size: int,
|
1557
|
+
internal: bool,
|
1558
|
+
use_jump_host: bool,
|
1559
|
+
include_trigger_trace: bool,
|
1560
|
+
) -> None:
|
1542
1561
|
import reconcile.openshift_saas_deploy_trigger_configs
|
1543
1562
|
|
1544
1563
|
run_integration(
|
@@ -1559,8 +1578,8 @@ def openshift_saas_deploy_trigger_configs(
|
|
1559
1578
|
@use_jump_host()
|
1560
1579
|
@click.pass_context
|
1561
1580
|
def openshift_saas_deploy_trigger_cleaner(
|
1562
|
-
ctx, thread_pool_size, internal, use_jump_host
|
1563
|
-
):
|
1581
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
1582
|
+
) -> None:
|
1564
1583
|
import reconcile.openshift_saas_deploy_trigger_cleaner
|
1565
1584
|
|
1566
1585
|
run_integration(
|
@@ -1581,8 +1600,12 @@ def openshift_saas_deploy_trigger_cleaner(
|
|
1581
1600
|
@saas_file_name
|
1582
1601
|
@click.pass_context
|
1583
1602
|
def openshift_tekton_resources(
|
1584
|
-
ctx
|
1585
|
-
|
1603
|
+
ctx: click.Context,
|
1604
|
+
thread_pool_size: int,
|
1605
|
+
internal: bool,
|
1606
|
+
use_jump_host: bool,
|
1607
|
+
saas_file_name: str | None,
|
1608
|
+
) -> None:
|
1586
1609
|
import reconcile.openshift_tekton_resources
|
1587
1610
|
|
1588
1611
|
run_integration(
|
@@ -1601,7 +1624,9 @@ def openshift_tekton_resources(
|
|
1601
1624
|
@click.argument("gitlab-project-id")
|
1602
1625
|
@click.argument("gitlab-merge-request-id")
|
1603
1626
|
@click.pass_context
|
1604
|
-
def gitlab_labeler(
|
1627
|
+
def gitlab_labeler(
|
1628
|
+
ctx: click.Context, gitlab_project_id: str, gitlab_merge_request_id: str
|
1629
|
+
) -> None:
|
1605
1630
|
import reconcile.gitlab_labeler
|
1606
1631
|
|
1607
1632
|
run_integration(
|
@@ -1616,7 +1641,9 @@ def gitlab_labeler(ctx, gitlab_project_id, gitlab_merge_request_id):
|
|
1616
1641
|
@internal()
|
1617
1642
|
@use_jump_host()
|
1618
1643
|
@click.pass_context
|
1619
|
-
def openshift_namespace_labels(
|
1644
|
+
def openshift_namespace_labels(
|
1645
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
1646
|
+
) -> None:
|
1620
1647
|
import reconcile.openshift_namespace_labels
|
1621
1648
|
|
1622
1649
|
run_integration(
|
@@ -1638,8 +1665,13 @@ def openshift_namespace_labels(ctx, thread_pool_size, internal, use_jump_host):
|
|
1638
1665
|
@namespace_name
|
1639
1666
|
@click.pass_context
|
1640
1667
|
def openshift_namespaces(
|
1641
|
-
ctx
|
1642
|
-
|
1668
|
+
ctx: click.Context,
|
1669
|
+
thread_pool_size: int,
|
1670
|
+
internal: bool,
|
1671
|
+
use_jump_host: bool,
|
1672
|
+
cluster_name: Iterable[str] | None,
|
1673
|
+
namespace_name: str | None,
|
1674
|
+
) -> None:
|
1643
1675
|
import reconcile.openshift_namespaces
|
1644
1676
|
|
1645
1677
|
run_integration(
|
@@ -1660,7 +1692,9 @@ def openshift_namespaces(
|
|
1660
1692
|
@internal()
|
1661
1693
|
@use_jump_host()
|
1662
1694
|
@click.pass_context
|
1663
|
-
def openshift_network_policies(
|
1695
|
+
def openshift_network_policies(
|
1696
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
1697
|
+
) -> None:
|
1664
1698
|
import reconcile.openshift_network_policies
|
1665
1699
|
|
1666
1700
|
run_integration(
|
@@ -1680,7 +1714,13 @@ def openshift_network_policies(ctx, thread_pool_size, internal, use_jump_host):
|
|
1680
1714
|
@internal()
|
1681
1715
|
@use_jump_host()
|
1682
1716
|
@click.pass_context
|
1683
|
-
def openshift_limitranges(
|
1717
|
+
def openshift_limitranges(
|
1718
|
+
ctx: click.Context,
|
1719
|
+
thread_pool_size: int,
|
1720
|
+
internal: bool,
|
1721
|
+
use_jump_host: bool,
|
1722
|
+
take_over: bool,
|
1723
|
+
) -> None:
|
1684
1724
|
import reconcile.openshift_limitranges
|
1685
1725
|
|
1686
1726
|
run_integration(
|
@@ -1701,7 +1741,13 @@ def openshift_limitranges(ctx, thread_pool_size, internal, use_jump_host, take_o
|
|
1701
1741
|
@internal()
|
1702
1742
|
@use_jump_host()
|
1703
1743
|
@click.pass_context
|
1704
|
-
def openshift_resourcequotas(
|
1744
|
+
def openshift_resourcequotas(
|
1745
|
+
ctx: click.Context,
|
1746
|
+
thread_pool_size: int,
|
1747
|
+
internal: bool,
|
1748
|
+
use_jump_host: bool,
|
1749
|
+
take_over: bool,
|
1750
|
+
) -> None:
|
1705
1751
|
import reconcile.openshift_resourcequotas
|
1706
1752
|
|
1707
1753
|
run_integration(
|
@@ -1724,8 +1770,13 @@ def openshift_resourcequotas(ctx, thread_pool_size, internal, use_jump_host, tak
|
|
1724
1770
|
@namespace_name
|
1725
1771
|
@click.pass_context
|
1726
1772
|
def openshift_vault_secrets(
|
1727
|
-
ctx
|
1728
|
-
|
1773
|
+
ctx: click.Context,
|
1774
|
+
thread_pool_size: int,
|
1775
|
+
internal: bool,
|
1776
|
+
use_jump_host: bool,
|
1777
|
+
cluster_name: Iterable[str] | None,
|
1778
|
+
namespace_name: str | None,
|
1779
|
+
) -> None:
|
1729
1780
|
import reconcile.openshift_vault_secrets
|
1730
1781
|
|
1731
1782
|
run_integration(
|
@@ -1747,7 +1798,13 @@ def openshift_vault_secrets(
|
|
1747
1798
|
@use_jump_host()
|
1748
1799
|
@cluster_name
|
1749
1800
|
@click.pass_context
|
1750
|
-
def openshift_rhcs_certs(
|
1801
|
+
def openshift_rhcs_certs(
|
1802
|
+
ctx: click.Context,
|
1803
|
+
thread_pool_size: int,
|
1804
|
+
internal: bool,
|
1805
|
+
use_jump_host: bool,
|
1806
|
+
cluster_name: Iterable[str] | None,
|
1807
|
+
) -> None:
|
1751
1808
|
import reconcile.openshift_rhcs_certs
|
1752
1809
|
|
1753
1810
|
run_integration(
|
@@ -1770,8 +1827,13 @@ def openshift_rhcs_certs(ctx, thread_pool_size, internal, use_jump_host, cluster
|
|
1770
1827
|
@namespace_name
|
1771
1828
|
@click.pass_context
|
1772
1829
|
def openshift_routes(
|
1773
|
-
ctx
|
1774
|
-
|
1830
|
+
ctx: click.Context,
|
1831
|
+
thread_pool_size: int,
|
1832
|
+
internal: bool,
|
1833
|
+
use_jump_host: bool,
|
1834
|
+
cluster_name: Iterable[str] | None,
|
1835
|
+
namespace_name: str | None,
|
1836
|
+
) -> None:
|
1775
1837
|
import reconcile.openshift_routes
|
1776
1838
|
|
1777
1839
|
run_integration(
|
@@ -1795,8 +1857,13 @@ def openshift_routes(
|
|
1795
1857
|
@namespace_name
|
1796
1858
|
@click.pass_context
|
1797
1859
|
def openshift_prometheus_rules(
|
1798
|
-
ctx
|
1799
|
-
|
1860
|
+
ctx: click.Context,
|
1861
|
+
thread_pool_size: int,
|
1862
|
+
internal: bool,
|
1863
|
+
use_jump_host: bool,
|
1864
|
+
cluster_name: Iterable[str] | None,
|
1865
|
+
namespace_name: str | None,
|
1866
|
+
) -> None:
|
1800
1867
|
import reconcile.openshift_prometheus_rules
|
1801
1868
|
|
1802
1869
|
run_integration(
|
@@ -1828,17 +1895,17 @@ def openshift_prometheus_rules(
|
|
1828
1895
|
)
|
1829
1896
|
@click.pass_context
|
1830
1897
|
def endpoints_discovery(
|
1831
|
-
ctx,
|
1832
|
-
thread_pool_size,
|
1833
|
-
internal,
|
1834
|
-
use_jump_host,
|
1835
|
-
cluster_name,
|
1836
|
-
enable_extended_early_exit,
|
1837
|
-
extended_early_exit_cache_ttl_seconds,
|
1838
|
-
log_cached_log_output,
|
1839
|
-
app_name,
|
1840
|
-
endpoint_tmpl_resource,
|
1841
|
-
):
|
1898
|
+
ctx: click.Context,
|
1899
|
+
thread_pool_size: int,
|
1900
|
+
internal: bool,
|
1901
|
+
use_jump_host: bool,
|
1902
|
+
cluster_name: Iterable[str] | None,
|
1903
|
+
enable_extended_early_exit: bool,
|
1904
|
+
extended_early_exit_cache_ttl_seconds: int,
|
1905
|
+
log_cached_log_output: bool,
|
1906
|
+
app_name: str | None,
|
1907
|
+
endpoint_tmpl_resource: str | None,
|
1908
|
+
) -> None:
|
1842
1909
|
from reconcile.endpoints_discovery.integration import (
|
1843
1910
|
EndpointsDiscoveryIntegration,
|
1844
1911
|
EndpointsDiscoveryIntegrationParams,
|
@@ -1864,7 +1931,7 @@ def endpoints_discovery(
|
|
1864
1931
|
|
1865
1932
|
@integration.command(short_help="Configures the teams and members in Quay.")
|
1866
1933
|
@click.pass_context
|
1867
|
-
def quay_membership(ctx):
|
1934
|
+
def quay_membership(ctx: click.Context) -> None:
|
1868
1935
|
import reconcile.quay_membership
|
1869
1936
|
|
1870
1937
|
run_integration(reconcile.quay_membership, ctx.obj)
|
@@ -1873,7 +1940,7 @@ def quay_membership(ctx):
|
|
1873
1940
|
@integration.command(short_help="Mirrors external images into GCP Artifact Registry.")
|
1874
1941
|
@click.pass_context
|
1875
1942
|
@binary(["skopeo"])
|
1876
|
-
def gcp_image_mirror(ctx):
|
1943
|
+
def gcp_image_mirror(ctx: click.Context) -> None:
|
1877
1944
|
import reconcile.gcp_image_mirror
|
1878
1945
|
|
1879
1946
|
run_integration(reconcile.gcp_image_mirror, ctx.obj)
|
@@ -1916,13 +1983,13 @@ def gcp_image_mirror(ctx):
|
|
1916
1983
|
@click.pass_context
|
1917
1984
|
@binary(["skopeo"])
|
1918
1985
|
def quay_mirror(
|
1919
|
-
ctx,
|
1920
|
-
control_file_dir,
|
1921
|
-
compare_tags,
|
1922
|
-
compare_tags_interval,
|
1923
|
-
repository_url,
|
1924
|
-
exclude_repository_url,
|
1925
|
-
):
|
1986
|
+
ctx: click.Context,
|
1987
|
+
control_file_dir: str | None,
|
1988
|
+
compare_tags: bool | None,
|
1989
|
+
compare_tags_interval: int,
|
1990
|
+
repository_url: Iterable[str] | None,
|
1991
|
+
exclude_repository_url: Iterable[str] | None,
|
1992
|
+
) -> None:
|
1926
1993
|
import reconcile.quay_mirror
|
1927
1994
|
|
1928
1995
|
run_integration(
|
@@ -1975,8 +2042,13 @@ def quay_mirror(
|
|
1975
2042
|
@click.pass_context
|
1976
2043
|
@binary(["skopeo"])
|
1977
2044
|
def quay_mirror_org(
|
1978
|
-
ctx
|
1979
|
-
|
2045
|
+
ctx: click.Context,
|
2046
|
+
control_file_dir: str | None,
|
2047
|
+
compare_tags: bool | None,
|
2048
|
+
compare_tags_interval: int,
|
2049
|
+
org: Iterable[str] | None,
|
2050
|
+
repository: Iterable[str] | None,
|
2051
|
+
) -> None:
|
1980
2052
|
import reconcile.quay_mirror_org
|
1981
2053
|
|
1982
2054
|
run_integration(
|
@@ -1992,7 +2064,7 @@ def quay_mirror_org(
|
|
1992
2064
|
|
1993
2065
|
@integration.command(short_help="Creates and Manages Quay Repos.")
|
1994
2066
|
@click.pass_context
|
1995
|
-
def quay_repos(ctx):
|
2067
|
+
def quay_repos(ctx: click.Context) -> None:
|
1996
2068
|
import reconcile.quay_repos
|
1997
2069
|
|
1998
2070
|
run_integration(reconcile.quay_repos, ctx.obj)
|
@@ -2000,7 +2072,7 @@ def quay_repos(ctx):
|
|
2000
2072
|
|
2001
2073
|
@integration.command(short_help="Manage permissions for Quay Repositories.")
|
2002
2074
|
@click.pass_context
|
2003
|
-
def quay_permissions(ctx):
|
2075
|
+
def quay_permissions(ctx: click.Context) -> None:
|
2004
2076
|
import reconcile.quay_permissions
|
2005
2077
|
|
2006
2078
|
run_integration(reconcile.quay_permissions, ctx.obj)
|
@@ -2010,7 +2082,9 @@ def quay_permissions(ctx):
|
|
2010
2082
|
@click.argument("app-interface-project-id")
|
2011
2083
|
@click.argument("infra-project-id")
|
2012
2084
|
@click.pass_context
|
2013
|
-
def ldap_users(
|
2085
|
+
def ldap_users(
|
2086
|
+
ctx: click.Context, infra_project_id: str, app_interface_project_id: str
|
2087
|
+
) -> None:
|
2014
2088
|
import reconcile.ldap_users
|
2015
2089
|
|
2016
2090
|
run_integration(
|
@@ -2026,7 +2100,7 @@ def ldap_users(ctx, infra_project_id, app_interface_project_id):
|
|
2026
2100
|
default="it-cloud-aws",
|
2027
2101
|
)
|
2028
2102
|
@click.pass_context
|
2029
|
-
def ldap_groups(ctx, aws_sso_namespace):
|
2103
|
+
def ldap_groups(ctx: click.Context, aws_sso_namespace: str) -> None:
|
2030
2104
|
from reconcile.ldap_groups.integration import (
|
2031
2105
|
LdapGroupsIntegration,
|
2032
2106
|
LdapGroupsIntegrationParams,
|
@@ -2067,12 +2141,12 @@ def ldap_groups(ctx, aws_sso_namespace):
|
|
2067
2141
|
)
|
2068
2142
|
@click.pass_context
|
2069
2143
|
def aws_version_sync(
|
2070
|
-
ctx,
|
2071
|
-
aws_resource_exporter_clusters,
|
2072
|
-
clusters,
|
2073
|
-
supported_providers,
|
2074
|
-
prometheus_timeout,
|
2075
|
-
):
|
2144
|
+
ctx: click.Context,
|
2145
|
+
aws_resource_exporter_clusters: str,
|
2146
|
+
clusters: str | None,
|
2147
|
+
supported_providers: str | None,
|
2148
|
+
prometheus_timeout: str | None,
|
2149
|
+
) -> None:
|
2076
2150
|
from reconcile.aws_version_sync.integration import (
|
2077
2151
|
AVSIntegration,
|
2078
2152
|
AVSIntegrationParams,
|
@@ -2106,7 +2180,12 @@ def aws_version_sync(
|
|
2106
2180
|
@click.argument("gitlab-project-id", required=False)
|
2107
2181
|
@click.argument("gitlab-merge-request-id", required=False)
|
2108
2182
|
@click.pass_context
|
2109
|
-
def terraform_repo(
|
2183
|
+
def terraform_repo(
|
2184
|
+
ctx: click.Context,
|
2185
|
+
output_file: str | None,
|
2186
|
+
gitlab_project_id: str | None,
|
2187
|
+
gitlab_merge_request_id: str | None,
|
2188
|
+
) -> None:
|
2110
2189
|
from reconcile import terraform_repo
|
2111
2190
|
|
2112
2191
|
run_class_integration(
|
@@ -2124,7 +2203,7 @@ def terraform_repo(ctx, output_file, gitlab_project_id, gitlab_merge_request_id)
|
|
2124
2203
|
|
2125
2204
|
@integration.command(short_help="Test app-interface templates.")
|
2126
2205
|
@click.pass_context
|
2127
|
-
def template_validator(ctx):
|
2206
|
+
def template_validator(ctx: click.Context) -> None:
|
2128
2207
|
from reconcile.templating import validator
|
2129
2208
|
|
2130
2209
|
run_class_integration(
|
@@ -2153,8 +2232,11 @@ def template_validator(ctx):
|
|
2153
2232
|
)
|
2154
2233
|
@click.pass_context
|
2155
2234
|
def template_renderer(
|
2156
|
-
ctx
|
2157
|
-
|
2235
|
+
ctx: click.Context,
|
2236
|
+
app_interface_data_path: str | None,
|
2237
|
+
clone_repo: bool,
|
2238
|
+
template_collection_name: str | None,
|
2239
|
+
) -> None:
|
2158
2240
|
from reconcile.templating.renderer import (
|
2159
2241
|
TemplateRendererIntegration,
|
2160
2242
|
TemplateRendererIntegrationParams,
|
@@ -2194,20 +2276,20 @@ def template_renderer(
|
|
2194
2276
|
)
|
2195
2277
|
@click.pass_context
|
2196
2278
|
def terraform_resources(
|
2197
|
-
ctx,
|
2198
|
-
print_to_file,
|
2199
|
-
enable_deletion,
|
2200
|
-
thread_pool_size,
|
2201
|
-
internal,
|
2202
|
-
use_jump_host,
|
2203
|
-
light,
|
2204
|
-
vault_output_path,
|
2205
|
-
account_name,
|
2206
|
-
exclude_accounts,
|
2207
|
-
enable_extended_early_exit,
|
2208
|
-
extended_early_exit_cache_ttl_seconds,
|
2209
|
-
log_cached_log_output,
|
2210
|
-
):
|
2279
|
+
ctx: click.Context,
|
2280
|
+
print_to_file: str | None,
|
2281
|
+
enable_deletion: bool,
|
2282
|
+
thread_pool_size: int,
|
2283
|
+
internal: bool,
|
2284
|
+
use_jump_host: bool,
|
2285
|
+
light: bool,
|
2286
|
+
vault_output_path: str,
|
2287
|
+
account_name: Iterable[str] | None,
|
2288
|
+
exclude_accounts: Iterable[str],
|
2289
|
+
enable_extended_early_exit: bool,
|
2290
|
+
extended_early_exit_cache_ttl_seconds: int,
|
2291
|
+
log_cached_log_output: bool,
|
2292
|
+
) -> None:
|
2211
2293
|
import reconcile.terraform_resources
|
2212
2294
|
|
2213
2295
|
if print_to_file and is_file_in_git_repo(print_to_file):
|
@@ -2242,15 +2324,15 @@ def terraform_resources(
|
|
2242
2324
|
@internal()
|
2243
2325
|
@click.pass_context
|
2244
2326
|
def terraform_cloudflare_resources(
|
2245
|
-
ctx,
|
2246
|
-
print_to_file,
|
2247
|
-
enable_deletion,
|
2248
|
-
thread_pool_size,
|
2249
|
-
account_name,
|
2250
|
-
vault_output_path,
|
2251
|
-
internal,
|
2252
|
-
use_jump_host,
|
2253
|
-
):
|
2327
|
+
ctx: click.Context,
|
2328
|
+
print_to_file: str | None,
|
2329
|
+
enable_deletion: bool,
|
2330
|
+
thread_pool_size: int,
|
2331
|
+
account_name: str | None,
|
2332
|
+
vault_output_path: str,
|
2333
|
+
internal: bool,
|
2334
|
+
use_jump_host: bool,
|
2335
|
+
) -> None:
|
2254
2336
|
import reconcile.terraform_cloudflare_resources
|
2255
2337
|
|
2256
2338
|
run_integration(
|
@@ -2276,8 +2358,13 @@ def terraform_cloudflare_resources(
|
|
2276
2358
|
@cloudflare_zone_name
|
2277
2359
|
@click.pass_context
|
2278
2360
|
def terraform_cloudflare_dns(
|
2279
|
-
ctx
|
2280
|
-
|
2361
|
+
ctx: click.Context,
|
2362
|
+
print_to_file: str | None,
|
2363
|
+
enable_deletion: bool,
|
2364
|
+
thread_pool_size: int,
|
2365
|
+
account_name: str | None,
|
2366
|
+
zone_name: str | None,
|
2367
|
+
) -> None:
|
2281
2368
|
from reconcile import terraform_cloudflare_dns
|
2282
2369
|
|
2283
2370
|
run_class_integration(
|
@@ -2303,8 +2390,12 @@ def terraform_cloudflare_dns(
|
|
2303
2390
|
@enable_deletion(default=True)
|
2304
2391
|
@click.pass_context
|
2305
2392
|
def terraform_cloudflare_users(
|
2306
|
-
ctx
|
2307
|
-
|
2393
|
+
ctx: click.Context,
|
2394
|
+
print_to_file: str | None,
|
2395
|
+
account_name: str | None,
|
2396
|
+
thread_pool_size: int,
|
2397
|
+
enable_deletion: bool,
|
2398
|
+
) -> None:
|
2308
2399
|
from reconcile.terraform_cloudflare_users import (
|
2309
2400
|
TerraformCloudflareUsers,
|
2310
2401
|
TerraformCloudflareUsersParams,
|
@@ -2330,10 +2421,10 @@ def terraform_cloudflare_users(
|
|
2330
2421
|
@threaded()
|
2331
2422
|
@click.pass_context
|
2332
2423
|
def cna_resources(
|
2333
|
-
ctx,
|
2334
|
-
enable_deletion,
|
2335
|
-
thread_pool_size,
|
2336
|
-
):
|
2424
|
+
ctx: click.Context,
|
2425
|
+
enable_deletion: bool,
|
2426
|
+
thread_pool_size: int,
|
2427
|
+
) -> None:
|
2337
2428
|
import reconcile.cna.integration
|
2338
2429
|
|
2339
2430
|
run_integration(
|
@@ -2350,11 +2441,11 @@ def cna_resources(
|
|
2350
2441
|
@click.option("--app-name", default=None, help="app to filter saas files by.")
|
2351
2442
|
@click.pass_context
|
2352
2443
|
def saas_auto_promotions_manager(
|
2353
|
-
ctx,
|
2354
|
-
thread_pool_size,
|
2355
|
-
env_name,
|
2356
|
-
app_name,
|
2357
|
-
):
|
2444
|
+
ctx: click.Context,
|
2445
|
+
thread_pool_size: int,
|
2446
|
+
env_name: str | None,
|
2447
|
+
app_name: str | None,
|
2448
|
+
) -> None:
|
2358
2449
|
import reconcile.saas_auto_promotions_manager.integration
|
2359
2450
|
|
2360
2451
|
run_integration(
|
@@ -2376,13 +2467,13 @@ def saas_auto_promotions_manager(
|
|
2376
2467
|
@account_name
|
2377
2468
|
@click.pass_context
|
2378
2469
|
def terraform_users(
|
2379
|
-
ctx,
|
2380
|
-
print_to_file,
|
2381
|
-
enable_deletion,
|
2382
|
-
thread_pool_size,
|
2383
|
-
send_mails,
|
2384
|
-
account_name,
|
2385
|
-
):
|
2470
|
+
ctx: click.Context,
|
2471
|
+
print_to_file: str | None,
|
2472
|
+
enable_deletion: bool,
|
2473
|
+
thread_pool_size: int,
|
2474
|
+
send_mails: bool,
|
2475
|
+
account_name: str | None,
|
2476
|
+
) -> None:
|
2386
2477
|
import reconcile.terraform_users
|
2387
2478
|
|
2388
2479
|
if print_to_file and is_file_in_git_repo(print_to_file):
|
@@ -2407,8 +2498,12 @@ def terraform_users(
|
|
2407
2498
|
@enable_deletion(default=False)
|
2408
2499
|
@click.pass_context
|
2409
2500
|
def terraform_vpc_resources(
|
2410
|
-
ctx
|
2411
|
-
|
2501
|
+
ctx: click.Context,
|
2502
|
+
account_name: str | None,
|
2503
|
+
print_to_file: str | None,
|
2504
|
+
thread_pool_size: int,
|
2505
|
+
enable_deletion: bool,
|
2506
|
+
) -> None:
|
2412
2507
|
from reconcile.terraform_vpc_resources.integration import (
|
2413
2508
|
TerraformVpcResources,
|
2414
2509
|
TerraformVpcResourcesParams,
|
@@ -2441,15 +2536,15 @@ def terraform_vpc_resources(
|
|
2441
2536
|
@log_cached_log_output
|
2442
2537
|
@click.pass_context
|
2443
2538
|
def terraform_vpc_peerings(
|
2444
|
-
ctx,
|
2445
|
-
print_to_file,
|
2446
|
-
enable_deletion,
|
2447
|
-
thread_pool_size,
|
2448
|
-
account_name,
|
2449
|
-
enable_extended_early_exit,
|
2450
|
-
extended_early_exit_cache_ttl_seconds,
|
2451
|
-
log_cached_log_output,
|
2452
|
-
):
|
2539
|
+
ctx: click.Context,
|
2540
|
+
print_to_file: str | None,
|
2541
|
+
enable_deletion: bool,
|
2542
|
+
thread_pool_size: int,
|
2543
|
+
account_name: str | None,
|
2544
|
+
enable_extended_early_exit: bool,
|
2545
|
+
extended_early_exit_cache_ttl_seconds: int,
|
2546
|
+
log_cached_log_output: bool,
|
2547
|
+
) -> None:
|
2453
2548
|
import reconcile.terraform_vpc_peerings
|
2454
2549
|
|
2455
2550
|
if print_to_file and is_file_in_git_repo(print_to_file):
|
@@ -2471,7 +2566,7 @@ def terraform_vpc_peerings(
|
|
2471
2566
|
short_help="Validates that VPC peerings do not exist between public and internal clusters."
|
2472
2567
|
)
|
2473
2568
|
@click.pass_context
|
2474
|
-
def vpc_peerings_validator(ctx):
|
2569
|
+
def vpc_peerings_validator(ctx: click.Context) -> None:
|
2475
2570
|
import reconcile.vpc_peerings_validator
|
2476
2571
|
|
2477
2572
|
run_integration(
|
@@ -2492,15 +2587,15 @@ def vpc_peerings_validator(ctx):
|
|
2492
2587
|
@account_name
|
2493
2588
|
@click.pass_context
|
2494
2589
|
def terraform_tgw_attachments(
|
2495
|
-
ctx,
|
2496
|
-
print_to_file,
|
2497
|
-
enable_deletion,
|
2498
|
-
thread_pool_size,
|
2499
|
-
account_name,
|
2500
|
-
enable_extended_early_exit,
|
2501
|
-
extended_early_exit_cache_ttl_seconds,
|
2502
|
-
log_cached_log_output,
|
2503
|
-
):
|
2590
|
+
ctx: click.Context,
|
2591
|
+
print_to_file: str | None,
|
2592
|
+
enable_deletion: bool,
|
2593
|
+
thread_pool_size: int,
|
2594
|
+
account_name: str | None,
|
2595
|
+
enable_extended_early_exit: bool,
|
2596
|
+
extended_early_exit_cache_ttl_seconds: int,
|
2597
|
+
log_cached_log_output: bool,
|
2598
|
+
) -> None:
|
2504
2599
|
import reconcile.terraform_tgw_attachments
|
2505
2600
|
|
2506
2601
|
if print_to_file and is_file_in_git_repo(print_to_file):
|
@@ -2522,7 +2617,7 @@ def terraform_tgw_attachments(
|
|
2522
2617
|
short_help="Accept GitHub repository invitations for known repositories."
|
2523
2618
|
)
|
2524
2619
|
@click.pass_context
|
2525
|
-
def github_repo_invites(ctx):
|
2620
|
+
def github_repo_invites(ctx: click.Context) -> None:
|
2526
2621
|
import reconcile.github_repo_invites
|
2527
2622
|
|
2528
2623
|
run_integration(reconcile.github_repo_invites, ctx.obj)
|
@@ -2531,7 +2626,7 @@ def github_repo_invites(ctx):
|
|
2531
2626
|
@integration.command(short_help="Validates permissions in github repositories.")
|
2532
2627
|
@click.argument("instance-name")
|
2533
2628
|
@click.pass_context
|
2534
|
-
def github_repo_permissions_validator(ctx, instance_name):
|
2629
|
+
def github_repo_permissions_validator(ctx: click.Context, instance_name: str) -> None:
|
2535
2630
|
import reconcile.github_repo_permissions_validator
|
2536
2631
|
|
2537
2632
|
run_integration(reconcile.github_repo_permissions_validator, ctx.obj, instance_name)
|
@@ -2539,7 +2634,7 @@ def github_repo_permissions_validator(ctx, instance_name):
|
|
2539
2634
|
|
2540
2635
|
@integration.command(short_help="Manage GitLab group members.")
|
2541
2636
|
@click.pass_context
|
2542
|
-
def gitlab_members(ctx):
|
2637
|
+
def gitlab_members(ctx: click.Context) -> None:
|
2543
2638
|
import reconcile.gitlab_members
|
2544
2639
|
|
2545
2640
|
run_integration(reconcile.gitlab_members, ctx.obj)
|
@@ -2547,7 +2642,7 @@ def gitlab_members(ctx):
|
|
2547
2642
|
|
2548
2643
|
@integration.command(short_help="Create GitLab projects.")
|
2549
2644
|
@click.pass_context
|
2550
|
-
def gitlab_projects(ctx):
|
2645
|
+
def gitlab_projects(ctx: click.Context) -> None:
|
2551
2646
|
import reconcile.gitlab_projects
|
2552
2647
|
|
2553
2648
|
run_integration(reconcile.gitlab_projects, ctx.obj)
|
@@ -2556,7 +2651,7 @@ def gitlab_projects(ctx):
|
|
2556
2651
|
@integration.command(short_help="Manage membership in OpenShift groups via OCM.")
|
2557
2652
|
@threaded()
|
2558
2653
|
@click.pass_context
|
2559
|
-
def ocm_groups(ctx, thread_pool_size):
|
2654
|
+
def ocm_groups(ctx: click.Context, thread_pool_size: int) -> None:
|
2560
2655
|
import reconcile.ocm_groups
|
2561
2656
|
|
2562
2657
|
run_integration(reconcile.ocm_groups, ctx.obj, thread_pool_size)
|
@@ -2597,7 +2692,7 @@ def ocm_groups(ctx, thread_pool_size):
|
|
2597
2692
|
)
|
2598
2693
|
@click.pass_context
|
2599
2694
|
def ocm_clusters(
|
2600
|
-
ctx,
|
2695
|
+
ctx: click.Context,
|
2601
2696
|
gitlab_project_id: str | None,
|
2602
2697
|
thread_pool_size: int,
|
2603
2698
|
job_controller_cluster: str | None,
|
@@ -2605,7 +2700,7 @@ def ocm_clusters(
|
|
2605
2700
|
rosa_job_service_account: str | None,
|
2606
2701
|
rosa_role: str | None,
|
2607
2702
|
rosa_job_image: str | None,
|
2608
|
-
):
|
2703
|
+
) -> None:
|
2609
2704
|
from reconcile.ocm_clusters import (
|
2610
2705
|
OcmClusters,
|
2611
2706
|
OcmClustersParams,
|
@@ -2627,69 +2722,43 @@ def ocm_clusters(
|
|
2627
2722
|
)
|
2628
2723
|
|
2629
2724
|
|
2630
|
-
def vault_creds_path(function):
|
2631
|
-
function = click.option(
|
2632
|
-
"--vault-creds-path",
|
2633
|
-
help="path in Vault to store creds.",
|
2634
|
-
default="app-sre/creds/kube-configs",
|
2635
|
-
)(function)
|
2636
|
-
|
2637
|
-
return function
|
2638
|
-
|
2639
|
-
|
2640
|
-
def dedicated_admin_namespace(function):
|
2641
|
-
function = click.option(
|
2642
|
-
"--dedicated-admin-namespace",
|
2643
|
-
default="dedicated-admin",
|
2644
|
-
help="namespace for the dedicated-admin bot",
|
2645
|
-
)(function)
|
2646
|
-
return function
|
2647
|
-
|
2648
|
-
|
2649
|
-
def dedicated_admin_service_account(function):
|
2650
|
-
function = click.option(
|
2651
|
-
"--dedicated-admin-service-account",
|
2652
|
-
default="app-sre",
|
2653
|
-
help="service account name for the dedicated-admin bot",
|
2654
|
-
)(function)
|
2655
|
-
return function
|
2656
|
-
|
2657
|
-
|
2658
|
-
def cluster_admin_namespace(function):
|
2659
|
-
function = click.option(
|
2660
|
-
"--cluster-admin-namespace",
|
2661
|
-
default="app-sre",
|
2662
|
-
help="namespace for the cluster-admin bot",
|
2663
|
-
)(function)
|
2664
|
-
return function
|
2665
|
-
|
2666
|
-
|
2667
|
-
def cluster_admin_service_account(function):
|
2668
|
-
function = click.option(
|
2669
|
-
"--cluster-admin-service-account",
|
2670
|
-
default="app-sre-cluster-admin-bot",
|
2671
|
-
help="service account name for the cluster-admin bot",
|
2672
|
-
)(function)
|
2673
|
-
return function
|
2674
|
-
|
2675
|
-
|
2676
2725
|
@integration.command(short_help="Manages dedicated-admin and cluster-admin creds.")
|
2677
2726
|
@gitlab_project_id
|
2678
|
-
@
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2727
|
+
@click.option(
|
2728
|
+
"--vault-creds-path",
|
2729
|
+
help="path in Vault to store creds.",
|
2730
|
+
default="app-sre/creds/kube-configs",
|
2731
|
+
)
|
2732
|
+
@click.option(
|
2733
|
+
"--dedicated-admin-namespace",
|
2734
|
+
default="dedicated-admin",
|
2735
|
+
help="namespace for the dedicated-admin bot",
|
2736
|
+
)
|
2737
|
+
@click.option(
|
2738
|
+
"--dedicated-admin-service-account",
|
2739
|
+
default="app-sre",
|
2740
|
+
help="service account name for the dedicated-admin bot",
|
2741
|
+
)
|
2742
|
+
@click.option(
|
2743
|
+
"--cluster-admin-namespace",
|
2744
|
+
default="app-sre",
|
2745
|
+
help="namespace for the cluster-admin bot",
|
2746
|
+
)
|
2747
|
+
@click.option(
|
2748
|
+
"--cluster-admin-service-account",
|
2749
|
+
default="app-sre-cluster-admin-bot",
|
2750
|
+
help="service account name for the cluster-admin bot",
|
2751
|
+
)
|
2683
2752
|
@click.pass_context
|
2684
2753
|
def openshift_cluster_bots(
|
2685
|
-
ctx,
|
2686
|
-
gitlab_project_id,
|
2687
|
-
vault_creds_path,
|
2688
|
-
dedicated_admin_namespace,
|
2689
|
-
dedicated_admin_service_account,
|
2690
|
-
cluster_admin_namespace,
|
2691
|
-
cluster_admin_service_account,
|
2692
|
-
):
|
2754
|
+
ctx: click.Context,
|
2755
|
+
gitlab_project_id: str | None,
|
2756
|
+
vault_creds_path: str,
|
2757
|
+
dedicated_admin_namespace: str,
|
2758
|
+
dedicated_admin_service_account: str,
|
2759
|
+
cluster_admin_namespace: str,
|
2760
|
+
cluster_admin_service_account: str,
|
2761
|
+
) -> None:
|
2693
2762
|
import reconcile.openshift_cluster_bots
|
2694
2763
|
|
2695
2764
|
run_integration(
|
@@ -2707,7 +2776,9 @@ def openshift_cluster_bots(
|
|
2707
2776
|
@integration.command(short_help="Manage External Configuration labels in OCM.")
|
2708
2777
|
@threaded()
|
2709
2778
|
@click.pass_context
|
2710
|
-
def ocm_external_configuration_labels(
|
2779
|
+
def ocm_external_configuration_labels(
|
2780
|
+
ctx: click.Context, thread_pool_size: int
|
2781
|
+
) -> None:
|
2711
2782
|
import reconcile.ocm_external_configuration_labels
|
2712
2783
|
|
2713
2784
|
run_integration(
|
@@ -2717,7 +2788,7 @@ def ocm_external_configuration_labels(ctx, thread_pool_size):
|
|
2717
2788
|
|
2718
2789
|
@integration.command(short_help="Trigger jenkins jobs following Addon upgrades.")
|
2719
2790
|
@click.pass_context
|
2720
|
-
def ocm_addons_upgrade_tests_trigger(ctx):
|
2791
|
+
def ocm_addons_upgrade_tests_trigger(ctx: click.Context) -> None:
|
2721
2792
|
import reconcile.ocm_addons_upgrade_tests_trigger
|
2722
2793
|
|
2723
2794
|
run_integration(reconcile.ocm_addons_upgrade_tests_trigger, ctx.obj)
|
@@ -2725,7 +2796,7 @@ def ocm_addons_upgrade_tests_trigger(ctx):
|
|
2725
2796
|
|
2726
2797
|
@integration.command(short_help="Manage Machine Pools in OCM.")
|
2727
2798
|
@click.pass_context
|
2728
|
-
def ocm_machine_pools(ctx):
|
2799
|
+
def ocm_machine_pools(ctx: click.Context) -> None:
|
2729
2800
|
import reconcile.ocm_machine_pools
|
2730
2801
|
|
2731
2802
|
run_integration(reconcile.ocm_machine_pools, ctx.obj)
|
@@ -2736,7 +2807,7 @@ def ocm_machine_pools(ctx):
|
|
2736
2807
|
@exclude_org_id
|
2737
2808
|
@click.pass_context
|
2738
2809
|
def ocm_upgrade_scheduler_org(
|
2739
|
-
ctx, org_id: Iterable[str], exclude_org_id: Iterable[str]
|
2810
|
+
ctx: click.Context, org_id: Iterable[str], exclude_org_id: Iterable[str]
|
2740
2811
|
) -> None:
|
2741
2812
|
from reconcile.aus.base import AdvancedUpgradeSchedulerBaseIntegrationParams
|
2742
2813
|
from reconcile.aus.ocm_upgrade_scheduler_org import (
|
@@ -2757,7 +2828,9 @@ def ocm_upgrade_scheduler_org(
|
|
2757
2828
|
@integration.command(short_help="Update Upgrade Policy schedules in OCM organizations.")
|
2758
2829
|
@gitlab_project_id
|
2759
2830
|
@click.pass_context
|
2760
|
-
def ocm_upgrade_scheduler_org_updater(
|
2831
|
+
def ocm_upgrade_scheduler_org_updater(
|
2832
|
+
ctx: click.Context, gitlab_project_id: str | None
|
2833
|
+
) -> None:
|
2761
2834
|
import reconcile.ocm_upgrade_scheduler_org_updater
|
2762
2835
|
|
2763
2836
|
run_integration(
|
@@ -2778,7 +2851,7 @@ def ocm_upgrade_scheduler_org_updater(ctx, gitlab_project_id):
|
|
2778
2851
|
@exclude_org_id
|
2779
2852
|
@click.pass_context
|
2780
2853
|
def ocm_addons_upgrade_scheduler_org(
|
2781
|
-
ctx,
|
2854
|
+
ctx: click.Context,
|
2782
2855
|
ocm_env: str,
|
2783
2856
|
org_id: Iterable[str],
|
2784
2857
|
exclude_org_id: Iterable[str],
|
@@ -2819,7 +2892,7 @@ def ocm_addons_upgrade_scheduler_org(
|
|
2819
2892
|
)
|
2820
2893
|
@click.pass_context
|
2821
2894
|
def advanced_upgrade_scheduler(
|
2822
|
-
ctx,
|
2895
|
+
ctx: click.Context,
|
2823
2896
|
ocm_env: str,
|
2824
2897
|
org_id: Iterable[str],
|
2825
2898
|
exclude_org_id: Iterable[str],
|
@@ -2874,7 +2947,7 @@ def advanced_upgrade_scheduler(
|
|
2874
2947
|
)
|
2875
2948
|
@click.pass_context
|
2876
2949
|
def version_gate_approver(
|
2877
|
-
ctx,
|
2950
|
+
ctx: click.Context,
|
2878
2951
|
job_controller_cluster: str,
|
2879
2952
|
job_controller_namespace: str,
|
2880
2953
|
rosa_job_service_account: str,
|
@@ -2903,7 +2976,7 @@ def version_gate_approver(
|
|
2903
2976
|
@integration.command(short_help="Manage Databases and Database Users.")
|
2904
2977
|
@vault_output_path
|
2905
2978
|
@click.pass_context
|
2906
|
-
def database_access_manager(ctx, vault_output_path: str):
|
2979
|
+
def database_access_manager(ctx: click.Context, vault_output_path: str) -> None:
|
2907
2980
|
from reconcile.database_access_manager import (
|
2908
2981
|
DatabaseAccessManagerIntegration,
|
2909
2982
|
DBAMIntegrationParams,
|
@@ -2921,7 +2994,7 @@ def database_access_manager(ctx, vault_output_path: str):
|
|
2921
2994
|
short_help="Export Product and Application informnation to Status Board."
|
2922
2995
|
)
|
2923
2996
|
@click.pass_context
|
2924
|
-
def status_board_exporter(ctx):
|
2997
|
+
def status_board_exporter(ctx: click.Context) -> None:
|
2925
2998
|
from reconcile.status_board import StatusBoardExporterIntegration
|
2926
2999
|
|
2927
3000
|
run_class_integration(
|
@@ -2933,7 +3006,9 @@ def status_board_exporter(ctx):
|
|
2933
3006
|
@integration.command(short_help="Update recommended version for OCM orgs")
|
2934
3007
|
@gitlab_project_id
|
2935
3008
|
@click.pass_context
|
2936
|
-
def ocm_update_recommended_version(
|
3009
|
+
def ocm_update_recommended_version(
|
3010
|
+
ctx: click.Context, gitlab_project_id: str | None
|
3011
|
+
) -> None:
|
2937
3012
|
import reconcile.ocm_update_recommended_version
|
2938
3013
|
|
2939
3014
|
run_integration(
|
@@ -2944,7 +3019,7 @@ def ocm_update_recommended_version(ctx, gitlab_project_id):
|
|
2944
3019
|
@integration.command(short_help="Manages cluster Addons in OCM.")
|
2945
3020
|
@threaded()
|
2946
3021
|
@click.pass_context
|
2947
|
-
def ocm_addons(ctx, thread_pool_size):
|
3022
|
+
def ocm_addons(ctx: click.Context, thread_pool_size: int) -> None:
|
2948
3023
|
import reconcile.ocm_addons
|
2949
3024
|
|
2950
3025
|
run_integration(reconcile.ocm_addons, ctx.obj, thread_pool_size)
|
@@ -2954,7 +3029,7 @@ def ocm_addons(ctx, thread_pool_size):
|
|
2954
3029
|
short_help="Grants AWS infrastructure access to members in AWS groups via OCM."
|
2955
3030
|
)
|
2956
3031
|
@click.pass_context
|
2957
|
-
def ocm_aws_infrastructure_access(ctx):
|
3032
|
+
def ocm_aws_infrastructure_access(ctx: click.Context) -> None:
|
2958
3033
|
import reconcile.ocm_aws_infrastructure_access
|
2959
3034
|
|
2960
3035
|
run_integration(reconcile.ocm_aws_infrastructure_access, ctx.obj)
|
@@ -2963,7 +3038,7 @@ def ocm_aws_infrastructure_access(ctx):
|
|
2963
3038
|
@integration.command(short_help="Manage GitHub Identity Providers in OCM.")
|
2964
3039
|
@vault_input_path
|
2965
3040
|
@click.pass_context
|
2966
|
-
def ocm_github_idp(ctx, vault_input_path):
|
3041
|
+
def ocm_github_idp(ctx: click.Context, vault_input_path: str) -> None:
|
2967
3042
|
import reconcile.ocm_github_idp
|
2968
3043
|
|
2969
3044
|
run_integration(reconcile.ocm_github_idp, ctx.obj, vault_input_path)
|
@@ -2999,12 +3074,12 @@ def ocm_github_idp(ctx, vault_input_path):
|
|
2999
3074
|
)
|
3000
3075
|
@click.pass_context
|
3001
3076
|
def ocm_oidc_idp(
|
3002
|
-
ctx,
|
3003
|
-
ocm_env,
|
3004
|
-
default_auth_name,
|
3005
|
-
default_auth_issuer_url,
|
3006
|
-
vault_input_path,
|
3007
|
-
):
|
3077
|
+
ctx: click.Context,
|
3078
|
+
ocm_env: str | None,
|
3079
|
+
default_auth_name: str,
|
3080
|
+
default_auth_issuer_url: str,
|
3081
|
+
vault_input_path: str,
|
3082
|
+
) -> None:
|
3008
3083
|
from reconcile.rhidp.ocm_oidc_idp.integration import (
|
3009
3084
|
OCMOidcIdp,
|
3010
3085
|
OCMOidcIdpParams,
|
@@ -3064,14 +3139,14 @@ def ocm_oidc_idp(
|
|
3064
3139
|
)
|
3065
3140
|
@click.pass_context
|
3066
3141
|
def rhidp_sso_client(
|
3067
|
-
ctx,
|
3068
|
-
keycloak_instance_vault_paths,
|
3069
|
-
contact_emails,
|
3070
|
-
vault_input_path,
|
3071
|
-
ocm_env,
|
3072
|
-
default_auth_name,
|
3073
|
-
default_auth_issuer_url,
|
3074
|
-
):
|
3142
|
+
ctx: click.Context,
|
3143
|
+
keycloak_instance_vault_paths: str,
|
3144
|
+
contact_emails: str,
|
3145
|
+
vault_input_path: str,
|
3146
|
+
ocm_env: str | None,
|
3147
|
+
default_auth_name: str,
|
3148
|
+
default_auth_issuer_url: str,
|
3149
|
+
) -> None:
|
3075
3150
|
from reconcile.rhidp.sso_client.integration import (
|
3076
3151
|
SSOClient,
|
3077
3152
|
SSOClientParams,
|
@@ -3098,7 +3173,7 @@ def rhidp_sso_client(
|
|
3098
3173
|
short_help="Manages the OCM subscription labels for clusters with RHIDP authentication. Part of RHIDP."
|
3099
3174
|
)
|
3100
3175
|
@click.pass_context
|
3101
|
-
def cluster_auth_rhidp(ctx):
|
3176
|
+
def cluster_auth_rhidp(ctx: click.Context) -> None:
|
3102
3177
|
from reconcile.cluster_auth_rhidp.integration import (
|
3103
3178
|
ClusterAuthRhidpIntegration,
|
3104
3179
|
ClusterAuthRhidpIntegrationParams,
|
@@ -3114,7 +3189,7 @@ def cluster_auth_rhidp(ctx):
|
|
3114
3189
|
short_help="Automatically provide dedicated Dynatrace tokens to management clusters"
|
3115
3190
|
)
|
3116
3191
|
@click.pass_context
|
3117
|
-
def dynatrace_token_provider(ctx):
|
3192
|
+
def dynatrace_token_provider(ctx: click.Context) -> None:
|
3118
3193
|
from reconcile.dynatrace_token_provider.integration import (
|
3119
3194
|
DynatraceTokenProviderIntegration,
|
3120
3195
|
)
|
@@ -3127,7 +3202,7 @@ def dynatrace_token_provider(ctx):
|
|
3127
3202
|
|
3128
3203
|
@integration.command(short_help="Manage labels across cluster fleets in OCM")
|
3129
3204
|
@click.pass_context
|
3130
|
-
def fleet_labeler(ctx):
|
3205
|
+
def fleet_labeler(ctx: click.Context) -> None:
|
3131
3206
|
from reconcile.fleet_labeler.integration import (
|
3132
3207
|
FleetLabelerIntegration,
|
3133
3208
|
)
|
@@ -3140,7 +3215,7 @@ def fleet_labeler(ctx):
|
|
3140
3215
|
|
3141
3216
|
@integration.command(short_help="Manage additional routers in OCM.")
|
3142
3217
|
@click.pass_context
|
3143
|
-
def ocm_additional_routers(ctx):
|
3218
|
+
def ocm_additional_routers(ctx: click.Context) -> None:
|
3144
3219
|
import reconcile.ocm_additional_routers
|
3145
3220
|
|
3146
3221
|
run_integration(reconcile.ocm_additional_routers, ctx.obj)
|
@@ -3148,7 +3223,7 @@ def ocm_additional_routers(ctx):
|
|
3148
3223
|
|
3149
3224
|
@integration.command(short_help="Send email notifications to app-interface audience.")
|
3150
3225
|
@click.pass_context
|
3151
|
-
def email_sender(ctx):
|
3226
|
+
def email_sender(ctx: click.Context) -> None:
|
3152
3227
|
import reconcile.email_sender
|
3153
3228
|
|
3154
3229
|
run_integration(reconcile.email_sender, ctx.obj)
|
@@ -3158,7 +3233,7 @@ def email_sender(ctx):
|
|
3158
3233
|
short_help="Send emails to users based on requests submitted to app-interface."
|
3159
3234
|
)
|
3160
3235
|
@click.pass_context
|
3161
|
-
def requests_sender(ctx):
|
3236
|
+
def requests_sender(ctx: click.Context) -> None:
|
3162
3237
|
import reconcile.requests_sender
|
3163
3238
|
|
3164
3239
|
run_integration(reconcile.requests_sender, ctx.obj)
|
@@ -3166,7 +3241,7 @@ def requests_sender(ctx):
|
|
3166
3241
|
|
3167
3242
|
@integration.command(short_help="Validate dependencies are defined for each service.")
|
3168
3243
|
@click.pass_context
|
3169
|
-
def service_dependencies(ctx):
|
3244
|
+
def service_dependencies(ctx: click.Context) -> None:
|
3170
3245
|
import reconcile.service_dependencies
|
3171
3246
|
|
3172
3247
|
run_integration(reconcile.service_dependencies, ctx.obj)
|
@@ -3175,7 +3250,7 @@ def service_dependencies(ctx):
|
|
3175
3250
|
@integration.command(short_help="Runs SQL Queries against app-interface RDS resources.")
|
3176
3251
|
@enable_deletion(default=False)
|
3177
3252
|
@click.pass_context
|
3178
|
-
def sql_query(ctx, enable_deletion):
|
3253
|
+
def sql_query(ctx: click.Context, enable_deletion: bool) -> None:
|
3179
3254
|
import reconcile.sql_query
|
3180
3255
|
|
3181
3256
|
run_integration(reconcile.sql_query, ctx.obj, enable_deletion)
|
@@ -3186,7 +3261,7 @@ def sql_query(ctx, enable_deletion):
|
|
3186
3261
|
)
|
3187
3262
|
@threaded()
|
3188
3263
|
@click.pass_context
|
3189
|
-
def gitlab_owners(ctx, thread_pool_size):
|
3264
|
+
def gitlab_owners(ctx: click.Context, thread_pool_size: int) -> None:
|
3190
3265
|
import reconcile.gitlab_owners
|
3191
3266
|
|
3192
3267
|
run_integration(reconcile.gitlab_owners, ctx.obj, thread_pool_size)
|
@@ -3198,8 +3273,11 @@ def gitlab_owners(ctx, thread_pool_size):
|
|
3198
3273
|
@click.argument("gitlab-maintainers-group", required=False)
|
3199
3274
|
@click.pass_context
|
3200
3275
|
def gitlab_fork_compliance(
|
3201
|
-
ctx
|
3202
|
-
|
3276
|
+
ctx: click.Context,
|
3277
|
+
gitlab_project_id: str,
|
3278
|
+
gitlab_merge_request_id: str,
|
3279
|
+
gitlab_maintainers_group: str | None,
|
3280
|
+
) -> None:
|
3203
3281
|
import reconcile.gitlab_fork_compliance
|
3204
3282
|
|
3205
3283
|
run_integration(
|
@@ -3217,7 +3295,7 @@ def gitlab_fork_compliance(
|
|
3217
3295
|
)
|
3218
3296
|
@threaded(default=2)
|
3219
3297
|
@click.pass_context
|
3220
|
-
def dashdotdb_cso(ctx, thread_pool_size):
|
3298
|
+
def dashdotdb_cso(ctx: click.Context, thread_pool_size: int) -> None:
|
3221
3299
|
import reconcile.dashdotdb_cso
|
3222
3300
|
|
3223
3301
|
run_integration(reconcile.dashdotdb_cso, ctx.obj, thread_pool_size)
|
@@ -3230,7 +3308,9 @@ def dashdotdb_cso(ctx, thread_pool_size):
|
|
3230
3308
|
@threaded(default=2)
|
3231
3309
|
@click.pass_context
|
3232
3310
|
@cluster_name
|
3233
|
-
def dashdotdb_dvo(
|
3311
|
+
def dashdotdb_dvo(
|
3312
|
+
ctx: click.Context, thread_pool_size: int, cluster_name: Iterable[str] | None
|
3313
|
+
) -> None:
|
3234
3314
|
import reconcile.dashdotdb_dvo
|
3235
3315
|
|
3236
3316
|
run_integration(reconcile.dashdotdb_dvo, ctx.obj, thread_pool_size, cluster_name)
|
@@ -3242,7 +3322,7 @@ def dashdotdb_dvo(ctx, thread_pool_size, cluster_name):
|
|
3242
3322
|
)
|
3243
3323
|
@threaded(default=2)
|
3244
3324
|
@click.pass_context
|
3245
|
-
def dashdotdb_slo(ctx, thread_pool_size):
|
3325
|
+
def dashdotdb_slo(ctx: click.Context, thread_pool_size: int) -> None:
|
3246
3326
|
import reconcile.dashdotdb_slo
|
3247
3327
|
|
3248
3328
|
run_integration(reconcile.dashdotdb_slo, ctx.obj, thread_pool_size)
|
@@ -3252,7 +3332,9 @@ def dashdotdb_slo(ctx, thread_pool_size):
|
|
3252
3332
|
@gitlab_project_id
|
3253
3333
|
@threaded(default=5)
|
3254
3334
|
@click.pass_context
|
3255
|
-
def dashdotdb_dora(
|
3335
|
+
def dashdotdb_dora(
|
3336
|
+
ctx: click.Context, gitlab_project_id: str | None, thread_pool_size: int
|
3337
|
+
) -> None:
|
3256
3338
|
import reconcile.dashdotdb_dora
|
3257
3339
|
|
3258
3340
|
run_integration(
|
@@ -3266,7 +3348,9 @@ def dashdotdb_dora(ctx, gitlab_project_id, thread_pool_size):
|
|
3266
3348
|
@binary_version("promtool", ["--version"], PROMTOOL_VERSION_REGEX, PROMTOOL_VERSION)
|
3267
3349
|
@cluster_name
|
3268
3350
|
@click.pass_context
|
3269
|
-
def prometheus_rules_tester(
|
3351
|
+
def prometheus_rules_tester(
|
3352
|
+
ctx: click.Context, thread_pool_size: int, cluster_name: Iterable[str] | None
|
3353
|
+
) -> None:
|
3270
3354
|
import reconcile.prometheus_rules_tester.integration
|
3271
3355
|
|
3272
3356
|
run_integration(
|
@@ -3279,7 +3363,7 @@ def prometheus_rules_tester(ctx, thread_pool_size, cluster_name):
|
|
3279
3363
|
|
3280
3364
|
@integration.command(short_help="Tests templating of resources.")
|
3281
3365
|
@click.pass_context
|
3282
|
-
def resource_template_tester(ctx):
|
3366
|
+
def resource_template_tester(ctx: click.Context) -> None:
|
3283
3367
|
import reconcile.resource_template_tester
|
3284
3368
|
|
3285
3369
|
run_integration(reconcile.resource_template_tester, ctx.obj)
|
@@ -3289,7 +3373,7 @@ def resource_template_tester(ctx):
|
|
3289
3373
|
short_help="Validate queries to maintain consumer schema compatibility."
|
3290
3374
|
)
|
3291
3375
|
@click.pass_context
|
3292
|
-
def query_validator(ctx):
|
3376
|
+
def query_validator(ctx: click.Context) -> None:
|
3293
3377
|
import reconcile.query_validator
|
3294
3378
|
|
3295
3379
|
run_integration(reconcile.query_validator, ctx.obj)
|
@@ -3297,7 +3381,7 @@ def query_validator(ctx):
|
|
3297
3381
|
|
3298
3382
|
@integration.command(short_help="Manages SendGrid teammates for a given account.")
|
3299
3383
|
@click.pass_context
|
3300
|
-
def sendgrid_teammates(ctx):
|
3384
|
+
def sendgrid_teammates(ctx: click.Context) -> None:
|
3301
3385
|
import reconcile.sendgrid_teammates
|
3302
3386
|
|
3303
3387
|
run_integration(reconcile.sendgrid_teammates, ctx.obj)
|
@@ -3306,7 +3390,7 @@ def sendgrid_teammates(ctx):
|
|
3306
3390
|
@integration.command(short_help="Maps ClusterDeployment resources to Cluster IDs.")
|
3307
3391
|
@vault_output_path
|
3308
3392
|
@click.pass_context
|
3309
|
-
def cluster_deployment_mapper(ctx, vault_output_path):
|
3393
|
+
def cluster_deployment_mapper(ctx: click.Context, vault_output_path: str) -> None:
|
3310
3394
|
import reconcile.cluster_deployment_mapper
|
3311
3395
|
|
3312
3396
|
run_integration(reconcile.cluster_deployment_mapper, ctx.obj, vault_output_path)
|
@@ -3317,7 +3401,12 @@ def cluster_deployment_mapper(ctx, vault_output_path):
|
|
3317
3401
|
@resource_kind
|
3318
3402
|
@vault_output_path
|
3319
3403
|
@click.pass_context
|
3320
|
-
def resource_scraper(
|
3404
|
+
def resource_scraper(
|
3405
|
+
ctx: click.Context,
|
3406
|
+
namespace_name: str | None,
|
3407
|
+
resource_kind: str | None,
|
3408
|
+
vault_output_path: str,
|
3409
|
+
) -> None:
|
3321
3410
|
import reconcile.resource_scraper
|
3322
3411
|
|
3323
3412
|
run_integration(
|
@@ -3336,7 +3425,9 @@ def resource_scraper(ctx, namespace_name, resource_kind, vault_output_path):
|
|
3336
3425
|
@internal()
|
3337
3426
|
@use_jump_host()
|
3338
3427
|
@click.pass_context
|
3339
|
-
def gabi_authorized_users(
|
3428
|
+
def gabi_authorized_users(
|
3429
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
3430
|
+
) -> None:
|
3340
3431
|
import reconcile.gabi_authorized_users
|
3341
3432
|
|
3342
3433
|
run_integration(
|
@@ -3352,7 +3443,7 @@ def gabi_authorized_users(ctx, thread_pool_size, internal, use_jump_host):
|
|
3352
3443
|
short_help="Manages components on statuspage.io hosted status pages."
|
3353
3444
|
)
|
3354
3445
|
@click.pass_context
|
3355
|
-
def status_page_components(ctx):
|
3446
|
+
def status_page_components(ctx: click.Context) -> None:
|
3356
3447
|
from reconcile.statuspage.integrations.components import (
|
3357
3448
|
StatusPageComponentsIntegration,
|
3358
3449
|
)
|
@@ -3364,7 +3455,7 @@ def status_page_components(ctx):
|
|
3364
3455
|
short_help="Manages maintenances on statuspage.io hosted status pages."
|
3365
3456
|
)
|
3366
3457
|
@click.pass_context
|
3367
|
-
def status_page_maintenances(ctx):
|
3458
|
+
def status_page_maintenances(ctx: click.Context) -> None:
|
3368
3459
|
from reconcile.statuspage.integrations.maintenances import (
|
3369
3460
|
StatusPageMaintenancesIntegration,
|
3370
3461
|
)
|
@@ -3394,7 +3485,12 @@ def status_page_maintenances(ctx):
|
|
3394
3485
|
multiple=True,
|
3395
3486
|
)
|
3396
3487
|
@click.pass_context
|
3397
|
-
def ocm_standalone_user_management(
|
3488
|
+
def ocm_standalone_user_management(
|
3489
|
+
ctx: click.Context,
|
3490
|
+
ocm_env: str | None,
|
3491
|
+
ocm_org_ids: str | None,
|
3492
|
+
group_provider: Iterable[str] | None,
|
3493
|
+
) -> None:
|
3398
3494
|
from reconcile.oum.base import OCMUserManagementIntegrationParams
|
3399
3495
|
from reconcile.oum.standalone import OCMStandaloneUserManagementIntegration
|
3400
3496
|
|
@@ -3419,8 +3515,8 @@ def ocm_standalone_user_management(ctx, ocm_env, ocm_org_ids, group_provider):
|
|
3419
3515
|
@use_jump_host()
|
3420
3516
|
@click.pass_context
|
3421
3517
|
def blackbox_exporter_endpoint_monitoring(
|
3422
|
-
ctx, thread_pool_size, internal, use_jump_host
|
3423
|
-
):
|
3518
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
3519
|
+
) -> None:
|
3424
3520
|
import reconcile.blackbox_exporter_endpoint_monitoring
|
3425
3521
|
|
3426
3522
|
run_integration(
|
@@ -3440,8 +3536,8 @@ def blackbox_exporter_endpoint_monitoring(
|
|
3440
3536
|
@use_jump_host()
|
3441
3537
|
@click.pass_context
|
3442
3538
|
def signalfx_prometheus_endpoint_monitoring(
|
3443
|
-
ctx, thread_pool_size, internal, use_jump_host
|
3444
|
-
):
|
3539
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
3540
|
+
) -> None:
|
3445
3541
|
import reconcile.signalfx_endpoint_monitoring
|
3446
3542
|
|
3447
3543
|
run_integration(
|
@@ -3453,7 +3549,9 @@ def signalfx_prometheus_endpoint_monitoring(
|
|
3453
3549
|
)
|
3454
3550
|
|
3455
3551
|
|
3456
|
-
def parse_image_tag_from_ref(
|
3552
|
+
def parse_image_tag_from_ref(
|
3553
|
+
ctx: click.Context | None, param: Any, value: Iterable[str]
|
3554
|
+
) -> dict[str, str] | None:
|
3457
3555
|
if value:
|
3458
3556
|
result = {}
|
3459
3557
|
for v in value:
|
@@ -3470,7 +3568,7 @@ def parse_image_tag_from_ref(ctx, param, value) -> dict[str, str] | None:
|
|
3470
3568
|
|
3471
3569
|
@integration.command(short_help="Allow vault to replicate secrets to other instances.")
|
3472
3570
|
@click.pass_context
|
3473
|
-
def vault_replication(ctx):
|
3571
|
+
def vault_replication(ctx: click.Context) -> None:
|
3474
3572
|
import reconcile.vault_replication
|
3475
3573
|
|
3476
3574
|
run_integration(reconcile.vault_replication, ctx.obj)
|
@@ -3507,15 +3605,15 @@ def vault_replication(ctx):
|
|
3507
3605
|
)
|
3508
3606
|
@click.pass_context
|
3509
3607
|
def integrations_manager(
|
3510
|
-
ctx,
|
3511
|
-
environment_name,
|
3512
|
-
thread_pool_size,
|
3513
|
-
internal,
|
3514
|
-
use_jump_host,
|
3515
|
-
image_tag_from_ref,
|
3516
|
-
upstream,
|
3517
|
-
image,
|
3518
|
-
):
|
3608
|
+
ctx: click.Context,
|
3609
|
+
environment_name: str | None,
|
3610
|
+
thread_pool_size: int,
|
3611
|
+
internal: bool,
|
3612
|
+
use_jump_host: bool,
|
3613
|
+
image_tag_from_ref: dict[str, str] | None,
|
3614
|
+
upstream: str | None,
|
3615
|
+
image: str | None,
|
3616
|
+
) -> None:
|
3519
3617
|
import reconcile.integrations_manager
|
3520
3618
|
|
3521
3619
|
run_integration(
|
@@ -3555,13 +3653,13 @@ def integrations_manager(
|
|
3555
3653
|
)
|
3556
3654
|
@click.pass_context
|
3557
3655
|
def change_owners(
|
3558
|
-
ctx,
|
3559
|
-
gitlab_project_id,
|
3560
|
-
gitlab_merge_request_id,
|
3561
|
-
comparison_sha,
|
3562
|
-
change_type_processing_mode,
|
3563
|
-
mr_management,
|
3564
|
-
):
|
3656
|
+
ctx: click.Context,
|
3657
|
+
gitlab_project_id: str,
|
3658
|
+
gitlab_merge_request_id: str,
|
3659
|
+
comparison_sha: str | None,
|
3660
|
+
change_type_processing_mode: str,
|
3661
|
+
mr_management: bool,
|
3662
|
+
) -> None:
|
3565
3663
|
import reconcile.change_owners.change_owners
|
3566
3664
|
|
3567
3665
|
run_integration(
|
@@ -3584,7 +3682,12 @@ def change_owners(
|
|
3584
3682
|
)
|
3585
3683
|
@click.option("--commit", help="Reconcile just this commit.", default=None)
|
3586
3684
|
@click.pass_context
|
3587
|
-
def change_log_tracking(
|
3685
|
+
def change_log_tracking(
|
3686
|
+
ctx: click.Context,
|
3687
|
+
gitlab_project_id: str | None,
|
3688
|
+
process_existing: bool,
|
3689
|
+
commit: str | None,
|
3690
|
+
) -> None:
|
3588
3691
|
from reconcile.change_owners.change_log_tracking import (
|
3589
3692
|
ChangeLogIntegration,
|
3590
3693
|
ChangeLogIntegrationParams,
|
@@ -3607,7 +3710,7 @@ def change_log_tracking(ctx, gitlab_project_id, process_existing, commit):
|
|
3607
3710
|
)
|
3608
3711
|
@click.option("--instance", help="Reconcile just this instance.", default=None)
|
3609
3712
|
@click.pass_context
|
3610
|
-
def glitchtip(ctx, instance):
|
3713
|
+
def glitchtip(ctx: click.Context, instance: str | None) -> None:
|
3611
3714
|
import reconcile.glitchtip.integration
|
3612
3715
|
|
3613
3716
|
run_integration(reconcile.glitchtip.integration, ctx.obj, instance)
|
@@ -3616,7 +3719,7 @@ def glitchtip(ctx, instance):
|
|
3616
3719
|
@integration.command(short_help="Configure Glitchtip project alerts.")
|
3617
3720
|
@click.option("--instance", help="Reconcile just this instance.", default=None)
|
3618
3721
|
@click.pass_context
|
3619
|
-
def glitchtip_project_alerts(ctx, instance):
|
3722
|
+
def glitchtip_project_alerts(ctx: click.Context, instance: str | None) -> None:
|
3620
3723
|
from reconcile.glitchtip_project_alerts.integration import (
|
3621
3724
|
GlitchtipProjectAlertsIntegration,
|
3622
3725
|
GlitchtipProjectAlertsIntegrationParams,
|
@@ -3638,7 +3741,13 @@ def glitchtip_project_alerts(ctx, instance):
|
|
3638
3741
|
@use_jump_host()
|
3639
3742
|
@click.option("--instance", help="Reconcile just this instance.", default=None)
|
3640
3743
|
@click.pass_context
|
3641
|
-
def glitchtip_project_dsn(
|
3744
|
+
def glitchtip_project_dsn(
|
3745
|
+
ctx: click.Context,
|
3746
|
+
thread_pool_size: int,
|
3747
|
+
internal: bool,
|
3748
|
+
use_jump_host: bool,
|
3749
|
+
instance: str | None,
|
3750
|
+
) -> None:
|
3642
3751
|
import reconcile.glitchtip_project_dsn.integration
|
3643
3752
|
|
3644
3753
|
run_integration(
|
@@ -3658,7 +3767,9 @@ def glitchtip_project_dsn(ctx, thread_pool_size, internal, use_jump_host, instan
|
|
3658
3767
|
@internal()
|
3659
3768
|
@use_jump_host()
|
3660
3769
|
@click.pass_context
|
3661
|
-
def skupper_network(
|
3770
|
+
def skupper_network(
|
3771
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
3772
|
+
) -> None:
|
3662
3773
|
import reconcile.skupper_network.integration
|
3663
3774
|
|
3664
3775
|
run_integration(
|
@@ -3686,7 +3797,9 @@ def skupper_network(ctx, thread_pool_size, internal, use_jump_host):
|
|
3686
3797
|
default="sre-capabilities.rhidp",
|
3687
3798
|
)
|
3688
3799
|
@click.pass_context
|
3689
|
-
def ocm_labels(
|
3800
|
+
def ocm_labels(
|
3801
|
+
ctx: click.Context, managed_label_prefixes: str, ignored_label_prefixes: str
|
3802
|
+
) -> None:
|
3690
3803
|
from reconcile.ocm_labels.integration import (
|
3691
3804
|
OcmLabelsIntegration,
|
3692
3805
|
OcmLabelsIntegrationParams,
|
@@ -3707,7 +3820,7 @@ def ocm_labels(ctx, managed_label_prefixes, ignored_label_prefixes):
|
|
3707
3820
|
short_help="Notifications to internal Red Hat users based on conditions in OCM."
|
3708
3821
|
)
|
3709
3822
|
@click.pass_context
|
3710
|
-
def ocm_internal_notifications(ctx):
|
3823
|
+
def ocm_internal_notifications(ctx: click.Context) -> None:
|
3711
3824
|
from reconcile.ocm_internal_notifications.integration import (
|
3712
3825
|
OcmInternalNotifications,
|
3713
3826
|
)
|
@@ -3720,7 +3833,7 @@ def ocm_internal_notifications(ctx):
|
|
3720
3833
|
|
3721
3834
|
@integration.command(short_help="Manages RHACS rbac configuration")
|
3722
3835
|
@click.pass_context
|
3723
|
-
def acs_rbac(ctx):
|
3836
|
+
def acs_rbac(ctx: click.Context) -> None:
|
3724
3837
|
from reconcile import acs_rbac
|
3725
3838
|
|
3726
3839
|
run_class_integration(
|
@@ -3731,7 +3844,7 @@ def acs_rbac(ctx):
|
|
3731
3844
|
|
3732
3845
|
@integration.command(short_help="Manages RHACS security policy configurations")
|
3733
3846
|
@click.pass_context
|
3734
|
-
def acs_policies(ctx):
|
3847
|
+
def acs_policies(ctx: click.Context) -> None:
|
3735
3848
|
from reconcile import acs_policies
|
3736
3849
|
|
3737
3850
|
run_class_integration(
|
@@ -3743,7 +3856,7 @@ def acs_policies(ctx):
|
|
3743
3856
|
@integration.command(short_help="Manage Unleash feature toggles.")
|
3744
3857
|
@click.option("--instance", help="Reconcile just this Unlash instance.", default=None)
|
3745
3858
|
@click.pass_context
|
3746
|
-
def unleash_feature_toggles(ctx, instance):
|
3859
|
+
def unleash_feature_toggles(ctx: click.Context, instance: str | None) -> None:
|
3747
3860
|
from reconcile.unleash_feature_toggles.integration import (
|
3748
3861
|
UnleashTogglesIntegration,
|
3749
3862
|
UnleashTogglesIntegrationParams,
|
@@ -3759,7 +3872,7 @@ def unleash_feature_toggles(ctx, instance):
|
|
3759
3872
|
|
3760
3873
|
@integration.command(short_help="Automate Deadmanssnitch Creation/Deletion")
|
3761
3874
|
@click.pass_context
|
3762
|
-
def deadmanssnitch(ctx):
|
3875
|
+
def deadmanssnitch(ctx: click.Context) -> None:
|
3763
3876
|
from reconcile import deadmanssnitch
|
3764
3877
|
|
3765
3878
|
run_class_integration(
|
@@ -3787,12 +3900,12 @@ def deadmanssnitch(ctx):
|
|
3787
3900
|
default="",
|
3788
3901
|
)
|
3789
3902
|
def external_resources(
|
3790
|
-
ctx,
|
3903
|
+
ctx: click.Context,
|
3791
3904
|
dry_run_job_suffix: str,
|
3792
3905
|
thread_pool_size: int,
|
3793
3906
|
workers_cluster: str,
|
3794
3907
|
workers_namespace: str,
|
3795
|
-
):
|
3908
|
+
) -> None:
|
3796
3909
|
import reconcile.external_resources.integration
|
3797
3910
|
|
3798
3911
|
run_integration(
|
@@ -3811,9 +3924,9 @@ def external_resources(
|
|
3811
3924
|
@click.pass_context
|
3812
3925
|
@threaded(default=5)
|
3813
3926
|
def external_resources_secrets_sync(
|
3814
|
-
ctx,
|
3927
|
+
ctx: click.Context,
|
3815
3928
|
thread_pool_size: int,
|
3816
|
-
):
|
3929
|
+
) -> None:
|
3817
3930
|
import reconcile.external_resources.integration_secrets_sync
|
3818
3931
|
|
3819
3932
|
run_integration(
|
@@ -3828,7 +3941,9 @@ def external_resources_secrets_sync(
|
|
3828
3941
|
@internal()
|
3829
3942
|
@use_jump_host()
|
3830
3943
|
@click.pass_context
|
3831
|
-
def automated_actions_config(
|
3944
|
+
def automated_actions_config(
|
3945
|
+
ctx: click.Context, thread_pool_size: int, internal: bool, use_jump_host: bool
|
3946
|
+
) -> None:
|
3832
3947
|
from reconcile.automated_actions.config.integration import (
|
3833
3948
|
AutomatedActionsConfigIntegration,
|
3834
3949
|
AutomatedActionsConfigIntegrationParams,
|