Skip to content

Commit fd788f3

Browse files
committed
Adding an e2e test on GMSA support
The previously existing e2e GMSA test really only tests a small part of the whole GMSA set up process, namely that once the API has inlined the GMSA contents in the pod's spec, and sent that to a worker's kubelet, then the kubelet passes that down to the runtime. This new test, in contrast, really tests the whole thing, i.e. deploying the admission webhook, then deploying a GMSA custom resource, and using that resource within a pod. The downside of this test though, is that it does need to make a lot of assumptions about the cluster it runs against, notably that it runs on a worker node that's already been joined to a working Active Directory domain (there are other assumptions, all documented at the beginning of the test file); for that reason, it is only intended to ever be run against an AKS cluster with the custom AKS extension from kubernetes-sigs/windows-testing#98. Note that this test doesn't aim at testing every edge-case, such as a pod trying to use a GMSA it doesn't have access to; the webhook has its own tests for these. This test's goal is to ensure the happy path doesn't break. Signed-off-by: Jean Rouge <[email protected]>
1 parent d7ecc85 commit fd788f3

File tree

4 files changed

+454
-5
lines changed

4 files changed

+454
-5
lines changed

test/e2e/windows/BUILD

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ go_library(
88
"density.go",
99
"dns.go",
1010
"framework.go",
11-
"gmsa.go",
11+
"gmsa_full.go",
12+
"gmsa_kubelet.go",
1213
"hybrid_network.go",
1314
"memory_limits.go",
1415
"networking.go",
1516
"security_context.go",
1617
"service.go",
18+
"utils.go",
1719
"volumes.go",
1820
],
1921
importpath = "k8s.io/kubernetes/test/e2e/windows",
2022
visibility = ["//visibility:public"],
2123
deps = [
2224
"//pkg/kubelet/apis/config:go_default_library",
2325
"//staging/src/k8s.io/api/core/v1:go_default_library",
26+
"//staging/src/k8s.io/api/rbac/v1:go_default_library",
2427
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
2528
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
2629
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
@@ -43,6 +46,7 @@ go_library(
4346
"//test/utils/image:go_default_library",
4447
"//vendor/github.com/onsi/ginkgo:go_default_library",
4548
"//vendor/github.com/onsi/gomega:go_default_library",
49+
"//vendor/github.com/pkg/errors:go_default_library",
4650
],
4751
)
4852

0 commit comments

Comments
 (0)