Skip to content

Commit 990c3c4

Browse files
committed
Move config-version sock and update docs
1 parent 5b20775 commit 990c3c4

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

internal/mode/static/nginx/config/version_template.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package config
22

33
const versionTemplateText = `
44
server {
5-
listen unix:/var/run/nginx/nginx-config-version.sock;
5+
listen unix:/var/lib/nginx/nginx-config-version.sock;
66
access_log off;
77
88
location /version {

internal/mode/static/nginx/runtime/verify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"k8s.io/apimachinery/pkg/util/wait"
1515
)
1616

17-
const configVersionURI = "/var/run/nginx/nginx-config-version.sock"
17+
const configVersionURI = "/var/lib/nginx/nginx-config-version.sock"
1818

1919
var noNewWorkersErrFmt = "reload unsuccessful: no new NGINX worker processes started for config version %d." +
2020
" Please check the NGINX container logs for possible configuration issues: %w"

site/content/overview/gateway-architecture.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The following list describes the connections, preceeded by their types in parent
7676
- Write: _NGF_ generates NGINX _configuration_ based on the cluster resources and writes them as `.conf` files to the mounted `nginx-conf` volume, located at `/etc/nginx/conf.d`. It also writes _TLS certificates_ and _keys_ from [TLS secrets](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets) referenced in the accepted Gateway resource to the `nginx-secrets` volume at the path `/etc/nginx/secrets`.
7777
- Read: _NGF_ reads the PID file `nginx.pid` from the `nginx-run` volume, located at `/var/run/nginx`. _NGF_ extracts the PID of the nginx process from this file in order to send reload signals to _NGINX master_.
7878
1. (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
79-
1. (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
79+
1. (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/lib/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
8080
1. (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
8181
1. (File I/O)
8282
- Write: The _NGINX master_ writes its PID to the `nginx.pid` file stored in the `nginx-run` volume.
@@ -88,7 +88,7 @@ The following list describes the connections, preceeded by their types in parent
8888
1. (File I/O) The _NGINX master_ sends logs to its _stdout_ and _stderr_, which are collected by the container runtime.
8989
1. (File I/O) An _NGINX worker_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
9090
1. (Signal) The _NGINX master_ controls the [lifecycle of _NGINX workers_](https://nginx.org/en/docs/control.html#reconfiguration) it creates workers with the new configuration and shutdowns workers with the old configuration.
91-
1. (HTTP) To consider a configuration reload a success, _NGF_ ensures that at least one NGINX worker has the new configuration. To do that, _NGF_ checks a particular endpoint via the unix:/var/run/nginx/nginx-config-version.sock UNIX socket.
91+
1. (HTTP) To consider a configuration reload a success, _NGF_ ensures that at least one NGINX worker has the new configuration. To do that, _NGF_ checks a particular endpoint via the unix:/var/lib/nginx/nginx-config-version.sock UNIX socket.
9292
1. (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
9393
1. (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.
9494

tests/suite/graceful_recovery_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ func runRecoveryTest(teaURL, coffeeURL, ngfPodName, containerName string, files
127127
Should(Succeed())
128128
}
129129

130-
// TEMP: Add sleep to see if it resolves falures
131-
time.Sleep(5 * time.Second)
132-
133130
Eventually(
134131
func() error {
135132
return checkForWorkingTraffic(teaURL, coffeeURL)

0 commit comments

Comments
 (0)