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
Problem:
Support provisioning NGINX data plane per Gateway, as expected
by the Gateway API conformance tests.
See #634
for more info
Solution:
- Implement provisioner command which which provisions a Deployment
of NKG (static mode) for each Gateway of the provisioner GatewayClass.
- Add provisioner manifests and docs
Fixes#634
Additionally, introduce PrepareTimeForFakeClient helper function, which
fixes an error that appeared on GitHub Action pipeline, not locally (see below).
(To reproduce it locally, run `make TZ=123 unit-tests` from a commit before
this one and ensure you compare Conditions in the status as in
Expect(clusterGc.Status.Conditions).To(Equal(expectedConditions)) )
The timezone of the time in a resource field returned by the fake client was different
from the one set in the field when updating the resource.
The commit adds PrepareTimeForFakeClient() which ensures that the time is prepared
correctly so that the timezone is the same.
The problem is only present when comparing status Conditions using gomega like
Expect(clusterGc.Status.Conditions).To(Equal(expectedConditions))
but not present if comparing using cmp like
Expect(helpers.Diff(expectedGc, latestGc)).To(BeEmpty()).
[FAILED] Expected
<*time.Location | 0x30d0b00>: {
name: "Local",
zone: [
{name: "UTC", offset: 0, isDST: false},
],
tx: [
{
when: -9223372036854775808,
index: 0,
isstd: false,
isutc: false,
},
],
extend: "UTC0",
cacheStart: -9223372036854775808,
cacheEnd: 9223372036854775807,
cacheZone: {name: "UTC", offset: 0, isDST: false},
}
to equal
<*time.Location | 0x309f240>: {name: "UTC", zone: nil, tx: nil, extend: "", cacheStart: 0, cacheEnd: 0, cacheZone: nil}
Provisioner implements data plane provisioning for NGINX Kubernetes Gateway (NKG): it creates an NKG static mode
4
+
Deployment for each Gateway that belongs to the provisioner GatewayClass.
5
+
6
+
```
7
+
Usage:
8
+
gateway provisioner-mode [flags]
9
+
10
+
Flags:
11
+
-h, --help help for provisioner-mode
12
+
13
+
Global Flags:
14
+
--gateway-ctlr-name string The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is 'k8s-gateway.nginx.org' (default "")
15
+
--gatewayclass string The name of the GatewayClass resource. Every NGINX Gateway must have a unique corresponding GatewayClass resource. (default "")
16
+
```
17
+
18
+
Provisioner is not meant to be used in production yet (see this issue for more details
19
+
https://github.com/nginxinc/nginx-kubernetes-gateway/issues/634). However, it can be used in the Gateway API conformance
20
+
tests, which expect a Gateway API implementation to provision an independent data plane per Gateway.
21
+
22
+
How to deploy:
23
+
24
+
1. Follow the [installation](/docs/installation.md) instructions up until the Deploy the NGINX Kubernetes Gateway Step
25
+
to deploy prerequisites for both the static mode Deployments and the provisioner.
0 commit comments