qontract-reconcile 0.10.1rc973__py3-none-any.whl → 0.10.1rc975__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.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/RECORD +8 -8
- reconcile/gql_definitions/integrations/integrations.py +2 -0
- reconcile/utils/glitchtip/models.py +3 -3
- tools/qontract_cli.py +44 -0
- {qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.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.1rc975
|
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.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/RECORD
RENAMED
@@ -316,7 +316,7 @@ reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=AojrkCDGbVjY0TOk
|
|
316
316
|
reconcile/gql_definitions/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
317
317
|
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=Pv6RcuIzpNmGc43eEq64nnKG0Dr7H0wjy5Xg1_oRltM,5197
|
318
318
|
reconcile/gql_definitions/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
319
|
-
reconcile/gql_definitions/integrations/integrations.py,sha256=
|
319
|
+
reconcile/gql_definitions/integrations/integrations.py,sha256=HosEgRUlAkxLNoj2cnq3mrTdWDn9UvbNmtz6OcweIYk,11668
|
320
320
|
reconcile/gql_definitions/jenkins_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
321
321
|
reconcile/gql_definitions/jenkins_configs/jenkins_configs.py,sha256=0nMkH0G-AjQwu53fqHykth6X6jjbHdW2hBp5n7N-r24,2766
|
322
322
|
reconcile/gql_definitions/jenkins_configs/jenkins_instances.py,sha256=b3gYVzQavxeLe4jSM5ZxrO77Vvs7kOljVOXEkTO943U,2165
|
@@ -740,7 +740,7 @@ reconcile/utils/dynatrace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
740
740
|
reconcile/utils/dynatrace/client.py,sha256=CsjhxyCxum2X_cl8bAe701rUvVu6PflAwIR0nBEQ2yU,1697
|
741
741
|
reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5__Dcl7yt0,258
|
742
742
|
reconcile/utils/glitchtip/client.py,sha256=EXJVIc0aUqkfApU4IIDoc89841XgUL7jJNyb0gLDpMI,7736
|
743
|
-
reconcile/utils/glitchtip/models.py,sha256=
|
743
|
+
reconcile/utils/glitchtip/models.py,sha256=uHbCK9-RWgxNYUAkEHXRAZRDDZW7jkOFFt9MdlqN4bU,6481
|
744
744
|
reconcile/utils/internal_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
745
745
|
reconcile/utils/internal_groups/client.py,sha256=RL-fNDtMGfpD7pNjCEmrj_0PV3ClCtUg6Su70exlhps,4521
|
746
746
|
reconcile/utils/internal_groups/models.py,sha256=y_IqBVqfGqNXiu0VudvBWFrm_-uafVm5KgLG-ca8XAs,2281
|
@@ -820,7 +820,7 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
|
|
820
820
|
tools/app_interface_reporter.py,sha256=uy9eRHf6EdvD8ZY2WYdroGXm18DOdnqVZyxaWN3Bm_0,17724
|
821
821
|
tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
|
822
822
|
tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
|
823
|
-
tools/qontract_cli.py,sha256=
|
823
|
+
tools/qontract_cli.py,sha256=S5oiRXYf_k47ovhoB4RIF7ysgqzaBp3CooTqBKg21mg,126061
|
824
824
|
tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
|
825
825
|
tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
|
826
826
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -851,8 +851,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
851
851
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
852
852
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
853
853
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
854
|
-
qontract_reconcile-0.10.
|
855
|
-
qontract_reconcile-0.10.
|
856
|
-
qontract_reconcile-0.10.
|
857
|
-
qontract_reconcile-0.10.
|
858
|
-
qontract_reconcile-0.10.
|
854
|
+
qontract_reconcile-0.10.1rc975.dist-info/METADATA,sha256=CrA6wNfw1OOMe_6qpaK6Z0I__W9EqTZOhEfliEMR8ls,2262
|
855
|
+
qontract_reconcile-0.10.1rc975.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
856
|
+
qontract_reconcile-0.10.1rc975.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
857
|
+
qontract_reconcile-0.10.1rc975.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
858
|
+
qontract_reconcile-0.10.1rc975.dist-info/RECORD,,
|
@@ -72,6 +72,7 @@ query Integrations {
|
|
72
72
|
}
|
73
73
|
cluster {
|
74
74
|
name
|
75
|
+
labels
|
75
76
|
serverUrl
|
76
77
|
insecureSkipTLSVerify
|
77
78
|
jumpHost {
|
@@ -210,6 +211,7 @@ class EnvironmentV1(ConfiguredBaseModel):
|
|
210
211
|
|
211
212
|
class ClusterV1(ConfiguredBaseModel):
|
212
213
|
name: str = Field(..., alias="name")
|
214
|
+
labels: Optional[Json] = Field(..., alias="labels")
|
213
215
|
server_url: str = Field(..., alias="serverUrl")
|
214
216
|
insecure_skip_tls_verify: Optional[bool] = Field(..., alias="insecureSkipTLSVerify")
|
215
217
|
jump_host: Optional[CommonJumphostFields] = Field(..., alias="jumpHost")
|
@@ -86,7 +86,7 @@ class RecipientType(Enum):
|
|
86
86
|
|
87
87
|
|
88
88
|
class ProjectAlertRecipient(BaseModel):
|
89
|
-
pk: int | None
|
89
|
+
pk: int | None = Field(None, alias="id")
|
90
90
|
recipient_type: RecipientType = Field(..., alias="recipientType")
|
91
91
|
url: str = ""
|
92
92
|
|
@@ -115,9 +115,9 @@ class ProjectAlertRecipient(BaseModel):
|
|
115
115
|
|
116
116
|
|
117
117
|
class ProjectAlert(BaseModel):
|
118
|
-
pk: int | None
|
118
|
+
pk: int | None = Field(None, alias="id")
|
119
119
|
name: str
|
120
|
-
timespan_minutes: int
|
120
|
+
timespan_minutes: int = Field(..., alias="timespanMinutes")
|
121
121
|
quantity: int
|
122
122
|
recipients: list[ProjectAlertRecipient] = Field([], alias="alertRecipients")
|
123
123
|
|
tools/qontract_cli.py
CHANGED
@@ -71,6 +71,7 @@ from reconcile.gql_definitions.common.app_interface_vault_settings import (
|
|
71
71
|
AppInterfaceSettingsV1,
|
72
72
|
)
|
73
73
|
from reconcile.gql_definitions.fragments.aus_organization import AUSOCMOrganization
|
74
|
+
from reconcile.gql_definitions.integrations import integrations as integrations_gql
|
74
75
|
from reconcile.gql_definitions.maintenance import maintenances as maintenances_gql
|
75
76
|
from reconcile.jenkins_job_builder import init_jjb
|
76
77
|
from reconcile.slack_base import slackapi_from_queries
|
@@ -2728,6 +2729,49 @@ def systems_and_tools(ctx):
|
|
2728
2729
|
print_output(ctx.obj["options"], inventory.data, inventory.columns)
|
2729
2730
|
|
2730
2731
|
|
2732
|
+
@get.command(short_help="get integration logs")
|
2733
|
+
@click.argument("integration_name")
|
2734
|
+
@click.option(
|
2735
|
+
"--environment_name", default="production", help="environment to get logs from"
|
2736
|
+
)
|
2737
|
+
@click.pass_context
|
2738
|
+
def logs(ctx, integration_name: str, environment_name: str):
|
2739
|
+
integrations = [
|
2740
|
+
i
|
2741
|
+
for i in integrations_gql.query(query_func=gql.get_api().query).integrations
|
2742
|
+
or []
|
2743
|
+
if i.name == integration_name
|
2744
|
+
]
|
2745
|
+
if not integrations:
|
2746
|
+
print("integration not found")
|
2747
|
+
return
|
2748
|
+
integration = integrations[0]
|
2749
|
+
vault_settings = get_app_interface_vault_settings()
|
2750
|
+
secret_reader = create_secret_reader(use_vault=vault_settings.vault)
|
2751
|
+
managed = integration.managed
|
2752
|
+
if not managed:
|
2753
|
+
print("integration is not managed")
|
2754
|
+
return
|
2755
|
+
namespaces = [
|
2756
|
+
m.namespace
|
2757
|
+
for m in managed
|
2758
|
+
if m.namespace.cluster.labels
|
2759
|
+
and m.namespace.cluster.labels.get("environment") == environment_name
|
2760
|
+
]
|
2761
|
+
if not namespaces:
|
2762
|
+
print(f"no managed {environment_name} namespace found")
|
2763
|
+
return
|
2764
|
+
namespace = namespaces[0]
|
2765
|
+
cluster = namespaces[0].cluster
|
2766
|
+
if not cluster.automation_token:
|
2767
|
+
print("cluster automation token not found")
|
2768
|
+
return
|
2769
|
+
token = secret_reader.read_secret(cluster.automation_token)
|
2770
|
+
|
2771
|
+
command = f"oc --server {cluster.server_url} --token {token} --namespace {namespace.name} logs -c int -l app=qontract-reconcile-{integration.name}"
|
2772
|
+
print(command)
|
2773
|
+
|
2774
|
+
|
2731
2775
|
@get.command
|
2732
2776
|
@click.pass_context
|
2733
2777
|
def jenkins_jobs(ctx):
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc973.dist-info → qontract_reconcile-0.10.1rc975.dist-info}/top_level.txt
RENAMED
File without changes
|