qontract-reconcile 0.10.1rc1202__py3-none-any.whl → 0.10.2.dev1__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.
Files changed (138) hide show
  1. qontract_reconcile-0.10.2.dev1.dist-info/METADATA +500 -0
  2. {qontract_reconcile-0.10.1rc1202.dist-info → qontract_reconcile-0.10.2.dev1.dist-info}/RECORD +12 -130
  3. {qontract_reconcile-0.10.1rc1202.dist-info → qontract_reconcile-0.10.2.dev1.dist-info}/WHEEL +1 -2
  4. {qontract_reconcile-0.10.1rc1202.dist-info → qontract_reconcile-0.10.2.dev1.dist-info}/entry_points.txt +1 -0
  5. reconcile/aws_account_manager/README.md +5 -0
  6. reconcile/change_owners/README.md +34 -0
  7. reconcile/glitchtip/README.md +150 -0
  8. reconcile/gql_definitions/introspection.json +51176 -0
  9. reconcile/run_integration.py +293 -0
  10. reconcile/utils/binary.py +2 -2
  11. reconcile/utils/mr/README.md +198 -0
  12. reconcile/utils/oc_map.py +2 -2
  13. tools/qontract_cli.py +0 -0
  14. qontract_reconcile-0.10.1rc1202.dist-info/METADATA +0 -64
  15. qontract_reconcile-0.10.1rc1202.dist-info/top_level.txt +0 -3
  16. reconcile/test/__init__.py +0 -0
  17. reconcile/test/conftest.py +0 -157
  18. reconcile/test/fixtures.py +0 -24
  19. reconcile/test/saas_auto_promotions_manager/__init__.py +0 -0
  20. reconcile/test/saas_auto_promotions_manager/conftest.py +0 -170
  21. reconcile/test/saas_auto_promotions_manager/merge_request_manager/__init__.py +0 -0
  22. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/__init__.py +0 -0
  23. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/conftest.py +0 -115
  24. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/data_keys.py +0 -19
  25. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_desired_state.py +0 -66
  26. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_merge_request_manager.py +0 -86
  27. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_mr_parser.py +0 -352
  28. reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_reconciler.py +0 -494
  29. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/__init__.py +0 -0
  30. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/conftest.py +0 -25
  31. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_content_multiple_namespaces.py +0 -37
  32. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_content_single_namespace.py +0 -81
  33. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_content_single_target.py +0 -61
  34. reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_json_path_selector.py +0 -74
  35. reconcile/test/saas_auto_promotions_manager/test_integration_test.py +0 -52
  36. reconcile/test/saas_auto_promotions_manager/utils/__init__.py +0 -0
  37. reconcile/test/test_acs_notifiers.py +0 -393
  38. reconcile/test/test_acs_policies.py +0 -497
  39. reconcile/test/test_acs_rbac.py +0 -865
  40. reconcile/test/test_aggregated_list.py +0 -237
  41. reconcile/test/test_amtool.py +0 -37
  42. reconcile/test/test_aws_ami_cleanup.py +0 -230
  43. reconcile/test/test_aws_ami_share.py +0 -68
  44. reconcile/test/test_aws_cloudwatch_log_retention.py +0 -434
  45. reconcile/test/test_aws_iam_keys.py +0 -70
  46. reconcile/test/test_aws_iam_password_reset.py +0 -35
  47. reconcile/test/test_aws_support_cases_sos.py +0 -23
  48. reconcile/test/test_checkpoint.py +0 -178
  49. reconcile/test/test_cli.py +0 -41
  50. reconcile/test/test_closedbox_endpoint_monitoring.py +0 -207
  51. reconcile/test/test_dashdotdb_dora.py +0 -245
  52. reconcile/test/test_database_access_manager.py +0 -660
  53. reconcile/test/test_deadmanssnitch.py +0 -290
  54. reconcile/test/test_gabi_authorized_users.py +0 -72
  55. reconcile/test/test_gcr_mirror.py +0 -14
  56. reconcile/test/test_github_org.py +0 -156
  57. reconcile/test/test_github_repo_invites.py +0 -119
  58. reconcile/test/test_gitlab_housekeeping.py +0 -333
  59. reconcile/test/test_gitlab_labeler.py +0 -126
  60. reconcile/test/test_gitlab_members.py +0 -219
  61. reconcile/test/test_gitlab_permissions.py +0 -164
  62. reconcile/test/test_instrumented_wrappers.py +0 -18
  63. reconcile/test/test_integrations_manager.py +0 -1252
  64. reconcile/test/test_jenkins_worker_fleets.py +0 -57
  65. reconcile/test/test_jira_permissions_validator.py +0 -519
  66. reconcile/test/test_jump_host.py +0 -114
  67. reconcile/test/test_ldap_users.py +0 -125
  68. reconcile/test/test_make.py +0 -28
  69. reconcile/test/test_ocm_additional_routers.py +0 -133
  70. reconcile/test/test_ocm_clusters.py +0 -798
  71. reconcile/test/test_ocm_clusters_manifest_updates.py +0 -87
  72. reconcile/test/test_ocm_machine_pools.py +0 -1103
  73. reconcile/test/test_ocm_update_recommended_version.py +0 -145
  74. reconcile/test/test_ocm_upgrade_scheduler_org_updater.py +0 -125
  75. reconcile/test/test_openshift_base.py +0 -1269
  76. reconcile/test/test_openshift_cluster_bots.py +0 -240
  77. reconcile/test/test_openshift_namespace_labels.py +0 -344
  78. reconcile/test/test_openshift_namespaces.py +0 -256
  79. reconcile/test/test_openshift_resource.py +0 -443
  80. reconcile/test/test_openshift_resources_base.py +0 -478
  81. reconcile/test/test_openshift_saas_deploy.py +0 -188
  82. reconcile/test/test_openshift_saas_deploy_change_tester.py +0 -308
  83. reconcile/test/test_openshift_saas_deploy_trigger_cleaner.py +0 -65
  84. reconcile/test/test_openshift_serviceaccount_tokens.py +0 -282
  85. reconcile/test/test_openshift_tekton_resources.py +0 -265
  86. reconcile/test/test_openshift_upgrade_watcher.py +0 -223
  87. reconcile/test/test_prometheus_rules_tester.py +0 -151
  88. reconcile/test/test_quay_membership.py +0 -86
  89. reconcile/test/test_quay_mirror.py +0 -172
  90. reconcile/test/test_quay_mirror_org.py +0 -82
  91. reconcile/test/test_quay_repos.py +0 -59
  92. reconcile/test/test_queries.py +0 -53
  93. reconcile/test/test_repo_owners.py +0 -47
  94. reconcile/test/test_requests_sender.py +0 -139
  95. reconcile/test/test_saasherder.py +0 -1611
  96. reconcile/test/test_saasherder_allowed_secret_paths.py +0 -125
  97. reconcile/test/test_secret_reader.py +0 -153
  98. reconcile/test/test_slack_base.py +0 -183
  99. reconcile/test/test_slack_usergroups.py +0 -785
  100. reconcile/test/test_sql_query.py +0 -316
  101. reconcile/test/test_status_board.py +0 -258
  102. reconcile/test/test_terraform_aws_route53.py +0 -29
  103. reconcile/test/test_terraform_cloudflare_dns.py +0 -117
  104. reconcile/test/test_terraform_cloudflare_resources.py +0 -408
  105. reconcile/test/test_terraform_cloudflare_users.py +0 -747
  106. reconcile/test/test_terraform_repo.py +0 -440
  107. reconcile/test/test_terraform_resources.py +0 -519
  108. reconcile/test/test_terraform_tgw_attachments.py +0 -1295
  109. reconcile/test/test_terraform_users.py +0 -152
  110. reconcile/test/test_terraform_vpc_peerings.py +0 -576
  111. reconcile/test/test_terraform_vpc_peerings_build_desired_state.py +0 -1434
  112. reconcile/test/test_three_way_diff_strategy.py +0 -131
  113. reconcile/test/test_utils_jinja2.py +0 -130
  114. reconcile/test/test_vault_replication.py +0 -534
  115. reconcile/test/test_vault_utils.py +0 -47
  116. reconcile/test/test_version_bump.py +0 -18
  117. reconcile/test/test_vpc_peerings_validator.py +0 -194
  118. reconcile/test/test_wrong_region.py +0 -78
  119. release/__init__.py +0 -0
  120. release/test_version.py +0 -50
  121. release/version.py +0 -104
  122. tools/cli_commands/test/__init__.py +0 -0
  123. tools/cli_commands/test/conftest.py +0 -332
  124. tools/cli_commands/test/test_aws_cost_report.py +0 -258
  125. tools/cli_commands/test/test_cost_management_api.py +0 -326
  126. tools/cli_commands/test/test_gpg_encrypt.py +0 -235
  127. tools/cli_commands/test/test_openshift_cost_optimization_report.py +0 -255
  128. tools/cli_commands/test/test_openshift_cost_report.py +0 -295
  129. tools/cli_commands/test/test_util.py +0 -70
  130. tools/test/__init__.py +0 -0
  131. tools/test/conftest.py +0 -77
  132. tools/test/test_app_interface_metrics_exporter.py +0 -48
  133. tools/test/test_erv2.py +0 -80
  134. tools/test/test_get_container_images.py +0 -230
  135. tools/test/test_qontract_cli.py +0 -197
  136. tools/test/test_saas_promotion_state.py +0 -187
  137. tools/test/test_sd_app_sre_alert_report.py +0 -74
  138. tools/test/test_sre_checkpoints.py +0 -79
@@ -0,0 +1,500 @@
1
+ Metadata-Version: 2.3
2
+ Name: qontract-reconcile
3
+ Version: 0.10.2.dev1
4
+ Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
+ Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
+ Project-URL: repository, https://github.com/app-sre/qontract-reconcile
7
+ Project-URL: documentation, https://github.com/app-sre/qontract-reconcile
8
+ Author-email: Red Hat App-SRE Team <sd-app-sre@redhat.com>
9
+ License: Apache 2.0
10
+ Classifier: Development Status :: 2 - Pre-Alpha
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: anymarkup<0.9.0,>=0.7.0
18
+ Requires-Dist: boto3==1.34.94
19
+ Requires-Dist: botocore==1.34.94
20
+ Requires-Dist: click<9.0,>=7.0
21
+ Requires-Dist: croniter<1.1.0,>=1.0.15
22
+ Requires-Dist: dateparser~=1.1.7
23
+ Requires-Dist: deepdiff==6.7.1
24
+ Requires-Dist: dnspython~=2.1
25
+ Requires-Dist: dt==1.1.61
26
+ Requires-Dist: filetype~=1.2.0
27
+ Requires-Dist: gql==3.1.0
28
+ Requires-Dist: hvac<0.8.0,>=0.7.0
29
+ Requires-Dist: jenkins-job-builder~=4.3.0
30
+ Requires-Dist: jinja2<3.2.0,>=2.10.1
31
+ Requires-Dist: jira~=3.1
32
+ Requires-Dist: jsonpatch~=1.33
33
+ Requires-Dist: jsonpath-ng==1.5.3
34
+ Requires-Dist: jsonpath-rw<1.5.0,>=1.4.0
35
+ Requires-Dist: jsonpointer~=2.4
36
+ Requires-Dist: kubernetes~=24.0
37
+ Requires-Dist: ldap3<2.10.0,>=2.9.1
38
+ Requires-Dist: markupsafe==2.1.1
39
+ Requires-Dist: networkx~=2.8
40
+ Requires-Dist: parse==1.18.0
41
+ Requires-Dist: prometheus-client~=0.8
42
+ Requires-Dist: psycopg2-binary~=2.9
43
+ Requires-Dist: pydantic~=1.10.6
44
+ Requires-Dist: pygithub<1.59,>=1.58
45
+ Requires-Dist: pyjwt~=2.7
46
+ Requires-Dist: pyopenssl~=23.0
47
+ Requires-Dist: pypd<1.2.0,>=1.1.0
48
+ Requires-Dist: python-gitlab~=4.6
49
+ Requires-Dist: requests-oauthlib~=1.3
50
+ Requires-Dist: requests~=2.32
51
+ Requires-Dist: rich<14.0.0,>=13.3.0
52
+ Requires-Dist: ruamel-yaml<0.18.0,>=0.17.22
53
+ Requires-Dist: semver~=3.0
54
+ Requires-Dist: sendgrid<6.5.0,>=6.4.8
55
+ Requires-Dist: sentry-sdk~=2.0
56
+ Requires-Dist: slack-sdk<4.0,>=3.10
57
+ Requires-Dist: sretoolbox~=2.6
58
+ Requires-Dist: sshtunnel>=0.4.0
59
+ Requires-Dist: tabulate<0.9.0,>=0.8.6
60
+ Requires-Dist: terrascript==0.9.0
61
+ Requires-Dist: toml<0.11.0,>=0.10.0
62
+ Requires-Dist: unleashclient~=5.11
63
+ Requires-Dist: urllib3~=2.2
64
+ Requires-Dist: websocket-client<0.55.0,>=0.35
65
+ Requires-Dist: yamllint==1.34.0
66
+ Description-Content-Type: text/markdown
67
+
68
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
69
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
70
+ [![PyPI](https://img.shields.io/pypi/v/qontract-reconcile)][pypi-link]
71
+ [![PyPI platforms][pypi-platforms]][pypi-link]
72
+ ![PyPI - License](https://img.shields.io/pypi/l/qontract-reconcile)
73
+ [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
74
+
75
+ # qontract-reconcile
76
+
77
+ A tool to reconcile services with their desired state as defined in app-interface.
78
+ Additional tools that use the libraries created by the reconciliations are also hosted here.
79
+
80
+ ## Usage
81
+
82
+ Use [config.toml.example](config.toml.example) as a template to create a `config.toml` file.
83
+
84
+ Run a reconcile integration like this:
85
+
86
+ ```sh
87
+ qontract-reconcile --config config.toml --dry-run <subcommand>
88
+
89
+ # review output and run without `--dry-run` to perform actual changes
90
+ qontract-reconcile --config config.toml <subcommand>
91
+ ```
92
+
93
+ > Note: you can use the `QONTRACT_CONFIG` environment variable instead of using `--config`.
94
+
95
+ ### OpenShift usage
96
+
97
+ OpenShift templates can be found [here](/openshift/qontract-reconcile.yaml). In order to add integrations there please use the [helm](/helm/README.md) chart provided.
98
+
99
+ ## Available Integrations
100
+
101
+ `qontract-reconcile` includes the following integrations:
102
+
103
+ ```text
104
+ acs-notifiers Manages RHACS notifier configurations
105
+ acs-policies Manages RHACS security policy configurations
106
+ acs-rbac Manages RHACS rbac configuration
107
+ advanced-upgrade-scheduler Manage Cluster Upgrade Policy schedules in
108
+ OCM organizations based on OCM labels.
109
+ aws-account-manager Create and manage AWS accounts.
110
+ aws-ami-cleanup Cleanup old and unused AMIs.
111
+ aws-ami-share Share AMI and AMI tags between accounts.
112
+ aws-cloudwatch-log-retention Set up retention period for Cloudwatch logs.
113
+ aws-ecr-image-pull-secrets Generate AWS ECR image pull secrets and
114
+ store them in Vault.
115
+ aws-garbage-collector Delete orphan AWS resources.
116
+ aws-iam-keys Delete IAM access keys by access key ID.
117
+ aws-iam-password-reset Reset IAM user password by user reference.
118
+ aws-saml-idp Manage the SAML IDP config for all AWS
119
+ accounts.
120
+ aws-saml-roles Manage the SAML IAM roles for all AWS
121
+ accounts with SSO enabled.
122
+ aws-support-cases-sos Scan AWS support cases for reports of leaked
123
+ keys and remove them (only submits PR)
124
+ aws-version-sync Sync AWS asset version numbers to App-
125
+ Interface
126
+ blackbox-exporter-endpoint-monitoring
127
+ Manages Prometheus Probe resources for
128
+ blackbox-exporter
129
+ change-log-tracking Analyze bundle diffs by change types.
130
+ change-owners Detects owners for changes in app-interface
131
+ PRs and allows them to self-service merge.
132
+ cluster-auth-rhidp Manages the OCM subscription labels for
133
+ clusters with RHIDP authentication. Part of
134
+ RHIDP.
135
+ cluster-deployment-mapper Maps ClusterDeployment resources to Cluster
136
+ IDs.
137
+ cna-resources Manage Cloud Resources using Cloud Native
138
+ Assets (CNA).
139
+ dashdotdb-cso Collects the ImageManifestVuln CRs from all
140
+ the clusters and posts them to Dashdotdb.
141
+ dashdotdb-dora Collects dora metrics.
142
+ dashdotdb-dvo Collects the DeploymentValidations from all
143
+ the clusters and posts them to Dashdotdb.
144
+ dashdotdb-slo Collects the ServiceSloMetrics from all the
145
+ clusters and posts them to Dashdotdb.
146
+ database-access-manager Manage Databases and Database Users.
147
+ deadmanssnitch Automate Deadmanssnitch Creation/Deletion
148
+ dynatrace-token-provider Automatically provide dedicated Dynatrace
149
+ tokens to management clusters
150
+ email-sender Send email notifications to app-interface
151
+ audience.
152
+ endpoints-discovery Discover routes and update endpoints
153
+ external-resources Manages External Resources
154
+ external-resources-secrets-sync
155
+ Syncs External Resources Secrets from Vault
156
+ to Clusters
157
+ gabi-authorized-users Manages user access for GABI instances.
158
+ gcr-mirror Mirrors external images into Google
159
+ Container Registry.
160
+ github Configures the teams and members in a GitHub
161
+ org.
162
+ github-owners Configures owners in a GitHub org.
163
+ github-repo-invites Accept GitHub repository invitations for
164
+ known repositories.
165
+ github-repo-permissions-validator
166
+ Validates permissions in github
167
+ repositories.
168
+ github-users Validate compliance of GitHub user profiles.
169
+ github-validator Validates GitHub organization settings.
170
+ gitlab-fork-compliance Ensures that forks of App Interface are
171
+ compliant.
172
+ gitlab-housekeeping Manage issues and merge requests on GitLab
173
+ projects.
174
+ gitlab-labeler Guesses and adds labels to merge requests
175
+ according to changed paths.
176
+ gitlab-members Manage GitLab group members.
177
+ gitlab-mr-sqs-consumer Listen to SQS and creates MRs out of the
178
+ messages.
179
+ gitlab-owners Manages labels on gitlab merge requests
180
+ based on OWNERS files schema.
181
+ gitlab-permissions Manage permissions on GitLab projects.
182
+ gitlab-projects Create GitLab projects.
183
+ glitchtip Configure and enforce glitchtip instance
184
+ configuration.
185
+ glitchtip-project-alerts Configure Glitchtip project alerts.
186
+ glitchtip-project-dsn Glitchtip project dsn as openshift secret.
187
+ integrations-manager Manages Qontract Reconcile integrations.
188
+ jenkins-job-builder Manage Jenkins jobs configurations using
189
+ jenkins-jobs.
190
+ jenkins-job-builds-cleaner Clean up jenkins job history.
191
+ jenkins-job-cleaner Delete Jenkins jobs in multiple tenant
192
+ instances.
193
+ jenkins-roles Manage Jenkins roles association via REST
194
+ API.
195
+ jenkins-webhooks Manage web hooks to Jenkins jobs.
196
+ jenkins-webhooks-cleaner Remove webhooks to previous Jenkins
197
+ instances.
198
+ jenkins-worker-fleets Manage Jenkins worker fleets via JCasC.
199
+ jira-permissions-validator Validate permissions in Jira.
200
+ jira-watcher Watch for changes in Jira boards and notify
201
+ on Slack.
202
+ ldap-groups Manages LDAP groups based on App-Interface
203
+ roles.
204
+ ldap-users Removes users which are not found in LDAP
205
+ search.
206
+ ocm-additional-routers Manage additional routers in OCM.
207
+ ocm-addons Manages cluster Addons in OCM.
208
+ ocm-addons-upgrade-scheduler-org
209
+ Manage Addons Upgrade Policy schedules in
210
+ OCM organizations.
211
+ ocm-addons-upgrade-tests-trigger
212
+ Trigger jenkins jobs following Addon
213
+ upgrades.
214
+ ocm-aws-infrastructure-access Grants AWS infrastructure access to members
215
+ in AWS groups via OCM.
216
+ ocm-clusters Manages clusters via OCM.
217
+ ocm-external-configuration-labels
218
+ Manage External Configuration labels in OCM.
219
+ ocm-github-idp Manage GitHub Identity Providers in OCM.
220
+ ocm-groups Manage membership in OpenShift groups via
221
+ OCM.
222
+ ocm-internal-notifications Notifications to internal Red Hat users
223
+ based on conditions in OCM.
224
+ ocm-labels Manage cluster OCM labels.
225
+ ocm-machine-pools Manage Machine Pools in OCM.
226
+ ocm-oidc-idp Manage OIDC cluster configuration in OCM
227
+ organizations based on OCM labels. Part of
228
+ RHIDP.
229
+ ocm-standalone-user-management Manages OCM cluster usergroups and
230
+ notifications via OCM labels.
231
+ ocm-update-recommended-version Update recommended version for OCM orgs
232
+ ocm-upgrade-scheduler-org Manage Upgrade Policy schedules in OCM
233
+ organizations.
234
+ ocm-upgrade-scheduler-org-updater
235
+ Update Upgrade Policy schedules in OCM
236
+ organizations.
237
+ openshift-cluster-bots Manages dedicated-admin and cluster-admin
238
+ creds.
239
+ openshift-clusterrolebindings Configures ClusterRolebindings in OpenShift
240
+ clusters.
241
+ openshift-groups Manages OpenShift Groups.
242
+ openshift-limitranges Manages OpenShift LimitRange objects.
243
+ openshift-namespace-labels Manages labels on OpenShift namespaces.
244
+ openshift-namespaces Manages OpenShift Namespaces.
245
+ openshift-network-policies Manages OpenShift NetworkPolicies.
246
+ openshift-prometheus-rules Manages OpenShift Prometheus Rules.
247
+ openshift-resourcequotas Manages OpenShift ResourceQuota objects.
248
+ openshift-resources Manages OpenShift Resources.
249
+ openshift-rolebindings Configures Rolebindings in OpenShift
250
+ clusters.
251
+ openshift-routes Manages OpenShift Routes.
252
+ openshift-saas-deploy Manage OpenShift resources defined in Saas
253
+ files.
254
+ openshift-saas-deploy-change-tester
255
+ Runs openshift-saas-deploy for each saas-
256
+ file that changed within a bundle.
257
+ openshift-saas-deploy-trigger-cleaner
258
+ Clean up deployment related resources.
259
+ openshift-saas-deploy-trigger-configs
260
+ Trigger deployments when configuration
261
+ changes.
262
+ openshift-saas-deploy-trigger-images
263
+ Trigger deployments when images are pushed.
264
+ openshift-saas-deploy-trigger-moving-commits
265
+ Trigger deployments when a commit changed
266
+ for a ref.
267
+ openshift-saas-deploy-trigger-upstream-jobs
268
+ Trigger deployments when upstream job runs.
269
+ openshift-serviceaccount-tokens
270
+ Use OpenShift ServiceAccount tokens across
271
+ namespaces/clusters.
272
+ openshift-tekton-resources Manages custom resources for Tekton based
273
+ deployments.
274
+ openshift-upgrade-watcher Watches for OpenShift upgrades and sends
275
+ notifications.
276
+ openshift-users Deletion of users from OpenShift clusters.
277
+ openshift-vault-secrets Manages OpenShift Secrets from Vault.
278
+ prometheus-rules-tester Tests prometheus rules using promtool.
279
+ quay-membership Configures the teams and members in Quay.
280
+ quay-mirror Mirrors external images into Quay.
281
+ quay-mirror-org Mirrors entire Quay orgs.
282
+ quay-permissions Manage permissions for Quay Repositories.
283
+ quay-repos Creates and Manages Quay Repos.
284
+ query-validator Validate queries to maintain consumer schema
285
+ compatibility.
286
+ requests-sender Send emails to users based on requests
287
+ submitted to app-interface.
288
+ resource-scraper Get resources from clusters and store in
289
+ Vault.
290
+ resource-template-tester Tests templating of resources.
291
+ rhidp-sso-client Manage Keycloak SSO clients for OCM
292
+ clusters. Part of RHIDP.
293
+ saas-auto-promotions-manager Manage auto-promotions defined in SaaS files
294
+ saas-file-validator Validates Saas files.
295
+ sendgrid-teammates Manages SendGrid teammates for a given
296
+ account.
297
+ service-dependencies Validate dependencies are defined for each
298
+ service.
299
+ signalfx-prometheus-endpoint-monitoring
300
+ Manages Prometheus Probe resources for
301
+ signalfx exporter
302
+ skupper-network Manages Skupper Networks.
303
+ slack-usergroups Manage Slack User Groups (channels and
304
+ users).
305
+ sql-query Runs SQL Queries against app-interface RDS
306
+ resources.
307
+ status-board-exporter Export Product and Application informnation
308
+ to Status Board.
309
+ status-page-components Manages components on statuspage.io hosted
310
+ status pages.
311
+ status-page-maintenances Manages maintenances on statuspage.io hosted
312
+ status pages.
313
+ template-renderer Render datafile templates in app-interface.
314
+ template-validator Test app-interface templates.
315
+ terraform-aws-route53 Manage AWS Route53 resources using
316
+ Terraform.
317
+ terraform-cloudflare-dns Manage Cloudflare DNS using Terraform.
318
+ terraform-cloudflare-resources Manage Cloudflare Resources using Terraform.
319
+ terraform-cloudflare-users Manage Cloudflare Users using Terraform.
320
+ terraform-init Initialize AWS accounts for Terraform usage.
321
+ terraform-repo Manages raw HCL Terraform from a separate
322
+ repository.
323
+ terraform-resources Manage AWS Resources using Terraform.
324
+ terraform-tgw-attachments Manages Transit Gateway attachments.
325
+ terraform-users Manage AWS users using Terraform.
326
+ terraform-vpc-peerings Manage VPC peerings between OSD clusters and
327
+ AWS accounts or other OSD clusters.
328
+ terraform-vpc-resources Manage VPC creation
329
+ unleash-feature-toggles Manage Unleash feature toggles.
330
+ vault-replication Allow vault to replicate secrets to other
331
+ instances.
332
+ version-gate-approver Approves OCM cluster upgrade version gates.
333
+ vpc-peerings-validator Validates that VPC peerings do not exist
334
+ between public and internal clusters.
335
+ ```
336
+
337
+ ## Tools
338
+
339
+ Additionally, the following tools are available:
340
+
341
+ - `app-interface-metrics-exporter`: Exports metrics from App-Interface.
342
+ - `app-interface-reporter`: Creates service reports and submits PR to App-Interface.
343
+ - `glitchtip-access-reporter`: Creates a report of users with access to Glitchtip.
344
+ - `glitchtip-access-revalidation`: Requests a revalidation of Glitchtip access.
345
+ - `qontract-cli`: A cli tool for qontract (currently very good at getting information).
346
+ - `run-integration`: A script to run qontract-reconcile in a container.
347
+ - `saas-metrics-exporter`: This tool is responsible for exposing/exporting SaaS metrics and data.
348
+ - `template-validation`: Run template validation.
349
+
350
+ ## Installation
351
+
352
+ Install the package from PyPI:
353
+
354
+ ```sh
355
+ uv tool install --python 3.11 qontract-reconcile
356
+ ```
357
+
358
+ or via `pip`:
359
+
360
+ ```sh
361
+ pip install qontract-reconcile
362
+ ```
363
+
364
+ Install runtime requirements:
365
+
366
+ Versions can be found in [qontract-reconcile-base Dockerfile](https://github.com/app-sre/container-images/blob/master/qontract-reconcile-base/Dockerfile).
367
+
368
+ - amtool
369
+ - git-secrets
370
+ - helm
371
+ - kubectl
372
+ - oc
373
+ - promtool
374
+ - skopeo
375
+ - terraform
376
+
377
+ ## Development
378
+
379
+ This project targets Python version 3.11.x for best compatibility and leverages [uv](https://docs.astral.sh/uv/) for the dependency managment.
380
+
381
+ Create a local development environment with all required dependencies:
382
+
383
+ ```sh
384
+ uv sync --python 3.11
385
+ ```
386
+
387
+ ### Image build
388
+
389
+ In order to speed up frequent builds and avoid issues with dependencies, docker image
390
+ makes use [`qontract-reconcile-build`](https://quay.io/repository/app-sre/qontract-reconcile-base?tag=latest&tab=tags)
391
+ image. See [`app-sre/coontainer-images`](https://github.com/app-sre/container-images)
392
+ repository if you want to make changes to the base image.
393
+
394
+ This repo [`Dockerfile`](dockerfiles/Dockerfile) must only contain instructions related to the Python code build.
395
+
396
+ The [README](dockerfiles/README.md) contains more information about the Dockerfile and the build stages.
397
+
398
+ ### Testing
399
+
400
+ This project uses [pytset](https://docs.pytest.org/en/stable/) as the test runner and
401
+ these tools for static analysis and type checking:
402
+
403
+ - [ruff](https://docs.astral.sh/ruff/): A fast Python linter and code formatter.
404
+ - [mypy](https://mypy.readthedocs.io/en/stable/): A static type checker for Python.
405
+
406
+ The [Makefile](Makefile) contains several targets to help with testing, linting,
407
+ formatting, and type checking:
408
+
409
+ - `make all-test`: Run all available tests.
410
+ - `make linter-test`: Run the linter and formatter tests.
411
+ - `make types-test`: Run the type checker tests.
412
+ - `make qenerate-test`: Run the query classes generation tests.
413
+ - `make helm-test`: Run the helm chart tests.
414
+ - `make unittest`: Run all Python unit tests.
415
+
416
+ ## Run reconcile loop for an integration locally in a container
417
+
418
+ This is currently only tested with the docker container engine.
419
+
420
+ For more flexible way to run in container, please see [qontract-development-cli](https://github.com/app-sre/qontract-development-cli).
421
+
422
+ ### Prepare config.toml
423
+
424
+ Make sure the file `./config.dev.toml` exists and contains your current configuration.
425
+ Your `config.dev.toml` should point to the following qontract-server address:
426
+
427
+ ```
428
+
429
+ [graphql]
430
+ server = "<http://host.docker.internal:4000/graphql>"
431
+
432
+ ```
433
+
434
+ ### Run qontract-server
435
+
436
+ Start the [qontract-server](https://github.com/app-sre/qontract-server) in a different window, e.g., via:
437
+
438
+ ```
439
+
440
+ qontract-server$ make dev
441
+
442
+ ```
443
+
444
+ ### Trigger integration
445
+
446
+ ```
447
+
448
+ make dev-reconcile-loop INTEGRATION_NAME=terraform-resources DRY_RUN=--dry-run INTEGRATION_EXTRA_ARGS=--light SLEEP_DURATION_SECS=100
449
+
450
+ ```
451
+
452
+ ## Query Classes
453
+
454
+ We use [qenerate](https://github.com/app-sre/qenerate) to generate data classes for GQL queries.
455
+ GQL definitions and generated classes can be found [here](reconcile/gql_definitions/).
456
+
457
+ ### Workflow
458
+
459
+ 1. Define your query or fragment in a `.gql` file somewhere in `reconcile/gql_definitions`.
460
+ 2. Every gql file must hold exactly one `query` OR `fragment` definition. You must not have multiple definitions within one file.
461
+ 3. Do not forget to add `# qenerate: plugin=pydantic_v1` in the beginning of the file. This tells `qenerate` which plugin is used to render the code.
462
+ 4. Have an up-to-date schema available at localhost:4000
463
+ 5. `make gql-introspection` gets the type definitions. They will be stored in `reconcile/gql_definitions/introspection.json`
464
+ 6. `make gql-query-classes` generates the data classes for your queries and fragments
465
+
466
+ ## Troubleshooting
467
+
468
+ `faulthandler` is enabled for this project and SIGUSR1 is registered to dump the traceback. To do so, you can use `kill -USR1 pid` where pid is the ID of the qontract-reconcile process.
469
+
470
+ ## Code style guide
471
+
472
+ Qontract-reconcile uses [PEP8](https://peps.python.org/pep-0008/) as the code style guide.
473
+ The style is enforced via [PR checks](#ci-tooling) with the help of the following utilities:
474
+
475
+ - [Ruff - An extremely fast Python linter and code formatter, written in Rust.](https://docs.astral.sh/ruff/)
476
+ - [Mypy](https://mypy.readthedocs.io/en/stable/)
477
+
478
+ Run `make format` before you commit your changes to keep the code compliant.
479
+
480
+ ## Release
481
+
482
+ Release version are calculated from git tags of the form X.Y.Z.
483
+
484
+ - If the current commit has such a tag, it will be used as is
485
+ - Otherwise the latest tag of that format is used and:
486
+ - the patch label (Z) is incremented
487
+ - the string `.pre<count>+<commitid>` is appended. `<count>` is the number of commits since the X.Y.Z tag. `<commitid> is... the current commitid.
488
+
489
+ After the PR is merged, a CI job will be triggered that will publish the package to pypi: <https://pypi.org/project/qontract-reconcile>.
490
+
491
+ ## Licence
492
+
493
+ [Apache License Version 2.0](LICENSE).
494
+
495
+ ## Authors
496
+
497
+ These tools have been written by the [Red Hat App-SRE Team](mailto:sd-app-sre@redhat.com).
498
+
499
+ [pypi-link]: https://pypi.org/project/qontract-reconcile/
500
+ [pypi-platforms]: https://img.shields.io/pypi/pyversions/qontract-reconcile