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

Adding DNS tests to overlay test as an optional check #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattmattox
Copy link
Contributor

Refactor overlaytest.sh to enhance network overlay test to add DNS testing capabilities

  • Added support for DNS checks via '--dns-check' argument (Off by default)
  • Improved output messages for better clarity on test results
  • Consolidated pod information retrieval in one command for efficiency
  • Enhanced error handling for DNS resolution tests

…ing capabilities

- Added support for DNS checks via '--dns-check' argument
- Improved output messages for better clarity on test results
- Consolidated pod information retrieval in one command for efficiency
- Enhanced error handling for DNS resolution tests
@mattmattox mattmattox requested a review from dkeightley January 15, 2025 10:32
@mattmattox mattmattox self-assigned this Jan 15, 2025
Copy link
Contributor

@dkeightley dkeightley left a comment

Choose a reason for hiding this comment

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

Added notes from slack, otherwise LGTM


echo "=> Start network overlay, DNS, and API test"

kubectl get pods -l name=overlaytest -o jsonpath='{range .items[*]}{@.metadata.name}{" "}{@.spec.nodeName}{" "}{@.status.podIP}{"\n"}{end}' | sort -k2 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the kubectl commands add -n default? For example if using admin-tools.yaml (which includes the SA to run these commands from a pod) it’ll create and deploy into it’s own namespace and kubectl won’t select any overlaytest pods

while read tip thost
do
if [[ ! $shost == $thost ]]; then
kubectl --request-timeout='10s' exec $spod -c overlaytest -- /bin/sh -c "ping -c2 $tip > /dev/null 2>&1"
Copy link
Contributor

Choose a reason for hiding this comment

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

I found the --request-timeout='10s' flag seems to stop kubectl from using the SA token to auth, and it errors like kubectl doesn’t have a kubeconfig. Strange, only repro’s when running in a pod. If you also find this, we may need to run without the flag?

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