qontract-reconcile 0.10.1rc560__py3-none-any.whl → 0.10.1rc564__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc560
3
+ Version: 0.10.1rc564
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
@@ -71,7 +71,7 @@ reconcile/openshift_network_policies.py,sha256=_qqv7yj17OM1J8KJPsFmzFZ85gzESJeBo
71
71
  reconcile/openshift_resourcequotas.py,sha256=yUi56PiOn3inMMfq_x_FEHmaW-reGipzoorjdar372g,2415
72
72
  reconcile/openshift_resources.py,sha256=kwsY5cko7udEKNlhL2oKiKv_5wzEw9wmmwROE016ng8,1400
73
73
  reconcile/openshift_resources_base.py,sha256=6dHsqa6UA8SkjiXNRn4JlsBH7hYp6q-OLhhPa2M3bCs,46694
74
- reconcile/openshift_rolebindings.py,sha256=PjKH_EdkdpFwqTA3ajptdUVrNvT9bBARSJBCcRW07fM,6553
74
+ reconcile/openshift_rolebindings.py,sha256=LlImloBisEqzc36jaatic-TeM3hzqMEfxogF-dM4Yhw,6599
75
75
  reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
76
76
  reconcile/openshift_saas_deploy.py,sha256=fmhopPEbyZsGQHRPzyzpKEvoBXEGN3aPxFi7Utq0emU,12788
77
77
  reconcile/openshift_saas_deploy_change_tester.py,sha256=fMmPDz-ZRO-WH8OIiDo4e4sBK4-zzpvFXmVCKGY1l-I,8837
@@ -571,7 +571,7 @@ reconcile/utils/lean_terraform_client.py,sha256=zReyNPJbr2uOdrdh8Qfe-OZQBoRwxb5Z
571
571
  reconcile/utils/make.py,sha256=QaEwucrzbl8-VHS66Wfdjfo0ubmAcvt_hZGpiGsKU50,231
572
572
  reconcile/utils/metrics.py,sha256=7nXdctmZ0UtGMHPpS3V55sfH4xpMPqdYaJ3JKAUc_sM,18474
573
573
  reconcile/utils/models.py,sha256=R3wF68yiaT0H2sQVMmHhHSTGI3JKKYEVjoizhHkySn8,4533
574
- reconcile/utils/oc.py,sha256=iAoM7zSm72zBOmCNW19ttAvm76tUgS26vlpb8SvVYwU,64058
574
+ reconcile/utils/oc.py,sha256=zzMes9Xr1J6p-n6FPIB4F6PP_XrabmNPxUDP9ruyYzA,64088
575
575
  reconcile/utils/oc_connection_parameters.py,sha256=85slrnDigYwYmzhyceVkMElWzFArp4ge1d-fHXVqh0w,9729
576
576
  reconcile/utils/oc_filters.py,sha256=R2Lf3fo0jQCeE62Ygeo_KN24XbAosq0QbjimYG6qHI4,1402
577
577
  reconcile/utils/oc_map.py,sha256=nT69J5pdPeIDnIYjD9fwY6GkE3BMQCf-AF0rmHJuUNw,9068
@@ -597,7 +597,7 @@ reconcile/utils/state.py,sha256=SAa6QLHu9lr0yqLCBy2AypNx1IPCJWlrRBrvlzAKsOU,1450
597
597
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
598
598
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
599
599
  reconcile/utils/terraform_client.py,sha256=_jBriLBwU005bDxWlq7CRByOkVCfiH47oBzB0ArNAY8,31901
600
- reconcile/utils/terrascript_aws_client.py,sha256=rE2eSQS2vBfkhR891vsPT-jL4MQJMFSAo1zhxKhrrLU,268043
600
+ reconcile/utils/terrascript_aws_client.py,sha256=fmL5Eyx4ZO1wvAb4wP93qWT_lolmabbI8_YfyXMtjn4,269064
601
601
  reconcile/utils/three_way_diff_strategy.py,sha256=nyqeQsLCoPI6e16k2CF3b9KNgQLU-rPf5RtfdUfVMwE,4468
602
602
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
603
603
  reconcile/utils/unleash.py,sha256=1D56CsZfE3ShDtN3IErE1T2eeIwNmxhK-yYbCotJ99E,3601
