Documentation
¶
Index ¶
Constants ¶
View Source
const ( K8S_VER = iota OC_VER_V3 OC_VER_V4 )
Variables ¶
View Source
var ErrMethodNotSupported = errors.New("Method not supported")
View Source
var ErrResourceNotSupported = errors.New("Method on resource not supported")
View Source
var ErrUnknownResource = errors.New("Unknown resource")
Functions ¶
func GetK8sVersion ¶
Types ¶
type Driver ¶
type Driver interface {
GetVersion(reGetK8sVersion, reGetOcVersion bool) (string, string)
SetIPAddrScope(ports map[string][]share.CLUSIPAddr, meta *container.ContainerMeta, nets map[string]*container.Network)
GetServiceFromPodLabels(namespace, pod, node string, labels map[string]string) *Service
GetService(meta *container.ContainerMeta, node string) *Service
GetPlatformRole(meta *container.ContainerMeta) (string, bool) // return platform type and if container should be secured
GetDomain(labels map[string]string) string
GetServiceSubnet(envs []string) *net.IPNet
GetHostTunnelIP(links map[string]sk.NetIface) []net.IPNet
IgnoreConnectFromManagedHost() bool
ConsiderHostsAsInternal() bool
ApplyPolicyAtIngress() bool
SupportKubeCISBench() bool
CleanupHostPorts(hostPorts map[string][]share.CLUSIPAddr) error
SetFlavor(flavor string) error // for Openshift & Rancher
}
type ResourceDriver ¶
type ResourceDriver interface {
GetOEMVersion() (string, error)
Login(username, password string) (string, string, error)
Logout(username, token string) error
GetAuthServerAlias() string
GetUserRoles(username string, subjType uint8) (map[string]string, map[string]share.NvFedPermissions, error)
ListUsers() []UserRBAC
RegisterResource(rt string) error
ListResource(rt, namespace string) ([]interface{}, error)
StartWatchResource(rt, ns string, wcb WatchCallback, scb StateCallback) error
StopWatchResource(rt string) error
StopWatchAllResources() error
GetResource(rt, namespace, name string) (interface{}, error)
AddResource(rt string, res interface{}) error
UpdateResource(rt string, res interface{}) error
DeleteResource(rt string, res interface{}) error
SetFlavor(flavor string) error // for Openshift & Rancher
GetPlatformUserGroups(token string) ([]string, error) // for OpenShift
}
type StateCallback ¶
type WatchCallback ¶
Click to show internal directories.
Click to hide internal directories.