From 7b46f12d662d3bbbc8bd2c9e01f978f7a42e1cd1 Mon Sep 17 00:00:00 2001 From: matoy Date: Fri, 23 Apr 2021 10:01:22 +0200 Subject: [PATCH] Update kubectl.pm (#2733) sub kubernetes_list_ingresses ADDED (it was missing comparing to api.pm) --- centreon-plugins/cloud/kubernetes/custom/kubectl.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/centreon-plugins/cloud/kubernetes/custom/kubectl.pm b/centreon-plugins/cloud/kubernetes/custom/kubectl.pm index 1b793a2b0..baedd1ffa 100644 --- a/centreon-plugins/cloud/kubernetes/custom/kubectl.pm +++ b/centreon-plugins/cloud/kubernetes/custom/kubectl.pm @@ -186,6 +186,18 @@ sub kubernetes_list_events { return $response; } +sub kubernetes_list_ingresses { + my ($self, %options) = @_; + + my $cmd = "get ingresses --all-namespaces --output='json' --kubeconfig='" . $self->{config_file} . "'" + . " --request-timeout='" . $self->{timeout} . "'"; + $cmd .= " --context='" . $self->{context} . "'" if (defined($self->{context}) && $self->{context} ne ''); + + my $response = $self->execute(cmd_options => $cmd); + + return $response; +} + sub kubernetes_list_namespaces { my ($self, %options) = @_;