Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9981f999
Commit
9981f999
authored
Nov 07, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16849 from feihujiang/cleanupDeprecatedV1beta1Content
Auto commit by PR queue bot
parents
354c6f3b
eac8d6a9
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
48 deletions
+16
-48
doc.go
pkg/api/doc.go
+1
-1
helpers.go
pkg/api/helpers.go
+1
-2
interfaces.go
pkg/api/meta/interfaces.go
+0
-2
fuzzer.go
pkg/api/testing/fuzzer.go
+0
-28
types.go
pkg/api/types.go
+0
-1
types_test.go
pkg/client/unversioned/clientcmd/api/types_test.go
+4
-4
converter.go
pkg/conversion/converter.go
+2
-2
encode.go
pkg/conversion/encode.go
+2
-2
scheme.go
pkg/conversion/scheme.go
+2
-2
exec.go
pkg/kubelet/network/exec/exec.go
+1
-1
scheme.go
pkg/runtime/scheme.go
+2
-2
types.go
pkg/runtime/types.go
+1
-1
No files found.
pkg/api/doc.go
View file @
9981f999
...
...
@@ -17,6 +17,6 @@ limitations under the License.
// Package api contains the latest (or "internal") version of the
// Kubernetes API objects. This is the API objects as represented in memory.
// The contract presented to clients is located in the versioned packages,
// which are sub-directories. The first one is "v1
beta1
". Those packages
// which are sub-directories. The first one is "v1". Those packages
// describe how a particular version is serialized to storage/network.
package
api
pkg/api/helpers.go
View file @
9981f999
...
...
@@ -53,8 +53,7 @@ func (c *ConversionError) Error() string {
var
Semantic
=
conversion
.
EqualitiesOrDie
(
func
(
a
,
b
resource
.
Quantity
)
bool
{
// Ignore formatting, only care that numeric value stayed the same.
// TODO: if we decide it's important, after we drop v1beta1/2, we
// could start comparing format.
// TODO: if we decide it's important, it should be safe to start comparing the format.
//
// Uninitialized quantities are equivalent to 0 quantities.
if
a
.
Amount
==
nil
&&
b
.
MilliValue
()
==
0
{
...
...
pkg/api/meta/interfaces.go
View file @
9981f999
...
...
@@ -107,8 +107,6 @@ const (
)
// RESTScope contains the information needed to deal with REST resources that are in a resource hierarchy
// TODO After we deprecate v1beta1 and v1beta2, we can look a supporting removing the flexibility of supporting
// either a query or path param, and instead just support path param
type
RESTScope
interface
{
// Name of the scope
Name
()
RESTScopeName
...
...
pkg/api/testing/fuzzer.go
View file @
9981f999
...
...
@@ -36,7 +36,6 @@ import (
"k8s.io/kubernetes/pkg/util"
"github.com/google/gofuzz"
"speter.net/go/exp/math/dec/inf"
)
// FuzzerFor can randomly populate api objects that are destined for version.
...
...
@@ -111,15 +110,6 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
statuses
:=
[]
api
.
PodPhase
{
api
.
PodPending
,
api
.
PodRunning
,
api
.
PodFailed
,
api
.
PodUnknown
}
*
j
=
statuses
[
c
.
Rand
.
Intn
(
len
(
statuses
))]
},
func
(
j
*
api
.
PodTemplateSpec
,
c
fuzz
.
Continue
)
{
// TODO: v1beta1/2 can't round trip a nil template correctly, fix by having v1beta1/2
// conversion compare converted object to nil via DeepEqual
j
.
ObjectMeta
=
api
.
ObjectMeta
{}
c
.
Fuzz
(
&
j
.
ObjectMeta
)
j
.
ObjectMeta
=
api
.
ObjectMeta
{
Labels
:
j
.
ObjectMeta
.
Labels
}
j
.
Spec
=
api
.
PodSpec
{}
c
.
Fuzz
(
&
j
.
Spec
)
},
func
(
j
*
api
.
Binding
,
c
fuzz
.
Continue
)
{
c
.
Fuzz
(
&
j
.
ObjectMeta
)
j
.
Target
.
Name
=
c
.
RandString
()
...
...
@@ -189,15 +179,6 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
c
.
RandString
()
:
c
.
RandString
(),
}
},
func
(
q
*
resource
.
Quantity
,
c
fuzz
.
Continue
)
{
// Real Quantity fuzz testing is done elsewhere;
// this limited subset of functionality survives
// round-tripping to v1beta1/2.
q
.
Amount
=
&
inf
.
Dec
{}
q
.
Format
=
resource
.
DecimalExponent
//q.Amount.SetScale(inf.Scale(-c.Intn(12)))
q
.
Amount
.
SetUnscaled
(
c
.
Int63n
(
1000
))
},
func
(
q
*
api
.
ResourceRequirements
,
c
fuzz
.
Continue
)
{
randomQuantity
:=
func
()
resource
.
Quantity
{
return
*
resource
.
NewQuantity
(
c
.
Int63n
(
1000
),
resource
.
DecimalExponent
)
...
...
@@ -325,15 +306,6 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
c
.
Fuzz
(
&
sc
.
Capabilities
.
Drop
)
}
},
func
(
e
*
api
.
Event
,
c
fuzz
.
Continue
)
{
c
.
FuzzNoCustom
(
e
)
// fuzz self without calling this function again
// Fix event count to 1, otherwise, if a v1beta1 or v1beta2 event has a count set arbitrarily, it's count is ignored
if
e
.
FirstTimestamp
.
IsZero
()
{
e
.
Count
=
1
}
else
{
c
.
Fuzz
(
&
e
.
Count
)
}
},
func
(
s
*
api
.
Secret
,
c
fuzz
.
Continue
)
{
c
.
FuzzNoCustom
(
s
)
// fuzz self without calling this function again
s
.
Type
=
api
.
SecretTypeOpaque
...
...
pkg/api/types.go
View file @
9981f999
...
...
@@ -1145,7 +1145,6 @@ type ReplicationControllerSpec struct {
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Internally, this takes precedence over a
// TemplateRef.
// Must be set before converting to a v1beta1 or v1beta2 API object.
Template
*
PodTemplateSpec
`json:"template,omitempty"`
}
...
...
pkg/client/unversioned/clientcmd/api/types_test.go
View file @
9981f999
...
...
@@ -44,13 +44,13 @@ func ExampleOfOptionsConfig() {
defaultConfig
.
Preferences
.
Colors
=
true
defaultConfig
.
Clusters
[
"alfa"
]
=
&
Cluster
{
Server
:
"https://alfa.org:8080"
,
APIVersion
:
"v1
beta2
"
,
APIVersion
:
"v1"
,
InsecureSkipTLSVerify
:
true
,
CertificateAuthority
:
"path/to/my/cert-ca-filename"
,
}
defaultConfig
.
Clusters
[
"bravo"
]
=
&
Cluster
{
Server
:
"https://bravo.org:8080"
,
APIVersion
:
"v1
beta1
"
,
APIVersion
:
"v1"
,
InsecureSkipTLSVerify
:
false
,
}
defaultConfig
.
AuthInfos
[
"white-mage-via-cert"
]
=
&
AuthInfo
{
...
...
@@ -86,13 +86,13 @@ func ExampleOfOptionsConfig() {
// clusters:
// alfa:
// LocationOfOrigin: ""
// api-version: v1
beta2
// api-version: v1
// certificate-authority: path/to/my/cert-ca-filename
// insecure-skip-tls-verify: true
// server: https://alfa.org:8080
// bravo:
// LocationOfOrigin: ""
// api-version: v1
beta1
// api-version: v1
// server: https://bravo.org:8080
// contexts:
// alfa-as-black-mage:
...
...
pkg/conversion/converter.go
View file @
9981f999
...
...
@@ -291,7 +291,7 @@ func verifyConversionFunctionSignature(ft reflect.Type) error {
//
// Example:
// c.RegisterConversionFunc(
// func(in *Pod, out *v1
beta1
.Pod, s Scope) error {
// func(in *Pod, out *v1.Pod, s Scope) error {
// // conversion logic...
// return nil
// })
...
...
@@ -343,7 +343,7 @@ func (c *Converter) SetStructFieldCopy(srcFieldType interface{}, srcFieldName st
//
// Example:
// c.RegisteDefaultingFunc(
// func(in *v1
beta1
.Pod) {
// func(in *v1.Pod) {
// // defaulting logic...
// })
func
(
c
*
Converter
)
RegisterDefaultingFunc
(
defaultingFunc
interface
{})
error
{
...
...
pkg/conversion/encode.go
View file @
9981f999
...
...
@@ -43,8 +43,8 @@ import (
// expressing any API object.
// * Only versioned objects should be encoded. This means that, if you pass
// a native object, Encode will convert it to a versioned object. For
// example, an api.Pod will get converted to a v1
beta1
.Pod. However, if
// you pass in an object that's already versioned (v1
beta1
.Pod), Encode
// example, an api.Pod will get converted to a v1.Pod. However, if
// you pass in an object that's already versioned (v1.Pod), Encode
// will not modify it.
//
// The purpose of the above complex conversion behavior is to allow us to
...
...
pkg/conversion/scheme.go
View file @
9981f999
...
...
@@ -184,7 +184,7 @@ func (s *Scheme) NewObject(versionName, kind string) (interface{}, error) {
// // the source version, e.g., ""
// s.Meta().SrcVersion
// // You can depend on this being set to the destination version,
// // e.g., "v1
beta1
".
// // e.g., "v1".
// s.Meta().DestVersion
// // Call scope.Convert to copy sub-fields.
// s.Convert(&in.SubFieldThatMoved, &out.NewLocation.NewName, 0)
...
...
@@ -256,7 +256,7 @@ func (s *Scheme) AddStructFieldConversion(srcFieldType interface{}, srcFieldName
// how to call these functions from the types of their two parameters.
//
// s.AddDefaultingFuncs(
// func(obj *v1
beta1
.Pod) {
// func(obj *v1.Pod) {
// if obj.OptionalField == "" {
// obj.OptionalField = "DefaultValue"
// }
...
...
pkg/kubelet/network/exec/exec.go
View file @
9981f999
...
...
@@ -33,7 +33,7 @@ limitations under the License.
// formatted output indicating the pod's IPAddress(v4/v6). An empty string value or an erroneous output
// will mean the container runtime (docker) will be asked for the PodIP
// e.g. {
// "apiVersion" : "v1
beta1
",
// "apiVersion" : "v1",
// "kind" : "PodNetworkStatus",
// "ip" : "10.20.30.40"
// }
...
...
pkg/runtime/scheme.go
View file @
9981f999
...
...
@@ -423,8 +423,8 @@ func (s *Scheme) ConvertToVersion(in Object, outVersion string) (Object, error)
// API object.
// * Only versioned objects should be encoded. This means that, if you pass
// a native object, Encode will convert it to a versioned object. For
// example, an api.Pod will get converted to a v1
beta1
.Pod. However, if
// you pass in an object that's already versioned (v1
beta1
.Pod), Encode
// example, an api.Pod will get converted to a v1.Pod. However, if
// you pass in an object that's already versioned (v1.Pod), Encode
// will not modify it.
//
// The purpose of the above complex conversion behavior is to allow us to
...
...
pkg/runtime/types.go
View file @
9981f999
...
...
@@ -84,7 +84,7 @@ type EmbeddedObject struct {
// // On the wire, the JSON will look something like this:
// {
// "kind":"MyAPIObject",
// "apiVersion":"v1
beta1
",
// "apiVersion":"v1",
// "myPlugin": {
// "kind":"PluginA",
// "aOption":"foo",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment