Skip to content

Commit a3e7869

Browse files
Add a delay and check to ensure that SPOD patch is rolled out
1 parent e357dbb commit a3e7869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/ci/install-spo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ install_operator() {
101101
k_wait pod -l name=spod
102102

103103
wait_for spod spod
104-
INITIAL_SPOD_DS_VERSION=$(k get daemonset spod -o=jsonpath='{.status.currentNumberScheduled}' 2>/dev/null)
104+
INITIAL_SPOD_DS_VERSION=$(k get controllerrevision -l name=spod --sort-by=.revision -o=jsonpath='{.items[-1].revision}' 2>/dev/null)
105105

106106
if [[ -z "$INITIAL_SPOD_DS_VERSION" ]]; then
107107
echo "Error: DaemonSet 'spod' not found or could not get its status."
@@ -111,7 +111,7 @@ install_operator() {
111111
# Wait for security profiles operator to modify the spod daemonset
112112
sleep 5
113113
k rollout status ds spod --timeout 360s
114-
PATCHED_SPOD_DS_VERSION=$(k get daemonset spod -o=jsonpath='{.status.currentNumberScheduled}' 2>/dev/null)
114+
PATCHED_SPOD_DS_VERSION=$(k get controllerrevision -l name=spod --sort-by=.revision -o=jsonpath='{.items[-1].revision}' 2>/dev/null)
115115

116116
if [ "$PATCHED_SPOD_DS_VERSION" -gt "$INITIAL_SPOD_DS_VERSION" ]; then
117117
echo "Success! The DaemonSet version has been updated from $INITIAL_SPOD_DS_VERSION to $PATCHED_SPOD_DS_VERSION."

0 commit comments

Comments
 (0)