test: remove override of API server options.
@@ -36,21 +36,6 @@ var testEnv *envtest.Environment
var testCtx = context.Background()
var stopCh = make(chan struct{})
-// copied from https://github.com/kubernetes-sigs/controller-runtime/blob/v0.5.0/pkg/internal/testing/integration/internal/apiserver.go
-var apiServerDefaultArgs = []string{
- // Allow tests to run offline, by preventing API server from attempting to
- // use default route to determine its --advertise-address
- "--advertise-address=127.0.0.1",
- "--etcd-servers={{ if .EtcdURL }}{{ .EtcdURL.String }}{{ end }}",
- "--cert-dir={{ .CertDir }}",
- "--insecure-port={{ if .URL }}{{ .URL.Port }}{{ end }}",
- "--insecure-bind-address={{ if .URL }}{{ .URL.Hostname }}{{ end }}",
- "--secure-port={{ if .SecurePort }}{{ .SecurePort }}{{ end }}",
- "--admission-control=AlwaysAdmit",
- "--service-cluster-ip-range=10.0.0.0/24",
- "--allow-privileged=true",
-}
-
const (
topolvmProvisionerStorageClassName = "topolvm-provisioner"
topolvmProvisionerImmediateStorageClassName = "topolvm-provisioner-immediate"
@@ -158,12 +143,8 @@ var _ = BeforeSuite(func() {
logf.SetLogger(zap.New(zap.UseDevMode(true), zap.WriteTo(GinkgoWriter)))
By("bootstrapping test environment")
- apiServerFlags := append(apiServerDefaultArgs,
- "--admission-control=MutatingAdmissionWebhook",
- "--feature-gates=CSIInlineVolume=true")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
- KubeAPIServerFlags: apiServerFlags,
}
var err error
