-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Modify the e2e local scripts so they can be run on a modern Mac #7456
Modify the e2e local scripts so they can be run on a modern Mac #7456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we upgrade kind version to version 1.30 or newer?
Deleting KIND cluster 'kind'.
Creating KIND cluster 'kind'
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.26.3) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
I was thinking about that, but decided to leave it. I want to look at other versions that we have in the project, and make another PR to bump them all to something reasonable. I kind of see this PR as "make it work" and a follow up PR will be "ensure everything is right", if you're fine with that |
sounds good to me. |
echo "Creating KIND cluster 'kind' with builtin registry." | ||
${SCRIPT_ROOT}/hack/e2e/kind-with-registry.sh | ||
echo "Creating KIND cluster 'kind'" | ||
kind create cluster --image=kindest/node:v1.26.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about setting it up like this for better readability:
KIND_VERSION="kindest/node:v1.26.3"
kind create cluster --image=${KIND_VERSION}
I tested it manually on my Mac, and it works. |
/lgtm Does anyone have a chance to run this on linux to verify those also still work? |
I can check this on a new ec2 over the weekend |
I tested it on a fresh Linux VM, and it works. I found a few improvements to make, such as detecting if the necessary commands exist, such as go, kubectl and make. |
@kwiesmueller I don't think the approve you did worked, can you re-approve? |
Make the help message slightly more helpful Also fix up redirects, as per https://www.shellcheck.net/wiki/SC2069
Since the approve label wasn't applied, I made a few small improvements based on the testing on a fresh linux VM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tiny comment otherwise lgtm from my side
" | ||
|
||
for i in $REQUIRED_COMMANDS; do | ||
if ! command -v $i > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use which instead? I'm not sure all of those commands has -v flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command
is a bash builtin, and the -v
is being passed to it.
This loop will run like this:
command -v docker
for example.
It's a way to test if a command exists, ie:
adrianmoisey@Adrian-Moisey:~$ command -v docker > /dev/null 2>&1
adrianmoisey@Adrian-Moisey:~$ echo $?
0
Or when it doesn't exist:
adrianmoisey@Adrian-Moisey:~$ command -v doesntexist > /dev/null 2>&1
adrianmoisey@Adrian-Moisey:~$ echo $?
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for clarifying :)
Oh, the change to .gitignore requires a different approver. @MaciekPytel can you take a look please? /assign maciekpytel |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianmoisey, gjtempleton, kwiesmueller, omerap12 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
e2e tests don't run locally on a modern Apple Silicon Mac. Additionally, these scripts seem to be out of date.
This PR is an attempt to start updating the tooling for local dev and testing.
It also removes the registry container, as kind supports loading images directly, without the need for a registry.
I haven't looked at any failed tests yet, but I plan to make more follow up PRs to improve on this area of the VPA in the future.
Which issue(s) this PR fixes:
Related to #7455
Special notes for your reviewer:
Untested on Linux or amd64 machines.
See this PR as an attempt to improve on these tools, and not the final state, I'd like to clean it up more after this PR lands.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: