From 6a8521390e49dfa7be81886caf2de13cb1416232 Mon Sep 17 00:00:00 2001 From: Carl Csaposs Date: Mon, 22 Apr 2024 08:55:46 +0000 Subject: [PATCH] Add default value for `resume-upgrade` parameter (#226) --- actions.yaml | 1 + src/kubernetes_upgrade.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/actions.yaml b/actions.yaml index d6c93a7a2..fed218358 100644 --- a/actions.yaml +++ b/actions.yaml @@ -6,6 +6,7 @@ resume-upgrade: params: force: type: boolean + default: false description: Force upgrade of next unit if an upgraded unit has non-active status. required: [] set-tls-private-key: diff --git a/src/kubernetes_upgrade.py b/src/kubernetes_upgrade.py index e9673b6b2..999a534e9 100644 --- a/src/kubernetes_upgrade.py +++ b/src/kubernetes_upgrade.py @@ -161,7 +161,7 @@ def reconcile_partition(self, *, action_event: ops.ActionEvent = None) -> None: - confirm first upgraded unit is healthy and resume upgrade - force upgrade of next unit if 1 or more upgraded units are unhealthy """ - force = bool(action_event and action_event.params.get("force") is True) + force = bool(action_event and action_event.params["force"] is True) units = self._sorted_units