You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Settings module is responsible for loading the configuration settings from the "nkl-config" ConfigMap resource in the "nkl" namespace.
30
-
The Settings are loaded when the controller starts and are reloaded when the "nkl-config" ConfigMap resource is updated.
29
+
The Settings module is responsible for loading the configuration settings from the "nlk-config" ConfigMap resource in the "nlk" namespace.
30
+
The Settings are loaded when the controller starts and are reloaded when the "nlk-config" ConfigMap resource is updated.
31
31
32
32
### Watcher
33
33
34
34
The Watcher is responsible for monitoring changes to Service resources in the "nginx-ingress" namespace.
35
-
It registers methods that handle each event type. Events are handled by creating a `core.Event` instance and adding it to the "nkl-handler" queue.
35
+
It registers methods that handle each event type. Events are handled by creating a `core.Event` instance and adding it to the "nlk-handler" queue.
36
36
When adding the event to the queue, the Watcher also retrieves the list of Node IPs and adds the list to the event.
37
37
The master node ip is excluded from the list. (NOTE: This should be configurable.)
38
38
39
39
### Handler
40
40
41
-
The Handler is responsible for taking the `core.Event` instances from the "nkl-handler" queue and calling the Translator to convert the event into a `core.ServerUpdateEvent` instance,
42
-
adding each `core.ServerUpdateEvent` to the "nkl-synchronizer" queue.
41
+
The Handler is responsible for taking the `core.Event` instances from the "nlk-handler" queue and calling the Translator to convert the event into a `core.ServerUpdateEvent` instance,
42
+
adding each `core.ServerUpdateEvent` to the "nlk-synchronizer" queue.
43
43
44
44
### Translator
45
45
46
46
The Translator is responsible for converting the `core.Event` event into an `nginxClient.UpstreamServer` event.
47
-
This involves filtering out the `core.Event` instances that are not of interest to the controller by accepting only Port names starting with the NklPrefix value (currently _nkl-_).
47
+
This involves filtering out the `core.Event` instances that are not of interest to the controller by accepting only Port names starting with the NklPrefix value (currently _nlk-_).
48
48
The event is then fanned-out based on the defined Ports, one event per defined Port. Each port is then augmented with the Ingress name (the name configured in the Port definition with the NklPrefix value removed),
49
49
and the list of the Node's IP addresses.
50
50
51
51
The Translator passes the list of events to the Synchronizer by calling the `AddEvents` method.
52
52
53
53
**NOTE: It is important that the Port names match the name of the defined NGINX Plus Upstreams.**
54
54
55
-
In the following example the NGINX Plus Upstreams are named "nkl-nginx-lb-http" and "nkl-nginx-lb-https". These match the name in the NGINX Plus configuration.
55
+
In the following example the NGINX Plus Upstreams are named "nlk-nginx-lb-http" and "nlk-nginx-lb-https". These match the name in the NGINX Plus configuration.
56
56
57
57
```yaml
58
58
apiVersion: v1
@@ -66,19 +66,19 @@ spec:
66
66
- port: 80
67
67
targetPort: 80
68
68
protocol: TCP
69
-
name: nkl-nginx-lb-http
69
+
name: nlk-nginx-lb-http
70
70
- port: 443
71
71
targetPort: 443
72
72
protocol: TCP
73
-
name: nkl-nginx-lb-https
73
+
name: nlk-nginx-lb-https
74
74
selector:
75
75
app: nginx-ingress
76
76
```
77
77
78
78
### Synchronizer
79
79
80
80
The Synchronizer is responsible for fanning-out the given list of `core.ServerUpdateEvent` events, one for each configured NGINX Plus host.
81
-
The NGINX Plus hosts are configured using a ConfigMap resource named "nkl-config" in the "nkl" namespace. An example of the ConfigMap is shown below.
81
+
The NGINX Plus hosts are configured using a ConfigMap resource named "nlk-config" in the "nlk" namespace. An example of the ConfigMap is shown below.
This example includes two NGINX Plus hosts to support High Availability.
95
95
96
-
Additionally, the Synchronizer is responsible for taking the `core.ServerUpdateEvent` instances from the "nkl-synchronizer" queue and updating the target NGINX Plus host.
96
+
Additionally, the Synchronizer is responsible for taking the `core.ServerUpdateEvent` instances from the "nlk-synchronizer" queue and updating the target NGINX Plus host.
97
97
The Synchronizer uses the [NGINX Plus Go client](https://github.com/nginxinc/nginx-plus-go-client) to communicate with each NGINX Plus host.
98
98
99
99
@@ -106,7 +106,7 @@ having defaults set to a base of 2 seconds, and a maximum of 60 seconds.
106
106
### Jitter
107
107
108
108
The Synchronizer uses a jitter mechanism to avoid thrashing the NGINX Plus hosts. Each `core.ServerUpdateEvent` instance
109
-
is added to the "nkl-synchronizer" queue with a random jitter value between 250 and 750 milliseconds.
109
+
is added to the "nlk-synchronizer" queue with a random jitter value between 250 and 750 milliseconds.
110
110
111
111
## Authors
112
112
- Steve Wagner - Solutions Architect - Community and Alliances @ F5, Inc.
0 commit comments