Skip to content

Commit a3a9c67

Browse files
committed
edit kind cluster creation with dual stack
1 parent 01d4670 commit a3a9c67

File tree

6 files changed

+48
-42
lines changed

6 files changed

+48
-42
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MANIFEST_DIR = $(CURDIR)/deploy/manifests
77
CHART_DIR = $(SELF_DIR)charts/nginx-gateway-fabric
88
NGINX_CONF_DIR = internal/mode/static/nginx/conf
99
NJS_DIR = internal/mode/static/nginx/modules/src
10+
KIND_CONFIG_FILE = $(SELF_DIR)config/cluster/kind-cluster.yaml
1011
NGINX_DOCKER_BUILD_PLUS_ARGS = --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key
1112
BUILD_AGENT=local
1213
PLUS_ENABLED ?= false
@@ -160,7 +161,7 @@ deps: ## Add missing and remove unused modules, verify deps and download them to
160161
.PHONY: create-kind-cluster
161162
create-kind-cluster: ## Create a kind cluster
162163
$(eval KIND_IMAGE=$(shell grep -m1 'FROM kindest/node' <$(SELF_DIR)tests/Dockerfile | awk -F'[ ]' '{print $$2}'))
163-
kind create cluster --image $(KIND_IMAGE)
164+
kind create cluster --image $(KIND_IMAGE) --config $(KIND_CONFIG_FILE)
164165

165166
.PHONY: delete-kind-cluster
166167
delete-kind-cluster: ## Delete kind cluster

apis/v1alpha1/nginxproxy_types.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type NginxProxyList struct {
3131
// IPFamilyType specifies the IP family to be used by NGINX.
3232
//
3333
// +kubebuilder:validation:Enum=dual;ipv4;ipv6
34+
// +kubebuilder:default:=dual
3435
type IPFamilyType string
3536

3637
const (

apis/v1alpha1/zz_generated.deepcopy.go

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/cluster/kind-cluster.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
networking:
6+
ipFamily: dual
7+
# ipFamily: ipv6
8+
# ipFamily: ipv4
9+
apiServerAddress: 127.0.0.1

docs/developer/quickstart.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -114,29 +114,24 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
114114

115115
1. Create a `kind` cluster:
116116

117-
To create a `kind` cluster with IPv4 enabled:
117+
To create a `kind` cluster with dual (IPv4 and IPv6) enabled:
118118

119119
```makefile
120120
make create-kind-cluster
121121
```
122122

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

125125
```yaml
126126
kind: Cluster
127127
apiVersion: kind.x-k8s.io/v1alpha4
128128
nodes:
129129
- role: control-plane
130130
networking:
131-
ipFamily: dual
132-
# ipFamily: ipv6
131+
ipFamily: ipv6
133132
apiServerAddress: 127.0.0.1
134133
```
135134
136-
```shell
137-
kind create cluster --config ~/cluster.yaml
138-
```
139-
140135
2. Load the previously built images onto your `kind` cluster:
141136

142137
```shell

site/content/reference/api.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -299,44 +299,44 @@ NginxProxySpec
299299
<table class="table table-bordered table-striped">
300300
<tr>
301301
<td>
302-
<code>telemetry</code><br/>
302+
<code>ipFamily</code><br/>
303303
<em>
304-
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
305-
Telemetry
304+
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
305+
IPFamilyType
306306
</a>
307307
</em>
308308
</td>
309309
<td>
310310
<em>(Optional)</em>
311-
<p>Telemetry specifies the OpenTelemetry configuration.</p>
311+
<p>IPFamily specifies the IP family to be used by the server.
312+
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
312313
</td>
313314
</tr>
314315
<tr>
315316
<td>
316-
<code>disableHTTP2</code><br/>
317+
<code>telemetry</code><br/>
317318
<em>
318-
bool
319+
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
320+
Telemetry
321+
</a>
319322
</em>
320323
</td>
321324
<td>
322325
<em>(Optional)</em>
323-
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
324-
Default is false, meaning http2 will be enabled for all servers.</p>
326+
<p>Telemetry specifies the OpenTelemetry configuration.</p>
325327
</td>
326328
</tr>
327329
<tr>
328330
<td>
329-
<code>ipFamily</code><br/>
331+
<code>disableHTTP2</code><br/>
330332
<em>
331-
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
332-
IPFamilyType
333-
</a>
333+
bool
334334
</em>
335335
</td>
336336
<td>
337337
<em>(Optional)</em>
338-
<p>IPFamily specifies the IP family to be used by the server.
339-
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
338+
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
339+
Default is false, meaning http2 will be enabled for all servers.</p>
340340
</td>
341341
</tr>
342342
</table>
@@ -921,44 +921,44 @@ Logging
921921
<tbody>
922922
<tr>
923923
<td>
924-
<code>telemetry</code><br/>
924+
<code>ipFamily</code><br/>
925925
<em>
926-
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
927-
Telemetry
926+
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
927+
IPFamilyType
928928
</a>
929929
</em>
930930
</td>
931931
<td>
932932
<em>(Optional)</em>
933-
<p>Telemetry specifies the OpenTelemetry configuration.</p>
933+
<p>IPFamily specifies the IP family to be used by the server.
934+
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
934935
</td>
935936
</tr>
936937
<tr>
937938
<td>
938-
<code>disableHTTP2</code><br/>
939+
<code>telemetry</code><br/>
939940
<em>
940-
bool
941+
<a href="#gateway.nginx.org/v1alpha1.Telemetry">
942+
Telemetry
943+
</a>
941944
</em>
942945
</td>
943946
<td>
944947
<em>(Optional)</em>
945-
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
946-
Default is false, meaning http2 will be enabled for all servers.</p>
948+
<p>Telemetry specifies the OpenTelemetry configuration.</p>
947949
</td>
948950
</tr>
949951
<tr>
950952
<td>
951-
<code>ipFamily</code><br/>
953+
<code>disableHTTP2</code><br/>
952954
<em>
953-
<a href="#gateway.nginx.org/v1alpha1.IPFamilyType">
954-
IPFamilyType
955-
</a>
955+
bool
956956
</em>
957957
</td>
958958
<td>
959959
<em>(Optional)</em>
960-
<p>IPFamily specifies the IP family to be used by the server.
961-
Default is &ldquo;dual&rdquo;, meaning the server will use both IPv4 and IPv6.</p>
960+
<p>DisableHTTP2 defines if http2 should be disabled for all servers.
961+
Default is false, meaning http2 will be enabled for all servers.</p>
962962
</td>
963963
</tr>
964964
</tbody>

0 commit comments

Comments
 (0)