forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bryce Palmer <[email protected]>
- Loading branch information
1 parent
3114152
commit 4b215ac
Showing
9 changed files
with
174 additions
and
88 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
openshift-kube-apiserver/admission/authorization/apis/restrictusers/v1alpha1/doc.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// +k8s:deepcopy-gen=package,register | ||
|
||
// Package v1alpha is the v1alpha1 version of the API. | ||
package v1alpha1 |
22 changes: 22 additions & 0 deletions
22
openshift-kube-apiserver/admission/authorization/apis/restrictusers/v1alpha1/register.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
) | ||
|
||
var GroupVersion = schema.GroupVersion{Group: "authorization.openshift.io", Version: "v1alpha1"} | ||
|
||
var ( | ||
localSchemeBuilder = runtime.NewSchemeBuilder( | ||
addKnownTypes, | ||
) | ||
Install = localSchemeBuilder.AddToScheme | ||
) | ||
|
||
func addKnownTypes(scheme *runtime.Scheme) error { | ||
scheme.AddKnownTypes(GroupVersion, | ||
&RestrictSubjectBindingsAdmissionConfig{}, | ||
) | ||
return nil | ||
} |
35 changes: 35 additions & 0 deletions
35
openshift-kube-apiserver/admission/authorization/apis/restrictusers/v1alpha1/types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// RestrictSubjectBindingsAdmissionConfig is the type | ||
// used for configuring the authorization.openshift.io/RestrictSubjectBindings | ||
// admission plugin. | ||
type RestrictSubjectBindingsAdmissionConfig struct { | ||
metav1.TypeMeta `json:",inline"` | ||
|
||
// openshiftOAuthDesiredState specifies the desired state | ||
// of the OpenShift oauth-apiserver based on observed configuration. | ||
// | ||
// Allowed values are Desired and NotDesired. | ||
// | ||
// When set to Desired, the authorization.openshift.io/RestrictSubjectBindings | ||
// admission plugin will be configured with the expectation that the OpenShift | ||
// oauth-apiserver will eventually be running and serving it's APIs. | ||
// | ||
// When set to NotDesired, the authorization.openshift.io/RestrictSubjectBindings | ||
// admission plugin will be configured with the expectation that the OpenShift | ||
// oauth-apiserver will not be running. | ||
OpenShiftOAuthDesiredState OpenShiftOAuthState `json:"openshiftOAuthDesiredState"` | ||
} | ||
|
||
type OpenShiftOAuthState string | ||
|
||
const ( | ||
OpenShiftOAuthStateDesired = "Desired" | ||
OpenShiftOAuthStateNotDesired = "NotDesired" | ||
) |
51 changes: 51 additions & 0 deletions
51
...be-apiserver/admission/authorization/apis/restrictusers/v1alpha1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
openshift-kube-apiserver/admission/authorization/restrictusers/authncache/authentication.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters