This addresses the TODO item so that the old kubelet config file could
be recovered if something goes wrong.
Signed-off-by: Dave Chen <dave.chen@arm.com>
* pkg/kubeapiserver/options: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
* pkg/kubeapiserver/options: Improving test coverage
Add a snippet of the expected error string related to the aspect being tested
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
The Feature:SCTPConnectivity tests cannot run at the same time as the
"X doesn't cause sctp.ko to be loaded" tests, since they may cause
sctp.ko to be loaded. We had dealt with this in the past by marking
them [Disruptive], but this isn't really fair; the problem is more
with the sctp.ko-checking tests than it is with the SCTPConnectivity
tests. So make them not [Disruptive] and instead make the
sctp.ko-checking tests be [Serial].
There were two SCTP tests grouped together in
test/e2e/network/service.go, but one of them wasn't a service test...
so move the SCTP service test to be grouped with the other service
tests, and the SCTP hostport tests to be grouped with other
non-service tests.
The SCTP HostPort test was checking that creating a pod with an SCTP
HostPort would create a certain iptables rule, but the handling of
HostPorts is now up to CRI, not kubelet, so kubernetes e2e cannot
assume it will implement the feature in any specific way.
(The test still ensures that (a) the apiserver accepts SCTP HostPorts,
and (b) neither kubelet nor the runtime causes the SCTP kernel module
to be loaded as part of creating a pod with an SCTP HostPort.)
We had a test that creating a Service with an SCTP port would create
an iptables rule with "-p sctp" in it, which let us test that
kube-proxy was doing vaguely the right thing with SCTP even if the e2e
environment didn't have SCTP support. But this would really make much
more sense as a unit test.
Change the CRConverter interface to use *unstructured.UnstructuredList
for input/output to simplify what converter implementers must implement.
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
Move the empty unstructured object check from the webhook converter to
the delegating converter, so other converters don't have to repeat the
same logic.
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
Create a new conversion Factory interface for CRDs, and split out
NewDelegatingConverter as a standalone package-level function, instead
of being part of CRConverterFactory.
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>