Add support for weave.npcExtraArgs

This commit is contained in:
Reilly Brogan 2020-01-03 21:28:37 -06:00
parent 71761bf327
commit 3e5b211bcd
10 changed files with 37 additions and 0 deletions

View File

@ -125,6 +125,20 @@ spec:
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 NPC EXTRA_ARGS
Weave-npc (the Weave network policy controller) allows you to customize arguments of the running binary by setting the EXTRA_ARGS environmental variable.
This can be used for debugging or for customizing the logging level of weave npc.
```
spec:
networking:
weave:
npcExtraArgs: "--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.

View File

@ -2788,6 +2788,7 @@ spec:
format: int32
type: integer
netExtraArgs:
description: Extra arguments that are passed to weave-kube
type: string
noMasqLocal:
format: int32
@ -2799,6 +2800,9 @@ spec:
description: NPCCPURequest CPU request of weave npc container.
Default 50m
type: string
npcExtraArgs:
description: Extra arguments that are passed to weave-npc
type: string
npcMemoryLimit:
description: NPCMemoryLimit memory limit of weave npc container.
Default 200Mi

View File

@ -67,6 +67,7 @@ type WeaveNetworkingSpec struct {
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
NpcExtraArgs string `json:"npcExtraArgs,omitempty"`
// MemoryRequest memory request of weave container. Default 200Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`

View File

@ -67,6 +67,7 @@ type WeaveNetworkingSpec struct {
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
NpcExtraArgs string `json:"npcExtraArgs,omitempty"`
// MemoryRequest memory request of weave container. Default 200Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`

View File

@ -4853,6 +4853,7 @@ func autoConvert_v1alpha1_WeaveNetworkingSpec_To_kops_WeaveNetworkingSpec(in *We
out.ConnLimit = in.ConnLimit
out.NoMasqLocal = in.NoMasqLocal
out.NetExtraArgs = in.NetExtraArgs
out.NpcExtraArgs = in.NpcExtraArgs
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.MemoryLimit = in.MemoryLimit
@ -4874,6 +4875,7 @@ func autoConvert_kops_WeaveNetworkingSpec_To_v1alpha1_WeaveNetworkingSpec(in *ko
out.ConnLimit = in.ConnLimit
out.NoMasqLocal = in.NoMasqLocal
out.NetExtraArgs = in.NetExtraArgs
out.NpcExtraArgs = in.NpcExtraArgs
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.MemoryLimit = in.MemoryLimit

View File

@ -67,6 +67,7 @@ type WeaveNetworkingSpec struct {
ConnLimit *int32 `json:"connLimit,omitempty"`
NoMasqLocal *int32 `json:"noMasqLocal,omitempty"`
NetExtraArgs string `json:"netExtraArgs,omitempty"`
NpcExtraArgs string `json:"npcExtraArgs,omitempty"`
// MemoryRequest memory request of weave container. Default 200Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`

View File

@ -5181,6 +5181,7 @@ func autoConvert_v1alpha2_WeaveNetworkingSpec_To_kops_WeaveNetworkingSpec(in *We
out.ConnLimit = in.ConnLimit
out.NoMasqLocal = in.NoMasqLocal
out.NetExtraArgs = in.NetExtraArgs
out.NpcExtraArgs = in.NpcExtraArgs
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.MemoryLimit = in.MemoryLimit
@ -5202,6 +5203,7 @@ func autoConvert_kops_WeaveNetworkingSpec_To_v1alpha2_WeaveNetworkingSpec(in *ko
out.ConnLimit = in.ConnLimit
out.NoMasqLocal = in.NoMasqLocal
out.NetExtraArgs = in.NetExtraArgs
out.NpcExtraArgs = in.NpcExtraArgs
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.MemoryLimit = in.MemoryLimit

View File

@ -211,6 +211,10 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- if .Networking.Weave.NpcExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NpcExtraArgs }}"
{{- end }}
image: 'weaveworks/weave-npc:2.6.0'
ports:
- name: metrics

View File

@ -203,6 +203,10 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- if .Networking.Weave.NpcExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NpcExtraArgs }}"
{{- end }}
image: 'weaveworks/weave-npc:2.6.0'
ports:
- name: metrics

View File

@ -207,6 +207,10 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- if .Networking.Weave.NpcExtraArgs }}
- name: EXTRA_ARGS
value: "{{ .Networking.Weave.NpcExtraArgs }}"
{{- end }}
image: 'weaveworks/weave-npc:2.6.0'
ports:
- name: metrics