authprune

package
v3.10.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterRoleReaper

func NewClusterRoleReaper(roleClient rbacv1client.ClusterRolesGetter, clusterBindingClient rbacv1client.ClusterRoleBindingsGetter, bindingClient rbacv1client.RoleBindingsGetter) kubectl.Reaper

func NewCmdPruneAuth

func NewCmdPruneAuth(f kcmdutil.Factory, name string, out io.Writer) *cobra.Command

NewCmdPruneRoles implements the OpenShift cli prune roles command.

func NewGroupReaper

func NewGroupReaper(
	userClient userclient.Interface,
	authorizationClient authclient.Interface,
	sccClient securitytypedclient.SecurityContextConstraintsInterface,
) kubectl.Reaper

func NewRoleReaper

func NewRoleReaper(roleClient rbacv1client.RolesGetter, bindingClient rbacv1client.RoleBindingsGetter) kubectl.Reaper

func NewUserReaper

func NewUserReaper(
	userClient userclient.Interface,
	authorizationClient authclient.Interface,
	oauthClient oauthclient.Interface,
	sccClient securitytypedclient.SecurityContextConstraintsInterface,
) kubectl.Reaper

Types

type ClusterRoleReaper

type ClusterRoleReaper struct {
	// contains filtered or unexported fields
}

func (*ClusterRoleReaper) Stop

func (r *ClusterRoleReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error

Stop on a reaper is actually used for deletion. In this case, we'll delete referencing clusterroleclusterBindings then delete the clusterrole.

type GroupReaper

type GroupReaper struct {
	// contains filtered or unexported fields
}

func (*GroupReaper) Stop

func (r *GroupReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error

Stop on a reaper is actually used for deletion. In this case, we'll delete referencing identities, clusterBindings, and bindings, then delete the group

type PruneAuthOptions

type PruneAuthOptions struct {
	FilenameOptions resource.FilenameOptions
	Selector        string
	All             bool

	Builder                  *resource.Builder
	RoleBindingClient        rbacv1client.RoleBindingsGetter
	ClusterRoleBindingClient rbacv1client.ClusterRoleBindingsGetter

	// TODO switch these to external clients
	UserInternalClient          userclient.Interface
	AuthorizationInternalClient authclient.Interface
	OAuthInternalClient         oauthclient.Interface
	SCCClient                   securitytypedclient.SecurityInterface

	Out io.Writer
}

PruneRolesOptions holds all the required options for pruning roles.

func (*PruneAuthOptions) Complete

func (o *PruneAuthOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (*PruneAuthOptions) RunPrune

func (o *PruneAuthOptions) RunPrune() error

type RoleReaper

type RoleReaper struct {
	// contains filtered or unexported fields
}

func (*RoleReaper) Stop

func (r *RoleReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error

Stop on a reaper is actually used for deletion. In this case, we'll delete referencing rolebindings then delete the role.

type UserReaper

type UserReaper struct {
	// contains filtered or unexported fields
}

func (*UserReaper) Stop

func (r *UserReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error

Stop on a reaper is actually used for deletion. In this case, we'll delete referencing identities, clusterBindings, and bindings, then delete the user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL