|
3 | 3 | // This product includes software developed at Datadog (https://www.datadoghq.com/).
|
4 | 4 | // Copyright 2016-present Datadog, Inc.
|
5 | 5 |
|
6 |
| -//go:build e2e |
7 |
| -// +build e2e |
8 |
| - |
9 | 6 | package e2e
|
10 | 7 |
|
11 | 8 | import (
|
12 |
| - "encoding/json" |
13 | 9 | "fmt"
|
14 | 10 | "os"
|
15 | 11 | "path/filepath"
|
16 |
| - "regexp" |
17 | 12 | "testing"
|
18 | 13 | "time"
|
19 | 14 |
|
@@ -56,24 +51,19 @@ alias kl="kubectl logs"
|
56 | 51 | alias kx="kubectl exec"
|
57 | 52 | ' >> /home/ubuntu/.bashrc
|
58 | 53 | `
|
59 |
| - defaultMgrImageName = "gcr.io/datadoghq/operator" |
60 |
| - defaultMgrImgTag = "latest" |
61 |
| - defaultMgrFileName = "e2e-manager.yaml" |
62 |
| - nodeAgentSelector = "agent.datadoghq.com/component=agent" |
63 |
| - clusterAgentSelector = "agent.datadoghq.com/component=cluster-agent" |
64 |
| - clusterCheckRunnerSelector = "agent.datadoghq.com/component=cluster-checks-runner" |
| 54 | + defaultMgrImageName = "gcr.io/datadoghq/operator" |
| 55 | + defaultMgrImgTag = "latest" |
| 56 | + nodeAgentSelector = "agent.datadoghq.com/component=agent" |
65 | 57 | )
|
66 | 58 |
|
67 | 59 | var (
|
68 |
| - namespaceName = "system" |
| 60 | + namespaceName = "e2e-operator" |
69 | 61 | k8sVersion = getEnv("K8S_VERSION", "1.26")
|
70 | 62 | imgPullPassword = getEnv("IMAGE_PULL_PASSWORD", "")
|
71 | 63 |
|
72 | 64 | kubeConfigPath string
|
73 |
| - kubectlOptions *k8s.KubectlOptions |
74 | 65 |
|
75 |
| - tmpDir string |
76 |
| - ddaMinimalPath = filepath.Join(manifestsPath, "datadog-agent-minimum.yaml") |
| 66 | + tmpDir string |
77 | 67 | )
|
78 | 68 |
|
79 | 69 | // getAbsPath Return absolute path for given path
|
@@ -211,23 +201,3 @@ func updateKustomization(kustomizeDirPath string, kustomizeResourcePaths []strin
|
211 | 201 |
|
212 | 202 | return nil
|
213 | 203 | }
|
214 |
| - |
215 |
| -func parseCollectorJson(collectorOutput string) map[string]interface{} { |
216 |
| - var jsonString string |
217 |
| - var jsonObject map[string]interface{} |
218 |
| - |
219 |
| - re := regexp.MustCompile(`(\{.*\})`) |
220 |
| - match := re.FindStringSubmatch(collectorOutput) |
221 |
| - if len(match) > 0 { |
222 |
| - jsonString = match[0] |
223 |
| - } else { |
224 |
| - return map[string]interface{}{} |
225 |
| - } |
226 |
| - |
227 |
| - // Parse collector JSON |
228 |
| - err := json.Unmarshal([]byte(jsonString), &jsonObject) |
229 |
| - if err != nil { |
230 |
| - return map[string]interface{}{} |
231 |
| - } |
232 |
| - return jsonObject |
233 |
| -} |
0 commit comments