Skip to content

Commit

Permalink
Update docs/networking/kindnet.md
Browse files Browse the repository at this point in the history
Co-authored-by: Ciprian Hacman <[email protected]>
Change-Id: I183e7dc52a71aa0d22607412c6e174c8d934c0c4
  • Loading branch information
aojea and hakman committed Jan 7, 2025
1 parent 8dc1e0d commit 98ad825
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/networking/kindnet.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Kindnet

***Kindnet support is experimental, and may be removed at any time***

## Introduction

* [kindnet](http://kindnet.es)

Kindnet focuses on providing essential networking functionality without unnecessary complexity.
Expand Down
3 changes: 3 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5785,6 +5785,9 @@ spec:
fastPathThreshold:
format: int32
type: integer
logLevel:
format: int32
type: integer
masquerade:
description: KindnetMasqueradeSpec configures Kindnet masquerading
settings.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ type KindnetNetworkingSpec struct {
FastPathThreshold *int32 `json:"fastPathThreshold,omitempty"`
// node agent masquerading rules
Masquerade *KindnetMasqueradeSpec `json:"masquerade,omitempty"`
// log level
LogLevel *int32 `json:"logLevel,omitempty"`
}

type KindnetMasqueradeSpec struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/kops/v1alpha2/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ type KindnetNetworkingSpec struct {
NAT64 *bool `json:"nat64,omitempty"`
FastPathThreshold *int32 `json:"fastPathThreshold,omitempty"`
Masquerade *KindnetMasqueradeSpec `json:"masquerade,omitempty"`
LogLevel *int32 `json:"logLevel,omitempty"`
}

// KindnetMasqueradeSpec configures Kindnet masquerading settings.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

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

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

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

1 change: 1 addition & 0 deletions pkg/apis/kops/v1alpha3/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ type KindnetNetworkingSpec struct {
NAT64 *bool `json:"nat64,omitempty"`
FastPathThreshold *int32 `json:"fastPathThreshold,omitempty"`
Masquerade *KindnetMasqueradeSpec `json:"masquerade,omitempty"`
LogLevel *int32 `json:"logLevel,omitempty"`
}

type KindnetMasqueradeSpec struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

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

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

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

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

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

4 changes: 4 additions & 0 deletions pkg/model/components/kindnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ func (b *KindnetOptionsBuilder) BuildOptions(o *kops.Cluster) error {
c.FastPathThreshold = fi.PtrTo(int32(0))
}

if c.LogLevel == nil {
c.LogLevel = fi.PtrTo(int32(2))
}

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ spec:
networkCIDR: 172.20.0.0/16
networking:
kindnet:
fastPathThreshold: 0
logLevel: 2
masquerade:
enabled: true
nonMasqueradeCIDRs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
version: 9.99.0
- id: k8s-1.32
manifest: networking.kindnet/k8s-1.32.yaml
manifestHash: 8da09d999d4060ab14a2517619248aadd0697dd9f966ea1cbf9866a780c27ea5
manifestHash: 01687948e8fc685a14c3571170e46aae89adce0300947f3625a2074b1b729a63
name: networking.kindnet
needsRollingUpdate: all
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ spec:
- /bin/kindnetd
- --hostname-override=$(NODE_NAME)
- --v=2
- --fastpath-threshold=0
- --masquerading=true
- --no-masquerade-cidr=172.20.0.0/16,100.96.0.0/11,100.64.0.0/13
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ spec:
args:
- /bin/kindnetd
- --hostname-override=$(NODE_NAME)
- --v=2
{{- if .Networking.Kindnet.LogLevel }}
- --v={{ .Networking.Kindnet.LogLevel }}
{{- end }}
{{- if .Networking.Kindnet.NetworkPolicies }}
- --network-policy={{ .Networking.Kindnet.NetworkPolicies }}
{{- end }}
Expand Down

0 comments on commit 98ad825

Please sign in to comment.