Skip to content

Commit 3c017cc

Browse files
Remove remote debugging
- This simplifies the dev scrips, the kind config and the helm chart - Security is no longer conditional - No one was using it anyway
1 parent 3254264 commit 3c017cc

File tree

25 files changed

+5
-566
lines changed

25 files changed

+5
-566
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,26 @@ updates:
1414
schedule:
1515
interval: "daily"
1616

17-
- package-ecosystem: "docker"
18-
directory: "/api/remote-debug"
19-
schedule:
20-
interval: "daily"
21-
2217
- package-ecosystem: "docker"
2318
directory: "/controllers"
2419
schedule:
2520
interval: "daily"
2621

27-
- package-ecosystem: "docker"
28-
directory: "/controllers/remote-debug"
29-
schedule:
30-
interval: "daily"
31-
3222
- package-ecosystem: "docker"
3323
directory: "/job-task-runner"
3424
schedule:
3525
interval: "daily"
3626

37-
- package-ecosystem: "docker"
38-
directory: "/job-task-runner/remote-debug"
39-
schedule:
40-
interval: "daily"
41-
4227
- package-ecosystem: "docker"
4328
directory: "/kpack-image-builder"
4429
schedule:
4530
interval: "daily"
4631

47-
- package-ecosystem: "docker"
48-
directory: "/kpack-image-builder/remote-debug"
49-
schedule:
50-
interval: "daily"
51-
5232
- package-ecosystem: "docker"
5333
directory: "/statefulset-runner"
5434
schedule:
5535
interval: "daily"
5636

57-
- package-ecosystem: "docker"
58-
directory: "/statefulset-runner/remote-debug"
59-
schedule:
60-
interval: "daily"
61-
6237
- package-ecosystem: "github-actions"
6338
directory: "/"
6439
schedule:

HACKING.md

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -51,105 +51,6 @@ API endpoint: https://localhost
5151
Of these options, `cf-admin` is the user with permissions set up by default. Selecting the other user may allow you to login and
5252
successfully create resources, but you may notice that the user lacks the permissions to list those resources once created.
5353

54-
## Deploying to `kind` for remote debugging with a locally deployed container registry
55-
56-
This is the above method, but run with `dlv` for remote debugging.
57-
58-
```
59-
./scripts/deploy-on-kind.sh <kind-cluster-name> --debug
60-
```
61-
62-
To remote debug, connect with `dlv` on `localhost:30051` (`controllers`) or `localhost:30052` (`api`).
63-
64-
A sample VSCode `launch.json` configuration is provided below:
65-
66-
```
67-
{
68-
"version": "0.2.0",
69-
"configurations": [
70-
{
71-
"name": "Attach to Debug Controllers on Kind",
72-
"type": "go",
73-
"debugAdapter": "dlv-dap",
74-
"request": "attach",
75-
"mode": "remote",
76-
"substitutePath": [
77-
{
78-
"from": "${workspaceFolder}",
79-
"to": "/workspace"
80-
}
81-
],
82-
"host": "localhost",
83-
"port": 30051
84-
},
85-
{
86-
"name": "Attach to Debug API on Kind",
87-
"type": "go",
88-
"debugAdapter": "dlv-dap",
89-
"request": "attach",
90-
"mode": "remote",
91-
"substitutePath": [
92-
{
93-
"from": "${workspaceFolder}",
94-
"to": "/workspace"
95-
}
96-
],
97-
"host": "localhost",
98-
"port": 30052
99-
},
100-
{
101-
"name": "Attach to Debug Job Task Runner on Kind",
102-
"type": "go",
103-
"debugAdapter": "dlv-dap",
104-
"request": "attach",
105-
"mode": "remote",
106-
"substitutePath": [
107-
{
108-
"from": "${workspaceFolder}",
109-
"to": "/workspace"
110-
}
111-
],
112-
"host": "localhost",
113-
"port": 30053
114-
},
115-
{
116-
"name": "Attach to Debug Kpack Image Builder on Kind",
117-
"type": "go",
118-
"debugAdapter": "dlv-dap",
119-
"request": "attach",
120-
"mode": "remote",
121-
"substitutePath": [
122-
{
123-
"from": "${workspaceFolder}",
124-
"to": "/workspace"
125-
}
126-
],
127-
"host": "localhost",
128-
"port": 30054
129-
},
130-
{
131-
"name": "Attach to Debug Statefulset Runner on Kind",
132-
"type": "go",
133-
"debugAdapter": "dlv-dap",
134-
"request": "attach",
135-
"mode": "remote",
136-
"substitutePath": [
137-
{
138-
"from": "${workspaceFolder}",
139-
"to": "/workspace"
140-
}
141-
],
142-
"host": "localhost",
143-
"port": 30055
144-
}
145-
]
146-
}
147-
148-
```
149-
150-
> **Note**
151-
> Images built for debugging are based on an Ubuntu container image, rather than distroless, so deploying with `--debug` is useful if you plan to `kubectl exec` into the running containers for any reason.
152-
15354
## Image tagging conventions
15455

