Make master index optional when master is used in other contexts

OpenShift provides a default URL at the root that shows the UI. The
provided flag makes loading the index handler optional for now.
This commit is contained in:
Clayton Coleman
2015-01-30 18:53:04 -05:00
parent 964080283a
commit 42175b433a
4 changed files with 29 additions and 12 deletions

View File

@@ -302,6 +302,7 @@ func TestAuthModeAlwaysAllow(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
@@ -353,6 +354,7 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authorizer: apiserver.NewAlwaysDenyAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
@@ -418,6 +420,7 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: allowAliceAuthorizer{},
@@ -478,6 +481,7 @@ func TestBobIsForbidden(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: allowAliceAuthorizer{},
@@ -538,6 +542,7 @@ func TestUnknownUserIsUnauthorized(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: allowAliceAuthorizer{},
@@ -617,6 +622,7 @@ func TestNamespaceAuthorization(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: a,
@@ -701,6 +707,7 @@ func TestKindAuthorization(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: a,
@@ -779,6 +786,7 @@ func TestReadOnlyAuthorization(t *testing.T) {
KubeletClient: client.FakeKubeletClient{},
EnableLogsSupport: false,
EnableUISupport: false,
EnableIndex: true,
APIPrefix: "/api",
Authenticator: getTestTokenAuth(),
Authorizer: a,