qontract-reconcile 0.10.1rc1002__py3-none-any.whl → 0.10.1rc1004__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.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/RECORD +8 -8
- reconcile/change_owners/self_service_roles.py +2 -2
- reconcile/gql_definitions/change_owners/queries/self_service_roles.py +2 -0
- reconcile/openshift_base.py +21 -3
- {qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc1004
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
{qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/RECORD
RENAMED
@@ -61,7 +61,7 @@ reconcile/ocm_groups.py,sha256=-rTPMewkdyo1De6gs4u-294p3z34oUbGfuNi8ov56Sk,3424
|
|
61
61
|
reconcile/ocm_machine_pools.py,sha256=poGfITOCJEMwYAJpiuL8SytgTcBmGIKEZPgNGld80TY,16563
|
62
62
|
reconcile/ocm_update_recommended_version.py,sha256=IYkfLXIprOW1jguZeELcGP1iBPuj-b53R-FTqKulMl8,4204
|
63
63
|
reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=aLgyInt9oIWAg0XtCiwJRUSwdPx3masKV8kHzkyEEOQ,4282
|
64
|
-
reconcile/openshift_base.py,sha256=
|
64
|
+
reconcile/openshift_base.py,sha256=ZcyB6FU0MSibu8mLCQrQFOcEIoGITGBjR-g3vbdNKHE,52647
|
65
65
|
reconcile/openshift_cluster_bots.py,sha256=1aGPaKUOoWuqDt6Jv6hdxc7NfdvjstrCmcDHHFfatIk,10942
|
66
66
|
reconcile/openshift_clusterrolebindings.py,sha256=sDgHi_t2ayE3O6zZ5CLao7uBmihxRK8K70w2GSADz-w,5822
|
67
67
|
reconcile/openshift_groups.py,sha256=sK2wLWwNupztbfyFPl32VH42s_s8Mu3g-URdlisnwJc,9382
|
@@ -167,7 +167,7 @@ reconcile/change_owners/changes.py,sha256=CH38-hyOfbH6xFYWidw_LAniyPisKq9nGRQhUa
|
|
167
167
|
reconcile/change_owners/decision.py,sha256=iUJcIc_N_RqXIAY8D10RZqPMC2OinsHTMcqI6f6uylE,7606
|
168
168
|
reconcile/change_owners/diff.py,sha256=0vyu29xCL24ZhUa7hqBni0NaxoCYRXLwvA-h8V23YQ4,9009
|
169
169
|
reconcile/change_owners/implicit_ownership.py,sha256=6BehZvx4IjrphmOt_LLLk9_02Fl5BY5jd00Wuz_PBZk,4234
|
170
|
-
reconcile/change_owners/self_service_roles.py,sha256=
|
170
|
+
reconcile/change_owners/self_service_roles.py,sha256=U-eU7G4YGg7atEKaJ8RpYgLUKden6xwggUHA7xJMowI,9714
|
171
171
|
reconcile/change_owners/tester.py,sha256=yY15ABnWx_3g9QeeR38-cQAaql0aq7JIxBv_7KtC91U,8955
|
172
172
|
reconcile/cluster_auth_rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
173
173
|
reconcile/cluster_auth_rhidp/integration.py,sha256=KIAiP_XFjsOA2OE8oFJa8lD0T1a7EwOmhct2xbj7tr8,9560
|
@@ -229,7 +229,7 @@ reconcile/gql_definitions/aws_version_sync/namespaces.py,sha256=eBLyXlSjWdmEE-jY
|
|
229
229
|
reconcile/gql_definitions/change_owners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
230
230
|
reconcile/gql_definitions/change_owners/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
231
231
|
reconcile/gql_definitions/change_owners/queries/change_types.py,sha256=9S2YRNnSAvutjzuubZIQQe35yd8V2rGKvWSUI6yl11Q,5017
|
232
|
-
reconcile/gql_definitions/change_owners/queries/self_service_roles.py,sha256
|
232
|
+
reconcile/gql_definitions/change_owners/queries/self_service_roles.py,sha256=BcTQvnefPiShG90ajU_l2V6HUYSEXgdAzgiwY89vQew,4790
|
233
233
|
reconcile/gql_definitions/cluster_auth_rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
234
234
|
reconcile/gql_definitions/cluster_auth_rhidp/clusters.py,sha256=Pp9P3Q30Be3szcVqOEOtPfYUNiGTq1xc5Juz-ApMMw0,3283
|
235
235
|
reconcile/gql_definitions/cna/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -857,8 +857,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
857
857
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
858
858
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
859
859
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
860
|
-
qontract_reconcile-0.10.
|
861
|
-
qontract_reconcile-0.10.
|
862
|
-
qontract_reconcile-0.10.
|
863
|
-
qontract_reconcile-0.10.
|
864
|
-
qontract_reconcile-0.10.
|
860
|
+
qontract_reconcile-0.10.1rc1004.dist-info/METADATA,sha256=a3aKyUnQQ5uLMR9YPT37jtYEY6XYSRMyLWX5v9LLF7g,2263
|
861
|
+
qontract_reconcile-0.10.1rc1004.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
862
|
+
qontract_reconcile-0.10.1rc1004.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
863
|
+
qontract_reconcile-0.10.1rc1004.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
864
|
+
qontract_reconcile-0.10.1rc1004.dist-info/RECORD,,
|
@@ -19,7 +19,7 @@ from reconcile.gql_definitions.change_owners.queries.self_service_roles import (
|
|
19
19
|
PermissionSlackUsergroupV1,
|
20
20
|
RoleV1,
|
21
21
|
)
|
22
|
-
from reconcile.utils import gql
|
22
|
+
from reconcile.utils import expiration, gql
|
23
23
|
from reconcile.utils.membershipsources.models import (
|
24
24
|
RoleBot,
|
25
25
|
RoleMember,
|
@@ -45,7 +45,7 @@ class DatafileIncompatibleWithChangeTypeError(Exception):
|
|
45
45
|
|
46
46
|
def fetch_self_service_roles(gql_api: gql.GqlApi) -> list[RoleV1]:
|
47
47
|
roles: list[RoleV1] = []
|
48
|
-
for r in self_service_roles.query(gql_api.query).roles or []:
|
48
|
+
for r in expiration.filter(self_service_roles.query(gql_api.query).roles or []):
|
49
49
|
if not r.self_service:
|
50
50
|
continue
|
51
51
|
validate_self_service_role(r)
|
@@ -87,6 +87,7 @@ query SelfServiceRolesQuery($name: String) {
|
|
87
87
|
memberSources {
|
88
88
|
...RoleMembershipSource
|
89
89
|
}
|
90
|
+
expirationDate
|
90
91
|
}
|
91
92
|
}
|
92
93
|
"""
|
@@ -152,6 +153,7 @@ class RoleV1(ConfiguredBaseModel):
|
|
152
153
|
bots: list[BotV1] = Field(..., alias="bots")
|
153
154
|
permissions: Optional[list[Union[PermissionSlackUsergroupV1, PermissionGitlabGroupMembershipV1, PermissionV1]]] = Field(..., alias="permissions")
|
154
155
|
member_sources: Optional[list[RoleMembershipSource]] = Field(..., alias="memberSources")
|
156
|
+
expiration_date: Optional[str] = Field(..., alias="expirationDate")
|
155
157
|
|
156
158
|
|
157
159
|
class SelfServiceRolesQueryQueryData(ConfiguredBaseModel):
|
reconcile/openshift_base.py
CHANGED
@@ -128,6 +128,7 @@ def init_specs_to_fetch(
|
|
128
128
|
clusters: Iterable[Mapping] | None = None,
|
129
129
|
override_managed_types: Iterable[str] | None = None,
|
130
130
|
managed_types_key: str = "managedResourceTypes",
|
131
|
+
cluster_admin: bool = False,
|
131
132
|
) -> list[StateSpec]:
|
132
133
|
state_specs: list[StateSpec] = []
|
133
134
|
|
@@ -144,7 +145,9 @@ def init_specs_to_fetch(
|
|
144
145
|
continue
|
145
146
|
|
146
147
|
cluster = namespace_info["cluster"]["name"]
|
147
|
-
privileged =
|
148
|
+
privileged = (
|
149
|
+
namespace_info.get("clusterAdmin", False) is True or cluster_admin
|
150
|
+
)
|
148
151
|
try:
|
149
152
|
oc = oc_map.get_cluster(cluster, privileged)
|
150
153
|
except OCLogMsg as ex:
|
@@ -348,6 +351,7 @@ def fetch_current_state(
|
|
348
351
|
namespaces=namespaces,
|
349
352
|
clusters=clusters,
|
350
353
|
override_managed_types=override_managed_types,
|
354
|
+
cluster_admin=cluster_admin,
|
351
355
|
)
|
352
356
|
threaded.run(
|
353
357
|
populate_current_state,
|
@@ -379,7 +383,14 @@ def apply(
|
|
379
383
|
recycle_pods: bool = True,
|
380
384
|
privileged: bool = False,
|
381
385
|
) -> None:
|
382
|
-
logging.info([
|
386
|
+
logging.info([
|
387
|
+
"apply",
|
388
|
+
f"privileged={privileged}",
|
389
|
+
cluster,
|
390
|
+
namespace,
|
391
|
+
resource_type,
|
392
|
+
resource.name,
|
393
|
+
])
|
383
394
|
|
384
395
|
try:
|
385
396
|
oc = oc_map.get_cluster(cluster, privileged)
|
@@ -537,7 +548,14 @@ def delete(
|
|
537
548
|
enable_deletion: bool,
|
538
549
|
privileged: bool = False,
|
539
550
|
) -> None:
|
540
|
-
logging.info([
|
551
|
+
logging.info([
|
552
|
+
"delete",
|
553
|
+
f"privileged={privileged}",
|
554
|
+
cluster,
|
555
|
+
namespace,
|
556
|
+
resource_type,
|
557
|
+
name,
|
558
|
+
])
|
541
559
|
|
542
560
|
if not enable_deletion:
|
543
561
|
logging.error("'delete' action is disabled due to previous errors.")
|
{qontract_reconcile-0.10.1rc1002.dist-info → qontract_reconcile-0.10.1rc1004.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|