Skip to content
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

Add support for netExtraArgs #7429

Merged
merged 1 commit into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions docs/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ spec:
mtu: 8912
```

### Configuring Weave Net EXTRA_ARGS

Weave allows you to pass command line arguments to weave by adding those arguments to the EXTRA_ARGS environmental variable.
This can be used for debugging or for customizing the logging level of weave net.

```
spec:
networking:
weave:
netExtraArgs: "--log-level=info"
```

Note that it is possible to break the cluster networking if flags are improperly used and as such this option should be used with caution.

### Configuring Weave network encryption

The Weave network encryption is configurable by creating a weave network secret password.
Expand Down
7 changes: 4 additions & 3 deletions pkg/apis/kops/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ type KopeioNetworkingSpec struct {

// WeaveNetworkingSpec declares that we want Weave networking
type WeaveNetworkingSpec struct {
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
}

// FlannelNetworkingSpec declares that we want Flannel networking
Expand Down
7 changes: 4 additions & 3 deletions pkg/apis/kops/v1alpha1/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ type KopeioNetworkingSpec struct {

// WeaveNetworkingSpec declares that we want Weave networking
type WeaveNetworkingSpec struct {
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
}

// FlannelNetworkingSpec declares that we want Flannel networking
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

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

7 changes: 4 additions & 3 deletions pkg/apis/kops/v1alpha2/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ type KopeioNetworkingSpec struct {

// WeaveNetworkingSpec declares that we want Weave networking
type WeaveNetworkingSpec struct {
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
MTU *int32 `json:"mtu,omitempty"`
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
}

// FlannelNetworkingSpec declares that we want Flannel networking
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.

Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ spec:
- name: CONN_LIMIT
value: "{{ .Networking.Weave.ConnLimit }}"
{{- end }}
{{- if .Networking.Weave.NetExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NetExtraArgs }}"
{{- end }}
{{- if WeaveSecret }}
- name: WEAVE_PASSWORD
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ spec:
- name: CONN_LIMIT
value: "{{ .Networking.Weave.ConnLimit }}"
{{- end }}
{{- if .Networking.Weave.NetExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NetExtraArgs }}"
{{- end }}
{{- if WeaveSecret }}
- name: WEAVE_PASSWORD
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ spec:
- name: CONN_LIMIT
value: "{{ .Networking.Weave.ConnLimit }}"
{{- end }}
{{- if .Networking.Weave.NetExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NetExtraArgs }}"
{{- end }}
{{- if WeaveSecret }}
- name: WEAVE_PASSWORD
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ spec:
- name: CONN_LIMIT
value: "{{ .Networking.Weave.ConnLimit }}"
{{- end }}
{{- if .Networking.Weave.NetExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NetExtraArgs }}"
{{- end }}
{{- if WeaveSecret }}
- name: WEAVE_PASSWORD
valueFrom:
Expand Down