qontract-reconcile 0.10.2.dev414__py3-none-any.whl → 0.10.2.dev427__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.
Potentially problematic release.
This version of qontract-reconcile might be problematic. Click here for more details.
- {qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.dist-info}/METADATA +2 -2
- {qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.dist-info}/RECORD +31 -30
- reconcile/aus/advanced_upgrade_service.py +3 -0
- reconcile/aus/base.py +112 -9
- reconcile/aus/models.py +2 -0
- reconcile/aus/ocm_addons_upgrade_scheduler_org.py +1 -0
- reconcile/aus/ocm_upgrade_scheduler.py +8 -1
- reconcile/aus/ocm_upgrade_scheduler_org.py +20 -5
- reconcile/aus/version_gates/sts_version_gate_handler.py +54 -1
- reconcile/automated_actions/config/integration.py +1 -1
- reconcile/cli.py +62 -4
- reconcile/external_resources/manager.py +7 -18
- reconcile/external_resources/model.py +8 -8
- reconcile/external_resources/state.py +1 -34
- reconcile/gql_definitions/rhcs/certs.py +19 -74
- reconcile/gql_definitions/rhcs/openshift_resource_rhcs_cert.py +42 -0
- reconcile/ocm_machine_pools.py +12 -6
- reconcile/openshift_base.py +60 -2
- reconcile/openshift_rhcs_certs.py +22 -24
- reconcile/rhidp/sso_client/base.py +15 -4
- reconcile/utils/binary.py +7 -12
- reconcile/utils/glitchtip/client.py +2 -2
- reconcile/utils/jobcontroller/controller.py +1 -1
- reconcile/utils/json.py +5 -1
- reconcile/utils/oc.py +136 -111
- reconcile/utils/rosa/session.py +16 -0
- reconcile/utils/saasherder/saasherder.py +20 -7
- reconcile/utils/vault.py +1 -1
- tools/cli_commands/erv2.py +1 -3
- {qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.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.dev427
|
|
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
|
|
@@ -31,7 +31,7 @@ Requires-Dist: jsonpatch~=1.33
|
|
|
31
31
|
Requires-Dist: jsonpath-ng==1.7.0
|
|
32
32
|
Requires-Dist: jsonpath-rw<1.5.0,>=1.4.0
|
|
33
33
|
Requires-Dist: jsonpointer~=2.4
|
|
34
|
-
Requires-Dist: kubernetes
|
|
34
|
+
Requires-Dist: kubernetes==32.0.1
|
|
35
35
|
Requires-Dist: ldap3<2.10.0,>=2.9.1
|
|
36
36
|
Requires-Dist: markupsafe==2.1.1
|
|
37
37
|
Requires-Dist: networkx~=2.8
|
{qontract_reconcile-0.10.2.dev414.dist-info → qontract_reconcile-0.10.2.dev427.dist-info}/RECORD
RENAMED
|
@@ -8,7 +8,7 @@ reconcile/aws_iam_password_reset.py,sha256=5oajSspJVAvpGd445hKsxtEGYb75dM4l1_PJT
|
|
|
8
8
|
reconcile/aws_support_cases_sos.py,sha256=G9g0oM6ohvuJ5N592ePjiPeaDug4_vapAy58RyG-S3Y,3478
|
|
9
9
|
reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=O1wFp52EyF538c6txaWBs8eMtUIy19gyHZ6VzJ6QXS8,3512
|
|
10
10
|
reconcile/checkpoint.py,sha256=Q5Ru36ZEwWw95ZkUXBf4VfvCmqDS9TcAF7QVroOf9Vk,5375
|
|
11
|
-
reconcile/cli.py,sha256=
|
|
11
|
+
reconcile/cli.py,sha256=_-0hLUqvfcvtKkLX_S77i-srmnN246p5m2K8sV_sS8I,115258
|
|
12
12
|
reconcile/closedbox_endpoint_monitoring_base.py,sha256=_OKz7K7HHw0-gzxeEma8PcUCtd70pRBy7JMoaAm8IVU,4940
|
|
13
13
|
reconcile/cluster_deployment_mapper.py,sha256=aKroYLY6-nNxWi2jxDu7VRMuNZ3YgSI0J6ek7Fet2AQ,2241
|
|
14
14
|
reconcile/dashdotdb_base.py,sha256=83ZWIf5JJk3P_D69y2TmXRcQr6ELJGlv10OM0h7fJVs,4767
|
|
@@ -51,10 +51,10 @@ reconcile/ocm_aws_infrastructure_access.py,sha256=St3nkPhQIAZiI6LQhi-aWYAGBbyuF8
|
|
|
51
51
|
reconcile/ocm_clusters.py,sha256=VPQEXNXggbZ2TlCty0nPLpFDmW3GjCbXIUCObIAnU4Y,17154
|
|
52
52
|
reconcile/ocm_external_configuration_labels.py,sha256=dRWpFFPe_8tU91k8tCdiZRod_TAYmVCHafr_kIpXu6o,4427
|
|
53
53
|
reconcile/ocm_groups.py,sha256=gDnkhkYUEoMkI6y6ctyoKIFpJNS18SVnedW4OzJ8VWs,4174
|
|
54
|
-
reconcile/ocm_machine_pools.py,sha256=
|
|
54
|
+
reconcile/ocm_machine_pools.py,sha256=l_ZJNkM-Pl4vl2LRI-aFjBjJm_TFSNKZchIjeZQB-0M,17738
|
|
55
55
|
reconcile/ocm_update_recommended_version.py,sha256=Vi3Y2sX-OQxx1mv_xiPQXnmrpsZzGIE38No0yBcTaD4,4204
|
|
56
56
|
reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=j4qthqx8qREB6mSbV9NT-Giq1Tu5y2EhPgIObkvmjyU,4371
|
|
57
|
-
reconcile/openshift_base.py,sha256=
|
|
57
|
+
reconcile/openshift_base.py,sha256=5EyuG7bi7KTbJoYnDewiQVLUjm_ERVhJbqutbaLvFj0,57907
|
|
58
58
|
reconcile/openshift_cluster_bots.py,sha256=QBflmFjXaIY7bxNlI2qSI5sER3Jks-_FAhrPHschI4g,10939
|
|
59
59
|
reconcile/openshift_clusterrolebindings.py,sha256=jwSaYQvUUY7noQGc148Dkqm6woYxvOEd1sume7k_sUk,6212
|
|
60
60
|
reconcile/openshift_groups.py,sha256=XpIyhgnWY1XUQio1wi6sHoDtoMYdk-lpHp0-1d1RC7o,9471
|
|
@@ -66,7 +66,7 @@ reconcile/openshift_prometheus_rules.py,sha256=FVVx1D7KCUnNZh7NwVNbD6t4lXKRSO7ph
|
|
|
66
66
|
reconcile/openshift_resourcequotas.py,sha256=0CSuCre3T2ON42Ku1UDhTRugfmUNBx8PILpxIQaAzJU,2882
|
|
67
67
|
reconcile/openshift_resources.py,sha256=YnhDxCvsp0muxEmULiqWhoar9EzxohTrnbY-U7oS5Hc,1603
|
|
68
68
|
reconcile/openshift_resources_base.py,sha256=tuOEH1UKoWksmPAfZJOhmLY6IghkvBcZyqa48kDLeR4,43172
|
|
69
|
-
reconcile/openshift_rhcs_certs.py,sha256=
|
|
69
|
+
reconcile/openshift_rhcs_certs.py,sha256=R6ySElFRsdk0aqXSMtMeVSC9ptyp_F3TTAR1PPTz8bw,10320
|
|
70
70
|
reconcile/openshift_rolebindings.py,sha256=G4n7wWTGZ34OsRgen0L3EpdPXuFEdZ_1E-b3ROvSb4I,10824
|
|
71
71
|
reconcile/openshift_routes.py,sha256=xnA34f32xDdkfV2MXIC1QURFJioQUsXT8AZBiY7iSP0,1298
|
|
72
72
|
reconcile/openshift_saas_deploy.py,sha256=YQRIjnb-V6x1a0fUv2w3hqjMj5tyqRirzkG8DzknYdc,13159
|
|
@@ -115,27 +115,27 @@ reconcile/terraform_vpc_peerings.py,sha256=KNdlt4DvmobSd-9YP8TFUdkyTPPoUHcUaB5JR
|
|
|
115
115
|
reconcile/vault_replication.py,sha256=vNPVO9J0EjH4nV7lvhLxet7V1L0m5KtejfoOYjGB1tw,19762
|
|
116
116
|
reconcile/vpc_peerings_validator.py,sha256=_77eu6DSy6VjTE5mhV-sOIVOGIiBvDEEDCdwwRdrgVQ,7101
|
|
117
117
|
reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
118
|
-
reconcile/aus/advanced_upgrade_service.py,sha256=
|
|
118
|
+
reconcile/aus/advanced_upgrade_service.py,sha256=byOl5wtDRG_VJiN50IM3dwA9vQz39ibSEh9uY5HI9jE,24201
|
|
119
119
|
reconcile/aus/aus_label_source.py,sha256=o0S2f0qwcII_8nzhHZhRQ83gEZ1DrSXyO4xzSwLebuU,4382
|
|
120
|
-
reconcile/aus/base.py,sha256=
|
|
120
|
+
reconcile/aus/base.py,sha256=z2C1-knQIsqD3HZPrZrDkjRknzS18QTmORy-XluDH9Q,54173
|
|
121
121
|
reconcile/aus/cluster_version_data.py,sha256=rrMYtS-gSWwV4vibf3HKP06Hh3FHO4cBzhZzEInMRlo,7506
|
|
122
122
|
reconcile/aus/healthchecks.py,sha256=jR9c-syh9impnkV0fd6XW3Bnk7iRN5zv8oCRYM-yIRY,2700
|
|
123
123
|
reconcile/aus/metrics.py,sha256=BhIvZVTn25fIzijz3xFynJngS2sXDBTxxprUUVWJcFo,4246
|
|
124
|
-
reconcile/aus/models.py,sha256=
|
|
124
|
+
reconcile/aus/models.py,sha256=S-sDmvKhpR5QzWloPfhl8DfbVElb0TNMGtgOZDptZBU,8738
|
|
125
125
|
reconcile/aus/node_pool_spec.py,sha256=FkMggklG-4BgQwud2Swp2m3AAAKzZmeaXgohl9uwxZ8,1138
|
|
126
|
-
reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=
|
|
127
|
-
reconcile/aus/ocm_upgrade_scheduler.py,sha256=
|
|
128
|
-
reconcile/aus/ocm_upgrade_scheduler_org.py,sha256=
|
|
126
|
+
reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=3Ezt-FGDKlK_bqaAVntMTr9i3ehT4v2PUepTlhob5b8,10419
|
|
127
|
+
reconcile/aus/ocm_upgrade_scheduler.py,sha256=8gN_B_Jw6-ridTsIiMdVoD_mJupVyEIKGlIZWSC0GbQ,3945
|
|
128
|
+
reconcile/aus/ocm_upgrade_scheduler_org.py,sha256=RU_WRpCy7tCSm2JhNtb3eQBilvU9po42nkpYwcv1QT4,4482
|
|
129
129
|
reconcile/aus/upgrades.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
130
130
|
reconcile/aus/version_gate_approver.py,sha256=Y-0GSV9sPEyZ42DJyRoAxn57L4J6jL_dQ__4fMlNrVI,7414
|
|
131
131
|
reconcile/aus/version_gates/__init__.py,sha256=AlfmPhMbuuRnJloODTKTgPhM-iFSW3XKsJhbiewBT1s,454
|
|
132
132
|
reconcile/aus/version_gates/handler.py,sha256=S_isQPYHbG4DERiUEvQBZ6ngiFX3uMmATA-Q_eNKmFk,839
|
|
133
133
|
reconcile/aus/version_gates/ingress_gate_handler.py,sha256=ZCtyggBzzcb0prtdbMpJsVkj5leYN-vS7srM9vbq9xo,1096
|
|
134
134
|
reconcile/aus/version_gates/ocp_gate_handler.py,sha256=RW1ppDaCZXVegV9AzzqYXxDUu_Z_7d43Z5h2Pk_piKc,716
|
|
135
|
-
reconcile/aus/version_gates/sts_version_gate_handler.py,sha256=
|
|
135
|
+
reconcile/aus/version_gates/sts_version_gate_handler.py,sha256=L0ifdUMXGbNZt36bnnRgDyEvoQq40bfDvRUrYLczj3c,5355
|
|
136
136
|
reconcile/automated_actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
137
|
reconcile/automated_actions/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
138
|
-
reconcile/automated_actions/config/integration.py,sha256=
|
|
138
|
+
reconcile/automated_actions/config/integration.py,sha256=uvaZbLp4FQz3DHfr9dA77FyHaRJHTvJDgdqGp7wdCNg,15303
|
|
139
139
|
reconcile/aws_account_manager/README.md,sha256=_XFM3GZNHUzv--e_navqJuaUWpjC6QrHfulreHynFf0,262
|
|
140
140
|
reconcile/aws_account_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
141
|
reconcile/aws_account_manager/integration.py,sha256=kVh8BgIOYDo482ExldGhuqmj1KN8qtlO15YVRvLxMDU,15397
|
|
@@ -188,13 +188,13 @@ reconcile/external_resources/aws.py,sha256=kh5p9KsYB7naewVPLPtcCjnIrUECmdR6lUgDr
|
|
|
188
188
|
reconcile/external_resources/factories.py,sha256=ftHFxEvzFp-oAOOLeR9viTLLVz0g6Hgs8ZNEsJKKOcs,5903
|
|
189
189
|
reconcile/external_resources/integration.py,sha256=Fcc7MjixGx6bE6K4fgXx6yFomVoJavsOLhhDgL7VJgg,7040
|
|
190
190
|
reconcile/external_resources/integration_secrets_sync.py,sha256=M2uOFi2JXWhiw3hQyE_4NVPQmPIYGHlghRti5eLWhkw,1738
|
|
191
|
-
reconcile/external_resources/manager.py,sha256=
|
|
191
|
+
reconcile/external_resources/manager.py,sha256=3CNpp-QHR3d-A4C4wMj4KvrAG0lWTwW5jcFA8AR-g4w,18363
|
|
192
192
|
reconcile/external_resources/meta.py,sha256=RM8qGE6UoJR58nLqABReIJrrdmx4Tqt_OcdlT-QygGs,620
|
|
193
193
|
reconcile/external_resources/metrics.py,sha256=ahvlgrc48B214NwBq-G6ncwQE3Qrtif61jtOrklfylQ,3903
|
|
194
|
-
reconcile/external_resources/model.py,sha256=
|
|
194
|
+
reconcile/external_resources/model.py,sha256=Kfwxm9TLa6j7Vs-rxXQTIQoNmJPHilSJbjLdlQmNZc4,15172
|
|
195
195
|
reconcile/external_resources/reconciler.py,sha256=hb32ERLhxkNR-RRYWaE0ngjKjHBM8uarBy8bDVPGGmE,9732
|
|
196
196
|
reconcile/external_resources/secrets_sync.py,sha256=Nn15MPDu_YaN2SKnPD_oHbUSW0Qza_GWFldBYMPJhhU,16191
|
|
197
|
-
reconcile/external_resources/state.py,sha256=
|
|
197
|
+
reconcile/external_resources/state.py,sha256=zWla2_j6BI1FBrSPqRRfuo55bXK0QWAxtEeafb8ffTg,13811
|
|
198
198
|
reconcile/fleet_labeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
199
199
|
reconcile/fleet_labeler/dependencies.py,sha256=kS0E_Cm_RrOgCtyPBVO2KoFlUsE-U7uml4I8zA0bUoY,3238
|
|
200
200
|
reconcile/fleet_labeler/integration.py,sha256=CqFhaiVKDEmvRrbQKWfH2UtbSETV3Wu8R-9wKO8lKMI,14620
|
|
@@ -385,7 +385,8 @@ reconcile/gql_definitions/openshift_serviceaccount_tokens/tokens.py,sha256=qv6tn
|
|
|
385
385
|
reconcile/gql_definitions/quay_membership/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
386
386
|
reconcile/gql_definitions/quay_membership/quay_membership.py,sha256=1Qj-UtDERTL9qSw047bMhz98DGDxLYV6vFHuQtLRZQM,3071
|
|
387
387
|
reconcile/gql_definitions/rhcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
388
|
-
reconcile/gql_definitions/rhcs/certs.py,sha256=
|
|
388
|
+
reconcile/gql_definitions/rhcs/certs.py,sha256=wBEMTnLKldPTu3g-mxUi1LyJXD4OnQSDnBO6uQVJg2c,4181
|
|
389
|
+
reconcile/gql_definitions/rhcs/openshift_resource_rhcs_cert.py,sha256=wlwJX2sihN7-EX6yyNo5VJtazx-p5kn32DLcI_d-gdU,1303
|
|
389
390
|
reconcile/gql_definitions/rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
390
391
|
reconcile/gql_definitions/rhidp/organizations.py,sha256=kbs2taA3frv74zDtSHzgf6cAL2w6RkI0Xf7C_TpCKqs,2546
|
|
391
392
|
reconcile/gql_definitions/service_dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -462,7 +463,7 @@ reconcile/rhidp/ocm_oidc_idp/base.py,sha256=gcrQEmHQ2GF2MtSxBcxTRsK-I19rsfIn9NZv
|
|
|
462
463
|
reconcile/rhidp/ocm_oidc_idp/integration.py,sha256=S6gfEMd_KbmqIT2W4lylVdO83EHvAoElw-65ih5loKA,1953
|
|
463
464
|
reconcile/rhidp/ocm_oidc_idp/metrics.py,sha256=mfk4grSmH8zfA6Oz5Q4L76Uh1Ip6HlqUl23ap2vWlRE,591
|
|
464
465
|
reconcile/rhidp/sso_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
465
|
-
reconcile/rhidp/sso_client/base.py,sha256=
|
|
466
|
+
reconcile/rhidp/sso_client/base.py,sha256=VBmIYVVFuwGEKI3v2MSSrqfg_04BFwIGIyz5TKCCiXA,8809
|
|
466
467
|
reconcile/rhidp/sso_client/integration.py,sha256=kA8g7c38ZBSdrRtyfEqy_WgSreD1PbwY7ZIN-3tZRPc,2221
|
|
467
468
|
reconcile/rhidp/sso_client/metrics.py,sha256=Tq7tSOsqL3XdcPUdozxqzSPIodUeOV87UCTqpuuqqhw,1013
|
|
468
469
|
reconcile/saas_auto_promotions_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -587,7 +588,7 @@ reconcile/utils/amtool.py,sha256=Ng5VVNCiPYEK67eDjIwfuuTLs5JsfltCwt6w5UfXbcY,228
|
|
|
587
588
|
reconcile/utils/aws_api.py,sha256=M2EQfDg2Aa8gKDh5aZDL8-Zd0vBXD7FQSySv-ivmYE4,62002
|
|
588
589
|
reconcile/utils/aws_helper.py,sha256=9u4m94bnc3chFIDDEXwYXRXj5b--D6CTRy6g234jhNY,2972
|
|
589
590
|
reconcile/utils/batches.py,sha256=TtEm64a8lWhFuNbUVpFEmXVdU2Q0sTBrP_I0Cjbgh7g,320
|
|
590
|
-
reconcile/utils/binary.py,sha256=
|
|
591
|
+
reconcile/utils/binary.py,sha256=kvpuM5CdirtHJ9GUoMjrWLCgrGvwAPmqgq65fceDZTk,2293
|
|
591
592
|
reconcile/utils/config.py,sha256=wuMVTFWkKRccruK1jrdZD_qC66Nt4N8ArYe9fKBK_bk,1220
|
|
592
593
|
reconcile/utils/constants.py,sha256=7p6ZD4HRXnUEWoDjHdr3-mMrJyq74Qkg7LzOWAV2AG4,168
|
|
593
594
|
reconcile/utils/datetime_util.py,sha256=OjLBRrliO9phT3o03UBvlmapyCSYDij2LrvgRdETOcg,1593
|
|
@@ -618,7 +619,7 @@ reconcile/utils/instrumented_wrappers.py,sha256=BwJBirum_ISxDy1Zf1_90PaQ9Q5JSp0T
|
|
|
618
619
|
reconcile/utils/jenkins_api.py,sha256=A7J2AnOxHHZfA-dqjUCtFgy4145peA7WwUvRIXjR5Qo,8623
|
|
619
620
|
reconcile/utils/jira_client.py,sha256=dEDGFxJYF_JmbqD72qLeTWyUhVQ-YTgBqTr6UMrdn1c,11777
|
|
620
621
|
reconcile/utils/jjb_client.py,sha256=_IbOG0soO98jaRbrPTH7y040onlOCSgKB9Q6zUFkF3Q,16326
|
|
621
|
-
reconcile/utils/json.py,sha256=
|
|
622
|
+
reconcile/utils/json.py,sha256=okNqZCz_R54TL4WCTrnsxpdI11VB7wKTSMu7OrKjaAo,2045
|
|
622
623
|
reconcile/utils/jsonpath.py,sha256=wdxOMqR-GMpQf5vRPWRMqAF7bCiXDBkkcFfY2U4j_tk,5536
|
|
623
624
|
reconcile/utils/jump_host.py,sha256=gi8vGUDgdTVwJvROvRVauFxtL0YAramhbWvG70L7AY8,5137
|
|
624
625
|
reconcile/utils/keycloak.py,sha256=YWSEUGrOVqFaJUk055dKUWpLDPdDRvhcmvR-lfbmxdE,3388
|
|
@@ -628,7 +629,7 @@ reconcile/utils/make.py,sha256=QaEwucrzbl8-VHS66Wfdjfo0ubmAcvt_hZGpiGsKU50,231
|
|
|
628
629
|
reconcile/utils/metrics.py,sha256=2aqd17TUMXdU8FbsZp4YG5EyBcI8ztehdUIAS1u70p0,18506
|
|
629
630
|
reconcile/utils/models.py,sha256=XqIwR-XMNhZ7m-jpfrQhuxC5TkFUMoCO5ShqUHuV3Bk,14560
|
|
630
631
|
reconcile/utils/oauth2_backend_application_session.py,sha256=6W16sMpnWEPFDUX7qi5Cui2yOnmLfpgUxWtB3Ii35D0,4177
|
|
631
|
-
reconcile/utils/oc.py,sha256=
|
|
632
|
+
reconcile/utils/oc.py,sha256=FYhTad_Nhc1Vn9dIBvxMCb-iYuOnlPlOv6AJaMsMgO0,69744
|
|
632
633
|
reconcile/utils/oc_connection_parameters.py,sha256=-H2crz0UOVKWlNrexf04ip8Vu57rE2QZLJuurvin1_c,9705
|
|
633
634
|
reconcile/utils/oc_filters.py,sha256=DXIA2--jlYadPGsKynnnXW_LIZra6N2wmD0MVngir5Y,1427
|
|
634
635
|
reconcile/utils/oc_map.py,sha256=ougQ-Wlsa8ymoE_lPQ7g2LlpsUOsHVeRCLYW_6fjeWU,8976
|
|
@@ -663,7 +664,7 @@ reconcile/utils/terraform_client.py,sha256=VexlnYM9h-2-g6Y8HiE48BFi8AX-mYLhIapl2
|
|
|
663
664
|
reconcile/utils/terrascript_aws_client.py,sha256=1PGO4WxJGin9yhBSYtlJw0GCBo3-AdTVvqZ9q8RWiY0,304412
|
|
664
665
|
reconcile/utils/three_way_diff_strategy.py,sha256=yDEbP3HWvDDVzo_8FEbcT0pA6lz72HviXZkh5wmzkkY,4837
|
|
665
666
|
reconcile/utils/throughput.py,sha256=KNDCVsCLSp89V4pO3sEUd7bJUuh6gNfsxsc_18rEv_Y,357
|
|
666
|
-
reconcile/utils/vault.py,sha256=
|
|
667
|
+
reconcile/utils/vault.py,sha256=e5zo-PmqG6ccp87-Ip6d3_RPZ1eZEtawS1WbRAVP73Y,15366
|
|
667
668
|
reconcile/utils/vcs.py,sha256=RDqe4bz01n_oU4VJRjSbbmWn-yqvFNCKCkC8JXgSfuU,10304
|
|
668
669
|
reconcile/utils/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
669
670
|
reconcile/utils/acs/base.py,sha256=G10mrztmTbdwcSuuXu4cp5gGH2Ogv9vZAAOBQUdl7e0,2625
|
|
@@ -689,7 +690,7 @@ reconcile/utils/clusterhealth/telemeter.py,sha256=PllSLsJXvGNatmTF4mxCNPVbDrpr_M
|
|
|
689
690
|
reconcile/utils/dynatrace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
690
691
|
reconcile/utils/dynatrace/client.py,sha256=imk1w_UYuAUWn6ykXK7wnnbLEu21sMh8rksb5qDas5M,2894
|
|
691
692
|
reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5__Dcl7yt0,258
|
|
692
|
-
reconcile/utils/glitchtip/client.py,sha256=
|
|
693
|
+
reconcile/utils/glitchtip/client.py,sha256=OMuKO4d9NCOn4o35acLQPCIgR9MrO0N_ednykvRfPQ4,9062
|
|
693
694
|
reconcile/utils/glitchtip/models.py,sha256=R7vVkcoXFxG5OpOLLAPa-j3mLj2JOxqW1_kiREDy4yc,6444
|
|
694
695
|
reconcile/utils/internal_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
695
696
|
reconcile/utils/internal_groups/client.py,sha256=-I5ZkvpJjRL50GwQls7YAFqkyVrqfFwM18AW7PMYbCU,4687
|
|
@@ -699,7 +700,7 @@ reconcile/utils/jinja2/extensions.py,sha256=7K-uo6G2eCWa98MHT8fRPYIKCLQB_5D2keqQ
|
|
|
699
700
|
reconcile/utils/jinja2/filters.py,sha256=JfO_14APySBPidsMvHXG-8dULNPddZCE15Umjk_aSBk,4830
|
|
700
701
|
reconcile/utils/jinja2/utils.py,sha256=iTwfFLWwuMIAIMuEnENrwcL7CRWw24fUmcWKLFw6jOE,9231
|
|
701
702
|
reconcile/utils/jobcontroller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
702
|
-
reconcile/utils/jobcontroller/controller.py,sha256=
|
|
703
|
+
reconcile/utils/jobcontroller/controller.py,sha256=3bNip_Eedu3HU8qd02kSBlNCivwSLSE1SlwcGysdrVs,15349
|
|
703
704
|
reconcile/utils/jobcontroller/models.py,sha256=okj1zGdharGTJYW-f1XyvmWfp4F2ESTkvhYvrmzSGGE,6936
|
|
704
705
|
reconcile/utils/membershipsources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
705
706
|
reconcile/utils/membershipsources/app_interface_resolver.py,sha256=cK4WkGRtqfdSq-RTswJ47nqQSZYiXshI3gFiKfILZe0,2014
|
|
@@ -743,7 +744,7 @@ reconcile/utils/ocm/syncsets.py,sha256=9IQm1l5BodOVZa2OFbQmow3afmh4nXe5pn-CCJ5Lx
|
|
|
743
744
|
reconcile/utils/ocm/upgrades.py,sha256=W8-sLgETI_418ftY9vBlXswyjx_KdhJTJO9cwBL3hfY,4162
|
|
744
745
|
reconcile/utils/rosa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
745
746
|
reconcile/utils/rosa/rosa_cli.py,sha256=zV8kKG5s3oFJwyW3E7xxNzqSE7JydrmBx169Jxm8sew,11331
|
|
746
|
-
reconcile/utils/rosa/session.py,sha256=
|
|
747
|
+
reconcile/utils/rosa/session.py,sha256=o7RCTazHRQbDOC_E89qYaQBiHIoj4mfcCjC6ndlA8rw,7418
|
|
747
748
|
reconcile/utils/runtime/__init__.py,sha256=sfk92MGfsBh9tKYHl_FH17NdEsrGBwgDFTb7KNKoIfY,107
|
|
748
749
|
reconcile/utils/runtime/desired_state_diff.py,sha256=Bw4zqel-klXCMZGqD1gyh8zkFq4h5qzv8rJn7K6WTXs,8132
|
|
749
750
|
reconcile/utils/runtime/environment.py,sha256=h-CFKLK1qRl_gfOVIUwjqVNOmukIPzUG7AiqpJGrjHA,2038
|
|
@@ -754,7 +755,7 @@ reconcile/utils/runtime/sharding.py,sha256=r0ieUtNed7NvknSw6qQrCkKpVXE1shuHGnfFc
|
|
|
754
755
|
reconcile/utils/saasherder/__init__.py,sha256=3U8plqMAPRE1kjwZ5YnIsYsggTf4_gS7flRUEuXVBAs,343
|
|
755
756
|
reconcile/utils/saasherder/interfaces.py,sha256=T-V6EQhzpKj0OAgnGAuAOWtKPa35UtMDuXcgnQs8Vd8,9413
|
|
756
757
|
reconcile/utils/saasherder/models.py,sha256=P7ZUvrJux72BDo72WrAg7niY9leah3im6GiXxUwQqTU,12824
|
|
757
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
|
758
|
+
reconcile/utils/saasherder/saasherder.py,sha256=L-wUiRbFaW0clndmFNhTBYHNqJAMxNU32ywyNNr6RV4,93750
|
|
758
759
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
|
759
760
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
|
760
761
|
reconcile/utils/terraform/config_client.py,sha256=gRL1rQ0AqvShei_rcGqC3HDYGskOFKE1nPrJyJE9yno,4676
|
|
@@ -778,7 +779,7 @@ tools/qontract_cli.py,sha256=DZU_DuN28IdqIZCykD06-Ze-zSrE9aKGU3a1ZEFIUIk,160262
|
|
|
778
779
|
tools/template_validation.py,sha256=imLeY5zYE_ITk0yl99pqkoqcG2psFG0jLYKTZ7NXLcY,3393
|
|
779
780
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
780
781
|
tools/cli_commands/container_images_report.py,sha256=8mAjCS6XR0yD7k0mfiVBlt6xbYU47q_ftdYNi5o5VKE,5566
|
|
781
|
-
tools/cli_commands/erv2.py,sha256=
|
|
782
|
+
tools/cli_commands/erv2.py,sha256=LTZ_9aZVEonTD65Rbd5BpkK1loh3WemmyX4xJBj6YwI,26081
|
|
782
783
|
tools/cli_commands/gpg_encrypt.py,sha256=EzCR3JvlCfO-a8VLG-mArD3edwM-aa0mUrDj1y0_NW0,5032
|
|
783
784
|
tools/cli_commands/systems_and_tools.py,sha256=cBSHPOzjWhbYVFr50zsre5vGcVnovFkrZVSGsssUgqU,16985
|
|
784
785
|
tools/cli_commands/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -800,7 +801,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
800
801
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=uQv2QJAmUXP1g2GPIH30WTlvL9soY6m9lefpZEVDM5w,3965
|
|
801
802
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
|
802
803
|
tools/sre_checkpoints/util.py,sha256=KcYVfa3UmJHVP_ocgrKe8NkrO5IDB9aWEDydSokPcRk,975
|
|
803
|
-
qontract_reconcile-0.10.2.
|
|
804
|
-
qontract_reconcile-0.10.2.
|
|
805
|
-
qontract_reconcile-0.10.2.
|
|
806
|
-
qontract_reconcile-0.10.2.
|
|
804
|
+
qontract_reconcile-0.10.2.dev427.dist-info/METADATA,sha256=NjqCRn18fEFCp48fYwMUJhH8KUPXRfczLzNLjF7BS0o,24948
|
|
805
|
+
qontract_reconcile-0.10.2.dev427.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
806
|
+
qontract_reconcile-0.10.2.dev427.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
|
807
|
+
qontract_reconcile-0.10.2.dev427.dist-info/RECORD,,
|
|
@@ -75,8 +75,10 @@ from reconcile.utils.ocm_base_client import (
|
|
|
75
75
|
OCMBaseClient,
|
|
76
76
|
init_ocm_base_client,
|
|
77
77
|
)
|
|
78
|
+
from reconcile.utils.semver_helper import make_semver
|
|
78
79
|
|
|
79
80
|
QONTRACT_INTEGRATION = "advanced-upgrade-scheduler"
|
|
81
|
+
QONTRACT_INTEGRATION_VERSION = make_semver(0, 1, 0)
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
class AdvancedUpgradeServiceIntegration(OCMClusterUpgradeSchedulerOrgIntegration):
|
|
@@ -378,6 +380,7 @@ def _build_org_upgrade_spec(
|
|
|
378
380
|
org=org_upgrade_spec.org,
|
|
379
381
|
upgradePolicy=upgrade_policy,
|
|
380
382
|
cluster=c.ocm_cluster,
|
|
383
|
+
cluster_labels=c.labels,
|
|
381
384
|
health=cluster_health,
|
|
382
385
|
nodePools=node_pool_specs_by_cluster_id.get(c.ocm_cluster.id) or [],
|
|
383
386
|
)
|
reconcile/aus/base.py
CHANGED
|
@@ -46,7 +46,7 @@ from reconcile.aus.models import (
|
|
|
46
46
|
OrganizationUpgradeSpec,
|
|
47
47
|
Sector,
|
|
48
48
|
)
|
|
49
|
-
from reconcile.aus.version_gates import HANDLERS
|
|
49
|
+
from reconcile.aus.version_gates import HANDLERS, sts_version_gate_handler
|
|
50
50
|
from reconcile.gql_definitions.advanced_upgrade_service.aus_organization import (
|
|
51
51
|
query as aus_organizations_query,
|
|
52
52
|
)
|
|
@@ -79,7 +79,9 @@ from reconcile.utils.datetime_util import (
|
|
|
79
79
|
from reconcile.utils.defer import defer
|
|
80
80
|
from reconcile.utils.disabled_integrations import integration_is_enabled
|
|
81
81
|
from reconcile.utils.filtering import remove_none_values_from_dict
|
|
82
|
+
from reconcile.utils.jobcontroller.controller import build_job_controller
|
|
82
83
|
from reconcile.utils.ocm.addons import AddonService, AddonServiceV1, AddonServiceV2
|
|
84
|
+
from reconcile.utils.ocm.base import LabelContainer
|
|
83
85
|
from reconcile.utils.ocm.clusters import (
|
|
84
86
|
OCMCluster,
|
|
85
87
|
)
|
|
@@ -102,6 +104,7 @@ from reconcile.utils.runtime.integration import (
|
|
|
102
104
|
PydanticRunParams,
|
|
103
105
|
QontractReconcileIntegration,
|
|
104
106
|
)
|
|
107
|
+
from reconcile.utils.secret_reader import SecretReaderBase
|
|
105
108
|
from reconcile.utils.semver_helper import (
|
|
106
109
|
get_version_prefix,
|
|
107
110
|
parse_semver,
|
|
@@ -110,6 +113,18 @@ from reconcile.utils.semver_helper import (
|
|
|
110
113
|
from reconcile.utils.state import init_state
|
|
111
114
|
|
|
112
115
|
MIN_DELTA_MINUTES = 6
|
|
116
|
+
STS_GATE_LABEL = "api.openshift.com/gate-sts"
|
|
117
|
+
AUS_VERSION_GATE_APPROVALS_LABEL = "sre-capabilities.aus.version-gate-approvals"
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class RosaRoleUpgradeHandlerParams(PydanticRunParams):
|
|
121
|
+
job_controller_cluster: str
|
|
122
|
+
job_controller_namespace: str
|
|
123
|
+
rosa_job_service_account: str
|
|
124
|
+
rosa_role: str
|
|
125
|
+
rosa_job_image: str | None = None
|
|
126
|
+
integration_name: str
|
|
127
|
+
integration_version: str
|
|
113
128
|
|
|
114
129
|
|
|
115
130
|
class AdvancedUpgradeSchedulerBaseIntegrationParams(PydanticRunParams):
|
|
@@ -117,6 +132,7 @@ class AdvancedUpgradeSchedulerBaseIntegrationParams(PydanticRunParams):
|
|
|
117
132
|
ocm_organization_ids: set[str] | None = None
|
|
118
133
|
excluded_ocm_organization_ids: set[str] | None = None
|
|
119
134
|
ignore_sts_clusters: bool = False
|
|
135
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None
|
|
120
136
|
|
|
121
137
|
|
|
122
138
|
class ReconcileError(Exception):
|
|
@@ -412,7 +428,12 @@ class AbstractUpgradePolicy(ABC, BaseModel):
|
|
|
412
428
|
state: str | None = None
|
|
413
429
|
|
|
414
430
|
@abstractmethod
|
|
415
|
-
def create(
|
|
431
|
+
def create(
|
|
432
|
+
self,
|
|
433
|
+
ocm_api: OCMBaseClient,
|
|
434
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
435
|
+
secret_reader: SecretReaderBase | None = None,
|
|
436
|
+
) -> None:
|
|
416
437
|
pass
|
|
417
438
|
|
|
418
439
|
@abstractmethod
|
|
@@ -436,7 +457,15 @@ class AddonUpgradePolicy(AbstractUpgradePolicy, arbitrary_types_allowed=True):
|
|
|
436
457
|
addon_id: str
|
|
437
458
|
addon_service: AddonService
|
|
438
459
|
|
|
439
|
-
|
|
460
|
+
class Config:
|
|
461
|
+
arbitrary_types_allowed = True
|
|
462
|
+
|
|
463
|
+
def create(
|
|
464
|
+
self,
|
|
465
|
+
ocm_api: OCMBaseClient,
|
|
466
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
467
|
+
secret_reader: SecretReaderBase | None = None,
|
|
468
|
+
) -> None:
|
|
440
469
|
self.addon_service.create_addon_upgrade_policy(
|
|
441
470
|
ocm_api=ocm_api,
|
|
442
471
|
cluster_id=self.cluster.id,
|
|
@@ -469,14 +498,63 @@ class AddonUpgradePolicy(AbstractUpgradePolicy, arbitrary_types_allowed=True):
|
|
|
469
498
|
class ClusterUpgradePolicy(AbstractUpgradePolicy):
|
|
470
499
|
"""Class to create ClusterUpgradePolicies in OCM"""
|
|
471
500
|
|
|
472
|
-
|
|
501
|
+
organization_id: str
|
|
502
|
+
cluster_labels: LabelContainer
|
|
503
|
+
|
|
504
|
+
def create(
|
|
505
|
+
self,
|
|
506
|
+
ocm_api: OCMBaseClient,
|
|
507
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
508
|
+
secret_reader: SecretReaderBase | None = None,
|
|
509
|
+
) -> None:
|
|
473
510
|
policy = {
|
|
474
511
|
"version": self.version,
|
|
475
512
|
"schedule_type": "manual",
|
|
476
513
|
"next_run": self.next_run,
|
|
477
514
|
}
|
|
515
|
+
if (
|
|
516
|
+
rosa_role_upgrade_handler_params
|
|
517
|
+
and secret_reader
|
|
518
|
+
and self.should_upgrade_roles()
|
|
519
|
+
):
|
|
520
|
+
logging.info(f"Updating account and operator roles for {self.cluster.name}")
|
|
521
|
+
sts_gate_handler = sts_version_gate_handler.STSGateHandler(
|
|
522
|
+
job_controller=build_job_controller(
|
|
523
|
+
integration=rosa_role_upgrade_handler_params.integration_name,
|
|
524
|
+
integration_version=rosa_role_upgrade_handler_params.integration_version,
|
|
525
|
+
cluster=rosa_role_upgrade_handler_params.job_controller_cluster,
|
|
526
|
+
namespace=rosa_role_upgrade_handler_params.job_controller_namespace,
|
|
527
|
+
secret_reader=secret_reader,
|
|
528
|
+
dry_run=False,
|
|
529
|
+
),
|
|
530
|
+
aws_iam_role=rosa_role_upgrade_handler_params.rosa_role,
|
|
531
|
+
rosa_job_service_account=rosa_role_upgrade_handler_params.rosa_job_service_account,
|
|
532
|
+
rosa_job_image=rosa_role_upgrade_handler_params.rosa_job_image,
|
|
533
|
+
)
|
|
534
|
+
if not sts_gate_handler.upgrade_rosa_roles_v2(
|
|
535
|
+
ocm_api=ocm_api,
|
|
536
|
+
cluster=self.cluster,
|
|
537
|
+
dry_run=False,
|
|
538
|
+
upgrade_version=self.version,
|
|
539
|
+
ocm_org_id=self.organization_id,
|
|
540
|
+
):
|
|
541
|
+
logging.error(
|
|
542
|
+
f"Failed to update account and operator roles for {self.cluster.name}"
|
|
543
|
+
)
|
|
478
544
|
create_upgrade_policy(ocm_api, self.cluster.id, policy)
|
|
479
545
|
|
|
546
|
+
def should_upgrade_roles(self) -> bool:
|
|
547
|
+
handler_csv = self.cluster_labels.get_label_value(
|
|
548
|
+
AUS_VERSION_GATE_APPROVALS_LABEL
|
|
549
|
+
)
|
|
550
|
+
if not handler_csv:
|
|
551
|
+
return False
|
|
552
|
+
return (
|
|
553
|
+
self.cluster.is_sts()
|
|
554
|
+
and self.cluster.is_rosa_classic()
|
|
555
|
+
and STS_GATE_LABEL in set(handler_csv.split(","))
|
|
556
|
+
)
|
|
557
|
+
|
|
480
558
|
def delete(self, ocm_api: OCMBaseClient) -> None:
|
|
481
559
|
raise NotImplementedError("ClusterUpgradePolicy.delete() not implemented")
|
|
482
560
|
|
|
@@ -494,7 +572,12 @@ class ClusterUpgradePolicy(AbstractUpgradePolicy):
|
|
|
494
572
|
class ControlPlaneUpgradePolicy(AbstractUpgradePolicy):
|
|
495
573
|
"""Class to create and delete ControlPlanUpgradePolicies in OCM"""
|
|
496
574
|
|
|
497
|
-
def create(
|
|
575
|
+
def create(
|
|
576
|
+
self,
|
|
577
|
+
ocm_api: OCMBaseClient,
|
|
578
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
579
|
+
secret_reader: SecretReaderBase | None = None,
|
|
580
|
+
) -> None:
|
|
498
581
|
policy = {
|
|
499
582
|
"version": self.version,
|
|
500
583
|
"schedule_type": "manual",
|
|
@@ -522,7 +605,12 @@ class NodePoolUpgradePolicy(AbstractUpgradePolicy):
|
|
|
522
605
|
|
|
523
606
|
node_pool: str
|
|
524
607
|
|
|
525
|
-
def create(
|
|
608
|
+
def create(
|
|
609
|
+
self,
|
|
610
|
+
ocm_api: OCMBaseClient,
|
|
611
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
612
|
+
secret_reader: SecretReaderBase | None = None,
|
|
613
|
+
) -> None:
|
|
526
614
|
policy = {
|
|
527
615
|
"version": self.version,
|
|
528
616
|
"schedule_type": "manual",
|
|
@@ -554,7 +642,13 @@ class UpgradePolicyHandler(BaseModel, extra="forbid"):
|
|
|
554
642
|
action: str
|
|
555
643
|
policy: AbstractUpgradePolicy
|
|
556
644
|
|
|
557
|
-
def act(
|
|
645
|
+
def act(
|
|
646
|
+
self,
|
|
647
|
+
dry_run: bool,
|
|
648
|
+
ocm_api: OCMBaseClient,
|
|
649
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
650
|
+
secret_reader: SecretReaderBase | None = None,
|
|
651
|
+
) -> None:
|
|
558
652
|
logging.info(f"{self.action} {self.policy.summarize()}")
|
|
559
653
|
if dry_run:
|
|
560
654
|
return
|
|
@@ -564,7 +658,7 @@ class UpgradePolicyHandler(BaseModel, extra="forbid"):
|
|
|
564
658
|
elif self.action == "delete":
|
|
565
659
|
self.policy.delete(ocm_api)
|
|
566
660
|
elif self.action == "create":
|
|
567
|
-
self.policy.create(ocm_api)
|
|
661
|
+
self.policy.create(ocm_api, rosa_role_upgrade_handler_params, secret_reader)
|
|
568
662
|
|
|
569
663
|
|
|
570
664
|
def fetch_current_state(
|
|
@@ -582,6 +676,7 @@ def fetch_current_state(
|
|
|
582
676
|
)
|
|
583
677
|
current_state.extend(
|
|
584
678
|
AddonUpgradePolicy(
|
|
679
|
+
organization_id=spec.org.org_id,
|
|
585
680
|
id=addon_upgrade_policy.id,
|
|
586
681
|
addon_id=addon_spec.addon.addon.id,
|
|
587
682
|
cluster=spec.cluster,
|
|
@@ -618,6 +713,8 @@ def fetch_current_state(
|
|
|
618
713
|
for upgrade_policy in upgrade_policies:
|
|
619
714
|
policy = upgrade_policy | {
|
|
620
715
|
"cluster": spec.cluster,
|
|
716
|
+
"organization_id": spec.org.org_id,
|
|
717
|
+
"cluster_labels": spec.cluster_labels,
|
|
621
718
|
}
|
|
622
719
|
current_state.append(ClusterUpgradePolicy(**policy))
|
|
623
720
|
|
|
@@ -1016,6 +1113,8 @@ def _create_upgrade_policy(
|
|
|
1016
1113
|
)
|
|
1017
1114
|
return ClusterUpgradePolicy(
|
|
1018
1115
|
cluster=spec.cluster,
|
|
1116
|
+
organization_id=spec.org.org_id,
|
|
1117
|
+
cluster_labels=spec.cluster_labels,
|
|
1019
1118
|
version=version,
|
|
1020
1119
|
schedule_type="manual",
|
|
1021
1120
|
next_run=next_schedule,
|
|
@@ -1122,6 +1221,8 @@ def calculate_diff(
|
|
|
1122
1221
|
UpgradePolicyHandler(
|
|
1123
1222
|
action="create",
|
|
1124
1223
|
policy=AddonUpgradePolicy(
|
|
1224
|
+
action="create",
|
|
1225
|
+
organization_id=spec.org.org_id,
|
|
1125
1226
|
cluster=spec.cluster,
|
|
1126
1227
|
version=version,
|
|
1127
1228
|
schedule_type="manual",
|
|
@@ -1186,6 +1287,8 @@ def act(
|
|
|
1186
1287
|
dry_run: bool,
|
|
1187
1288
|
diffs: list[UpgradePolicyHandler],
|
|
1188
1289
|
ocm_api: OCMBaseClient,
|
|
1290
|
+
rosa_role_upgrade_handler_params: RosaRoleUpgradeHandlerParams | None = None,
|
|
1291
|
+
secret_reader: SecretReaderBase | None = None,
|
|
1189
1292
|
addon_id: str | None = None,
|
|
1190
1293
|
) -> None:
|
|
1191
1294
|
diffs.sort(key=sort_diffs)
|
|
@@ -1198,7 +1301,7 @@ def act(
|
|
|
1198
1301
|
):
|
|
1199
1302
|
continue
|
|
1200
1303
|
try:
|
|
1201
|
-
diff.act(dry_run, ocm_api)
|
|
1304
|
+
diff.act(dry_run, ocm_api, rosa_role_upgrade_handler_params, secret_reader)
|
|
1202
1305
|
except HTTPError as e:
|
|
1203
1306
|
logging.error(f"{policy.cluster.name}: {e}: {e.response.text}")
|
|
1204
1307
|
|
reconcile/aus/models.py
CHANGED
|
@@ -14,6 +14,7 @@ from reconcile.aus.healthchecks import AUSClusterHealth
|
|
|
14
14
|
from reconcile.gql_definitions.fragments.aus_organization import AUSOCMOrganization
|
|
15
15
|
from reconcile.gql_definitions.fragments.upgrade_policy import ClusterUpgradePolicyV1
|
|
16
16
|
from reconcile.utils.ocm.addons import OCMAddonInstallation
|
|
17
|
+
from reconcile.utils.ocm.base import LabelContainer
|
|
17
18
|
from reconcile.utils.ocm.clusters import OCMCluster
|
|
18
19
|
from reconcile.utils.semver_helper import parse_semver
|
|
19
20
|
|
|
@@ -33,6 +34,7 @@ class ClusterUpgradeSpec(BaseModel):
|
|
|
33
34
|
|
|
34
35
|
org: AUSOCMOrganization
|
|
35
36
|
cluster: OCMCluster
|
|
37
|
+
cluster_labels: LabelContainer | None = None
|
|
36
38
|
upgrade_policy: ClusterUpgradePolicyV1 = Field(..., alias="upgradePolicy")
|
|
37
39
|
health: AUSClusterHealth
|
|
38
40
|
node_pools: list[NodePoolSpec] = Field(default_factory=list, alias="nodePools")
|
|
@@ -82,7 +82,14 @@ class OCMClusterUpgradeSchedulerIntegration(
|
|
|
82
82
|
version_data,
|
|
83
83
|
integration=self.name,
|
|
84
84
|
)
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
aus.act(
|
|
87
|
+
dry_run,
|
|
88
|
+
diffs,
|
|
89
|
+
ocm_api,
|
|
90
|
+
self.params.rosa_role_upgrade_handler_params,
|
|
91
|
+
self.secret_reader,
|
|
92
|
+
)
|
|
86
93
|
|
|
87
94
|
def expose_version_data_metrics(
|
|
88
95
|
self,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from collections import defaultdict
|
|
2
|
+
from dataclasses import dataclass
|
|
2
3
|
|
|
3
4
|
from reconcile.aus.healthchecks import (
|
|
4
5
|
AUSClusterHealthCheckProvider,
|
|
@@ -13,6 +14,7 @@ from reconcile.aus.node_pool_spec import get_node_pool_specs_by_org_cluster
|
|
|
13
14
|
from reconcile.aus.ocm_upgrade_scheduler import OCMClusterUpgradeSchedulerIntegration
|
|
14
15
|
from reconcile.gql_definitions.fragments.aus_organization import AUSOCMOrganization
|
|
15
16
|
from reconcile.gql_definitions.fragments.ocm_environment import OCMEnvironment
|
|
17
|
+
from reconcile.utils.ocm.base import LabelContainer
|
|
16
18
|
from reconcile.utils.ocm.clusters import (
|
|
17
19
|
OCMCluster,
|
|
18
20
|
discover_clusters_for_organizations,
|
|
@@ -22,6 +24,12 @@ from reconcile.utils.ocm_base_client import init_ocm_base_client
|
|
|
22
24
|
QONTRACT_INTEGRATION = "ocm-upgrade-scheduler-org"
|
|
23
25
|
|
|
24
26
|
|
|
27
|
+
@dataclass
|
|
28
|
+
class ClusterUpgradeSpecWithLabels:
|
|
29
|
+
cluster: OCMCluster
|
|
30
|
+
cluster_labels: LabelContainer
|
|
31
|
+
|
|
32
|
+
|
|
25
33
|
class OCMClusterUpgradeSchedulerOrgIntegration(OCMClusterUpgradeSchedulerIntegration):
|
|
26
34
|
@property
|
|
27
35
|
def name(self) -> str:
|
|
@@ -60,7 +68,10 @@ class OCMClusterUpgradeSchedulerOrgIntegration(OCMClusterUpgradeSchedulerIntegra
|
|
|
60
68
|
specs=self._build_cluster_upgrade_specs(
|
|
61
69
|
org=org,
|
|
62
70
|
clusters_by_name={
|
|
63
|
-
c.ocm_cluster.name:
|
|
71
|
+
c.ocm_cluster.name: ClusterUpgradeSpecWithLabels(
|
|
72
|
+
cluster=c.ocm_cluster,
|
|
73
|
+
cluster_labels=c.labels,
|
|
74
|
+
)
|
|
64
75
|
for c in clusters_by_org[org.org_id]
|
|
65
76
|
},
|
|
66
77
|
cluster_health_provider=build_cluster_health_providers_for_organization(
|
|
@@ -79,7 +90,7 @@ class OCMClusterUpgradeSchedulerOrgIntegration(OCMClusterUpgradeSchedulerIntegra
|
|
|
79
90
|
def _build_cluster_upgrade_specs(
|
|
80
91
|
self,
|
|
81
92
|
org: AUSOCMOrganization,
|
|
82
|
-
clusters_by_name: dict[str,
|
|
93
|
+
clusters_by_name: dict[str, ClusterUpgradeSpecWithLabels],
|
|
83
94
|
cluster_health_provider: AUSClusterHealthCheckProvider,
|
|
84
95
|
node_pool_specs_by_cluster_id: dict[str, list[NodePoolSpec]],
|
|
85
96
|
) -> list[ClusterUpgradeSpec]:
|
|
@@ -87,12 +98,16 @@ class OCMClusterUpgradeSchedulerOrgIntegration(OCMClusterUpgradeSchedulerIntegra
|
|
|
87
98
|
ClusterUpgradeSpec(
|
|
88
99
|
org=org,
|
|
89
100
|
upgradePolicy=cluster.upgrade_policy,
|
|
90
|
-
cluster=clusters_by_name[cluster.name],
|
|
101
|
+
cluster=clusters_by_name[cluster.name].cluster,
|
|
102
|
+
cluster_labels=clusters_by_name[cluster.name].cluster_labels,
|
|
91
103
|
health=cluster_health_provider.cluster_health(
|
|
92
|
-
cluster_external_id=clusters_by_name[
|
|
104
|
+
cluster_external_id=clusters_by_name[
|
|
105
|
+
cluster.name
|
|
106
|
+
].cluster.external_id,
|
|
93
107
|
org_id=org.org_id,
|
|
94
108
|
),
|
|
95
|
-
nodePools=node_pool_specs_by_cluster_id.get(ocm_cluster.id)
|
|
109
|
+
nodePools=node_pool_specs_by_cluster_id.get(ocm_cluster.cluster.id)
|
|
110
|
+
or [],
|
|
96
111
|
)
|
|
97
112
|
for cluster in org.upgrade_policy_clusters or []
|
|
98
113
|
# clusters that are not in the UUID dict will be ignored because
|