Skip to content

Commit

Permalink
Merge pull request #16469 from sttts/sttts-static-deepcopy-prep
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Prepare for static deep-copy in 3.8 rebase

This has no effect yet in 3.7 based master, but will make the 3.8 rebase much easier
with the deepcopy tags in place and test types moved into non-test packages to
be reachable by deepcopy-gen.
  • Loading branch information
openshift-merge-robot committed Sep 25, 2017
2 parents 11e88a4 + 93d6b94 commit b3475a3
Show file tree
Hide file tree
Showing 104 changed files with 5,175 additions and 131 deletions.
11 changes: 11 additions & 0 deletions pkg/apps/apis/apps/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const (
// +genclient:method=Rollback,verb=create,subresource=rollback,input=DeploymentConfigRollback
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale,result=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentConfig represents a configuration for a single deployment (represented as a
// ReplicationController). It also contains details about changes which resulted in the current
Expand Down Expand Up @@ -504,6 +505,8 @@ type DeploymentCondition struct {
Message string
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentConfigList is a collection of deployment configs.
type DeploymentConfigList struct {
metav1.TypeMeta
Expand All @@ -513,6 +516,8 @@ type DeploymentConfigList struct {
Items []DeploymentConfig
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentConfigRollback provides the input to rollback generation.
type DeploymentConfigRollback struct {
metav1.TypeMeta
Expand Down Expand Up @@ -540,6 +545,8 @@ type DeploymentConfigRollbackSpec struct {
IncludeStrategy bool
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentRequest is a request to a deployment config for a new deployment.
type DeploymentRequest struct {
metav1.TypeMeta
Expand All @@ -556,11 +563,15 @@ type DeploymentRequest struct {
ExcludeTriggers []DeploymentTriggerType
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentLog represents the logs for a deployment
type DeploymentLog struct {
metav1.TypeMeta
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentLogOptions is the REST options for a deployment log
type DeploymentLogOptions struct {
metav1.TypeMeta
Expand Down
11 changes: 11 additions & 0 deletions pkg/apps/apis/apps/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
// +genclient:method=Rollback,verb=create,subresource=rollback,input=DeploymentConfigRollback
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale,result=k8s.io/kubernetes/pkg/apis/extensions/v1beta1.Scale
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Deployment Configs define the template for a pod and manages deploying new images or configuration changes.
// A single deployment configuration is usually analogous to a single micro-service. Can support many different
Expand Down Expand Up @@ -379,6 +380,8 @@ type DeploymentCondition struct {
Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentConfigList is a collection of deployment configs.
type DeploymentConfigList struct {
metav1.TypeMeta `json:",inline"`
Expand All @@ -389,6 +392,8 @@ type DeploymentConfigList struct {
Items []DeploymentConfig `json:"items" protobuf:"bytes,2,rep,name=items"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentConfigRollback provides the input to rollback generation.
type DeploymentConfigRollback struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -416,6 +421,8 @@ type DeploymentConfigRollbackSpec struct {
IncludeStrategy bool `json:"includeStrategy" protobuf:"varint,6,opt,name=includeStrategy"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentRequest is a request to a deployment config for a new deployment.
type DeploymentRequest struct {
metav1.TypeMeta `json:",inline"`
Expand All @@ -432,11 +439,15 @@ type DeploymentRequest struct {
ExcludeTriggers []DeploymentTriggerType `json:"excludeTriggers,omitempty" protobuf:"bytes,4,rep,name=excludeTriggers,casttype=DeploymentTriggerType"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentLog represents the logs for a deployment
type DeploymentLog struct {
metav1.TypeMeta `json:",inline"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DeploymentLogOptions is the REST options for a deployment log
type DeploymentLogOptions struct {
metav1.TypeMeta `json:",inline"`
Expand Down
39 changes: 39 additions & 0 deletions pkg/authorization/apis/authorization/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@ type PolicyRule struct {
NonResourceURLs sets.String
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// IsPersonalSubjectAccessReview is a marker for PolicyRule.AttributeRestrictions that denotes that subjectaccessreviews on self should be allowed
type IsPersonalSubjectAccessReview struct {
metav1.TypeMeta
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings.
type Role struct {
Expand All @@ -98,6 +101,7 @@ type Role struct {
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RoleBinding references a Role, but not contain it. It can reference any Role in the same namespace or in the global namespace.
// It adds who information via Users and Groups and namespace information by which namespace it exists in. RoleBindings in a given
Expand All @@ -118,6 +122,7 @@ type RoleBinding struct {
type RolesByName map[string]*Role

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Policy is a object that holds all the Roles for a particular namespace. There is at most
// one Policy document per namespace.
Expand All @@ -135,6 +140,7 @@ type Policy struct {
type RoleBindingsByName map[string]*RoleBinding

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PolicyBinding is a object that holds all the RoleBindings for a particular namespace. There is
// one PolicyBinding document per referenced Policy namespace
Expand All @@ -154,6 +160,7 @@ type PolicyBinding struct {

// +genclient
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// SelfSubjectRulesReview is a resource you can create to determine which actions you can perform in a namespace
type SelfSubjectRulesReview struct {
Expand All @@ -177,6 +184,7 @@ type SelfSubjectRulesReviewSpec struct {

// +genclient
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// SubjectRulesReview is a resource you can create to determine which actions another user can perform in a namespace
type SubjectRulesReview struct {
Expand Down Expand Up @@ -208,6 +216,8 @@ type SubjectRulesReviewStatus struct {
EvaluationError string
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ResourceAccessReviewResponse describes who can perform the action
type ResourceAccessReviewResponse struct {
metav1.TypeMeta
Expand All @@ -230,6 +240,7 @@ type ResourceAccessReviewResponse struct {
// +genclient
// +genclient:nonNamespaced
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ResourceAccessReview is a means to request a list of which users and groups are authorized to perform the
// action specified by spec
Expand All @@ -240,6 +251,8 @@ type ResourceAccessReview struct {
Action
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// SubjectAccessReviewResponse describes whether or not a user or group can perform an action
type SubjectAccessReviewResponse struct {
metav1.TypeMeta
Expand All @@ -259,6 +272,7 @@ type SubjectAccessReviewResponse struct {
// +genclient
// +genclient:nonNamespaced
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// SubjectAccessReview is an object for requesting information about whether a user or group can perform an action
type SubjectAccessReview struct {
Expand All @@ -280,6 +294,7 @@ type SubjectAccessReview struct {

// +genclient
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// LocalResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec in a particular namespace
type LocalResourceAccessReview struct {
Expand All @@ -291,6 +306,7 @@ type LocalResourceAccessReview struct {

// +genclient
// +genclient:onlyVerbs=create
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// LocalSubjectAccessReview is an object for requesting information about whether a user or group can perform an action in a particular namespace
type LocalSubjectAccessReview struct {
Expand Down Expand Up @@ -332,6 +348,8 @@ type Action struct {
Content kruntime.Object
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PolicyList is a collection of Policies
type PolicyList struct {
metav1.TypeMeta
Expand All @@ -342,6 +360,8 @@ type PolicyList struct {
Items []Policy
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PolicyBindingList is a collection of PolicyBindings
type PolicyBindingList struct {
metav1.TypeMeta
Expand All @@ -352,6 +372,8 @@ type PolicyBindingList struct {
Items []PolicyBinding
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RoleBindingList is a collection of RoleBindings
type RoleBindingList struct {
metav1.TypeMeta
Expand All @@ -362,6 +384,8 @@ type RoleBindingList struct {
Items []RoleBinding
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RoleList is a collection of Roles
type RoleList struct {
metav1.TypeMeta
Expand All @@ -374,6 +398,7 @@ type RoleList struct {

// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterRole is a logical grouping of PolicyRules that can be referenced as a unit by ClusterRoleBindings.
type ClusterRole struct {
Expand All @@ -387,6 +412,7 @@ type ClusterRole struct {

// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference any ClusterRole in the same namespace or in the global namespace.
// It adds who information via Users and Groups and namespace information by which namespace it exists in. ClusterRoleBindings in a given
Expand All @@ -409,6 +435,7 @@ type ClusterRolesByName map[string]*ClusterRole

// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterPolicy is a object that holds all the ClusterRoles for a particular namespace. There is at most
// one ClusterPolicy document per namespace.
Expand All @@ -428,6 +455,7 @@ type ClusterRoleBindingsByName map[string]*ClusterRoleBinding

// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterPolicyBinding is a object that holds all the ClusterRoleBindings for a particular namespace. There is
// one ClusterPolicyBinding document per referenced ClusterPolicy namespace
Expand All @@ -445,6 +473,8 @@ type ClusterPolicyBinding struct {
RoleBindings ClusterRoleBindingsByName
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterPolicyList is a collection of ClusterPolicies
type ClusterPolicyList struct {
metav1.TypeMeta
Expand All @@ -455,6 +485,8 @@ type ClusterPolicyList struct {
Items []ClusterPolicy
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterPolicyBindingList is a collection of ClusterPolicyBindings
type ClusterPolicyBindingList struct {
metav1.TypeMeta
Expand All @@ -465,6 +497,8 @@ type ClusterPolicyBindingList struct {
Items []ClusterPolicyBinding
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterRoleBindingList is a collection of ClusterRoleBindings
type ClusterRoleBindingList struct {
metav1.TypeMeta
Expand All @@ -475,6 +509,8 @@ type ClusterRoleBindingList struct {
Items []ClusterRoleBinding
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterRoleList is a collection of ClusterRoles
type ClusterRoleList struct {
metav1.TypeMeta
Expand All @@ -486,6 +522,7 @@ type ClusterRoleList struct {
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RoleBindingRestriction is an object that can be matched against a subject
// (user, group, or service account) to determine whether rolebindings on that
Expand Down Expand Up @@ -515,6 +552,8 @@ type RoleBindingRestrictionSpec struct {
ServiceAccountRestriction *ServiceAccountRestriction
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RoleBindingRestrictionList is a collection of RoleBindingRestriction objects.
type RoleBindingRestrictionList struct {
metav1.TypeMeta
Expand Down
Loading

0 comments on commit b3475a3

Please sign in to comment.