Skip to content

Commit

Permalink
Update readme on stdout support
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn committed Oct 6, 2020
1 parent 47f1bc4 commit 44161d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,10 @@ Type: String

Default: `/var/log/aws-routed-eni/plugin.log`

Valid Values: `stdout` or a file path
Valid Values: `stderr` or a file path

Specifies where to write the logging output for `aws-cni` plugin. Either to stdout or to override the default file (i.e., `/var/log/aws-routed-eni/plugin.log`).
Specifies where to write the logging output for `aws-cni` plugin. Either to `stderr` or to override the default file (i.e., `/var/log/aws-routed-eni/plugin.log`).
`Stdout` cannot be supported for plugin log, please refer to #1248 for more details.

---

Expand Down
11 changes: 11 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ log_in_json()
printf '{"level":"%s","ts":"%s","caller":"%s","msg":"%s"}\n' "$LOGTYPE" "$TIMESTAMP" "$FILENAME" "$MSG"
}

validate_env_var()
{
log_in_json info "Validating env variables ..."
if [[ "$AWS_VPC_K8S_PLUGIN_LOG_FILE" == "stdout" ]]; then
log_in_json error "AWS_VPC_K8S_PLUGIN_LOG_FILE cannot be set to stdout"
exit 1
fi
}

# Check for all the required binaries before we go forward
if [ ! -f aws-k8s-agent ]; then
log_in_json error "Required aws-k8s-agent executable not found."
Expand All @@ -55,6 +64,8 @@ AWS_VPC_K8S_PLUGIN_LOG_LEVEL=${AWS_VPC_K8S_PLUGIN_LOG_LEVEL:-"Debug"}

AWS_VPC_K8S_CNI_CONFIGURE_RPFILTER=${AWS_VPC_K8S_CNI_CONFIGURE_RPFILTER:-"true"}

validate_env_var

# Check for ipamd connectivity on localhost port 50051
wait_for_ipam() {
while :
Expand Down

0 comments on commit 44161d9

Please sign in to comment.