Documentation ¶
Index ¶
- Constants
- Variables
- func NewConfigFor(k *model.Kube) (*rest.Config, error)
- type Bundle
- type Certs
- type ChartGetter
- type Handler
- type Interface
- type MetricResponse
- type ReleaseInput
- type ServerResourceGetter
- type Service
- func (s Service) Create(ctx context.Context, k *model.Kube) error
- func (s Service) Delete(ctx context.Context, kubeID string) error
- func (s Service) DeleteRelease(ctx context.Context, kubeID, rlsName string, purge bool) (*model.ReleaseInfo, error)
- func (s Service) Get(ctx context.Context, kubeID string) (*model.Kube, error)
- func (s Service) GetCerts(ctx context.Context, kname, cname string) (*Bundle, error)
- func (s Service) GetKubeResources(ctx context.Context, kubeID, resource, ns, name string) ([]byte, error)
- func (s Service) InstallRelease(ctx context.Context, kubeID string, rls *ReleaseInput) (*release.Release, error)
- func (s Service) KubeConfigFor(ctx context.Context, kubeID, user string) ([]byte, error)
- func (s Service) ListAll(ctx context.Context) ([]model.Kube, error)
- func (s Service) ListKubeResources(ctx context.Context, kubeID string) ([]byte, error)
- func (s Service) ListReleases(ctx context.Context, kubeID, namespace, offset string, limit int) ([]*model.ReleaseInfo, error)
- func (s Service) ReleaseDetails(ctx context.Context, kubeID, rlsName string) (*release.Release, error)
- type ServiceInfo
Constants ¶
View Source
const ( KubernetesAdminUser = "kubernetes-admin" DefaultStoragePrefix = "/supergiant/kubes/" )
View Source
const (
DefaultCertsPath = "/etc/kubernets/ssl"
)
Default variables for certs.
Variables ¶
View Source
var ( ErrInvalidRunner = errors.New("provided invalid runner") ErrEmptyName = errors.New("empty name") )
Certs specific errors.
View Source
var (
ErrNoHelmProxy = errors.New("helm proxy constructor not found")
)
Functions ¶
Types ¶
type Certs ¶
type Certs struct {
// contains filtered or unexported fields
}
Certs handles keys and certificates for kube components.
type ChartGetter ¶
type ChartGetter interface {
GetChart(ctx context.Context, repoName, chartName, chartVersion string) (*chart.Chart, error)
}
ChartGetter interface is a wrapper for GetChart function.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a http controller for a kube entity.
type Interface ¶
type Interface interface { Create(ctx context.Context, k *model.Kube) error Get(ctx context.Context, name string) (*model.Kube, error) ListAll(ctx context.Context) ([]model.Kube, error) Delete(ctx context.Context, name string) error KubeConfigFor(ctx context.Context, kname, user string) ([]byte, error) ListKubeResources(ctx context.Context, kname string) ([]byte, error) GetKubeResources(ctx context.Context, kname, resource, ns, name string) ([]byte, error) GetCerts(ctx context.Context, kname, cname string) (*Bundle, error) InstallRelease(ctx context.Context, kname string, rls *ReleaseInput) (*release.Release, error) ListReleases(ctx context.Context, kname, ns, offset string, limit int) ([]*model.ReleaseInfo, error) ReleaseDetails(ctx context.Context, kname, rlsName string) (*release.Release, error) DeleteRelease(ctx context.Context, kname, rlsName string, purge bool) (*model.ReleaseInfo, error) }
Interface represents an interface for a kube service.
type MetricResponse ¶
type ReleaseInput ¶
type ServerResourceGetter ¶
type ServerResourceGetter interface {
ServerResources() ([]*metav1.APIResourceList, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages kubernetes clusters.
func NewService ¶
func NewService(prefix string, s storage.Interface, chrtGetter ChartGetter) *Service
NewService constructs a Service.
func (Service) DeleteRelease ¶
func (Service) GetCerts ¶
GetCerts returns a keys bundle for provided component name. TODO: do we need this?
func (Service) GetKubeResources ¶
func (s Service) GetKubeResources(ctx context.Context, kubeID, resource, ns, name string) ([]byte, error)
GetKubeResources returns raw representation of the kubernetes resources.
func (Service) InstallRelease ¶
func (Service) KubeConfigFor ¶
func (Service) ListKubeResources ¶
ListKubeResources returns raw representation of the supported kubernetes resources.
func (Service) ListReleases ¶
Click to show internal directories.
Click to hide internal directories.