Skip to content

Commit

Permalink
allow to turn on delve (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas authored Apr 17, 2024
1 parent 2ef03df commit 8c7cc49
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 58 deletions.
43 changes: 22 additions & 21 deletions charts/appgate-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,28 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
# command: ["poktrolld"]
# command: ["dlv"]
args:
#- "exec"
#- "--listen=:40006"
#- "--headless=true"
#- "--api-version=2"
#- "--accept-multiclient"
#- "/usr/local/bin/poktrolld"
#- "--"
{{ if .Values.development.delve.enabled }}
command: [ "/go/bin/dlv" ]
args:
- exec
- --listen={{ .Values.development.delve.laddr }}
- --headless=true
- --api-version=2
- --accept-multiclient
- /usr/local/bin/poktrolld
- --
{{ else }}
# TODO(@okdas): enable health checks
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
args:
{{ end }}
- "appgate-server"
- "--keyring-backend={{ .Values.keyringBackend }}"
- "--config=/root/.poktroll/config/config.yaml"
Expand All @@ -56,17 +68,6 @@ spec:
- name: metrics
containerPort: {{ .Values.metrics.port }}
protocol: TCP
- containerPort: 40006 # TODO(@okdas): remove this - currently only needed for LocalNet dlv
name: debug
# TODO(@okdas): enable health checks
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
5 changes: 5 additions & 0 deletions charts/appgate-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ config:
# If changing port here, make sure to adjust `metrics.serviceMonitor.port`
addr: :9090

development:
delve:
enabled: false
laddr: :40004

keyringBackend: test

imagePullSecrets: []
Expand Down
14 changes: 13 additions & 1 deletion charts/poktroll-validator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ spec:
name: debug
- containerPort: {{ .Values.service.grpcPort }}
name: grpc
{{ if .Values.development.delve.enabled }}
command: [ "/go/bin/dlv" ]
args:
- exec
- --listen={{ .Values.development.delve.laddr }}
- --headless=true
- --api-version=2
- --accept-multiclient
- /usr/local/bin/poktrolld
- --
{{ else }}
livenessProbe:
httpGet:
path: /
Expand All @@ -74,7 +85,8 @@ spec:
httpGet:
path: /
port: {{ .Values.service.rpcPort }}
args:
args:
{{ end }}
- start
- --rpc.laddr=tcp://0.0.0.0:36657
- --p2p.laddr=0.0.0.0:36656
Expand Down
37 changes: 20 additions & 17 deletions charts/poktroll-validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ logs:
level: info
format: plain

development:
delve:
enabled: false
laddr: :40004

image:
repository: ghcr.io/pokt-network/poktrolld
tag: latest
Expand All @@ -32,20 +37,18 @@ persistence:
existingClaim: ""
scripts:
enabled: true
podSecurityContext:
{}
# allowPrivilegeEscalation: true
# capabilities:
# add: ["SYS_PTRACE"]
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 8
# memory: 16Gi
# requests:
# cpu: 4
# memory: 12Gi
podSecurityContext: {}
# allowPrivilegeEscalation: true
# capabilities:
# add: ["SYS_PTRACE"]
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 8
# memory: 16Gi
# requests:
# cpu: 4
# memory: 12Gi
40 changes: 21 additions & 19 deletions charts/relayminer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,28 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
# command: ["dlv"]
{{ if .Values.development.delve.enabled }}
command: [ "/go/bin/dlv" ]
args:
# - "exec"
# - "--listen=:40005"
# - "--headless=true"
# - "--api-version=2"
# - "--accept-multiclient"
# - "/usr/local/bin/poktrolld"
# - "--"
- exec
- --listen={{ .Values.development.delve.laddr }}
- --headless=true
- --api-version=2
- --accept-multiclient
- /usr/local/bin/poktrolld
- --
{{ else }}
# TODO(@okdas): enable health checks
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
args:
{{ end }}
- "relayminer"
- "--keyring-backend={{ .Values.keyringBackend }}"
- "--config=/root/.poktroll/config/config.yaml"
Expand All @@ -55,17 +68,6 @@ spec:
- name: metrics
containerPort: {{ .Values.metrics.port }}
protocol: TCP
- containerPort: 40005 # TODO(@okdas): remove this - currently only needed for LocalNet dlv
name: debug
# TODO(@okdas): enable health checks
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
5 changes: 5 additions & 0 deletions charts/relayminer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ config:
# If changing port here, make sure to adjust `metrics.serviceMonitor.port`
addr: :9090

development:
delve:
enabled: false
laddr: :40004

keyringBackend: test

imagePullSecrets: []
Expand Down

0 comments on commit 8c7cc49

Please sign in to comment.