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
3ba9d1d0
Commit
3ba9d1d0
authored
Nov 09, 2017
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused pkg/apis/policy/v1alpha1
parent
ea66c005
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
3 additions
and
423 deletions
+3
-423
.golint_failures
hack/.golint_failures
+0
-1
update-codegen.sh
hack/update-codegen.sh
+1
-2
BUILD
pkg/apis/policy/BUILD
+0
-1
BUILD
pkg/apis/policy/v1alpha1/BUILD
+0
-37
doc.go
pkg/apis/policy/v1alpha1/doc.go
+0
-23
register.go
pkg/apis/policy/v1alpha1/register.go
+0
-61
types.go
pkg/apis/policy/v1alpha1/types.go
+0
-97
zz_generated.deepcopy.go
pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go
+0
-167
zz_generated.defaults.go
pkg/apis/policy/v1alpha1/zz_generated.defaults.go
+0
-32
BUILD
test/integration/framework/BUILD
+1
-1
master_utils.go
test/integration/framework/master_utils.go
+1
-1
No files found.
hack/.golint_failures
View file @
3ba9d1d0
...
@@ -59,7 +59,6 @@ pkg/apis/imagepolicy
...
@@ -59,7 +59,6 @@ pkg/apis/imagepolicy
pkg/apis/imagepolicy/v1alpha1
pkg/apis/imagepolicy/v1alpha1
pkg/apis/networking
pkg/apis/networking
pkg/apis/policy
pkg/apis/policy
pkg/apis/policy/v1alpha1
pkg/apis/policy/v1beta1
pkg/apis/policy/v1beta1
pkg/apis/policy/validation
pkg/apis/policy/validation
pkg/apis/rbac/v1
pkg/apis/rbac/v1
...
...
hack/update-codegen.sh
View file @
3ba9d1d0
...
@@ -87,8 +87,7 @@ ${listergen} --input-dirs "${listergen_internal_apis_csv}" "$@"
...
@@ -87,8 +87,7 @@ ${listergen} --input-dirs "${listergen_internal_apis_csv}" "$@"
listergen_external_apis
=(
listergen_external_apis
=(
$(
$(
cd
${
KUBE_ROOT
}
/staging/src
cd
${
KUBE_ROOT
}
/staging/src
# because client-gen doesn't do policy/v1alpha1, we have to skip it too
find k8s.io/api
-name
types.go | xargs
-n1
dirname
|
sort
find k8s.io/api
-name
types.go | xargs
-n1
dirname
|
sort
|
grep
-v
pkg.apis.policy.v1alpha1
)
)
)
)
listergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_external_apis
[*]
}
"
)
listergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_external_apis
[*]
}
"
)
...
...
pkg/apis/policy/BUILD
View file @
3ba9d1d0
...
@@ -35,7 +35,6 @@ filegroup(
...
@@ -35,7 +35,6 @@ filegroup(
":package-srcs",
":package-srcs",
"//pkg/apis/policy/fuzzer:all-srcs",
"//pkg/apis/policy/fuzzer:all-srcs",
"//pkg/apis/policy/install:all-srcs",
"//pkg/apis/policy/install:all-srcs",
"//pkg/apis/policy/v1alpha1:all-srcs",
"//pkg/apis/policy/v1beta1:all-srcs",
"//pkg/apis/policy/v1beta1:all-srcs",
"//pkg/apis/policy/validation:all-srcs",
"//pkg/apis/policy/validation:all-srcs",
],
],
...
...
pkg/apis/policy/v1alpha1/BUILD
deleted
100644 → 0
View file @
ea66c005
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"register.go",
"types.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "k8s.io/kubernetes/pkg/apis/policy/v1alpha1",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
pkg/apis/policy/v1alpha1/doc.go
deleted
100644 → 0
View file @
ea66c005
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:defaulter-gen=TypeMeta
// +k8s:deepcopy-gen=package
// Package policy is for any kind of policy object. Suitable examples, even if
// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
// NetworkPolicy, etc.
package
v1alpha1
// import "k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
pkg/apis/policy/v1alpha1/register.go
deleted
100644 → 0
View file @
ea66c005
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
v1alpha1
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the group name use in this package
const
GroupName
=
"policy"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
"v1alpha1"
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func
Resource
(
resource
string
)
schema
.
GroupResource
{
return
SchemeGroupVersion
.
WithResource
(
resource
)
.
GroupResource
()
}
var
(
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
SchemeBuilder
runtime
.
SchemeBuilder
localSchemeBuilder
=
&
SchemeBuilder
AddToScheme
=
localSchemeBuilder
.
AddToScheme
)
func
init
()
{
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder
.
Register
(
addKnownTypes
,
RegisterDefaults
)
}
// Adds the list of known types to the given scheme.
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
PodDisruptionBudget
{},
&
PodDisruptionBudgetList
{},
&
Eviction
{},
)
// Add the watch version that applies
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
return
nil
}
pkg/apis/policy/v1alpha1/types.go
deleted
100644 → 0
View file @
ea66c005
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
v1alpha1
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
type
PodDisruptionBudgetSpec
struct
{
// An eviction is allowed if at least "minAvailable" pods selected by
// "selector" will still be available after the eviction, i.e. even in the
// absence of the evicted pod. So for example you can prevent all voluntary
// evictions by specifying "100%".
// +optional
MinAvailable
intstr
.
IntOrString
`json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
// Label query over pods whose evictions are managed by the disruption
// budget.
// +optional
Selector
*
metav1
.
LabelSelector
`json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
}
// PodDisruptionBudgetStatus represents information about the status of a
// PodDisruptionBudget. Status may trail the actual state of a system.
type
PodDisruptionBudgetStatus
struct
{
// Whether or not a disruption is currently allowed.
PodDisruptionAllowed
bool
`json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"`
// current number of healthy pods
CurrentHealthy
int32
`json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"`
// minimum desired number of healthy pods
DesiredHealthy
int32
`json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"`
// total number of pods counted by this disruption budget
ExpectedPods
int32
`json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
type
PodDisruptionBudget
struct
{
metav1
.
TypeMeta
`json:",inline"`
// +optional
metav1
.
ObjectMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Specification of the desired behavior of the PodDisruptionBudget.
// +optional
Spec
PodDisruptionBudgetSpec
`json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Most recently observed status of the PodDisruptionBudget.
// +optional
Status
PodDisruptionBudgetStatus
`json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
type
PodDisruptionBudgetList
struct
{
metav1
.
TypeMeta
`json:",inline"`
// +optional
metav1
.
ListMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items
[]
PodDisruptionBudget
`json:"items" protobuf:"bytes,2,rep,name=items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Eviction evicts a pod from its node subject to certain policies and safety constraints.
// This is a subresource of Pod. A request to cause such an eviction is
// created by POSTing to .../pods/<pod name>/eviction.
type
Eviction
struct
{
metav1
.
TypeMeta
`json:",inline"`
// ObjectMeta describes the pod that is being evicted.
// +optional
metav1
.
ObjectMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// DeleteOptions may be provided
// +optional
DeleteOptions
*
metav1
.
DeleteOptions
`json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
}
pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go
deleted
100644 → 0
View file @
ea66c005
// +build !ignore_autogenerated
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package
v1alpha1
import
(
v1
"k8s.io/apimachinery/pkg/apis/meta/v1"
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
Eviction
)
DeepCopyInto
(
out
*
Eviction
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
in
.
ObjectMeta
.
DeepCopyInto
(
&
out
.
ObjectMeta
)
if
in
.
DeleteOptions
!=
nil
{
in
,
out
:=
&
in
.
DeleteOptions
,
&
out
.
DeleteOptions
if
*
in
==
nil
{
*
out
=
nil
}
else
{
*
out
=
new
(
v1
.
DeleteOptions
)
(
*
in
)
.
DeepCopyInto
(
*
out
)
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.
func
(
in
*
Eviction
)
DeepCopy
()
*
Eviction
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
Eviction
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
Eviction
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
PodDisruptionBudget
)
DeepCopyInto
(
out
*
PodDisruptionBudget
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
in
.
ObjectMeta
.
DeepCopyInto
(
&
out
.
ObjectMeta
)
in
.
Spec
.
DeepCopyInto
(
&
out
.
Spec
)
out
.
Status
=
in
.
Status
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget.
func
(
in
*
PodDisruptionBudget
)
DeepCopy
()
*
PodDisruptionBudget
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
PodDisruptionBudget
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
PodDisruptionBudget
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
PodDisruptionBudgetList
)
DeepCopyInto
(
out
*
PodDisruptionBudgetList
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
out
.
ListMeta
=
in
.
ListMeta
if
in
.
Items
!=
nil
{
in
,
out
:=
&
in
.
Items
,
&
out
.
Items
*
out
=
make
([]
PodDisruptionBudget
,
len
(
*
in
))
for
i
:=
range
*
in
{
(
*
in
)[
i
]
.
DeepCopyInto
(
&
(
*
out
)[
i
])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList.
func
(
in
*
PodDisruptionBudgetList
)
DeepCopy
()
*
PodDisruptionBudgetList
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
PodDisruptionBudgetList
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
PodDisruptionBudgetList
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
PodDisruptionBudgetSpec
)
DeepCopyInto
(
out
*
PodDisruptionBudgetSpec
)
{
*
out
=
*
in
out
.
MinAvailable
=
in
.
MinAvailable
if
in
.
Selector
!=
nil
{
in
,
out
:=
&
in
.
Selector
,
&
out
.
Selector
if
*
in
==
nil
{
*
out
=
nil
}
else
{
*
out
=
new
(
v1
.
LabelSelector
)
(
*
in
)
.
DeepCopyInto
(
*
out
)
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec.
func
(
in
*
PodDisruptionBudgetSpec
)
DeepCopy
()
*
PodDisruptionBudgetSpec
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
PodDisruptionBudgetSpec
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
PodDisruptionBudgetStatus
)
DeepCopyInto
(
out
*
PodDisruptionBudgetStatus
)
{
*
out
=
*
in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus.
func
(
in
*
PodDisruptionBudgetStatus
)
DeepCopy
()
*
PodDisruptionBudgetStatus
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
PodDisruptionBudgetStatus
)
in
.
DeepCopyInto
(
out
)
return
out
}
pkg/apis/policy/v1alpha1/zz_generated.defaults.go
deleted
100644 → 0
View file @
ea66c005
// +build !ignore_autogenerated
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by defaulter-gen. Do not edit it manually!
package
v1alpha1
import
(
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func
RegisterDefaults
(
scheme
*
runtime
.
Scheme
)
error
{
return
nil
}
test/integration/framework/BUILD
View file @
3ba9d1d0
...
@@ -23,7 +23,7 @@ go_library(
...
@@ -23,7 +23,7 @@ go_library(
"//pkg/api/testapi:go_default_library",
"//pkg/api/testapi:go_default_library",
"//pkg/apis/batch:go_default_library",
"//pkg/apis/batch:go_default_library",
"//pkg/apis/core:go_default_library",
"//pkg/apis/core:go_default_library",
"//pkg/apis/policy/v1
alph
a1:go_default_library",
"//pkg/apis/policy/v1
bet
a1:go_default_library",
"//pkg/client/clientset_generated/internalclientset:go_default_library",
"//pkg/client/clientset_generated/internalclientset:go_default_library",
"//pkg/controller:go_default_library",
"//pkg/controller:go_default_library",
"//pkg/controller/replication:go_default_library",
"//pkg/controller/replication:go_default_library",
...
...
test/integration/framework/master_utils.go
View file @
3ba9d1d0
...
@@ -64,7 +64,7 @@ import (
...
@@ -64,7 +64,7 @@ import (
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/apis/batch"
api
"k8s.io/kubernetes/pkg/apis/core"
api
"k8s.io/kubernetes/pkg/apis/core"
policy
"k8s.io/kubernetes/pkg/apis/policy/v1
alph
a1"
policy
"k8s.io/kubernetes/pkg/apis/policy/v1
bet
a1"
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
"k8s.io/kubernetes/pkg/controller"
"k8s.io/kubernetes/pkg/controller"
replicationcontroller
"k8s.io/kubernetes/pkg/controller/replication"
replicationcontroller
"k8s.io/kubernetes/pkg/controller/replication"
...
...
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