Skip to content

Commit

Permalink
Add a yaml file to deploy standalone ipfix-collector for convenience.
Browse files Browse the repository at this point in the history
Add corresponding guidance in README to apply this yaml file.
  • Loading branch information
Anlan He committed Apr 3, 2021
1 parent 88e3927 commit ca06808
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ go-ipfix is an IPFIX library that can be used to implement an IPFIX exporter, wh
## Try it out
This IPFIX library can be used to build an exporter. Please check out the [exporter tests](https://github.com/vmware/go-ipfix/blob/main/pkg/exporter/process_test.go) to get an idea on how to build exporter on top of TCP and UDP transport protocols given a IPFIX collector.

To deploy a standalone go-ipfix collector, which is used to decode and log the IPFIX records, you can use:
```
cd <directory containing this README file>/build/yamls
kubectl apply -f ./ipfix-collector.yml
```
## Build Registry
To build the registry from [IANA registry](https://www.iana.org/assignments/ipfix/ipfix.xhtml) or [Antrea registry](pkg/registry/registry_antrea.csv), run following commands:
```
Expand Down
47 changes: 47 additions & 0 deletions build/yamls/ipfix-collector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
app: ipfix-collector
name: ipfix
---
apiVersion: v1
kind: Service
metadata:
labels:
app: ipfix-collector
name: ipfix-collector
namespace: ipfix
spec:
selector:
app: ipfix-collector
ports:
- protocol: TCP
port: 4739
targetPort: 4739
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ipfix-collector
name: ipfix-collector
namespace: ipfix
spec:
replicas: 1
selector:
matchLabels:
app: ipfix-collector
template:
metadata:
labels:
app: ipfix-collector
spec:
containers:
- image: projects.registry.vmware.com/antrea/ipfix-collector:v0.4.8
args:
- --v=0
imagePullPolicy: IfNotPresent
name: ipfix-collector
ports:
- containerPort: 4739

0 comments on commit ca06808

Please sign in to comment.