Merge pull request #11737 from thockin/cleanup-remove-v1beta3

Remove v1beta3
This commit is contained in:
Mike Danese
2015-07-24 10:25:56 -07:00
63 changed files with 85 additions and 24241 deletions

View File

@@ -23,7 +23,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
pkg_runtime "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/golang/glog"
@@ -32,7 +31,7 @@ import (
var (
functionDest = flag.StringP("funcDest", "f", "-", "Output for conversion functions; '-' means stdout")
version = flag.StringP("version", "v", "v1beta3", "Version for conversion.")
version = flag.StringP("version", "v", "v1", "Version for conversion.")
)
func main() {

View File

@@ -24,7 +24,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
pkg_runtime "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/golang/glog"
@@ -33,7 +32,7 @@ import (
var (
functionDest = flag.StringP("func-dest", "f", "-", "Output for deep copy functions; '-' means stdout")
version = flag.StringP("version", "v", "v1beta3", "Version for deep copies.")
version = flag.StringP("version", "v", "v1", "Version for deep copies.")
overwrites = flag.StringP("overwrites", "o", "", "Comma-separated overwrites for package names")
)

View File

@@ -152,8 +152,6 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
glog.Fatalf("no public address for %s", host)
}
// Enable v1beta3 in master only if we are starting the components for that api version.
enableV1Beta3 := apiVersion == "v1beta3"
// Create a master and install handlers into mux.
m := master.New(&master.Config{
EtcdHelper: helper,
@@ -162,7 +160,6 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
EnableLogsSupport: false,
EnableProfiling: true,
APIPrefix: "/api",
EnableV1Beta3: enableV1Beta3,
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
ReadWritePort: portNumber,
@@ -332,7 +329,7 @@ containers:
desc: "static-pod-from-spec",
fileContents: `{
"kind": "Pod",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "static-pod-from-spec"
},
@@ -611,23 +608,6 @@ func runPatchTest(c *client.Client) {
RemoveLabelBody []byte
RemoveAllLabelsBody []byte
}{
"v1beta3": {
api.JSONPatchType: {
[]byte(`[{"op":"add","path":"/metadata/labels","value":{"foo":"bar","baz":"qux"}}]`),
[]byte(`[{"op":"remove","path":"/metadata/labels/foo"}]`),
[]byte(`[{"op":"remove","path":"/metadata/labels"}]`),
},
api.MergePatchType: {
[]byte(`{"metadata":{"labels":{"foo":"bar","baz":"qux"}}}`),
[]byte(`{"metadata":{"labels":{"foo":null}}}`),
[]byte(`{"metadata":{"labels":null}}`),
},
api.StrategicMergePatchType: {
[]byte(`{"metadata":{"labels":{"foo":"bar","baz":"qux"}}}`),
[]byte(`{"metadata":{"labels":{"foo":null}}}`),
[]byte(`{"metadata":{"labels":{"$patch":"replace"}}}`),
},
},
"v1": {
api.JSONPatchType: {
[]byte(`[{"op":"add","path":"/metadata/labels","value":{"foo":"bar","baz":"qux"}}]`),
@@ -1027,7 +1007,7 @@ func ServeCachedManifestFile(contents string) (servingAddress string) {
const (
testPodSpecFile = `{
"kind": "Pod",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "container-vm-guestbook-pod-spec"
},

View File

@@ -1,24 +0,0 @@
{
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"metadata": {
"name": "nginx-controller",
"labels": {"name": "nginx"}
},
"spec": {
"replicas": 2,
"selector": {"name": "nginx"},
"template": {
"metadata": {
"labels": {"name": "nginx"}
},
"spec": {
"containers": [{
"name": "nginx",
"image": "nginx",
"ports": [{"containerPort": 80}]
}]
}
}
}
}

View File

@@ -285,9 +285,6 @@ func (s *APIServer) Run(_ []string) error {
}
_ = disableLegacyAPIs // hush the compiler while we don't have legacy APIs to disable.
// v1beta3 is disabled by default. Users can enable it using "api/v1beta3=true"
enableV1beta3 := s.getRuntimeConfigValue("api/v1beta3", false)
// "api/v1={true|false} allows users to enable/disable v1 API.
// This takes preference over api/all and api/legacy, if specified.
disableV1 := disableAllAPIs
@@ -387,7 +384,6 @@ func (s *APIServer) Run(_ []string) error {
SupportsBasicAuth: len(s.BasicAuthFile) > 0,
Authorizer: authorizer,
AdmissionControl: admissionController,
EnableV1Beta3: enableV1beta3,
DisableV1: disableV1,
MasterServiceNamespace: s.MasterServiceNamespace,
ClusterName: s.ClusterName,