Enhance yaml processing
@@ -226,12 +226,9 @@ compare_kubectl() {
| $sed -e '/name: suffix/,+1d' \
| $sed -e '/name: S3_BUCKET_PATH/,+1d' \
| $sed -e '/name: S3_BUCKET_URL/,+1d' \
+ | $sed -e '/annotations:$/{$!{N;s/annotations:\n kubernetes.io.*//;ty;P;D;:y;d}}' \
> ${new_result}
- # Trying to get rid extra fields on EKS
- if [[ "${resource}" == pod* ]]; then
- $sed -i -E '/annotations:|kubernetes.io\/psp:/d' ${new_result}
- fi
diff -u ${expected_result} ${new_result}
}
