Skip to content

Commit

Permalink
Fixing internal update crd
Browse files Browse the repository at this point in the history
  • Loading branch information
wilmer05 committed Jul 14, 2023
1 parent 86a66da commit 21c27aa
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions paasta_tools/setup_kubernetes_internal_crd.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,20 @@ def main() -> None:
def setup_kube_internal_crd(
kube_client: KubeClient,
) -> bool:
existing_crds = kube_client.apiextensions.list_custom_resource_definition(
label_selector=paasta_prefixed("internal")
)

return update_crds(
kube_client=kube_client, desired_crds=INTERNAL_CRDS, existing_crds=existing_crds
)
for apiextension in [
kube_client.apiextensions,
kube_client.apiextensions_v1_beta1,
]:
existing_crds = apiextension.list_custom_resource_definition(
label_selector=paasta_prefixed("internal")
)
if update_crds(
kube_client=kube_client,
desired_crds=INTERNAL_CRDS,
existing_crds=existing_crds,
):
return True
return False


if __name__ == "__main__":
Expand Down

0 comments on commit 21c27aa

Please sign in to comment.