Skip to content

Commit

Permalink
stack: add dhcrelay giaddr control behaviour (#84)
Browse files Browse the repository at this point in the history
## Description

Introduce presentGIAddr to control the handling of incoming DHCPv4 packets which already contain relay agent options.

## Why is this needed

When there are more relay agents - having append would result in multiple `Agent-Information`.
  • Loading branch information
mergify[bot] authored Mar 3, 2024
2 parents ecf484b + 7cc5e43 commit 732235e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions tinkerbell/stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ helm upgrade stack-release stack/ --namespace tink-system --wait
| `stack.relay.image` | Image to use for the DHCP relay service | `ghcr.io/jacobweinstock/dhcrelay` |
| `stack.relay.maxHopCount` | Maximum number of hops to allow for DHCP relay | `10` |
| `stack.relay.sourceInterface` | Host/Node interface to use for listening for DHCP broadcast packets | `eno1` |
| `stack.relay.presentGiaddrAction` | Control the handling of incoming DHCPv4 packets which already contain relay agent options | `append` |

### Tinkerbell Services Parameters

Expand Down
2 changes: 1 addition & 1 deletion tinkerbell/stack/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
{{- end }}
- name: {{ .Values.stack.relay.name }}
image: {{ .Values.stack.relay.image }}
args: ["-m", "append", "-c", "{{ .Values.stack.relay.maxHopCount }}", "-id", "{{ $macvlanInterfaceName }}", "-iu", "eth0", "-U", "eth0", "smee.{{ .Release.Namespace }}.svc.cluster.local."]
args: ["-m", "{{ .Values.stack.relay.presentGiaddrAction }}", "-c", "{{ .Values.stack.relay.maxHopCount }}", "-id", "{{ $macvlanInterfaceName }}", "-iu", "eth0", "-U", "eth0", "smee.{{ .Release.Namespace }}.svc.cluster.local."]
ports:
- containerPort: 67
protocol: UDP
Expand Down
6 changes: 6 additions & 0 deletions tinkerbell/stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ stack:
# don't respect signals properly when run as PID 1.
image: ghcr.io/jacobweinstock/dhcprelay # dhcprelay is a multiarch-enabled version of dhcrelay
maxHopCount: 10
# The presentGiaddrAction pertains to the course of action when the giaddr field appears in the DHCP packet.
# In situations where another DHCP relay agent is already in operation within the environment,
# maintaining option (82) in its received state from the dhcrelay might be essential.
# This behavior can be regulated by configuring the presentGiaddrAction as "forward."
# Additional information is available at: https://linux.die.net/man/8/dhcrelay
presentGiaddrAction: append
# sourceInterface is the Host/Node interface to use for listening for DHCP broadcast packets.
# When unset, the interface from the default route will be used.
# sourceInterface: eno1
Expand Down

0 comments on commit 732235e

Please sign in to comment.