Skip to content

Commit

Permalink
Add hostAliases within the value option for convenience during e2e te…
Browse files Browse the repository at this point in the history
…sting. (#5386)

Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
  • Loading branch information
yuntanghsu authored Aug 22, 2023
1 parent bf3beed commit d4fc6ae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/charts/flow-aggregator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Kubernetes: `>= 1.16.0-0`
| flowLogger.path | string | `"/tmp/antrea-flows.log"` | Path is the path to the local log file. |
| flowLogger.prettyPrint | bool | `true` | PrettyPrint enables conversion of some numeric fields to a more meaningful string representation. |
| flowLogger.recordFormat | string | `"CSV"` | RecordFormat defines the format of the flow records logged to file. Only "CSV" is supported at the moment. |
| hostAliases | list | `[]` | HostAliases to be injected into the Pod's hosts file. For example: `[{"ip": "8.8.8.8", "hostnames": ["clickhouse.example.com"]}]` |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"antrea/flow-aggregator","tag":""}` | Container image used by Flow Aggregator. |
| inactiveFlowRecordTimeout | string | `"90s"` | Provide the inactive flow record timeout as a duration string. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". |
| logVerbosity | int | `0` | Log verbosity switch for Flow Aggregator. |
Expand Down
8 changes: 8 additions & 0 deletions build/charts/flow-aggregator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ spec:
labels:
app: flow-aggregator
spec:
hostAliases:
{{- range .Values.hostAliases }}
- ip: {{ .ip }}
hostnames:
{{- range $hostname := .hostnames }}
- {{ $hostname }}
{{- end }}
{{- end }}
containers:
- name: flow-aggregator
image: {{ include "flowAggregatorImage" . | quote }}
Expand Down
3 changes: 3 additions & 0 deletions build/charts/flow-aggregator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ flowAggregatorAddress: ""
recordContents:
# -- Determine whether source and destination Pod labels will be included in the flow records.
podLabels: false
# -- HostAliases to be injected into the Pod's hosts file.
# For example: `[{"ip": "8.8.8.8", "hostnames": ["clickhouse.example.com"]}]`
hostAliases: []
# apiServer contains APIServer related configuration options.
apiServer:
# -- The port for the Flow Aggregator APIServer to serve on.
Expand Down
1 change: 1 addition & 0 deletions build/yamls/flow-aggregator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ spec:
name: host-var-log-antrea-flow-aggregator
- mountPath: /etc/flow-aggregator/certs
name: clickhouse-ca
hostAliases: null
nodeSelector:
kubernetes.io/arch: amd64
kubernetes.io/os: linux
Expand Down

0 comments on commit d4fc6ae

Please sign in to comment.