PodMonitorExist tries to find the PodMonitor resource in the current cluster
(client discovery.DiscoveryInterface)
| 177 | |
| 178 | // PodMonitorExist tries to find the PodMonitor resource in the current cluster |
| 179 | func PodMonitorExist(client discovery.DiscoveryInterface) (bool, error) { |
| 180 | exist, err := resourceExist(client, "monitoring.coreos.com/v1", "podmonitors") |
| 181 | if err != nil { |
| 182 | return false, err |
| 183 | } |
| 184 | |
| 185 | return exist, nil |
| 186 | } |
| 187 | |
| 188 | // extractK8sMinorVersion extracts and parses the Kubernetes minor version from |
| 189 | // the version info that's been detected by discovery client |
no test coverage detected