qontract-reconcile 0.10.2.dev83__py3-none-any.whl → 0.10.2.dev85__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.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/RECORD +7 -7
- reconcile/aus/ocm_addons_upgrade_scheduler_org.py +4 -3
- tools/cli_commands/container_images_report.py +10 -4
- tools/qontract_cli.py +2 -0
- {qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev85
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
|
6
6
|
Project-URL: repository, https://github.com/app-sre/qontract-reconcile
|
{qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/RECORD
RENAMED
@@ -129,7 +129,7 @@ reconcile/aus/healthchecks.py,sha256=jR9c-syh9impnkV0fd6XW3Bnk7iRN5zv8oCRYM-yIRY
|
|
129
129
|
reconcile/aus/metrics.py,sha256=nKT4m2zGT-QOMR0c-z-npVNKWsNMubzdffpU_f9n4II,3927
|
130
130
|
reconcile/aus/models.py,sha256=R72G-2_mx4KHvdIFOzOd2neubu-BBlw5i7hqKVk7W3s,8149
|
131
131
|
reconcile/aus/node_pool_spec.py,sha256=FkMggklG-4BgQwud2Swp2m3AAAKzZmeaXgohl9uwxZ8,1138
|
132
|
-
reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256
|
132
|
+
reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=SHbFEEq9ETtkkuzBBaNuwSDze8fj6DWHeA_XNgOyTbo,10308
|
133
133
|
reconcile/aus/ocm_upgrade_scheduler.py,sha256=2uPn13y3QGCHLoKwCc1Z7q9wQsoQf_F1HATMYUbl53s,3695
|
134
134
|
reconcile/aus/ocm_upgrade_scheduler_org.py,sha256=QeZAQ1wdDPcwZ77b3Xmt4yBV60rWi3qd8h-vGwnwoCs,3948
|
135
135
|
reconcile/aus/upgrades.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -759,11 +759,11 @@ tools/app_sre_tekton_access_reporter.py,sha256=o9prLUgQpwO3msRWc2as1xT1y9OB3znkp
|
|
759
759
|
tools/app_sre_tekton_access_revalidation.py,sha256=66nHEaY-bIqxIhpcmwN8AvQZu6ZXenfkg4Fut0pVZRM,2726
|
760
760
|
tools/glitchtip_access_reporter.py,sha256=o01A6b88t3Wie6tj_tJWWVo2J01LxQ_a9giGm4UzEaU,2901
|
761
761
|
tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
|
762
|
-
tools/qontract_cli.py,sha256=
|
762
|
+
tools/qontract_cli.py,sha256=_KHwJIC0Keyy2cmhUVruOYtmp1CrTZDzEZkEe8lf81I,152941
|
763
763
|
tools/sd_app_sre_alert_report.py,sha256=jQpJdXVID68bSNtJNOGDh0-ei1CfEUS4Itr4MAaBNFA,5062
|
764
764
|
tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
|
765
765
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
766
|
-
tools/cli_commands/container_images_report.py,sha256=
|
766
|
+
tools/cli_commands/container_images_report.py,sha256=SXh6sZ1dXXzd-2R5eeBufCtW3J4-Y55--0MZLdo4lr8,5409
|
767
767
|
tools/cli_commands/erv2.py,sha256=VxUlNXllo947UwmtvS-42IeI9x_t_X3MHrrSI3K_GRo,23274
|
768
768
|
tools/cli_commands/gpg_encrypt.py,sha256=JWwds_Qg7KhSJMIGUh8TfI5-Jf17iUtmaEi4kWJxfVE,4907
|
769
769
|
tools/cli_commands/systems_and_tools.py,sha256=EMHOF1AtUDaoSk0bbjl6oUKYAz4rTZjIBaF-6E6GspM,16816
|
@@ -786,7 +786,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
786
786
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
787
787
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
788
788
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
789
|
-
qontract_reconcile-0.10.2.
|
790
|
-
qontract_reconcile-0.10.2.
|
791
|
-
qontract_reconcile-0.10.2.
|
792
|
-
qontract_reconcile-0.10.2.
|
789
|
+
qontract_reconcile-0.10.2.dev85.dist-info/METADATA,sha256=vrGwAn3HqOrv1hAUy75U95p-JGo8Qf35bTOhuopBq0U,24565
|
790
|
+
qontract_reconcile-0.10.2.dev85.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
791
|
+
qontract_reconcile-0.10.2.dev85.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
792
|
+
qontract_reconcile-0.10.2.dev85.dist-info/RECORD,,
|
@@ -88,7 +88,8 @@ class OCMAddonsUpgradeSchedulerOrgIntegration(
|
|
88
88
|
addon_id=addon_id,
|
89
89
|
integration=self.name,
|
90
90
|
).get(
|
91
|
-
|
91
|
+
addon_org_upgrade_spec.org.environment.name,
|
92
|
+
addon_org_upgrade_spec.org.org_id,
|
92
93
|
)
|
93
94
|
|
94
95
|
addon_current_state: list[AddonUpgradePolicy] = [
|
@@ -98,13 +99,13 @@ class OCMAddonsUpgradeSchedulerOrgIntegration(
|
|
98
99
|
]
|
99
100
|
|
100
101
|
self.expose_remaining_soak_day_metrics(
|
101
|
-
org_upgrade_spec=
|
102
|
+
org_upgrade_spec=addon_org_upgrade_spec,
|
102
103
|
version_data=version_data,
|
103
104
|
current_state=addon_current_state,
|
104
105
|
metrics_builder=functools.partial(
|
105
106
|
AUSAddonVersionRemainingSoakDaysGauge,
|
106
107
|
integration=self.name,
|
107
|
-
ocm_env=
|
108
|
+
ocm_env=addon_org_upgrade_spec.org.environment.name,
|
108
109
|
addon=addon_id,
|
109
110
|
),
|
110
111
|
)
|
@@ -6,11 +6,11 @@ from typing import Any
|
|
6
6
|
from pydantic import BaseModel
|
7
7
|
from sretoolbox.utils import threaded
|
8
8
|
|
9
|
-
from reconcile.gql_definitions.common.
|
9
|
+
from reconcile.gql_definitions.common.namespaces import NamespaceV1
|
10
10
|
from reconcile.typed_queries.app_interface_vault_settings import (
|
11
11
|
get_app_interface_vault_settings,
|
12
12
|
)
|
13
|
-
from reconcile.typed_queries.
|
13
|
+
from reconcile.typed_queries.namespaces import get_namespaces
|
14
14
|
from reconcile.utils.oc_filters import filter_namespaces_by_cluster_and_namespace
|
15
15
|
from reconcile.utils.oc_map import OCMap, init_oc_map_from_namespaces
|
16
16
|
from reconcile.utils.secret_reader import create_secret_reader
|
@@ -22,6 +22,7 @@ IMAGE_NAME_REGEX = re.compile(
|
|
22
22
|
|
23
23
|
class NamespaceImages(BaseModel):
|
24
24
|
namespace_name: str
|
25
|
+
app_name: str
|
25
26
|
image_names: list[str] | None = None
|
26
27
|
error_message: str | None = None
|
27
28
|
|
@@ -40,7 +41,7 @@ def get_all_pods_images(
|
|
40
41
|
* namespaces: a comma separated list of namespaces where the instance is used
|
41
42
|
* count: number of uses of the image
|
42
43
|
"""
|
43
|
-
all_namespaces =
|
44
|
+
all_namespaces = get_namespaces()
|
44
45
|
namespaces = filter_namespaces_by_cluster_and_namespace(
|
45
46
|
namespaces=all_namespaces,
|
46
47
|
cluster_names=cluster_name,
|
@@ -89,6 +90,7 @@ def fetch_pods_images_from_namespaces(
|
|
89
90
|
|
90
91
|
for name in ni.image_names or []:
|
91
92
|
result[name]["namespaces"].add(ni.namespace_name)
|
93
|
+
result[name]["apps"].add(ni.app_name)
|
92
94
|
result[name]["count"] += 1
|
93
95
|
|
94
96
|
exclude_pattern_compiled: re.Pattern | None = None
|
@@ -109,6 +111,7 @@ def fetch_pods_images_from_namespaces(
|
|
109
111
|
result_filtered_flattened.append({
|
110
112
|
"name": name,
|
111
113
|
"namespaces": ",".join(sorted(value["namespaces"])),
|
114
|
+
"apps": ",".join(sorted(value["apps"])),
|
112
115
|
"count": value["count"],
|
113
116
|
})
|
114
117
|
|
@@ -119,6 +122,7 @@ def fetch_pods_images_from_namespaces(
|
|
119
122
|
result_filtered_flattened.append({
|
120
123
|
"name": "error",
|
121
124
|
"namespaces": message,
|
125
|
+
"apps": "",
|
122
126
|
"count": count,
|
123
127
|
})
|
124
128
|
|
@@ -126,7 +130,7 @@ def fetch_pods_images_from_namespaces(
|
|
126
130
|
|
127
131
|
|
128
132
|
def _get_all_images_default() -> dict[str, Any]:
|
129
|
-
return {"namespaces": set(), "count": 0}
|
133
|
+
return {"namespaces": set(), "apps": set(), "count": 0}
|
130
134
|
|
131
135
|
|
132
136
|
def _get_namespace_images(ns: NamespaceV1, oc_map: OCMap) -> NamespaceImages:
|
@@ -145,10 +149,12 @@ def _get_namespace_images(ns: NamespaceV1, oc_map: OCMap) -> NamespaceImages:
|
|
145
149
|
except Exception as exc:
|
146
150
|
return NamespaceImages(
|
147
151
|
namespace_name=ns.name,
|
152
|
+
app_name=ns.app.name,
|
148
153
|
error_message=str(exc),
|
149
154
|
)
|
150
155
|
|
151
156
|
return NamespaceImages(
|
152
157
|
namespace_name=ns.name,
|
158
|
+
app_name=ns.app.name,
|
153
159
|
image_names=image_names,
|
154
160
|
)
|
tools/qontract_cli.py
CHANGED
@@ -4528,6 +4528,7 @@ def container_images(
|
|
4528
4528
|
"fields": [
|
4529
4529
|
{"key": "name", "sortable": True},
|
4530
4530
|
{"key": "namespaces", "sortable": True},
|
4531
|
+
{"key": "apps", "sortable": True},
|
4531
4532
|
{"key": "count", "sortable": True},
|
4532
4533
|
],
|
4533
4534
|
"items": results,
|
@@ -4548,6 +4549,7 @@ You can view the source of this Markdown to extract the JSON data.
|
|
4548
4549
|
columns = [
|
4549
4550
|
"name",
|
4550
4551
|
"namespaces",
|
4552
|
+
"apps",
|
4551
4553
|
"count",
|
4552
4554
|
]
|
4553
4555
|
ctx.obj["options"]["sort"] = False
|
{qontract_reconcile-0.10.2.dev83.dist-info → qontract_reconcile-0.10.2.dev85.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|