Documentation ¶
Index ¶
- Variables
- func AuthenticateHandler() http.HandlerFunc
- func CA(w http.ResponseWriter, _ *http.Request)
- func CurrentJWT(usertoken string) (*types.AuthJWTClaims, error)
- func GenerateConfig(w http.ResponseWriter, r *http.Request)
- func GenerateJWT(w http.ResponseWriter, r *http.Request)
- func GenerateProjects(context []*types.NamespaceAndRole)
- func GenerateResources() error
- func GenerateRoleBinding(context *types.NamespaceAndRole)
- func GetUserNamespace(group string) (*types.NamespaceAndRole, error)
- func GetUserNamespaces(groups []string) []*types.NamespaceAndRole
- func RefreshK8SResources(w http.ResponseWriter, _ *http.Request)
- func WatchNetPolConfig() cache.Store
- func WatchProjects() cache.Store
Constants ¶
This section is empty.
Variables ¶
var Config *types.Config
var DnsParser = regexp.MustCompile("(?:.+_+)*(?P<namespace>.+)_(?P<role>.+)$")
Functions ¶
func AuthenticateHandler ¶
func AuthenticateHandler() http.HandlerFunc
Authenticate service for kubernetes Api Server https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
func CurrentJWT ¶
func CurrentJWT(usertoken string) (*types.AuthJWTClaims, error)
func GenerateConfig ¶
func GenerateConfig(w http.ResponseWriter, r *http.Request)
GenerateConfig generates a config in yaml, including JWT token and cluster information. It can be directly used out of the box by kubectl. It returns a well formatted yaml
func GenerateJWT ¶
func GenerateJWT(w http.ResponseWriter, r *http.Request)
func GenerateProjects ¶
func GenerateProjects(context []*types.NamespaceAndRole)
A loop wrapper for generateProject splitted for unit test !
func GenerateResources ¶
func GenerateResources() error
Generate Namespaces and Rolebinding from Ldap groups
func GenerateRoleBinding ¶
func GenerateRoleBinding(context *types.NamespaceAndRole)
GenerateRolebinding from tupple If exists, nothing is done, only creating !
func GetUserNamespace ¶
func GetUserNamespace(group string) (*types.NamespaceAndRole, error)
Get Namespace, Role for a group name
func GetUserNamespaces ¶
func GetUserNamespaces(groups []string) []*types.NamespaceAndRole
Get Namespace, Role for a list of group name
func RefreshK8SResources ¶
func RefreshK8SResources(w http.ResponseWriter, _ *http.Request)
Handler to regenerate all resources created by kubi
func WatchNetPolConfig ¶
Watch NetworkPolicyConfig, which is a config object for namespace network bubble This CRD allow user to deploy global configuration for network configuration for update, the default network config is updated for deletion, it is automatically recreated for create, just create it
func WatchProjects ¶
Watch NetworkPolicyConfig, which is a config object for namespace network bubble This CRD allow user to deploy global configuration for network configuration for update, the default network config is updated for deletion, it is automatically recreated for create, just create it
Types ¶
This section is empty.