Patrick Ohly
9b49ef433c
e2e framework: add top-level README.md
...
This documents the cleaned up package structure and explains how callbacks are
invoked. Ginkgko v2 has led to some improvements in that area.
2022-10-06 08:19:47 +02:00
Patrick Ohly
7f8831407c
e2e framework: also test BeforeEach and extension mechanism
...
This adds test coverage for NewFrameworkExtensions and shows better how
BeforeEach callbacks are invokved. The unit test is not strictly about just the
cleanup operations anymore, but that's okay(ish).
2022-10-06 08:19:47 +02:00
Patrick Ohly
717913f902
build: adapt to new location of etcdImage variable
...
zeitgeist failed because it expected the variable in the old file.
2022-10-06 08:19:47 +02:00
Patrick Ohly
dfdf88d4fa
e2e: adapt to moved code
...
This is the result of automatically editing source files like this:
go install golang.org/x/tools/cmd/goimports@latest
find ./test/e2e* -name "*.go" | xargs env PATH=$GOPATH/bin:$PATH ./e2e-framework-sed.sh
with e2e-framework-sed.sh containing this:
sed -i \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecCommandInContainer(/e2epod.ExecCommandInContainer(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecCommandInContainerWithFullOutput(/e2epod.ExecCommandInContainerWithFullOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInContainer(/e2epod.ExecShellInContainer(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInPod(/e2epod.ExecShellInPod(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInPodWithFullOutput(/e2epod.ExecShellInPodWithFullOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecWithOptions(/e2epod.ExecWithOptions(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.MatchContainerOutput(/e2eoutput.MatchContainerOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.PodClient(/e2epod.NewPodClient(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.PodClientNS(/e2epod.PodClientNS(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.TestContainerOutput(/e2eoutput.TestContainerOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.TestContainerOutputRegexp(/e2eoutput.TestContainerOutputRegexp(\1, /" \
-e "s/framework.AddOrUpdateLabelOnNode\b/e2enode.AddOrUpdateLabelOnNode/" \
-e "s/framework.AllNodes\b/e2edebug.AllNodes/" \
-e "s/framework.AllNodesReady\b/e2enode.AllNodesReady/" \
-e "s/framework.ContainerResourceGatherer\b/e2edebug.ContainerResourceGatherer/" \
-e "s/framework.ContainerResourceUsage\b/e2edebug.ContainerResourceUsage/" \
-e "s/framework.CreateEmptyFileOnPod\b/e2eoutput.CreateEmptyFileOnPod/" \
-e "s/framework.DefaultPodDeletionTimeout\b/e2epod.DefaultPodDeletionTimeout/" \
-e "s/framework.DumpAllNamespaceInfo\b/e2edebug.DumpAllNamespaceInfo/" \
-e "s/framework.DumpDebugInfo\b/e2eoutput.DumpDebugInfo/" \
-e "s/framework.DumpNodeDebugInfo\b/e2edebug.DumpNodeDebugInfo/" \
-e "s/framework.EtcdUpgrade\b/e2eproviders.EtcdUpgrade/" \
-e "s/framework.EventsLister\b/e2edebug.EventsLister/" \
-e "s/framework.ExecOptions\b/e2epod.ExecOptions/" \
-e "s/framework.ExpectNodeHasLabel\b/e2enode.ExpectNodeHasLabel/" \
-e "s/framework.ExpectNodeHasTaint\b/e2enode.ExpectNodeHasTaint/" \
-e "s/framework.GCEUpgradeScript\b/e2eproviders.GCEUpgradeScript/" \
-e "s/framework.ImagePrePullList\b/e2epod.ImagePrePullList/" \
-e "s/framework.KubectlBuilder\b/e2ekubectl.KubectlBuilder/" \
-e "s/framework.LocationParamGKE\b/e2eproviders.LocationParamGKE/" \
-e "s/framework.LogSizeDataTimeseries\b/e2edebug.LogSizeDataTimeseries/" \
-e "s/framework.LogSizeGatherer\b/e2edebug.LogSizeGatherer/" \
-e "s/framework.LogsSizeData\b/e2edebug.LogsSizeData/" \
-e "s/framework.LogsSizeDataSummary\b/e2edebug.LogsSizeDataSummary/" \
-e "s/framework.LogsSizeVerifier\b/e2edebug.LogsSizeVerifier/" \
-e "s/framework.LookForStringInLog\b/e2eoutput.LookForStringInLog/" \
-e "s/framework.LookForStringInPodExec\b/e2eoutput.LookForStringInPodExec/" \
-e "s/framework.LookForStringInPodExecToContainer\b/e2eoutput.LookForStringInPodExecToContainer/" \
-e "s/framework.MasterAndDNSNodes\b/e2edebug.MasterAndDNSNodes/" \
-e "s/framework.MasterNodes\b/e2edebug.MasterNodes/" \
-e "s/framework.MasterUpgradeGKE\b/e2eproviders.MasterUpgradeGKE/" \
-e "s/framework.NewKubectlCommand\b/e2ekubectl.NewKubectlCommand/" \
-e "s/framework.NewLogsVerifier\b/e2edebug.NewLogsVerifier/" \
-e "s/framework.NewNodeKiller\b/e2enode.NewNodeKiller/" \
-e "s/framework.NewResourceUsageGatherer\b/e2edebug.NewResourceUsageGatherer/" \
-e "s/framework.NodeHasTaint\b/e2enode.NodeHasTaint/" \
-e "s/framework.NodeKiller\b/e2enode.NodeKiller/" \
-e "s/framework.NodesSet\b/e2edebug.NodesSet/" \
-e "s/framework.PodClient\b/e2epod.PodClient/" \
-e "s/framework.RemoveLabelOffNode\b/e2enode.RemoveLabelOffNode/" \
-e "s/framework.ResourceConstraint\b/e2edebug.ResourceConstraint/" \
-e "s/framework.ResourceGathererOptions\b/e2edebug.ResourceGathererOptions/" \
-e "s/framework.ResourceUsagePerContainer\b/e2edebug.ResourceUsagePerContainer/" \
-e "s/framework.ResourceUsageSummary\b/e2edebug.ResourceUsageSummary/" \
-e "s/framework.RunHostCmd\b/e2eoutput.RunHostCmd/" \
-e "s/framework.RunHostCmdOrDie\b/e2eoutput.RunHostCmdOrDie/" \
-e "s/framework.RunHostCmdWithFullOutput\b/e2eoutput.RunHostCmdWithFullOutput/" \
-e "s/framework.RunHostCmdWithRetries\b/e2eoutput.RunHostCmdWithRetries/" \
-e "s/framework.RunKubectl\b/e2ekubectl.RunKubectl/" \
-e "s/framework.RunKubectlInput\b/e2ekubectl.RunKubectlInput/" \
-e "s/framework.RunKubectlOrDie\b/e2ekubectl.RunKubectlOrDie/" \
-e "s/framework.RunKubectlOrDieInput\b/e2ekubectl.RunKubectlOrDieInput/" \
-e "s/framework.RunKubectlWithFullOutput\b/e2ekubectl.RunKubectlWithFullOutput/" \
-e "s/framework.RunKubemciCmd\b/e2ekubectl.RunKubemciCmd/" \
-e "s/framework.RunKubemciWithKubeconfig\b/e2ekubectl.RunKubemciWithKubeconfig/" \
-e "s/framework.SingleContainerSummary\b/e2edebug.SingleContainerSummary/" \
-e "s/framework.SingleLogSummary\b/e2edebug.SingleLogSummary/" \
-e "s/framework.TimestampedSize\b/e2edebug.TimestampedSize/" \
-e "s/framework.WaitForAllNodesSchedulable\b/e2enode.WaitForAllNodesSchedulable/" \
-e "s/framework.WaitForSSHTunnels\b/e2enode.WaitForSSHTunnels/" \
-e "s/framework.WorkItem\b/e2edebug.WorkItem/" \
"$@"
for i in "$@"; do
# Import all sub packages and let goimports figure out which of those
# are redundant (= already imported) or not needed.
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2edebug "k8s.io/kubernetes/test/e2e/framework/debug"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2enode "k8s.io/kubernetes/test/e2e/framework/node"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2eoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2epod "k8s.io/kubernetes/test/e2e/framework/pod"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2eproviders "k8s.io/kubernetes/test/e2e/framework/providers"' "$i"
goimports -w "$i"
done
2022-10-06 08:19:47 +02:00
Patrick Ohly
92047da152
e2e: make import blocks consistent
2022-10-06 08:16:47 +02:00
Patrick Ohly
5614a9d064
e2e framework: eliminate interim sub packages
...
The "todo" packages were necessary while moving code around to avoid hitting
cyclic dependencies. Now that any sub package can depend on the framework, they
are no longer needed and the code can be moved into the normal sub packages.
2022-10-06 08:16:47 +02:00
Patrick Ohly
2d21acb1be
e2e framework: eliminate redundant framework/[log|ginkgowrapper]
...
These sub packages were created by mistake. Logging and failure handling are
core features and must be implemented in the framework package.
2022-10-06 08:16:47 +02:00
Patrick Ohly
a46fea53e6
e2e framework: move pod exec and create into sub package
2022-10-06 08:16:47 +02:00
Patrick Ohly
8af3258526
e2e framework: move NodeKiller into framework/node
...
This removes some more dependencies from the framework.
Removing the configuration needs to be handled as part of refactoring the
TestContext.
2022-10-06 08:16:47 +02:00
Patrick Ohly
70d0824f01
e2e framework: move resource gathering into framework/debug
...
This helps getting rid of the ssh dependency. The same init package as for
dumping namespaces takes care of adding the functionality back to framework
instances.
2022-10-06 08:16:47 +02:00
Patrick Ohly
f9bc4f837b
e2e framework: move log size verification into framework/debug
...
This helps getting rid of the ssh dependency. The same init package as for
dumping namespaces takes care of adding the functionality back to framework
instances.
2022-10-06 08:16:47 +02:00
Patrick Ohly
802451b6ca
e2e framework: move metrics gathering into sub package
...
This reduces the size of the test/e2e/framework itself. Because it does not
gather metrics data anymore by default, E2E test suites must set their
callbacks function or set the original one by importing
"k8s.io/kubernetes/test/e2e/framework/todo/metrics/init".
2022-10-06 08:16:47 +02:00
Patrick Ohly
b8d28cb6c3
e2e framework: move node helper code into sub package
...
This reduces the size of the test/e2e/framework itself. Because it does not
check nodes anymore by default, E2E test suites must set their own check
function or set the original one by importing
"k8s.io/kubernetes/test/e2e/framework/todo/node/init".
2022-10-06 08:16:47 +02:00
Patrick Ohly
c45a924c5e
e2e framework: move dumping of information into sub package
...
This reduces the size of the test/e2e/framework itself. Because it does not
dump anything anymore by default, E2E test suites must set their own dump
function or set the original one by importing
"k8s.io/kubernetes/test/e2e/framework/debug/init".
2022-10-06 08:16:47 +02:00
Patrick Ohly
2c8ef492ae
e2e framework: move kubectl and pod helper code
2022-10-06 08:16:47 +02:00
Patrick Ohly
e95c2dbbe3
e2e framework: introduce todo sub packages
2022-10-06 08:16:47 +02:00
Patrick Ohly
37d562b454
e2e framework: support callbacks during framework creation and before each test
...
This will be used as mechanism for invoking some of the code which is currently
hard-coded in the framework once that code is placed in optional packages.
2022-10-06 08:16:47 +02:00
Kubernetes Prow Robot
fbb6ccc0c6
Merge pull request #112869 from xmcqueen/master
...
moved the downloading of the node_perf tensorflow test-data artifact …
2022-10-05 20:29:54 -07:00
Kubernetes Prow Robot
38bc7131b3
Merge pull request #112892 from robscott/patch-kube-proxy
...
Updating kube-proxy base impage to distroless-iptables:v0.1.2
2022-10-05 19:21:51 -07:00
Rob Scott
d18c8919b0
Updating kube-proxy base impage to distroless-iptables:v0.1.2
...
Change-Id: Idcbed345085926fdcff952b503f0bac82cb89e82
2022-10-06 01:19:00 +00:00
Kubernetes Prow Robot
b4eec3c2ad
Merge pull request #112792 from cici37/celAd
...
Add feature gate CelValidatingAdmission
2022-10-05 16:39:53 -07:00
Kubernetes Prow Robot
44a0b4e145
Merge pull request #112881 from logicalhan/slis
...
put component slis endpoint behind a feature gate
2022-10-05 12:53:46 -07:00
Cici Huang
d8ab3fea0d
Update feature gate name to CELValidatingAdmission
2022-10-05 19:40:50 +00:00
Kubernetes Prow Robot
4511da23c3
Merge pull request #112872 from ameukam/regional-bucket
...
Test startup: make staging bucket regional
2022-10-05 11:35:46 -07:00
Han Kang
f043544cb5
add feature gate for component SLIs to component-base
...
Change-Id: I39896ce970e5700764253389e77293ebe58856c3
2022-10-05 10:52:29 -07:00
Kubernetes Prow Robot
4a894be926
Merge pull request #112866 from BenTheElder/em
...
emeritus fejta
2022-10-05 10:14:04 -07:00
Kubernetes Prow Robot
5556d3336b
Merge pull request #112846 from Richabanker/stability-fix-test
...
Add test for internal metric
2022-10-05 00:00:03 -07:00
Kubernetes Prow Robot
e9f28c0254
Merge pull request #112870 from BenTheElder/nogopkg
...
drop Gopkg.toml from publishing bot rules
2022-10-04 22:10:02 -07:00
Arnaud Meukam
9987e4635f
Test startup: make staging bucket regional
...
Make GCS buckets created by the e2e tests regional.
There are by default multi-regional in US location. The change is
introduced to minimize GCS global cost.
GCS new pricing changed since Oct 1, 2022. See https://cloud.google.com/storage/pricing-announce
Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
2022-10-05 06:34:04 +02:00
Benjamin Elder
a3e3608fd7
drop Gopkg.toml from publishing bot rules
2022-10-04 20:55:33 -07:00
Kubernetes Prow Robot
4e3b3764ff
Merge pull request #112864 from BenTheElder/nobzl
...
remove more lingering bazel references
2022-10-04 20:42:03 -07:00
Kubernetes Prow Robot
4dc65c4353
Merge pull request #112865 from thockin/no-make-generators
...
Clean up detritus from generated_files
2022-10-04 18:16:03 -07:00
Brian McQueen
f6c71328cf
moved the downloading of the node_perf tensorflow test-data artifact into the Dockerfile to be downloaded at image-build time 109295
2022-10-04 17:35:32 -07:00
Benjamin Elder
cee4ee074d
emeritus fejta, Erick is inactive after leaving google for spaceX
2022-10-04 17:07:35 -07:00
Tim Hockin
5da7ca9b0f
Clean up detritus from generaed_files
...
Now that tests are fixed, it should be OK to remove these.
2022-10-04 17:04:49 -07:00
Benjamin Elder
f96d61d916
remove BUILD files from publishing bot rules
...
bazel has been removed since 1.21, the rules only go back to 1.22
TODO: remove Gopkg.toml rule as well ...?
2022-10-04 16:52:27 -07:00
Benjamin Elder
23cdaa2ee7
remove clearly unnecessary lingering bzl file references
2022-10-04 16:47:39 -07:00
Benjamin Elder
db9c760ee7
remove clearly unnecessary lingering BUILD file references
2022-10-04 16:47:25 -07:00
Kubernetes Prow Robot
27344212ce
Merge pull request #112827 from SataQiu/clean-scheduler-20221003
...
scheduler: cleanup the unused event types about Service
2022-10-04 16:24:00 -07:00
Kubernetes Prow Robot
3ef7784b75
Merge pull request #112837 from daschott/daschott/winkernel-lb-id-regression
...
Fix winkernel proxier setting the wrong HNS loadbalancer ID for ingresss IP
2022-10-04 15:16:00 -07:00
Kubernetes Prow Robot
98233be715
Merge pull request #112709 from swagatbora90/kubelet-tracing
...
Support otel tracing in cri remote image service
2022-10-04 14:12:00 -07:00
Kubernetes Prow Robot
8db0d1a8e0
Merge pull request #112819 from thockin/no-make-generators
...
Kill off makefile-driven code-generation
2022-10-04 10:16:16 -07:00
Tim Hockin
1c65dc535f
Remove refs to .make
2022-10-04 08:58:52 -07:00
Tim Hockin
d8988801c2
Remove old make-helper script
2022-10-04 08:58:46 -07:00
Tim Hockin
48b5b0c238
Remove go2make
2022-10-04 08:50:32 -07:00
Tim Hockin
e477d45f56
Neutralize obsolete verify scripts
...
This is all obsolete or covered by verify-codegen now.
2022-10-04 08:50:31 -07:00
Tim Hockin
70c1c795e8
Remove generated file rules in make
...
This is all covered by update-codegen.sh now.
The old `make generated_files` rule still exists, but just prints a
warning.
2022-10-04 08:50:30 -07:00
Tim Hockin
7afaf23b01
Copy make's codegen logic to update-codegen.sh
...
The `make` rules which auto-generate some of our API stuff are
incredibly baroque, and hard to maintain. They were originally added on
the assumption that we would stop checking generated files into git.
Since then we have moved away from that goal, and the worst problems
with generated files have been resolved.
Reasons to kill this:
* It is slow on every build, as opposed to just being slow when running
the generators. It is even slow to calculate that there's nothing to
update.
* Most development work doesn't involve changing APIs.
* It only covers about half (or less) of the generated code, and making
it cover more would be even slower.
* Approximately 1 person knows how this all works.
* We have CI to make sure changes do not get merged without updating
this code.
* We have corner cases where this does the WRONG thing and tracking
those down is ugly and hard in perpetuity.
So this commit puts all the same logic that WAS in the
Makefile.generated_files into update-codegen.sh.
I do not love this script, especially WRT sub-packages, but I am trying
not to boil the ocean. I hope to follow up with some more cleanups over
time.
I have tested this manually and with the scripts and it still seems to
catch errors properly.
This includes a change to kube::util::read-array to make it not unset
variables and not over-write non-array variables.
2022-10-04 08:48:39 -07:00
Tim Hockin
b52b50bcea
update-codegen: reorder some lines for later diffs
2022-10-04 08:45:57 -07:00
Tim Hockin
89e0e09eb9
Format calls to codegens
...
No functional changes here,just formatting. Makes future commits
easier.
2022-10-04 08:45:57 -07:00