@@ -684,8 +684,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
684
684
  tools/test/test_qontract_cli.py,sha256=se-YG_YVCWRFrnCPvBVHDBT_59CkbIoEni-4SJa8_MU,2755
685
685
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
686
686
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
687
- qontract_reconcile-0.10.1rc560.dist-info/METADATA,sha256=ehv0dWxZP3LGPKg6XVOI_-eH7A_-cZxdJfuZz3bFTwg,2349
688
- qontract_reconcile-0.10.1rc560.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
689
- qontract_reconcile-0.10.1rc560.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
690
- qontract_reconcile-0.10.1rc560.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
691
- qontract_reconcile-0.10.1rc560.dist-info/RECORD,,
687
+ qontract_reconcile-0.10.1rc564.dist-info/METADATA,sha256=H7XSFTmd9QRaOfHpx7eCVKpUS6DcGuiMMKsL10guJ2Y,2349
688
+ qontract_reconcile-0.10.1rc564.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
689
+ qontract_reconcile-0.10.1rc564.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
690
+ qontract_reconcile-0.10.1rc564.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
691
+ qontract_reconcile-0.10.1rc564.dist-info/RECORD,,
@@ -54,7 +54,7 @@ def construct_user_oc_resource(role, user):
54
54
  "apiVersion": "rbac.authorization.k8s.io/v1",
55
55
  "kind": "RoleBinding",
56
56
  "metadata": {"name": name},
57
- "roleRef": {"name": role},
57
+ "roleRef": {"kind": "ClusterRole", "name": role},
58
58
  "subjects": [{"kind": "User", "name": user}],
59
59
  }
60
60
  return (
@@ -71,7 +71,7 @@ def construct_sa_oc_resource(role, namespace, sa_name):
71
71
  "apiVersion": "rbac.authorization.k8s.io/v1",
72
72
  "kind": "RoleBinding",
73
73
  "metadata": {"name": name},
74
- "roleRef": {"name": role},
74
+ "roleRef": {"kind": "ClusterRole", "name": role},
75
75
  "subjects": [
76
76
  {"kind": "ServiceAccount", "name": sa_name, "namespace": namespace}
77
77
  ],
reconcile/utils/oc.py CHANGED
@@ -23,7 +23,7 @@ from typing import (
23
23
  )
24
24
 
25
25
  import urllib3
26
- from kubernetes.client import (
26
+ from kubernetes.client import ( # type: ignore[attr-defined]
27
27
  ApiClient,
28
28
  Configuration,
29
29
  )
@@ -289,6 +289,10 @@ class aws_s3_bucket_acl(Resource):
289
289
  pass
290
290
 
291
291
 
292
+ class aws_s3_bucket_logging(Resource):
293
+ pass
294
+
295
+
292
296
  class aws_cloudfront_log_delivery_canonical_user_id(Data):
293
297
  pass
294
298
 
@@ -1926,6 +1930,27 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1926
1930
  if cors_rules:
1927
1931
  # common_values['cors_rules'] is a list of cors_rules
1928
1932
  values["cors_rule"] = cors_rules
1933
+ # S3 Bucket Logging
1934
+ s3_bucket_logging = common_values.get("s3_bucket_logging")
1935
+ if s3_bucket_logging:
1936
+ target_bucket_name = s3_bucket_logging.get("target_bucket_name")
1937
+ logging_identifier = f"{identifier}-logging"
1938
+
1939
+ # Logging config will be set out of this resource
1940
+ # the following `ignore_change` allows to avoid conflicts
1941
+ values.setdefault("lifecycle", {}).setdefault("ignore_changes", []).append(
1942
+ "logging"
1943
+ )
1944
+
1945
+ logging_values = {
1946
+ "bucket": "${aws_s3_bucket." + identifier + ".id}",
1947
+ "target_bucket": "${aws_s3_bucket." + target_bucket_name + ".id}",
1948
+ "target_prefix": s3_bucket_logging.get("target_prefix", ""),
1949
+ }
1950
+ logging_tf_resource = aws_s3_bucket_logging(
1951
+ logging_identifier, **logging_values
1952
+ )
1953
+ tf_resources.append(logging_tf_resource)
1929
1954
  deps = []
1930
1955
  replication_configs = common_values.get("replication_configurations")
1931
1956
  if replication_configs: