mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Make runtime namespace configurable (#145)
Making the runtime namespace configurable makes it possible to run locally outside of the cluster. This is useful for quick development testing. Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -192,11 +192,12 @@ var _ = Describe("Manager", Ordered, func() {
|
||||
Eventually(verifyMetricsServerStarted).Should(Succeed())
|
||||
|
||||
By("creating the curl-metrics pod to access the metrics endpoint")
|
||||
cmd = exec.Command("kubectl", "run", "curl-metrics", "--restart=Never",
|
||||
"--namespace", namespace,
|
||||
"--image=curlimages/curl:latest",
|
||||
"--overrides",
|
||||
fmt.Sprintf(`{
|
||||
Eventually(func(g Gomega) {
|
||||
cmd = exec.Command("kubectl", "run", "curl-metrics", "--restart=Never",
|
||||
"--namespace", namespace,
|
||||
"--image=curlimages/curl:latest",
|
||||
"--overrides",
|
||||
fmt.Sprintf(`{
|
||||
"spec": {
|
||||
"containers": [{
|
||||
"name": "curl",
|
||||
@@ -217,8 +218,9 @@ var _ = Describe("Manager", Ordered, func() {
|
||||
}]
|
||||
}
|
||||
}`, metricsServiceName, namespace))
|
||||
_, err = utils.Run(cmd)
|
||||
Expect(err).NotTo(HaveOccurred(), "Failed to create curl-metrics pod")
|
||||
_, err = utils.Run(cmd)
|
||||
g.Expect(err).NotTo(HaveOccurred(), "Failed to create curl-metrics pod")
|
||||
}).Should(Succeed())
|
||||
|
||||
By("waiting for the curl-metrics pod to complete.")
|
||||
verifyCurlUp := func(g Gomega) {
|
||||
|
||||
Reference in New Issue
Block a user