Browse Source

kubectl-ingress: list ingresses with links

master
Maxim Likhachev 5 years ago
parent
commit
31eb562cea
  1. 27
      kubectl-ingress

27
kubectl-ingress

@ -0,0 +1,27 @@
#!/bin/bash
#
# Copyright (C) 2020, Maxim Lihachev, <envrm@yandex.ru>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##
## kubectl-ingress is a wrapper for 'kubectl get ingress` command which
## makes links clickable.
##
echo -e "$(sed 's!(([[:alpha:]](-?[[:alnum:]])*)\.)+[[:alpha:]]{2,}!\\e]8;;http://\0\\e\\\\\0\\e]8;;\\e\\!g;
s!((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])!\\e]8;;http://\0\\e\\\\\0\\e]8;;\\e\\!g
' -r <<<"$(kubectl get ingress "$@")")"
Loading…
Cancel
Save