core

package
v0.0.0-...-2472f49 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP_FORMAT                = "g, %s, role:%s"
	PERMISSION_FORMAT           = "p, role:%s, %s, %s, %s, allow"
	DEFAULT_CONFIGMAP_NAME      = "argocd-rbac-cm"
	DEFAULT_CONFIGMAP_NAMESPACE = "argocd"
	DEFAULT_POLICY_KEY          = "policy.default"
	DEFAULT_RBAC_KEY            = "policy.csv"
	GROUP_TYPE                  = "groups"
	ROLE_TYPE                   = "roles"
)

Variables

View Source
var ACTIONS = map[string]bool{
	"get":      true,
	"create":   true,
	"update":   true,
	"delete":   true,
	"sync":     true,
	"override": true,
	"action":   true,
	"*":        true,
}
View Source
var RESOURCES = map[string]bool{
	"clusters":     true,
	"projects":     true,
	"applications": true,
	"repositories": true,
	"certificates": true,
	"*":            true,
}

Functions

func GetTypedNamespacedName

func GetTypedNamespacedName(resourceType string, objectMeta *v12.ObjectMeta) string

Types

type RbacManager

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

func NewRbacManager

func NewRbacManager(client client.Client, configMapName string, configMapNamespace string, defaultPolicy string) RbacManager

func (*RbacManager) ApplyGroupMapping

func (r *RbacManager) ApplyGroupMapping(mapping *v1beta1.GroupMapping)

func (*RbacManager) ApplyRoleMapping

func (r *RbacManager) ApplyRoleMapping(mapping *v1beta1.RoleMapping) error

func (*RbacManager) ClearGroupMapping

func (r *RbacManager) ClearGroupMapping(objectMeta *v12.ObjectMeta)

func (*RbacManager) ClearRoleMapping

func (r *RbacManager) ClearRoleMapping(objectMeta *v12.ObjectMeta)

func (*RbacManager) Commit

func (r *RbacManager) Commit(force bool) error

func (*RbacManager) IsDirty

func (r *RbacManager) IsDirty() bool

Jump to

Keyboard shortcuts

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