InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.
()
| 40 | |
| 41 | // InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics. |
| 42 | func InstallPrometheusOperator() error { |
| 43 | url := fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion) |
| 44 | cmd := exec.Command("kubectl", "create", "-f", url) |
| 45 | _, err := Run(cmd) |
| 46 | return err |
| 47 | } |
| 48 | |
| 49 | // Run executes the provided command within this context |
| 50 | func Run(cmd *exec.Cmd) ([]byte, error) { |