services

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config *types.Config
View Source
var DnsParser = regexp.MustCompile("(?:.+_+)*(?P<namespace>.+)_(?P<role>.+)$")

Functions

func CA

func CA(w http.ResponseWriter, _ *http.Request)

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

func WatchNetPolConfig() cache.Store

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

func WatchProjects() cache.Store

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.

Jump to

Keyboard shortcuts

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