You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Open the file `internal/controller/flowcollector/flowcollector_controller.go`
88
-
2. Find the `Reconcile` function (around line 100-150)
89
-
3. Click on the left margin next to the line number where you want to pause (e.g., the first line inside the Reconcile function)
90
-
4. A red dot will appear indicating the breakpoint is set
86
+
The main reconciliation logic is in `internal/controller/flowcollector/flowcollector_controller.go` (look for the `Reconcile` function around line 100-150).
91
87
92
-
**To trigger the reconciliation:**
93
-
Execute this command in a terminal to modify the FlowCollector CR:
88
+
**If using VSCode debugging:**
89
+
1. Open `internal/controller/flowcollector/flowcollector_controller.go`
90
+
2. Click the left margin next to the line number inside the `Reconcile` function to set a breakpoint
Copy file name to clipboardExpand all lines: .claude/commands/setup-dev-env.md
+26-23Lines changed: 26 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,56 +2,59 @@
2
2
3
3
This command sets up a complete development environment for NetObserv.
4
4
5
-
**First, check if the user specified custom images:**
6
-
- Did the user provide a **USER** (quay.io username/repo)?
7
-
- Did the user provide a **VERSION** (image tag)?
5
+
## Gather Configuration
8
6
9
-
If the user specified custom images (e.g., "using the image from my repo, leandroberetta with tag v1.2.3"), extract those values. Otherwise, use the defaults: `USER=netobserv` and `VERSION=main`.
7
+
First, use the AskUserQuestion tool to gather the necessary configuration:
10
8
11
-
**Next, determine your platform:**
12
-
- Are you using **OpenShift** or **vanilla Kubernetes**?
9
+
**Question 1:** What platform are you using?
10
+
- Options: OpenShift, Kubernetes
11
+
- Header: "Platform"
12
+
- Store the answer to determine if `make set-release-kind-downstream` should be run in step 2.
13
13
14
-
This will determine whether to run `make set-release-kind-downstream` in step 2.
14
+
**Question 2:** Are you using custom images?
15
+
- Options: "Yes, custom images", "No, use defaults (netobserv/main)"
16
+
- Header: "Images"
17
+
18
+
**If the user selected custom images**, ask follow-up questions to get:
19
+
- USER (quay.io username/repo, e.g., "leandroberetta")
20
+
- VERSION (image tag, e.g., "v1.2.3" or "main")
21
+
22
+
Set the variables:
23
+
- If using defaults: `USER=netobserv` and `VERSION=main`
24
+
- If using custom: `USER=<user_value>` and `VERSION=<version_value>`
15
25
16
26
## Steps
17
27
18
-
### 1. Deploy the operator to the cluster
28
+
### 1. Deploy the operator
19
29
20
-
Deploy the operator with the specified or default images:
30
+
Run the deployment command with the configured values:
21
31
22
-
**If custom USER and VERSION were provided:**
32
+
**If custom USER and VERSION:**
23
33
```bash
24
34
USER=<user_value> VERSION=<version_value> make deploy
25
35
```
26
36
27
-
**If using defaults (no custom images specified):**
37
+
**If using defaults:**
28
38
```bash
29
39
USER=netobserv make deploy
30
40
```
31
41
32
-
**Note:**
33
-
- Using `USER=netobserv` (default) ensures the operator uses public images from `quay.io/netobserv` without authentication.
34
-
- Custom USER values like `USER=leandroberetta` will use images from `quay.io/leandroberetta/`.
35
-
- The VERSION parameter controls the image tag (e.g., `VERSION=v1.2.3` or `VERSION=main`).
36
-
37
42
### 2. Configure for OpenShift (if applicable)
38
43
39
-
**Only if you're using OpenShift**, run:
44
+
**Only run this if the user selected OpenShift** in the platform question:
40
45
41
46
```bash
42
47
make set-release-kind-downstream
43
48
```
44
49
45
-
**If you're using vanilla Kubernetes**, skip this step entirely.
50
+
Skip this step for Kubernetes.
46
51
47
52
### 3. Deploy Loki
48
53
49
54
```bash
50
55
make deploy-loki
51
56
```
52
57
53
-
This will deploy Loki and make it available at http://localhost:3100
54
-
55
58
### 4. Deploy sample FlowCollector CR
56
59
57
60
```bash
@@ -60,7 +63,7 @@ make deploy-sample-cr
60
63
61
64
### 5. Verify deployment
62
65
63
-
Check that all components are running:
66
+
Run these commands to verify all components are running:
64
67
65
68
```bash
66
69
kubectl get pods -n netobserv
@@ -69,8 +72,8 @@ kubectl get flowcollector cluster -o yaml
0 commit comments