dashboard

package
v0.0.0-...-f34f428 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServiceAccount

func CreateServiceAccount(p interfaces.PortalProxy, endpointGUID, userGUID string) error

CreateServiceAccount will create a service account for accessing the Kubernetes Dashboard

func DeleteDashboard

func DeleteDashboard(p interfaces.PortalProxy, endpointGUID, userGUID string) error

DeleteDashboard will delete the dashboard from Kubernetes cluster

func DeleteServiceAccount

func DeleteServiceAccount(p interfaces.PortalProxy, endpointGUID, userGUID string) error

DeleteServiceAccount will delete the service account

func InstallDashboard

func InstallDashboard(p interfaces.PortalProxy, endpointGUID, userGUID string) error

InstallDashboard will install the dashboard into a Kubernetes cluster

func KubeDashboardLogin

func KubeDashboardLogin(c echo.Context, p interfaces.PortalProxy) error

KubeDashboardLogin will check and log into the Kubernetes Dashboard then redirect to the Dashboard UI

func KubeDashboardProxy

func KubeDashboardProxy(c echo.Context, p interfaces.PortalProxy, config *rest.Config) error

KubeDashboardProxy proxies a request to the Kube Dash service using the K8S API

func YAMLToJSONWithLabel

func YAMLToJSONWithLabel(body interface{}) ([]byte, error)

Types

type ServiceInfo

type ServiceInfo struct {
	Namespace        string `json:"namespace"`
	ServiceName      string `json:"name"`
	Scheme           string `json:"scheme"`
	StratosInstalled bool   `json:"-"`
}

ServiceInfo represents the information for the Dashboard Service that we need to proxy the service

type StatusResponse

type StatusResponse struct {
	Endpoint         string             `json:"guid"`
	Installed        bool               `json:"installed"`
	StratosInstalled bool               `json:"stratosInstalled"`
	Running          bool               `json:"running"`
	Pod              *v1.Pod            `json:"pod"`
	Version          string             `json:"version"`
	Service          *ServiceInfo       `json:"service"`
	HasToken         bool               `json:"tokenExists"`
	ServiceAccont    *v1.ServiceAccount `json:"serviceAccount"`
	Token            string             `json:"-"`
}

StatusResponse is the response from the dashboard status check

func KubeDashboardStatus

func KubeDashboardStatus(p interfaces.PortalProxy, endpointGUID, userGUID string, includeToken bool) (*StatusResponse, error)

KubeDashboardStatus will determine if the specified Kube endpoint has the dashboard installed and ready

Jump to

Keyboard shortcuts

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