Skip to content

Commit

Permalink
Fix collector klog flag not supported error (#311)
Browse files Browse the repository at this point in the history
Add registration of klog flags

Fixes: #306

Signed-off-by: heanlan <hanlan@vmware.com>
  • Loading branch information
heanlan committed Jun 13, 2023
1 parent 636ea41 commit 49bed1f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion build/yamls/collector/templates/ipfix-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ spec:
spec:
containers:
- args:
- --v=0
{{- if .Values.logVerbosity }}
- --v={{ .Values.logVerbosity }}
{{- end }}
- --ipfix.port={{ .Values.port }}
- --ipfix.transport={{ .Values.protocol }}
image: projects.registry.vmware.com/antrea/ipfix-collector:{{ .Values.image_tag }}
Expand Down
2 changes: 2 additions & 0 deletions build/yamls/collector/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
protocol: tcp
port: 4739
image_tag: latest
# -- Log verbosity switch for IPFIX collector.
logVerbosity: 0
1 change: 0 additions & 1 deletion build/yamls/ipfix-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
spec:
containers:
- args:
- --v=0
- --ipfix.port=4739
- --ipfix.transport=tcp
image: projects.registry.vmware.com/antrea/ipfix-collector:latest
Expand Down
1 change: 1 addition & 0 deletions cmd/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func newCollectorCommand() *cobra.Command {
addIPFIXFlags(flags)
// Install command line flags
flags.AddGoFlagSet(flag.CommandLine)
logs.AddFlags(flags)
return cmd
}

Expand Down

0 comments on commit 49bed1f

Please sign in to comment.