Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose configuration variables via ipamD to make it debug friendly #287

Merged
merged 1 commit into from
Jan 14, 2019
Merged

Expose configuration variables via ipamD to make it debug friendly #287

merged 1 commit into from
Jan 14, 2019

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Jan 12, 2019

After added some configuration variables, these are not exposed via
ipamD. This patch exposes following variables as introspection data.

  • AWS_VPC_K8S_CNI_RANDOMIZESNAT
  • ENI_CONFIG_ANNOTATION_DEF
  • ENI_CONFIG_LABEL_DEF

c.f - After this patch:

{"AWS_VPC_CNI_NODE_PORT_SUPPORT":true,"AWS_VPC_K8S_CNI_CONNMARK":128,"AWS_VPC_K8S_CNI_EXTERNALSNAT":false,"AWS_VPC_K8S_CNI_RANDOMIZESNAT":1}

{"ENI":{},"MyENI":"default","EniConfigAnnotationDef":"k8s.amazonaws.com/eniConfig","EniConfigLabelDef":"k8s.amazonaws.com/eniConfig"}

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

After added some configuration variables, these are not exposed via
ipamd. This patch exposes following variables as introspection data.

- AWS_VPC_K8S_CNI_RANDOMIZESNAT
- ENI_CONFIG_ANNOTATION_DEF
- ENI_CONFIG_LABEL_DEF

c.f - After this patch:
```
{"AWS_VPC_CNI_NODE_PORT_SUPPORT":true,"AWS_VPC_K8S_CNI_CONNMARK":128,"AWS_VPC_K8S_CNI_EXTERNALSNAT":false,"AWS_VPC_K8S_CNI_RANDOMIZESNAT":1}

{"ENI":{},"MyENI":"default","EniConfigAnnotationDef":"k8s.amazonaws.com/eniConfig","EniConfigLabelDef":"k8s.amazonaws.com/eniConfig"}
```
@@ -483,7 +484,7 @@ func typeOfSNAT() snatType {
return randomHashSNAT
default:
// if we get to this point, the environment variable has an invalid value
log.Errorf("Failed to parse %s; using default: %s. Provided string was \"%s\"", envRandomizeSNAT, defaultString,
log.Errorf("Failed to parse %s; using default: %s. Provided string was %q", envRandomizeSNAT, defaultString,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good call to use %q

@mogren mogren merged commit 75e26e6 into aws:master Jan 14, 2019
@nak3 nak3 deleted the introspect branch January 14, 2019 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants