(fix) Apiserver key rotate job loop
- the apiserver key rotation job would loop forever because the 'uniq' pipe operates on lines, but we had a single line with space-separated records. Update the pipe with a 'tr' command to break spaces into newlines to properly de-deplicate the pod list. Change-Id: I4e690d4456e1f80f1edec9fee3206a3a88d7e8fe
This commit is contained in:
parent
4f7999bd00
commit
b6c3decf22
@ -39,8 +39,8 @@ get_encryption_hash() {
|
||||
}
|
||||
|
||||
apiserver_compare() {
|
||||
echo "${apiservers[@]}" | sort | uniq > "${TEMP_DIR}/a.txt"
|
||||
echo "${updated_apiservers[@]}" | sort | uniq > "${TEMP_DIR}/b.txt"
|
||||
echo "${apiservers[@]}" | tr ' ' '\n' | sort | uniq > "${TEMP_DIR}/a.txt"
|
||||
echo "${updated_apiservers[@]}" | tr ' ' '\n' | sort | uniq > "${TEMP_DIR}/b.txt"
|
||||
comm -3 "${TEMP_DIR}/a.txt" "${TEMP_DIR}/b.txt"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user