15556
We store Korifi container images on [DockerHub](https://hub.docker.com/u/cloudfoundry).

README.helm.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Here are all the values that can be set for the chart:
7878
- `workloadsTLSSecret` (_String_): TLS secret used when setting up an app routes.
7979
- `crds`:
8080
- `include` (_Boolean_): Install CRDs as part of the Helm installation.
81-
- `debug` (_Boolean_): Enables remote debugging with [Delve](https://github.com/go-delve/delve).
8281
- `defaultAppDomainName` (_String_): Base domain name for application URLs.
8382
- `eksContainerRegistryRoleARN` (_String_): Amazon Resource Name (ARN) of the IAM role to use to access the ECR registry from an EKS deployed Korifi. Required if containerRegistrySecret not set.
8483
- `experimental`: Experimental features. No guarantees are provided and breaking/backwards incompatible changes should be expected. These features are not recommended for use in production environments.

api/remote-debug/Dockerfile

Lines changed: 0 additions & 38 deletions
This file was deleted.

controllers/remote-debug/Dockerfile

Lines changed: 0 additions & 33 deletions
This file was deleted.

helm/korifi/api/deployment.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ spec:
2626
- name: INTERNAL_CERT_PATH
2727
value: /etc/korifi-tls-internal
2828
image: {{ .Values.api.image }}
29-
{{- if .Values.debug }}
30-
command:
31-
- "/dlv"
32-
args:
33-
- "--listen=:40000"
34-
- "--headless=true"
35-
- "--api-version=2"
36-
- "exec"
37-
- "/cfapi"
38-
- "--continue"
39-
- "--accept-multiclient"
40-
{{- end }}
4129
name: korifi-api
4230
ports:
4331
- containerPort: {{ .Values.api.apiServer.internalPort }}

helm/korifi/api/service.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,3 @@ spec:
1414
selector:
1515
app: korifi-api
1616
type: ClusterIP
17-
18-
---
19-
{{- if .Values.debug }}
20-
apiVersion: v1
21-
kind: Service
22-
metadata:
23-
name: api-debug-port
24-
namespace: {{ .Release.Namespace }}
25-
spec:
26-
ports:
27-
- name: debug-30052
28-
nodePort: 30052
29-
port: 30052
30-
protocol: TCP
31-
targetPort: 40000
32-
selector:
33-
app: korifi-api
34-
type: NodePort
35-
{{- end }}

helm/korifi/controllers/deployment.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,9 @@ spec:
2727
- name: CONTROLLERSCONFIG
2828
value: /etc/korifi-controllers-config
2929
image: {{ .Values.controllers.image }}
30-
{{- if .Values.debug }}
31-
command:
32-
- "/dlv"
33-
args:
34-
- "--listen=:40000"
35-
- "--headless=true"
36-
- "--api-version=2"
37-
- "exec"
38-
- "/manager"
39-
- "--continue"
40-
- "--accept-multiclient"
41-
- "--"
42-
- "--health-probe-bind-address=:8081"
43-
- "--leader-elect"
44-
{{- else }}
4530
args:
4631
- --health-probe-bind-address=:8081
4732
- --leader-elect
48-
{{- end }}
4933
livenessProbe:
5034
httpGet:
5135
path: /healthz

helm/korifi/controllers/service.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,3 @@ spec:
99
targetPort: 9443
1010
selector:
1111
app: korifi-controllers
12-
13-
{{- if .Values.debug }}
14-
---
15-
apiVersion: v1
16-
kind: Service
17-
metadata:
18-
name: controller-manager-debug-port
19-
namespace: {{ .Release.Namespace }}
20-
spec:
21-
ports:
22-
- name: debug-30051
23-
nodePort: 30051
24-
port: 30051
25-
protocol: TCP
26-
targetPort: 40000
27-
selector:
28-
app: korifi-controllers
29-
type: NodePort
30-
{{- end }}

helm/korifi/job-task-runner/deployment.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,10 @@ spec:
2323
containers:
2424
- name: manager
2525
image: {{ .Values.jobTaskRunner.image }}
26-
{{- if .Values.debug }}
27-
command:
28-
- "/dlv"
29-
args:
30-
- "--listen=:40000"
31-
- "--headless=true"
32-
- "--api-version=2"
33-
- "exec"
34-
- "/manager"
35-
- "--continue"
36-
- "--accept-multiclient"
37-
- "--"
38-
- "--health-probe-bind-address=:8081"
39-
- "--leader-elect"
40-
- "--ttl={{ required "jobTTL is required" .Values.jobTaskRunner.jobTTL }}"
41-
{{- else }}
4226
args:
4327
- --health-probe-bind-address=:8081
4428
- --leader-elect
4529
- --ttl={{ required "jobTTL is required" .Values.jobTaskRunner.jobTTL }}
46-
{{- end }}
4730
livenessProbe:
4831
httpGet:
4932
path: /healthz

0 commit comments

Comments
 (0)