Skip to content

Add support for IPv6 #2190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5afe069
add support for ipv6
salonichf5 Jul 2, 2024
1fe7bb1
Update apis/v1alpha1/nginxproxy_types.go
salonichf5 Jul 8, 2024
caafe33
updates based on reviews
salonichf5 Jul 9, 2024
6c96e94
edit kind cluster creation with dual stack
salonichf5 Jul 9, 2024
0a5ead0
fix fieldalignment
salonichf5 Jul 9, 2024
8a930d7
updates based on reviews
salonichf5 Jul 10, 2024
2f03c33
update unit test
salonichf5 Jul 10, 2024
a19793c
update endpoint verification based on NGINX IP Family
salonichf5 Jul 11, 2024
5600726
update resolver
salonichf5 Jul 11, 2024
ec86322
update nginx proxy validator for ipFamily
salonichf5 Jul 11, 2024
5f6f583
add conditions to service
salonichf5 Jul 12, 2024
5b38ff9
improve verify IPFamily
salonichf5 Jul 12, 2024
b3dcc2c
Update internal/mode/static/state/resolver/resolver_test.go
salonichf5 Jul 12, 2024
c804274
Update internal/mode/static/nginx/config/upstreams_test.go
salonichf5 Jul 12, 2024
a578387
Update internal/mode/static/nginx/config/servers.go
salonichf5 Jul 12, 2024
624fd81
Update internal/mode/static/state/dataplane/configuration_test.go
salonichf5 Jul 12, 2024
de05457
Update internal/mode/static/state/graph/backend_refs.go
salonichf5 Jul 12, 2024
fe42fa5
Update internal/mode/static/state/graph/backend_refs.go
salonichf5 Jul 12, 2024
82584b2
Update internal/mode/static/state/graph/backend_refs.go
salonichf5 Jul 12, 2024
931c613
Update internal/mode/static/state/graph/backend_refs_test.go
salonichf5 Jul 12, 2024
2d1938c
Update internal/mode/static/state/graph/backend_refs_test.go
salonichf5 Jul 12, 2024
efe7fa1
address comments
salonichf5 Jul 12, 2024
4175da4
update compat doc and troubleshooting guide
salonichf5 Jul 14, 2024
e3c1b57
update doc
salonichf5 Jul 15, 2024
2ea4db6
update troubleshooting guide
salonichf5 Jul 15, 2024
b52b90d
update based on reviews
salonichf5 Jul 15, 2024
9ef4868
move service name creation out of function
salonichf5 Jul 16, 2024
e802e82
address comments
salonichf5 Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
edit kind cluster creation with dual stack
  • Loading branch information
salonichf5 committed Jul 17, 2024
commit 6c96e949a70c1c25942770840c5dbc7111be9d27
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ MANIFEST_DIR = $(CURDIR)/deploy/manifests
CHART_DIR = $(SELF_DIR)charts/nginx-gateway-fabric
NGINX_CONF_DIR = internal/mode/static/nginx/conf
NJS_DIR = internal/mode/static/nginx/modules/src
KIND_CONFIG_FILE = $(SELF_DIR)config/cluster/kind-cluster.yaml
NGINX_DOCKER_BUILD_PLUS_ARGS = --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key
BUILD_AGENT=local
PLUS_ENABLED ?= false
Expand Down Expand Up @@ -160,7 +161,7 @@ deps: ## Add missing and remove unused modules, verify deps and download them to
.PHONY: create-kind-cluster
create-kind-cluster: ## Create a kind cluster
$(eval KIND_IMAGE=$(shell grep -m1 'FROM kindest/node' <$(SELF_DIR)tests/Dockerfile | awk -F'[ ]' '{print $$2}'))
kind create cluster --image $(KIND_IMAGE)
kind create cluster --image $(KIND_IMAGE) --config $(KIND_CONFIG_FILE)

.PHONY: delete-kind-cluster
delete-kind-cluster: ## Delete kind cluster
Expand Down
1 change: 1 addition & 0 deletions apis/v1alpha1/nginxproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type NginxProxyList struct {
// IPFamilyType specifies the IP family to be used by NGINX.
//
// +kubebuilder:validation:Enum=dual;ipv4;ipv6
// +kubebuilder:default:=dual
type IPFamilyType string

const (
Expand Down
10 changes: 5 additions & 5 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions config/cluster/kind-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
networking:
ipFamily: dual
# ipFamily: ipv6
# ipFamily: ipv4
apiServerAddress: 127.0.0.1
11 changes: 3 additions & 8 deletions docs/developer/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,29 +134,24 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-

1. Create a `kind` cluster:

To create a `kind` cluster with IPv4 enabled:
To create a `kind` cluster with dual (IPv4 and IPv6) enabled:

```makefile
make create-kind-cluster
```

To create a `kind` cluster with IPv6 or Dual IPFamily enabled, use this `config.yaml`:
To create a `kind` cluster with IPv6 or IPv4 only, edit kind cluster config located at `nginx-gateway-fabric/config/cluster/kind-cluster.yaml`:

```yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
networking:
ipFamily: dual
# ipFamily: ipv6
ipFamily: ipv6
apiServerAddress: 127.0.0.1
```

```shell
kind create cluster --config ~/cluster.yaml
```

2. Load the previously built images onto your `kind` cluster:

```shell
Expand Down
56 changes: 28 additions & 28 deletions site/content/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,44 +299,44 @@ NginxProxySpec
<table class="table table-bordered table-striped">
<tr>
<td>
<code>telemetry</code><br/>
<code>ipFamily</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
Telemetry
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
IPFamilyType
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Telemetry specifies the OpenTelemetry configuration.</p>
<p>IPFamily specifies the IP family to be used by the server.
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
</td>
</tr>
<tr>
<td>
<code>disableHTTP2</code><br/>
<code>telemetry</code><br/>
<em>
bool
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
Telemetry
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
Default is false, meaning http2 will be enabled for all servers.</p>
<p>Telemetry specifies the OpenTelemetry configuration.</p>
</td>
</tr>
<tr>
<td>
<code>ipFamily</code><br/>
<code>disableHTTP2</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
IPFamilyType
</a>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>IPFamily specifies the IP family to be used by the server.
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
Default is false, meaning http2 will be enabled for all servers.</p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -921,44 +921,44 @@ Logging
<tbody>
<tr>
<td>
<code>telemetry</code><br/>
<code>ipFamily</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
Telemetry
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
IPFamilyType
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Telemetry specifies the OpenTelemetry configuration.</p>
<p>IPFamily specifies the IP family to be used by the server.
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
</td>
</tr>
<tr>
<td>
<code>disableHTTP2</code><br/>
<code>telemetry</code><br/>
<em>
bool
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
Telemetry
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
Default is false, meaning http2 will be enabled for all servers.</p>
<p>Telemetry specifies the OpenTelemetry configuration.</p>
</td>
</tr>
<tr>
<td>
<code>ipFamily</code><br/>
<code>disableHTTP2</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
IPFamilyType
</a>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>IPFamily specifies the IP family to be used by the server.
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
Default is false, meaning http2 will be enabled for all servers.</p>
</td>
</tr>
</tbody>
Expand Down