Documentation ¶
Index ¶
- Constants
- Variables
- func ExistsSubject(list []Subject, subjectName string) (int, bool)
- func InitRbacTable(clustername string, clusterRoles *rbac.ClusterRoleList, roles *rbac.RoleList, ...) *[]RbacTable
- func InitSA2WLIDmap(k8sAPI *k8sinterface.KubernetesApi, clusterName string) (map[string][]string, error)
- func InitSAID2WLIDmap(k8sAPI *k8sinterface.KubernetesApi, clusterName string) (map[string][]string, error)
- func ListAllWorkloads(k8sAPI *k8sinterface.KubernetesApi) ([]k8sinterface.IWorkload, error)
- func RbacObjectIMetadataWrapper(rbacObj *RBAC) (map[string]interface{}, error)
- func RbacTableObjectIMetadataWrapper(rbacTObj *[]RbacTable) (map[string]interface{}, error)
- func SA2WLIDmapIMetadataWrapper(RbacObj map[string][]string) (map[string]interface{}, error)
- func SAID2WLIDmapIMetadataWrapper(RbacObj map[string][]string) (map[string]interface{}, error)
- type RBAC
- type RbacObjects
- type RbacTable
- type Role
- type Rule
- type Subject
Constants ¶
View Source
const (
ArmoRBACGroup = "armo.rbac.com"
)
Variables ¶
View Source
var (
ResourceGroupMapping = []string{
"pods",
"daemonsets",
"deployments",
"replicasets",
"statefulsets",
"jobs",
"cronjobs",
}
)
Functions ¶
func ExistsSubject ¶
ExistsSubject -
func InitRbacTable ¶
func InitRbacTable(clustername string, clusterRoles *rbac.ClusterRoleList, roles *rbac.RoleList, clusterRoleBindings *rbac.ClusterRoleBindingList, roleBindings *rbac.RoleBindingList) *[]RbacTable
DEPRECATED InitRbacTable -
func InitSA2WLIDmap ¶
func InitSA2WLIDmap(k8sAPI *k8sinterface.KubernetesApi, clusterName string) (map[string][]string, error)
TODO - DEPRECATE sa2WLIDmap create service account to WLID map
func InitSAID2WLIDmap ¶
func InitSAID2WLIDmap(k8sAPI *k8sinterface.KubernetesApi, clusterName string) (map[string][]string, error)
func ListAllWorkloads ¶
func ListAllWorkloads(k8sAPI *k8sinterface.KubernetesApi) ([]k8sinterface.IWorkload, error)
func RbacObjectIMetadataWrapper ¶
DEPRECATED
func RbacTableObjectIMetadataWrapper ¶
DEPRECATED
func SA2WLIDmapIMetadataWrapper ¶
TODO- DEPRECATE sa2WLIDmap
Types ¶
type RBAC ¶
type RBAC struct { Kind string Cluster string GeneratedDate string GeneratedTime string Subjects []Subject }
DEPRECATED RBAC -
func InitRbac ¶
func InitRbac(clusterName string, clusterRoles *rbac.ClusterRoleList, roles *rbac.RoleList, clusterRoleBindings *rbac.ClusterRoleBindingList, roleBindings *rbac.RoleBindingList) *RBAC
DEPRECATED InitRbac -
type RbacObjects ¶
type RbacObjects struct { ClusterRoles *rbac.ClusterRoleList Roles *rbac.RoleList ClusterRoleBindings *rbac.ClusterRoleBindingList RoleBindings *rbac.RoleBindingList Rbac *RBAC // DEPRECATED RbacT *[]RbacTable // DEPRECATED SA2WLIDmap map[string][]string //TODO- DEPRECATE sa2WLIDmap SAID2WLIDmap map[string][]string }
func (RbacObjects) MarshalJSON ¶
func (rbacObj RbacObjects) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.