forked from LaconicNetwork/kompose
added OpenShifts fork of Kubernetes
reason for this is that openshift/kubernetes backported k8s.io/kubernetes/pkg/securitycontextconstraints/util that is currently required by something that github.com/openshift/origin/pkg/deploy/api/v1 depends on
This commit is contained in:
+257
@@ -0,0 +1,257 @@
|
||||
// +build !ignore_autogenerated_openshift
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := api.Scheme.AddGeneratedDeepCopyFuncs(
|
||||
DeepCopy_api_ClusterRoleScopeRestriction,
|
||||
DeepCopy_api_OAuthAccessToken,
|
||||
DeepCopy_api_OAuthAccessTokenList,
|
||||
DeepCopy_api_OAuthAuthorizeToken,
|
||||
DeepCopy_api_OAuthAuthorizeTokenList,
|
||||
DeepCopy_api_OAuthClient,
|
||||
DeepCopy_api_OAuthClientAuthorization,
|
||||
DeepCopy_api_OAuthClientAuthorizationList,
|
||||
DeepCopy_api_OAuthClientList,
|
||||
DeepCopy_api_ScopeRestriction,
|
||||
); err != nil {
|
||||
// if one of the deep copy functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_api_ClusterRoleScopeRestriction(in ClusterRoleScopeRestriction, out *ClusterRoleScopeRestriction, c *conversion.Cloner) error {
|
||||
if in.RoleNames != nil {
|
||||
in, out := in.RoleNames, &out.RoleNames
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.RoleNames = nil
|
||||
}
|
||||
if in.Namespaces != nil {
|
||||
in, out := in.Namespaces, &out.Namespaces
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Namespaces = nil
|
||||
}
|
||||
out.AllowEscalation = in.AllowEscalation
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthAccessToken(in OAuthAccessToken, out *OAuthAccessToken, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ClientName = in.ClientName
|
||||
out.ExpiresIn = in.ExpiresIn
|
||||
if in.Scopes != nil {
|
||||
in, out := in.Scopes, &out.Scopes
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Scopes = nil
|
||||
}
|
||||
out.RedirectURI = in.RedirectURI
|
||||
out.UserName = in.UserName
|
||||
out.UserUID = in.UserUID
|
||||
out.AuthorizeToken = in.AuthorizeToken
|
||||
out.RefreshToken = in.RefreshToken
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthAccessTokenList(in OAuthAccessTokenList, out *OAuthAccessTokenList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]OAuthAccessToken, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_api_OAuthAccessToken(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthAuthorizeToken(in OAuthAuthorizeToken, out *OAuthAuthorizeToken, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ClientName = in.ClientName
|
||||
out.ExpiresIn = in.ExpiresIn
|
||||
if in.Scopes != nil {
|
||||
in, out := in.Scopes, &out.Scopes
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Scopes = nil
|
||||
}
|
||||
out.RedirectURI = in.RedirectURI
|
||||
out.State = in.State
|
||||
out.UserName = in.UserName
|
||||
out.UserUID = in.UserUID
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthAuthorizeTokenList(in OAuthAuthorizeTokenList, out *OAuthAuthorizeTokenList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]OAuthAuthorizeToken, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_api_OAuthAuthorizeToken(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthClient(in OAuthClient, out *OAuthClient, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Secret = in.Secret
|
||||
if in.AdditionalSecrets != nil {
|
||||
in, out := in.AdditionalSecrets, &out.AdditionalSecrets
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.AdditionalSecrets = nil
|
||||
}
|
||||
out.RespondWithChallenges = in.RespondWithChallenges
|
||||
if in.RedirectURIs != nil {
|
||||
in, out := in.RedirectURIs, &out.RedirectURIs
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.RedirectURIs = nil
|
||||
}
|
||||
out.GrantMethod = in.GrantMethod
|
||||
if in.ScopeRestrictions != nil {
|
||||
in, out := in.ScopeRestrictions, &out.ScopeRestrictions
|
||||
*out = make([]ScopeRestriction, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_api_ScopeRestriction(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.ScopeRestrictions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthClientAuthorization(in OAuthClientAuthorization, out *OAuthClientAuthorization, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ClientName = in.ClientName
|
||||
out.UserName = in.UserName
|
||||
out.UserUID = in.UserUID
|
||||
if in.Scopes != nil {
|
||||
in, out := in.Scopes, &out.Scopes
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Scopes = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthClientAuthorizationList(in OAuthClientAuthorizationList, out *OAuthClientAuthorizationList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]OAuthClientAuthorization, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_api_OAuthClientAuthorization(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_OAuthClientList(in OAuthClientList, out *OAuthClientList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]OAuthClient, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_api_OAuthClient(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_ScopeRestriction(in ScopeRestriction, out *ScopeRestriction, c *conversion.Cloner) error {
|
||||
if in.ExactValues != nil {
|
||||
in, out := in.ExactValues, &out.ExactValues
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.ExactValues = nil
|
||||
}
|
||||
if in.ClusterRole != nil {
|
||||
in, out := in.ClusterRole, &out.ClusterRole
|
||||
*out = new(ClusterRoleScopeRestriction)
|
||||
if err := DeepCopy_api_ClusterRoleScopeRestriction(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ClusterRole = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package api
|
||||
|
||||
import "k8s.io/kubernetes/pkg/fields"
|
||||
|
||||
// OAuthAccessTokenToSelectableFields returns a label set that represents the object
|
||||
func OAuthAccessTokenToSelectableFields(obj *OAuthAccessToken) fields.Set {
|
||||
return fields.Set{
|
||||
"metadata.name": obj.Name,
|
||||
"clientName": obj.ClientName,
|
||||
"userName": obj.UserName,
|
||||
"userUID": obj.UserUID,
|
||||
"authorizeToken": obj.AuthorizeToken,
|
||||
}
|
||||
}
|
||||
|
||||
// OAuthAuthorizeTokenToSelectableFields returns a label set that represents the object
|
||||
func OAuthAuthorizeTokenToSelectableFields(obj *OAuthAuthorizeToken) fields.Set {
|
||||
return fields.Set{
|
||||
"metadata.name": obj.Name,
|
||||
"clientName": obj.ClientName,
|
||||
"userName": obj.UserName,
|
||||
"userUID": obj.UserUID,
|
||||
}
|
||||
}
|
||||
|
||||
// OAuthClientToSelectableFields returns a label set that represents the object
|
||||
func OAuthClientToSelectableFields(obj *OAuthClient) fields.Set {
|
||||
return fields.Set{
|
||||
"metadata.name": obj.Name,
|
||||
}
|
||||
}
|
||||
|
||||
// OAuthClientAuthorizationToSelectableFields returns a label set that represents the object
|
||||
func OAuthClientAuthorizationToSelectableFields(obj *OAuthClientAuthorization) fields.Set {
|
||||
return fields.Set{
|
||||
"metadata.name": obj.Name,
|
||||
"clientName": obj.ClientName,
|
||||
"userName": obj.UserName,
|
||||
"userUID": obj.UserUID,
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
const GroupName = ""
|
||||
|
||||
// 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 back a Group qualified GroupKind
|
||||
func Kind(kind string) unversioned.GroupKind {
|
||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
||||
func Resource(resource string) unversioned.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
// Add the API to Scheme.
|
||||
addKnownTypes(scheme)
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&OAuthAccessToken{},
|
||||
&OAuthAccessTokenList{},
|
||||
&OAuthAuthorizeToken{},
|
||||
&OAuthAuthorizeTokenList{},
|
||||
&OAuthClient{},
|
||||
&OAuthClientList{},
|
||||
&OAuthClientAuthorization{},
|
||||
&OAuthClientAuthorizationList{},
|
||||
)
|
||||
}
|
||||
|
||||
func (obj *OAuthClientAuthorizationList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthClientAuthorization) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthClientList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthClient) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthAuthorizeTokenList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthAuthorizeToken) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthAccessTokenList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *OAuthAccessToken) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
kapi "k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
)
|
||||
|
||||
type OAuthAccessToken struct {
|
||||
unversioned.TypeMeta
|
||||
kapi.ObjectMeta
|
||||
|
||||
// ClientName references the client that created this token.
|
||||
ClientName string
|
||||
|
||||
// ExpiresIn is the seconds from CreationTime before this token expires.
|
||||
ExpiresIn int64
|
||||
|
||||
// Scopes is an array of the requested scopes.
|
||||
Scopes []string
|
||||
|
||||
// RedirectURI is the redirection associated with the token.
|
||||
RedirectURI string
|
||||
|
||||
// UserName is the user name associated with this token
|
||||
UserName string
|
||||
|
||||
// UserUID is the unique UID associated with this token
|
||||
UserUID string
|
||||
|
||||
// AuthorizeToken contains the token that authorized this token
|
||||
AuthorizeToken string
|
||||
|
||||
// RefreshToken is the value by which this token can be renewed. Can be blank.
|
||||
RefreshToken string
|
||||
}
|
||||
|
||||
type OAuthAuthorizeToken struct {
|
||||
unversioned.TypeMeta
|
||||
kapi.ObjectMeta
|
||||
|
||||
// ClientName references the client that created this token.
|
||||
ClientName string
|
||||
|
||||
// ExpiresIn is the seconds from CreationTime before this token expires.
|
||||
ExpiresIn int64
|
||||
|
||||
// Scopes is an array of the requested scopes.
|
||||
Scopes []string
|
||||
|
||||
// RedirectURI is the redirection associated with the token.
|
||||
RedirectURI string
|
||||
|
||||
// State data from request
|
||||
State string
|
||||
|
||||
// UserName is the user name associated with this token
|
||||
UserName string
|
||||
|
||||
// UserUID is the unique UID associated with this token. UserUID and UserName must both match
|
||||
// for this token to be valid.
|
||||
UserUID string
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
type OAuthClient struct {
|
||||
unversioned.TypeMeta
|
||||
kapi.ObjectMeta
|
||||
|
||||
// Secret is the unique secret associated with a client
|
||||
Secret string
|
||||
|
||||
// AdditionalSecrets holds other secrets that may be used to identify the client. This is useful for rotation
|
||||
// and for service account token validation
|
||||
AdditionalSecrets []string
|
||||
|
||||
// RespondWithChallenges indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects
|
||||
RespondWithChallenges bool
|
||||
|
||||
// RedirectURIs is the valid redirection URIs associated with a client
|
||||
RedirectURIs []string
|
||||
|
||||
// GrantMethod determines how to handle grants for this client. If no method is provided, the
|
||||
// cluster default grant handling method will be used
|
||||
GrantMethod GrantHandlerType
|
||||
|
||||
// ScopeRestrictions describes which scopes this client can request. Each requested scope
|
||||
// is checked against each restriction. If any restriction matches, then the scope is allowed.
|
||||
// If no restriction matches, then the scope is denied.
|
||||
ScopeRestrictions []ScopeRestriction
|
||||
}
|
||||
|
||||
type GrantHandlerType string
|
||||
|
||||
const (
|
||||
// GrantHandlerAuto auto-approves client authorization grant requests
|
||||
GrantHandlerAuto GrantHandlerType = "auto"
|
||||
// GrantHandlerPrompt prompts the user to approve new client authorization grant requests
|
||||
GrantHandlerPrompt GrantHandlerType = "prompt"
|
||||
// GrantHandlerDeny auto-denies client authorization grant requests
|
||||
GrantHandlerDeny GrantHandlerType = "deny"
|
||||
)
|
||||
|
||||
// ScopeRestriction describe one restriction on scopes. Exactly one option must be non-nil.
|
||||
type ScopeRestriction struct {
|
||||
// ExactValues means the scope has to match a particular set of strings exactly
|
||||
ExactValues []string
|
||||
|
||||
// ClusterRole describes a set of restrictions for cluster role scoping.
|
||||
ClusterRole *ClusterRoleScopeRestriction
|
||||
}
|
||||
|
||||
// ClusterRoleScopeRestriction describes restrictions on cluster role scopes
|
||||
type ClusterRoleScopeRestriction struct {
|
||||
// RoleNames is the list of cluster roles that can referenced. * means anything
|
||||
RoleNames []string
|
||||
// Namespaces is the list of namespaces that can be referenced. * means any of them (including *)
|
||||
Namespaces []string
|
||||
// AllowEscalation indicates whether you can request roles and their escalating resources
|
||||
AllowEscalation bool
|
||||
}
|
||||
|
||||
type OAuthClientAuthorization struct {
|
||||
unversioned.TypeMeta
|
||||
kapi.ObjectMeta
|
||||
|
||||
// ClientName references the client that created this authorization
|
||||
ClientName string
|
||||
|
||||
// UserName is the user name that authorized this client
|
||||
UserName string
|
||||
|
||||
// UserUID is the unique UID associated with this authorization. UserUID and UserName
|
||||
// must both match for this authorization to be valid.
|
||||
UserUID string
|
||||
|
||||
// Scopes is an array of the granted scopes.
|
||||
Scopes []string
|
||||
}
|
||||
|
||||
type OAuthAccessTokenList struct {
|
||||
unversioned.TypeMeta
|
||||
unversioned.ListMeta
|
||||
Items []OAuthAccessToken
|
||||
}
|
||||
|
||||
type OAuthAuthorizeTokenList struct {
|
||||
unversioned.TypeMeta
|
||||
unversioned.ListMeta
|
||||
Items []OAuthAuthorizeToken
|
||||
}
|
||||
|
||||
type OAuthClientList struct {
|
||||
unversioned.TypeMeta
|
||||
unversioned.ListMeta
|
||||
Items []OAuthClient
|
||||
}
|
||||
|
||||
type OAuthClientAuthorizationList struct {
|
||||
unversioned.TypeMeta
|
||||
unversioned.ListMeta
|
||||
Items []OAuthClientAuthorization
|
||||
}
|
||||
Reference in New Issue
Block a user