From 781cc893ab649730c91e3d8b51dcff813fcb2e22 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Thu, 26 Oct 2023 16:19:50 -0600 Subject: [PATCH 1/3] Remove the tftp proxy timeout: Slow clients, which are very common for firmware iPXE, will fail with this timeout. Also, updated all DNS names to be fully qualified. Signed-off-by: Jacob Weinstock --- tinkerbell/stack/templates/nginx-configmap.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tinkerbell/stack/templates/nginx-configmap.yaml b/tinkerbell/stack/templates/nginx-configmap.yaml index 354c8e21..2c54da79 100644 --- a/tinkerbell/stack/templates/nginx-configmap.yaml +++ b/tinkerbell/stack/templates/nginx-configmap.yaml @@ -21,7 +21,7 @@ data: proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; resolver $POD_NAMESERVER; - set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution + set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local.; # needed in Kubernetes for dynamic DNS resolution proxy_pass http://$smee_dns:{{ .Values.smee.http.port }}; } @@ -66,15 +66,14 @@ data: server { listen {{ .Values.smee.tftp.port }} udp; resolver $POD_NAMESERVER; - set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution + set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local.; # needed in Kubernetes for dynamic DNS resolution proxy_pass $smee_dns:{{ .Values.smee.tftp.port }}; - proxy_timeout 1s; access_log /dev/stdout logger-json; } server { listen {{ .Values.smee.syslog.port }} udp; resolver $POD_NAMESERVER; - set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution + set $smee_dns {{ .Values.smee.name }}.{{ .Release.Namespace }}.svc.cluster.local.; # needed in Kubernetes for dynamic DNS resolution proxy_pass $smee_dns:{{ .Values.smee.syslog.port }}; access_log /dev/stdout logger-json; } From 01b346e455e55278adace6ed0d6cfe82d7377fc7 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Thu, 26 Oct 2023 16:21:41 -0600 Subject: [PATCH 2/3] Bump stack chart version Signed-off-by: Jacob Weinstock --- tinkerbell/stack/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinkerbell/stack/Chart.yaml b/tinkerbell/stack/Chart.yaml index 8fe49f67..bae36e18 100644 --- a/tinkerbell/stack/Chart.yaml +++ b/tinkerbell/stack/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.1 +version: 0.4.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.4.1" +appVersion: "0.4.2" dependencies: - name: tink From 462f981d19799c3e1286a0680699e47eceb735a9 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Thu, 26 Oct 2023 16:30:05 -0600 Subject: [PATCH 3/3] Add nginx options for static file serving: These will improve performance for serving HookOS to iPXE clients. Signed-off-by: Jacob Weinstock --- tinkerbell/stack/templates/nginx-configmap.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tinkerbell/stack/templates/nginx-configmap.yaml b/tinkerbell/stack/templates/nginx-configmap.yaml index 2c54da79..9a8484b3 100644 --- a/tinkerbell/stack/templates/nginx-configmap.yaml +++ b/tinkerbell/stack/templates/nginx-configmap.yaml @@ -55,6 +55,8 @@ data: server { listen {{ .Values.stack.hook.port }}; location / { + sendfile on; + sendfile_max_chunk 1m; root /usr/share/nginx/html; } }