qontract-reconcile 0.10.1rc1133__py3-none-any.whl → 0.10.1rc1135__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.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/RECORD +8 -8
- reconcile/dashdotdb_slo.py +29 -16
- reconcile/gql_definitions/dashdotdb_slo/slo_documents_query.py +2 -2
- reconcile/utils/mr/promote_qontract.py +9 -0
- {qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.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.1rc1135
|
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.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/RECORD
RENAMED
@@ -17,7 +17,7 @@ reconcile/dashdotdb_base.py,sha256=l34QDu1G96_Ctnh7ZXdxXgSeCE93GQMdLAkWxmN6vDA,4
|
|
17
17
|
reconcile/dashdotdb_cso.py,sha256=IkI_KSZuH_kPn0cIQKXitJXiPPFSyHykrOuFy9h9ZpU,3643
|
18
18
|
reconcile/dashdotdb_dora.py,sha256=YmfxD02tKUAQQzku2aj2DXv1oKkAr4V_2lrPVtTFGyI,17674
|
19
19
|
reconcile/dashdotdb_dvo.py,sha256=lCkZ0iby6HrNQb-3kYb6xrt8wCjVUZYxKzz9SiStfHU,8946
|
20
|
-
reconcile/dashdotdb_slo.py,sha256=
|
20
|
+
reconcile/dashdotdb_slo.py,sha256=QKKqLzA2f6zUjQvQ_6U4DObpSOB80C7h-NWXJhzQwME,7812
|
21
21
|
reconcile/database_access_manager.py,sha256=FfyXnYcUdX54BYR_6B9PWFmhT8xdNrPCfoz3Q7q39tg,25646
|
22
22
|
reconcile/deadmanssnitch.py,sha256=n-5W-djUgwzpmdDM4eQIZpkkDmHY0vndt-42LJXI4Y8,7491
|
23
23
|
reconcile/email_sender.py,sha256=-5L-Ag_jaEYSzYRoMr52KQBRXz1E8yx9GqLbg2X4XFU,3533
|
@@ -283,7 +283,7 @@ reconcile/gql_definitions/cost_report/app_names.py,sha256=fzqYXyiTSll359J1F1o7qa
|
|
283
283
|
reconcile/gql_definitions/cost_report/cost_namespaces.py,sha256=wV76J8Ynq0ObSfjSZQRLmCPUZ96frGc82Z5HPM_e4F4,2219
|
284
284
|
reconcile/gql_definitions/cost_report/settings.py,sha256=0nhBDJ5MZ1m7XkNDGrRLmsnUbzqZ4WRh_DDEEzKhcxU,2153
|
285
285
|
reconcile/gql_definitions/dashdotdb_slo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
286
|
-
reconcile/gql_definitions/dashdotdb_slo/slo_documents_query.py,sha256=
|
286
|
+
reconcile/gql_definitions/dashdotdb_slo/slo_documents_query.py,sha256=MYYpVOc8Ze9w7k6-tlUkp5OaPG_5bqHPS5FhfWTw00U,4335
|
287
287
|
reconcile/gql_definitions/dynatrace_token_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
288
288
|
reconcile/gql_definitions/dynatrace_token_provider/dynatrace_bootstrap_tokens.py,sha256=5gTuAnR2rnx2k6Rn7FMEAzw6GCZ6F5HZbqkmJ9-3NI4,2244
|
289
289
|
reconcile/gql_definitions/dynatrace_token_provider/token_specs.py,sha256=XGsMuB8gowRpqJjkD_KRomx-1OswzyWbF4qjVdhionk,2555
|
@@ -785,7 +785,7 @@ reconcile/utils/mr/labels.py,sha256=9QRTRjZAtq45zELd9SwavaraczMjwjn5no3RK1YxFTg,
|
|
785
785
|
reconcile/utils/mr/notificator.py,sha256=cp80wFzu_ZzrJPye7L1pI0H6JRGb7hOGuNxJYUq4Yr8,2967
|
786
786
|
reconcile/utils/mr/ocm_update_recommended_version.py,sha256=p_aVP0TGrlKk9WBwgQnYWqUDsED_Hg6G5Bqj0UvtRwA,1536
|
787
787
|
reconcile/utils/mr/ocm_upgrade_scheduler_org_updates.py,sha256=ojnIjw-8vRnmCCxOGBOEgPZLH4nC1hcuef74LWw2Rpk,3004
|
788
|
-
reconcile/utils/mr/promote_qontract.py,sha256=
|
788
|
+
reconcile/utils/mr/promote_qontract.py,sha256=wgvX2CBlcZaihKJSXJ0zcEK8NGaEP2_DUQDz0STzGes,7158
|
789
789
|
reconcile/utils/mr/user_maintenance.py,sha256=cHPBn8zrReWLHalyk-EFdkFJe9zjVjRoZhT4t2zZfGE,3956
|
790
790
|
reconcile/utils/ocm/__init__.py,sha256=Y-bp8GomMpyCo0tFW6kJ78-ZG1UIupYRtBzbMWU0kwM,798
|
791
791
|
reconcile/utils/ocm/addons.py,sha256=_LDdJ-gapM3s5exKlIUt-MlXZTAUoHezbYBU0QmvfWQ,7335
|
@@ -871,8 +871,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
871
871
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
872
872
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
873
873
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
874
|
-
qontract_reconcile-0.10.
|
875
|
-
qontract_reconcile-0.10.
|
876
|
-
qontract_reconcile-0.10.
|
877
|
-
qontract_reconcile-0.10.
|
878
|
-
qontract_reconcile-0.10.
|
874
|
+
qontract_reconcile-0.10.1rc1135.dist-info/METADATA,sha256=Oak4R7AGZ3502qdMt4vkjhrsP51rNmGLHzAJoQnPqRA,2213
|
875
|
+
qontract_reconcile-0.10.1rc1135.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
876
|
+
qontract_reconcile-0.10.1rc1135.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
877
|
+
qontract_reconcile-0.10.1rc1135.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
878
|
+
qontract_reconcile-0.10.1rc1135.dist-info/RECORD,,
|
reconcile/dashdotdb_slo.py
CHANGED
@@ -100,10 +100,10 @@ class DashdotdbSLO(DashdotdbBase):
|
|
100
100
|
LOG.debug("SLO: processing %s", slo_document.name)
|
101
101
|
result: list[ServiceSLO] = []
|
102
102
|
for namespace_access in slo_document.namespaces:
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
if (
|
104
|
+
namespace_access.slo_namespace
|
105
|
+
and namespace_access.prometheus_access is None
|
106
|
+
):
|
107
107
|
continue
|
108
108
|
|
109
109
|
ns = namespace_access.namespace
|
@@ -112,12 +112,16 @@ class DashdotdbSLO(DashdotdbBase):
|
|
112
112
|
password: str | None = None
|
113
113
|
if namespace_access.prometheus_access:
|
114
114
|
promurl = namespace_access.prometheus_access.url
|
115
|
-
|
115
|
+
if (
|
116
116
|
namespace_access.prometheus_access.username
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
and namespace_access.prometheus_access.password
|
118
|
+
):
|
119
|
+
username = self.secret_reader.read_secret(
|
120
|
+
namespace_access.prometheus_access.username
|
121
|
+
)
|
122
|
+
password = self.secret_reader.read_secret(
|
123
|
+
namespace_access.prometheus_access.password
|
124
|
+
)
|
121
125
|
else:
|
122
126
|
promurl = ns.cluster.prometheus_url
|
123
127
|
if not ns.cluster.automation_token:
|
@@ -132,13 +136,22 @@ class DashdotdbSLO(DashdotdbBase):
|
|
132
136
|
template = jinja2.Template(expr)
|
133
137
|
window = slo.slo_parameters.window
|
134
138
|
promquery = template.render({"window": window})
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
139
|
+
try:
|
140
|
+
prom_response = self._promget(
|
141
|
+
url=promurl,
|
142
|
+
params={"query": (f"{promquery}")},
|
143
|
+
token=promtoken,
|
144
|
+
username=username,
|
145
|
+
password=password,
|
146
|
+
)
|
147
|
+
except requests.exceptions.ConnectionError as error:
|
148
|
+
# This can happen when prometheus is unreachable, or when running locally
|
149
|
+
# and some prometheus URL are openshift service names. The trick is to run
|
150
|
+
# with `oc port-forward` and update the local hosts file if we need to query those.
|
151
|
+
LOG.error(
|
152
|
+
f"{self.logmarker} Could not reach prometheus at {promurl}: {error}. Skipping {slo.name}"
|
153
|
+
)
|
154
|
+
raise
|
142
155
|
prom_result = prom_response["data"]["result"]
|
143
156
|
if not prom_result:
|
144
157
|
continue
|
@@ -84,8 +84,8 @@ class ConfiguredBaseModel(BaseModel):
|
|
84
84
|
|
85
85
|
class SLOExternalPrometheusAccessV1(ConfiguredBaseModel):
|
86
86
|
url: str = Field(..., alias="url")
|
87
|
-
username: VaultSecret = Field(..., alias="username")
|
88
|
-
password: VaultSecret = Field(..., alias="password")
|
87
|
+
username: Optional[VaultSecret] = Field(..., alias="username")
|
88
|
+
password: Optional[VaultSecret] = Field(..., alias="password")
|
89
89
|
|
90
90
|
|
91
91
|
class AppV1(ConfiguredBaseModel):
|
@@ -184,6 +184,15 @@ class PromoteQontractReconcileCommercial(MergeRequestBase):
|
|
184
184
|
replace_text=self.commit_sha,
|
185
185
|
)
|
186
186
|
|
187
|
+
# data/services/app-interface/terraform-repo/cicd/ci-int/saas-terraform-repo.yaml
|
188
|
+
self._process_by(
|
189
|
+
"json_path",
|
190
|
+
gitlab_cli=gitlab_cli,
|
191
|
+
path="data/services/app-interface/terraform-repo/cicd/ci-int/saas-terraform-repo.yaml",
|
192
|
+
search_text="$.resourceTemplates[?(@.name == 'terraform-repo')].targets[?(@.name == 'tf-repo-prod')].parameters.QR_IMAGE_TAG",
|
193
|
+
replace_text=self.version,
|
194
|
+
)
|
195
|
+
|
187
196
|
# data/pipelines/tekton-provider-global-defaults.yaml
|
188
197
|
self._process_by(
|
189
198
|
"json_path",
|
{qontract_reconcile-0.10.1rc1133.dist-info → qontract_reconcile-0.10.1rc1135.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|