Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling v1beta3 api version by default in master #6098

Merged
merged 1 commit into from
Mar 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Repurposing enableV1beta3 to disableV1beta3 in master config to enabl…
…e v1beta3 by default
  • Loading branch information
nikhiljindal committed Mar 30, 2015
commit 478b7d5edf9ef424fe92f59d11c333953b2334c0
1 change: 0 additions & 1 deletion cmd/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
ReadOnlyPort: portNumber,
PublicAddress: publicAddress,
CacheTimeout: 2 * time.Second,
EnableV1Beta3: true,
})
handler.delegate = m.Handler

Expand Down
8 changes: 6 additions & 2 deletions cmd/kube-apiserver/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ func (s *APIServer) Run(_ []string) error {
glog.Fatalf("Failure to start kubelet client: %v", err)
}

_, v1beta3 := s.RuntimeConfig["api/v1beta3"]
disableV1beta3 := false
v1beta3FlagValue, ok := s.RuntimeConfig["api/v1beta3"]
if ok && v1beta3FlagValue == "false" {
disableV1beta3 = true
}

// TODO: expose same flags as client.BindClientConfigFlags but for a server
clientConfig := &client.Config{
Expand Down Expand Up @@ -274,7 +278,7 @@ func (s *APIServer) Run(_ []string) error {
Authenticator: authenticator,
Authorizer: authorizer,
AdmissionControl: admissionController,
EnableV1Beta3: v1beta3,
DisableV1Beta3: disableV1beta3,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not bad - it's an easy compile error during rebase. The harder is when it isn't a compile error (no one notices).

----- Original Message -----

@@ -274,7 +278,7 @@ func (s *APIServer) Run(_ []string) error {
Authenticator: authenticator,
Authorizer: authorizer,
AdmissionControl: admissionController,

  •   EnableV1Beta3:          v1beta3,
    
  •   DisableV1Beta3:         disableV1beta3,
    

@smarterclayton How much of a problem are these types of breaking changes?

https://github.com/openshift/origin/blob/master/pkg/cmd/server/kubernetes/master.go#L65


Reply to this email directly or view it on GitHub:
https://github.com/GoogleCloudPlatform/kubernetes/pull/6098/files#r27528113

MasterServiceNamespace: s.MasterServiceNamespace,
ClusterName: s.ClusterName,
ExternalHost: s.ExternalHost,
Expand Down
8 changes: 4 additions & 4 deletions pkg/master/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ type Config struct {
EnableUISupport bool
// allow downstream consumers to disable swagger
EnableSwaggerSupport bool
// allow v1beta3 to be conditionally enabled
EnableV1Beta3 bool
// allow v1beta3 to be conditionally disabled
DisableV1Beta3 bool
// allow downstream consumers to disable the index route
EnableIndex bool
EnableProfiling bool
Expand Down Expand Up @@ -277,7 +277,7 @@ func New(c *Config) *Master {
authenticator: c.Authenticator,
authorizer: c.Authorizer,
admissionControl: c.AdmissionControl,
v1beta3: c.EnableV1Beta3,
v1beta3: !c.DisableV1Beta3,
requestContextMapper: c.RequestContextMapper,

cacheTimeout: c.CacheTimeout,
Expand Down Expand Up @@ -409,7 +409,7 @@ func (m *Master) init(c *Config) {
if err := m.api_v1beta2().InstallREST(m.handlerContainer); err != nil {
glog.Fatalf("Unable to setup API v1beta2: %v", err)
}
if c.EnableV1Beta3 {
if m.v1beta3 {
if err := m.api_v1beta3().InstallREST(m.handlerContainer); err != nil {
glog.Fatalf("Unable to setup API v1beta3: %v", err)
}
Expand Down
1 change: 0 additions & 1 deletion test/integration/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func TestClient(t *testing.T) {
EnableLogsSupport: false,
EnableProfiling: true,
EnableUISupport: false,
EnableV1Beta3: true,
APIPrefix: "/api",
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
Expand Down