Documentation ¶
Index ¶
- Constants
- func Init(portalProxy api.PortalProxy) (api.StratosPlugin, error)
- type HelmConfiguration
- type KubeAPIVersions
- type KubeProxyError
- type KubeProxyFunc
- type KubeProxyResponse
- type KubeProxyResponses
- type KubeStatus
- type KubernetesSpecification
- func (c *KubernetesSpecification) AddAdminGroupRoutes(echoGroup *echo.Group)
- func (c *KubernetesSpecification) AddAuthProvider(provider auth.KubeAuthProvider)
- func (c *KubernetesSpecification) AddSessionGroupRoutes(echoGroup *echo.Group)
- func (c *KubernetesSpecification) Connect(ec echo.Context, cnsiRecord api.CNSIRecord, userID string) (*api.TokenRecord, bool, error)
- func (c *KubernetesSpecification) DeleteRelease(ec echo.Context) error
- func (c *KubernetesSpecification) FindAuthProvider(name string) auth.KubeAuthProvider
- func (c *KubernetesSpecification) GetAuthProvider(name string) auth.KubeAuthProvider
- func (c *KubernetesSpecification) GetClientId() string
- func (c *KubernetesSpecification) GetConfigForEndpoint(masterURL string, token api.TokenRecord) (*restclient.Config, error)
- func (c *KubernetesSpecification) GetConfigForEndpointUser(endpointID, userID string) (*restclient.Config, error)
- func (c *KubernetesSpecification) GetEndpointPlugin() (api.EndpointPlugin, error)
- func (c *KubernetesSpecification) GetHelmConfiguration(endpointGUID, userID, namespace string) (*action.Configuration, *HelmConfiguration, error)
- func (c *KubernetesSpecification) GetKubeConfigForEndpoint(masterURL string, token api.TokenRecord, namespace string) (string, error)
- func (c *KubernetesSpecification) GetKubeConfigForEndpointUser(endpointID, userID string) (string, error)
- func (c *KubernetesSpecification) GetMiddlewarePlugin() (api.MiddlewarePlugin, error)
- func (c *KubernetesSpecification) GetRelease(ec echo.Context) error
- func (c *KubernetesSpecification) GetReleaseHistory(ec echo.Context) error
- func (c *KubernetesSpecification) GetReleaseStatus(ec echo.Context) error
- func (c *KubernetesSpecification) GetRoutePlugin() (api.RoutePlugin, error)
- func (c *KubernetesSpecification) GetType() string
- func (c *KubernetesSpecification) Info(apiEndpoint string, skipSSLValidation bool, caCert string) (api.CNSIRecord, interface{}, error)
- func (c *KubernetesSpecification) Init() error
- func (c *KubernetesSpecification) InstallRelease(ec echo.Context) error
- func (c *KubernetesSpecification) ListReleases(ec echo.Context) error
- func (c *KubernetesSpecification) ProxyKubernetesAPI(userID string, f KubeProxyFunc) (KubeProxyResponses, error)
- func (c *KubernetesSpecification) Register(echoContext echo.Context) error
- func (c *KubernetesSpecification) RequiresCert(ec echo.Context) error
- func (c *KubernetesSpecification) UpdateMetadata(info *api.Info, userGUID string, echoContext echo.Context)
- func (c *KubernetesSpecification) UpgradeRelease(ec echo.Context) error
- func (c *KubernetesSpecification) Validate(userGUID string, cnsiRecord api.CNSIRecord, tokenRecord api.TokenRecord) error
- type ResourceMessage
- type ResourceResponse
Constants ¶
const ( PauseTrue int = iota + 20000 PauseFalse )
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(portalProxy api.PortalProxy) (api.StratosPlugin, error)
Init creates a new instance of the Kubernetes plugin
Types ¶
type HelmConfiguration ¶
type HelmConfiguration struct {
Folder string
}
HelmConfiguration stores any resources that need to be cleaned up after use
func (*HelmConfiguration) Cleanup ¶
func (f *HelmConfiguration) Cleanup()
Cleanup any resources associated with the Helm configuration
type KubeAPIVersions ¶
type KubeProxyError ¶
type KubeProxyError struct {
Name string
}
KubeProxyError represents error when a proxied request to the Kube API failes
type KubeProxyFunc ¶
type KubeProxyFunc func(*api.ConnectedEndpoint, chan KubeProxyResponse)
KubeProxyFunc represents a function to proxy to the Kube API
type KubeProxyResponse ¶
type KubeProxyResponse struct { Endpoint string Result interface{} Error *KubeProxyError }
KubeProxyResponse represents a response from a proxy request to the Kube API
type KubeProxyResponses ¶
type KubeProxyResponses map[string]interface{}
KubeProxyResponses represents response from multiple proxy requests to the Kube API
type KubeStatus ¶
type KubernetesSpecification ¶
type KubernetesSpecification struct {
// contains filtered or unexported fields
}
KubernetesSpecification is the endpoint that adds Kubernetes support to the backend
func (*KubernetesSpecification) AddAdminGroupRoutes ¶
func (c *KubernetesSpecification) AddAdminGroupRoutes(echoGroup *echo.Group)
func (*KubernetesSpecification) AddAuthProvider ¶
func (c *KubernetesSpecification) AddAuthProvider(provider auth.KubeAuthProvider)
AddAuthProvider adds a Kubernetes auth provider
func (*KubernetesSpecification) AddSessionGroupRoutes ¶
func (c *KubernetesSpecification) AddSessionGroupRoutes(echoGroup *echo.Group)
func (*KubernetesSpecification) Connect ¶
func (c *KubernetesSpecification) Connect(ec echo.Context, cnsiRecord api.CNSIRecord, userID string) (*api.TokenRecord, bool, error)
func (*KubernetesSpecification) DeleteRelease ¶
func (c *KubernetesSpecification) DeleteRelease(ec echo.Context) error
DeleteRelease will delete a release
func (*KubernetesSpecification) FindAuthProvider ¶
func (c *KubernetesSpecification) FindAuthProvider(name string) auth.KubeAuthProvider
FindAuthProvider finds auth provider - case insensitive
func (*KubernetesSpecification) GetAuthProvider ¶
func (c *KubernetesSpecification) GetAuthProvider(name string) auth.KubeAuthProvider
GetAuthProvider gets a Kubernetes auth provider by key
func (*KubernetesSpecification) GetClientId ¶
func (c *KubernetesSpecification) GetClientId() string
func (*KubernetesSpecification) GetConfigForEndpoint ¶
func (c *KubernetesSpecification) GetConfigForEndpoint(masterURL string, token api.TokenRecord) (*restclient.Config, error)
GetConfigForEndpoint gets a config for the Kubernetes go-client for the specified endpoint
func (*KubernetesSpecification) GetConfigForEndpointUser ¶
func (c *KubernetesSpecification) GetConfigForEndpointUser(endpointID, userID string) (*restclient.Config, error)
GetConfigForEndpointUser gets a kube config for the endpoint ID and user ID
func (*KubernetesSpecification) GetEndpointPlugin ¶
func (c *KubernetesSpecification) GetEndpointPlugin() (api.EndpointPlugin, error)
func (*KubernetesSpecification) GetHelmConfiguration ¶
func (c *KubernetesSpecification) GetHelmConfiguration(endpointGUID, userID, namespace string) (*action.Configuration, *HelmConfiguration, error)
GetHelmConfiguration - gets a Helm V3 client for using it as a client library
func (*KubernetesSpecification) GetKubeConfigForEndpoint ¶
func (c *KubernetesSpecification) GetKubeConfigForEndpoint(masterURL string, token api.TokenRecord, namespace string) (string, error)
GetKubeConfigForEndpoint gets a Kube Config file contents for the specified endpoint
func (*KubernetesSpecification) GetKubeConfigForEndpointUser ¶
func (c *KubernetesSpecification) GetKubeConfigForEndpointUser(endpointID, userID string) (string, error)
func (*KubernetesSpecification) GetMiddlewarePlugin ¶
func (c *KubernetesSpecification) GetMiddlewarePlugin() (api.MiddlewarePlugin, error)
func (*KubernetesSpecification) GetRelease ¶
func (c *KubernetesSpecification) GetRelease(ec echo.Context) error
GetRelease gets the release information for a specific Helm release
func (*KubernetesSpecification) GetReleaseHistory ¶
func (c *KubernetesSpecification) GetReleaseHistory(ec echo.Context) error
GetReleaseHistory will get the history for a release
func (*KubernetesSpecification) GetReleaseStatus ¶
func (c *KubernetesSpecification) GetReleaseStatus(ec echo.Context) error
GetReleaseStatus will get release status for the given release This is a web socket request and will return info over the websocket polling until disconnected
func (*KubernetesSpecification) GetRoutePlugin ¶
func (c *KubernetesSpecification) GetRoutePlugin() (api.RoutePlugin, error)
func (*KubernetesSpecification) GetType ¶
func (c *KubernetesSpecification) GetType() string
func (*KubernetesSpecification) Info ¶
func (c *KubernetesSpecification) Info(apiEndpoint string, skipSSLValidation bool, caCert string) (api.CNSIRecord, interface{}, error)
func (*KubernetesSpecification) Init ¶
func (c *KubernetesSpecification) Init() error
Init the Kubernetes Jetstream plugin
func (*KubernetesSpecification) InstallRelease ¶
func (c *KubernetesSpecification) InstallRelease(ec echo.Context) error
InstallRelease will install a Helm 3 release
func (*KubernetesSpecification) ListReleases ¶
func (c *KubernetesSpecification) ListReleases(ec echo.Context) error
ListReleases will list the helm releases for all endpoints
func (*KubernetesSpecification) ProxyKubernetesAPI ¶
func (c *KubernetesSpecification) ProxyKubernetesAPI(userID string, f KubeProxyFunc) (KubeProxyResponses, error)
ProxyKubernetesAPI proxies an API request to all of the user's connected Kubernetes endpoints
func (*KubernetesSpecification) Register ¶
func (c *KubernetesSpecification) Register(echoContext echo.Context) error
func (*KubernetesSpecification) RequiresCert ¶
func (c *KubernetesSpecification) RequiresCert(ec echo.Context) error
func (*KubernetesSpecification) UpdateMetadata ¶
func (c *KubernetesSpecification) UpdateMetadata(info *api.Info, userGUID string, echoContext echo.Context)
func (*KubernetesSpecification) UpgradeRelease ¶
func (c *KubernetesSpecification) UpgradeRelease(ec echo.Context) error
UpgradeRelease will upgrade the specified release
func (*KubernetesSpecification) Validate ¶
func (c *KubernetesSpecification) Validate(userGUID string, cnsiRecord api.CNSIRecord, tokenRecord api.TokenRecord) error
type ResourceMessage ¶
type ResourceMessage struct {
MessageType int `json:"type"`
}
ResourceMessage ... Incoming content of socket
type ResourceResponse ¶
type ResourceResponse struct { Kind string `json:"kind"` Data json.RawMessage `json:"data"` }
ResourceResponse ... Outgoing content of socket