Vendor main dependencies.
This commit is contained in:
parent
49a09ab7dd
commit
dd5e3fba01
2738 changed files with 1045689 additions and 0 deletions
21
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/doc.go
generated
vendored
Normal file
21
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
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:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
package rbac
|
164
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/helpers.go
generated
vendored
Normal file
164
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/helpers.go
generated
vendored
Normal file
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
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 rbac
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/client-go/1.5/pkg/api/unversioned"
|
||||
)
|
||||
|
||||
func RoleRefGroupKind(roleRef RoleRef) unversioned.GroupKind {
|
||||
return unversioned.GroupKind{Group: roleRef.APIGroup, Kind: roleRef.Kind}
|
||||
}
|
||||
|
||||
func VerbMatches(rule PolicyRule, requestedVerb string) bool {
|
||||
for _, ruleVerb := range rule.Verbs {
|
||||
if ruleVerb == VerbAll {
|
||||
return true
|
||||
}
|
||||
if ruleVerb == requestedVerb {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func APIGroupMatches(rule PolicyRule, requestedGroup string) bool {
|
||||
for _, ruleGroup := range rule.APIGroups {
|
||||
if ruleGroup == APIGroupAll {
|
||||
return true
|
||||
}
|
||||
if ruleGroup == requestedGroup {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func ResourceMatches(rule PolicyRule, requestedResource string) bool {
|
||||
for _, ruleResource := range rule.Resources {
|
||||
if ruleResource == ResourceAll {
|
||||
return true
|
||||
}
|
||||
if ruleResource == requestedResource {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func ResourceNameMatches(rule PolicyRule, requestedName string) bool {
|
||||
if len(rule.ResourceNames) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, ruleName := range rule.ResourceNames {
|
||||
if ruleName == requestedName {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func NonResourceURLMatches(rule PolicyRule, requestedURL string) bool {
|
||||
for _, ruleURL := range rule.NonResourceURLs {
|
||||
if ruleURL == NonResourceAll {
|
||||
return true
|
||||
}
|
||||
if ruleURL == requestedURL {
|
||||
return true
|
||||
}
|
||||
if strings.HasSuffix(ruleURL, "*") && strings.HasPrefix(requestedURL, strings.TrimRight(ruleURL, "*")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=false
|
||||
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
||||
// We use it to construct rules in code. It's more compact than trying to write them
|
||||
// out in a literal and allows us to perform some basic checking during construction
|
||||
type PolicyRuleBuilder struct {
|
||||
PolicyRule PolicyRule
|
||||
}
|
||||
|
||||
func NewRule(verbs ...string) *PolicyRuleBuilder {
|
||||
return &PolicyRuleBuilder{
|
||||
PolicyRule: PolicyRule{Verbs: verbs},
|
||||
}
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
|
||||
r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...)
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
|
||||
r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...)
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
|
||||
r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...)
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
|
||||
r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...)
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
|
||||
ret, err := r.Rule()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
|
||||
if len(r.PolicyRule.Verbs) == 0 {
|
||||
return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
|
||||
}
|
||||
|
||||
switch {
|
||||
case len(r.PolicyRule.NonResourceURLs) > 0:
|
||||
if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
|
||||
return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
|
||||
}
|
||||
case len(r.PolicyRule.Resources) > 0:
|
||||
if len(r.PolicyRule.NonResourceURLs) != 0 {
|
||||
return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
|
||||
}
|
||||
if len(r.PolicyRule.APIGroups) == 0 {
|
||||
// this a common bug
|
||||
return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
|
||||
}
|
||||
default:
|
||||
return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
|
||||
}
|
||||
|
||||
return r.PolicyRule, nil
|
||||
}
|
43
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/install/install.go
generated
vendored
Normal file
43
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/install/install.go
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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 install installs the batch API group, making it available as
|
||||
// an option to all of the API encoding/decoding machinery.
|
||||
package install
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/1.5/pkg/apimachinery/announced"
|
||||
"k8s.io/client-go/1.5/pkg/apis/rbac"
|
||||
"k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1"
|
||||
"k8s.io/client-go/1.5/pkg/util/sets"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := announced.NewGroupMetaFactory(
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: rbac.GroupName,
|
||||
VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
|
||||
ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/rbac",
|
||||
RootScopedKinds: sets.NewString("ClusterRole", "ClusterRoleBinding"),
|
||||
AddInternalObjectsToScheme: rbac.AddToScheme,
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
|
||||
},
|
||||
).Announce().RegisterAndEnable(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
65
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/register.go
generated
vendored
Normal file
65
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/register.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
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 rbac
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
"k8s.io/client-go/1.5/pkg/api/unversioned"
|
||||
"k8s.io/client-go/1.5/pkg/runtime"
|
||||
"k8s.io/client-go/1.5/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "rbac.authorization.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||
|
||||
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||
func Kind(kind string) unversioned.GroupKind {
|
||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) unversioned.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Role{},
|
||||
&RoleBinding{},
|
||||
&RoleBindingList{},
|
||||
&RoleList{},
|
||||
|
||||
&ClusterRole{},
|
||||
&ClusterRoleBinding{},
|
||||
&ClusterRoleBindingList{},
|
||||
&ClusterRoleList{},
|
||||
|
||||
&api.ListOptions{},
|
||||
&api.DeleteOptions{},
|
||||
&api.ExportOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
191
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/types.go
generated
vendored
Normal file
191
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/types.go
generated
vendored
Normal file
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
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 rbac
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
"k8s.io/client-go/1.5/pkg/api/unversioned"
|
||||
"k8s.io/client-go/1.5/pkg/runtime"
|
||||
)
|
||||
|
||||
// Authorization is calculated against
|
||||
// 1. evaluation of ClusterRoleBindings - short circuit on match
|
||||
// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
|
||||
// 3. deny by default
|
||||
|
||||
const (
|
||||
APIGroupAll = "*"
|
||||
ResourceAll = "*"
|
||||
VerbAll = "*"
|
||||
NonResourceAll = "*"
|
||||
|
||||
GroupKind = "Group"
|
||||
ServiceAccountKind = "ServiceAccount"
|
||||
UserKind = "User"
|
||||
|
||||
UserAll = "*"
|
||||
)
|
||||
|
||||
// PolicyRule holds information that describes a policy rule, but does not contain information
|
||||
// about who the rule applies to or which namespace the rule applies to.
|
||||
type PolicyRule struct {
|
||||
// Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
|
||||
Verbs []string
|
||||
// AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
|
||||
// If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
|
||||
AttributeRestrictions runtime.Object
|
||||
// APIGroups is the name of the APIGroup that contains the resources.
|
||||
// If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
|
||||
|
||||
APIGroups []string
|
||||
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
|
||||
Resources []string
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
ResourceNames []string
|
||||
|
||||
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
|
||||
// If an action is not a resource API request, then the URL is split on '/' and is checked against the NonResourceURLs to look for a match.
|
||||
// Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
|
||||
// Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
|
||||
NonResourceURLs []string
|
||||
}
|
||||
|
||||
// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
|
||||
// or a value for non-objects such as user and group names.
|
||||
type Subject struct {
|
||||
// Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
|
||||
// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
|
||||
Kind string
|
||||
// APIVersion holds the API group and version of the referenced object. For non-object references such as "Group" and "User" this is
|
||||
// expected to be API version of this API group. For example, "rbac/v1alpha1".
|
||||
APIVersion string
|
||||
// Name of the object being referenced.
|
||||
Name string
|
||||
// Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
|
||||
// the Authorizer should report an error.
|
||||
Namespace string
|
||||
}
|
||||
|
||||
// RoleRef contains information that points to the role being used
|
||||
type RoleRef struct {
|
||||
// APIGroup is the group for the resource being referenced
|
||||
APIGroup string
|
||||
// Kind is the type of resource being referenced
|
||||
Kind string
|
||||
// Name is the name of resource being referenced
|
||||
Name string
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
|
||||
type Role struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
api.ObjectMeta
|
||||
|
||||
// Rules holds all the PolicyRules for this Role
|
||||
Rules []PolicyRule
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
|
||||
// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
|
||||
// namespace only have effect in that namespace.
|
||||
type RoleBinding struct {
|
||||
unversioned.TypeMeta
|
||||
api.ObjectMeta
|
||||
|
||||
// Subjects holds references to the objects the role applies to.
|
||||
Subjects []Subject
|
||||
|
||||
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
|
||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||
RoleRef RoleRef
|
||||
}
|
||||
|
||||
// RoleBindingList is a collection of RoleBindings
|
||||
type RoleBindingList struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta
|
||||
|
||||
// Items is a list of roleBindings
|
||||
Items []RoleBinding
|
||||
}
|
||||
|
||||
// RoleList is a collection of Roles
|
||||
type RoleList struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta
|
||||
|
||||
// Items is a list of roles
|
||||
Items []Role
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
// +nonNamespaced=true
|
||||
|
||||
// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
|
||||
type ClusterRole struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
api.ObjectMeta
|
||||
|
||||
// Rules holds all the PolicyRules for this ClusterRole
|
||||
Rules []PolicyRule
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
// +nonNamespaced=true
|
||||
|
||||
// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
|
||||
// and adds who information via Subject.
|
||||
type ClusterRoleBinding struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
api.ObjectMeta
|
||||
|
||||
// Subjects holds references to the objects the role applies to.
|
||||
Subjects []Subject
|
||||
|
||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||
RoleRef RoleRef
|
||||
}
|
||||
|
||||
// ClusterRoleBindingList is a collection of ClusterRoleBindings
|
||||
type ClusterRoleBindingList struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta
|
||||
|
||||
// Items is a list of ClusterRoleBindings
|
||||
Items []ClusterRoleBinding
|
||||
}
|
||||
|
||||
// ClusterRoleList is a collection of ClusterRoles
|
||||
type ClusterRoleList struct {
|
||||
unversioned.TypeMeta
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta
|
||||
|
||||
// Items is a list of ClusterRoles
|
||||
Items []ClusterRole
|
||||
}
|
36
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/defaults.go
generated
vendored
Normal file
36
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/defaults.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
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 (
|
||||
"k8s.io/client-go/1.5/pkg/runtime"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
return scheme.AddDefaultingFuncs(
|
||||
func(obj *ClusterRoleBinding) {
|
||||
if len(obj.RoleRef.APIGroup) == 0 {
|
||||
obj.RoleRef.APIGroup = GroupName
|
||||
}
|
||||
},
|
||||
func(obj *RoleBinding) {
|
||||
if len(obj.RoleRef.APIGroup) == 0 {
|
||||
obj.RoleRef.APIGroup = GroupName
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
22
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/doc.go
generated
vendored
Normal file
22
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
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:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
package v1alpha1
|
2593
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.pb.go
generated
vendored
Normal file
2593
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
55
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/register.go
generated
vendored
Normal file
55
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/register.go
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
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 (
|
||||
"k8s.io/client-go/1.5/pkg/api/unversioned"
|
||||
"k8s.io/client-go/1.5/pkg/api/v1"
|
||||
"k8s.io/client-go/1.5/pkg/runtime"
|
||||
"k8s.io/client-go/1.5/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "rbac.authorization.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Role{},
|
||||
&RoleBinding{},
|
||||
&RoleBindingList{},
|
||||
&RoleList{},
|
||||
|
||||
&ClusterRole{},
|
||||
&ClusterRoleBinding{},
|
||||
&ClusterRoleBindingList{},
|
||||
&ClusterRoleList{},
|
||||
|
||||
&v1.ListOptions{},
|
||||
&v1.DeleteOptions{},
|
||||
&v1.ExportOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
4567
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.generated.go
generated
vendored
Normal file
4567
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.generated.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
178
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.go
generated
vendored
Normal file
178
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.go
generated
vendored
Normal file
|
@ -0,0 +1,178 @@
|
|||
/*
|
||||
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 (
|
||||
"k8s.io/client-go/1.5/pkg/api/unversioned"
|
||||
"k8s.io/client-go/1.5/pkg/api/v1"
|
||||
"k8s.io/client-go/1.5/pkg/runtime"
|
||||
)
|
||||
|
||||
// Authorization is calculated against
|
||||
// 1. evaluation of ClusterRoleBindings - short circuit on match
|
||||
// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
|
||||
// 3. deny by default
|
||||
|
||||
// PolicyRule holds information that describes a policy rule, but does not contain information
|
||||
// about who the rule applies to or which namespace the rule applies to.
|
||||
type PolicyRule struct {
|
||||
// Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
|
||||
Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
|
||||
// AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
|
||||
// If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
|
||||
AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"`
|
||||
|
||||
// APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
|
||||
// the enumerated resources in any API group will be allowed.
|
||||
APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
|
||||
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
|
||||
Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
|
||||
|
||||
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
|
||||
// This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
|
||||
// Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
|
||||
// Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
|
||||
NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
|
||||
}
|
||||
|
||||
// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
|
||||
// or a value for non-objects such as user and group names.
|
||||
type Subject struct {
|
||||
// Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
|
||||
// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
|
||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||
// APIVersion holds the API group and version of the referenced object.
|
||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
|
||||
// Name of the object being referenced.
|
||||
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
|
||||
// Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
|
||||
// the Authorizer should report an error.
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
||||
}
|
||||
|
||||
// RoleRef contains information that points to the role being used
|
||||
type RoleRef struct {
|
||||
// APIGroup is the group for the resource being referenced
|
||||
APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Kind is the type of resource being referenced
|
||||
Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
|
||||
// Name is the name of resource being referenced
|
||||
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
|
||||
type Role struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Rules holds all the PolicyRules for this Role
|
||||
Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
|
||||
// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
|
||||
// namespace only have effect in that namespace.
|
||||
type RoleBinding struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Subjects holds references to the objects the role applies to.
|
||||
Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
|
||||
|
||||
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
|
||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
||||
}
|
||||
|
||||
// RoleBindingList is a collection of RoleBindings
|
||||
type RoleBindingList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of RoleBindings
|
||||
Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// RoleList is a collection of Roles
|
||||
type RoleList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of Roles
|
||||
Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
// +nonNamespaced=true
|
||||
|
||||
// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
|
||||
type ClusterRole struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Rules holds all the PolicyRules for this ClusterRole
|
||||
Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
// +nonNamespaced=true
|
||||
|
||||
// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
|
||||
// and adds who information via Subject.
|
||||
type ClusterRoleBinding struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Subjects holds references to the objects the role applies to.
|
||||
Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
|
||||
|
||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
||||
}
|
||||
|
||||
// ClusterRoleBindingList is a collection of ClusterRoleBindings
|
||||
type ClusterRoleBindingList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of ClusterRoleBindings
|
||||
Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// ClusterRoleList is a collection of ClusterRoles
|
||||
type ClusterRoleList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of ClusterRoles
|
||||
Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
149
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
generated
vendored
Normal file
149
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
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
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
var map_ClusterRole = map[string]string{
|
||||
"": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"rules": "Rules holds all the PolicyRules for this ClusterRole",
|
||||
}
|
||||
|
||||
func (ClusterRole) SwaggerDoc() map[string]string {
|
||||
return map_ClusterRole
|
||||
}
|
||||
|
||||
var map_ClusterRoleBinding = map[string]string{
|
||||
"": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"subjects": "Subjects holds references to the objects the role applies to.",
|
||||
"roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
|
||||
}
|
||||
|
||||
func (ClusterRoleBinding) SwaggerDoc() map[string]string {
|
||||
return map_ClusterRoleBinding
|
||||
}
|
||||
|
||||
var map_ClusterRoleBindingList = map[string]string{
|
||||
"": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of ClusterRoleBindings",
|
||||
}
|
||||
|
||||
func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
|
||||
return map_ClusterRoleBindingList
|
||||
}
|
||||
|
||||
var map_ClusterRoleList = map[string]string{
|
||||
"": "ClusterRoleList is a collection of ClusterRoles",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of ClusterRoles",
|
||||
}
|
||||
|
||||
func (ClusterRoleList) SwaggerDoc() map[string]string {
|
||||
return map_ClusterRoleList
|
||||
}
|
||||
|
||||
var map_PolicyRule = map[string]string{
|
||||
"": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
|
||||
"verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
|
||||
"attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.",
|
||||
"apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
|
||||
"resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
|
||||
"resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
|
||||
"nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
|
||||
}
|
||||
|
||||
func (PolicyRule) SwaggerDoc() map[string]string {
|
||||
return map_PolicyRule
|
||||
}
|
||||
|
||||
var map_Role = map[string]string{
|
||||
"": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"rules": "Rules holds all the PolicyRules for this Role",
|
||||
}
|
||||
|
||||
func (Role) SwaggerDoc() map[string]string {
|
||||
return map_Role
|
||||
}
|
||||
|
||||
var map_RoleBinding = map[string]string{
|
||||
"": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"subjects": "Subjects holds references to the objects the role applies to.",
|
||||
"roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
|
||||
}
|
||||
|
||||
func (RoleBinding) SwaggerDoc() map[string]string {
|
||||
return map_RoleBinding
|
||||
}
|
||||
|
||||
var map_RoleBindingList = map[string]string{
|
||||
"": "RoleBindingList is a collection of RoleBindings",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of RoleBindings",
|
||||
}
|
||||
|
||||
func (RoleBindingList) SwaggerDoc() map[string]string {
|
||||
return map_RoleBindingList
|
||||
}
|
||||
|
||||
var map_RoleList = map[string]string{
|
||||
"": "RoleList is a collection of Roles",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of Roles",
|
||||
}
|
||||
|
||||
func (RoleList) SwaggerDoc() map[string]string {
|
||||
return map_RoleList
|
||||
}
|
||||
|
||||
var map_RoleRef = map[string]string{
|
||||
"": "RoleRef contains information that points to the role being used",
|
||||
"apiGroup": "APIGroup is the group for the resource being referenced",
|
||||
"kind": "Kind is the type of resource being referenced",
|
||||
"name": "Name is the name of resource being referenced",
|
||||
}
|
||||
|
||||
func (RoleRef) SwaggerDoc() map[string]string {
|
||||
return map_RoleRef
|
||||
}
|
||||
|
||||
var map_Subject = map[string]string{
|
||||
"": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
|
||||
"kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
|
||||
"apiVersion": "APIVersion holds the API group and version of the referenced object.",
|
||||
"name": "Name of the object being referenced.",
|
||||
"namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
|
||||
}
|
||||
|
||||
func (Subject) SwaggerDoc() map[string]string {
|
||||
return map_Subject
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
559
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
generated
vendored
Normal file
559
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
generated
vendored
Normal file
|
@ -0,0 +1,559 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
api "k8s.io/client-go/1.5/pkg/api"
|
||||
rbac "k8s.io/client-go/1.5/pkg/apis/rbac"
|
||||
conversion "k8s.io/client-go/1.5/pkg/conversion"
|
||||
runtime "k8s.io/client-go/1.5/pkg/runtime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole,
|
||||
Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole,
|
||||
Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
|
||||
Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding,
|
||||
Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
|
||||
Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList,
|
||||
Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList,
|
||||
Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList,
|
||||
Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule,
|
||||
Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule,
|
||||
Convert_v1alpha1_Role_To_rbac_Role,
|
||||
Convert_rbac_Role_To_v1alpha1_Role,
|
||||
Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding,
|
||||
Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding,
|
||||
Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList,
|
||||
Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList,
|
||||
Convert_v1alpha1_RoleList_To_rbac_RoleList,
|
||||
Convert_rbac_RoleList_To_v1alpha1_RoleList,
|
||||
Convert_v1alpha1_RoleRef_To_rbac_RoleRef,
|
||||
Convert_rbac_RoleRef_To_v1alpha1_RoleRef,
|
||||
Convert_v1alpha1_Subject_To_rbac_Subject,
|
||||
Convert_rbac_Subject_To_v1alpha1_Subject,
|
||||
)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
|
||||
return autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]rbac.Subject, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
|
||||
return autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]rbac.ClusterRoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
|
||||
return autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]rbac.ClusterRole, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRole, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
|
||||
return autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
|
||||
out.Verbs = in.Verbs
|
||||
if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.APIGroups = in.APIGroups
|
||||
out.Resources = in.Resources
|
||||
out.ResourceNames = in.ResourceNames
|
||||
out.NonResourceURLs = in.NonResourceURLs
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
|
||||
out.Verbs = in.Verbs
|
||||
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.APIGroups = in.APIGroups
|
||||
out.Resources = in.Resources
|
||||
out.ResourceNames = in.ResourceNames
|
||||
out.NonResourceURLs = in.NonResourceURLs
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
|
||||
return autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_Role_To_rbac_Role(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
|
||||
return autoConvert_rbac_Role_To_v1alpha1_Role(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]rbac.Subject, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
|
||||
return autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]rbac.RoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
|
||||
return autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]rbac.Role, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Role, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
|
||||
return autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
|
||||
out.APIGroup = in.APIGroup
|
||||
out.Kind = in.Kind
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
|
||||
out.APIGroup = in.APIGroup
|
||||
out.Kind = in.Kind
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
|
||||
return autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
|
||||
out.Kind = in.Kind
|
||||
out.APIVersion = in.APIVersion
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
|
||||
out.Kind = in.Kind
|
||||
out.APIVersion = in.APIVersion
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
|
||||
return autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s)
|
||||
}
|
293
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
generated
vendored
Normal file
293
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
generated
vendored
Normal file
|
@ -0,0 +1,293 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/1.5/pkg/api/v1"
|
||||
conversion "k8s.io/client-go/1.5/pkg/conversion"
|
||||
runtime "k8s.io/client-go/1.5/pkg/runtime"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(RegisterDeepCopies)
|
||||
}
|
||||
|
||||
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
|
||||
// to allow building arbitrary schemes.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Role, InType: reflect.TypeOf(&Role{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleList, InType: reflect.TypeOf(&RoleList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Subject, InType: reflect.TypeOf(&Subject{})},
|
||||
)
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRole)
|
||||
out := out.(*ClusterRole)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleBinding)
|
||||
out := out.(*ClusterRoleBinding)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
out.RoleRef = in.RoleRef
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleBindingList)
|
||||
out := out.(*ClusterRoleBindingList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleList)
|
||||
out := out.(*ClusterRoleList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRole, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PolicyRule)
|
||||
out := out.(*PolicyRule)
|
||||
if in.Verbs != nil {
|
||||
in, out := &in.Verbs, &out.Verbs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.Verbs = nil
|
||||
}
|
||||
if err := runtime.DeepCopy_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.APIGroups != nil {
|
||||
in, out := &in.APIGroups, &out.APIGroups
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.APIGroups = nil
|
||||
}
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.Resources = nil
|
||||
}
|
||||
if in.ResourceNames != nil {
|
||||
in, out := &in.ResourceNames, &out.ResourceNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.ResourceNames = nil
|
||||
}
|
||||
if in.NonResourceURLs != nil {
|
||||
in, out := &in.NonResourceURLs, &out.NonResourceURLs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.NonResourceURLs = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Role)
|
||||
out := out.(*Role)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleBinding)
|
||||
out := out.(*RoleBinding)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
out.RoleRef = in.RoleRef
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleBindingList)
|
||||
out := out.(*RoleBindingList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleList)
|
||||
out := out.(*RoleList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Role, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_Role(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleRef)
|
||||
out := out.(*RoleRef)
|
||||
out.APIGroup = in.APIGroup
|
||||
out.Kind = in.Kind
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Subject)
|
||||
out := out.(*Subject)
|
||||
out.Kind = in.Kind
|
||||
out.APIVersion = in.APIVersion
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
}
|
297
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/zz_generated.deepcopy.go
generated
vendored
Normal file
297
vendor/k8s.io/client-go/1.5/pkg/apis/rbac/zz_generated.deepcopy.go
generated
vendored
Normal file
|
@ -0,0 +1,297 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package rbac
|
||||
|
||||
import (
|
||||
api "k8s.io/client-go/1.5/pkg/api"
|
||||
conversion "k8s.io/client-go/1.5/pkg/conversion"
|
||||
runtime "k8s.io/client-go/1.5/pkg/runtime"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(RegisterDeepCopies)
|
||||
}
|
||||
|
||||
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
|
||||
// to allow building arbitrary schemes.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Role, InType: reflect.TypeOf(&Role{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})},
|
||||
)
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRole)
|
||||
out := out.(*ClusterRole)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleBinding)
|
||||
out := out.(*ClusterRoleBinding)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
out.RoleRef = in.RoleRef
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleBindingList)
|
||||
out := out.(*ClusterRoleBindingList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ClusterRoleList)
|
||||
out := out.(*ClusterRoleList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRole, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PolicyRule)
|
||||
out := out.(*PolicyRule)
|
||||
if in.Verbs != nil {
|
||||
in, out := &in.Verbs, &out.Verbs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.Verbs = nil
|
||||
}
|
||||
if in.AttributeRestrictions == nil {
|
||||
out.AttributeRestrictions = nil
|
||||
} else if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.AttributeRestrictions = *newVal.(*runtime.Object)
|
||||
}
|
||||
if in.APIGroups != nil {
|
||||
in, out := &in.APIGroups, &out.APIGroups
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.APIGroups = nil
|
||||
}
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.Resources = nil
|
||||
}
|
||||
if in.ResourceNames != nil {
|
||||
in, out := &in.ResourceNames, &out.ResourceNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.ResourceNames = nil
|
||||
}
|
||||
if in.NonResourceURLs != nil {
|
||||
in, out := &in.NonResourceURLs, &out.NonResourceURLs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
} else {
|
||||
out.NonResourceURLs = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Role)
|
||||
out := out.(*Role)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Rules = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleBinding)
|
||||
out := out.(*RoleBinding)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Subjects != nil {
|
||||
in, out := &in.Subjects, &out.Subjects
|
||||
*out = make([]Subject, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Subjects = nil
|
||||
}
|
||||
out.RoleRef = in.RoleRef
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleBindingList)
|
||||
out := out.(*RoleBindingList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RoleBinding, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleList)
|
||||
out := out.(*RoleList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Role, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_rbac_Role(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*RoleRef)
|
||||
out := out.(*RoleRef)
|
||||
out.APIGroup = in.APIGroup
|
||||
out.Kind = in.Kind
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_rbac_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Subject)
|
||||
out := out.(*Subject)
|
||||
out.Kind = in.Kind
|
||||
out.APIVersion = in.APIVersion
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue