mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
Suppress error message from grep when checking whether a subnet has a secondary range or not.
This commit is contained in:
parent
c6d0726df8
commit
977252d4b2
@ -1713,7 +1713,7 @@ function create-subnetworks() {
|
||||
--secondary-range "services-default=${SERVICE_CLUSTER_IP_RANGE}"
|
||||
echo "Created subnetwork ${IP_ALIAS_SUBNETWORK}"
|
||||
else
|
||||
if ! echo ${subnet} | grep --quiet secondaryIpRanges ${subnet}; then
|
||||
if ! echo ${subnet} | grep -qs secondaryIpRanges ${subnet} 2>/dev/null; then
|
||||
echo "${color_red}Subnet ${IP_ALIAS_SUBNETWORK} does not have a secondary range${color_norm}"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user