Documentation ¶
Index ¶
- Constants
- Variables
- type Auth
- type Bundle
- type Certs
- type Handler
- type Interface
- type Kube
- type Service
- func (s *Service) Create(ctx context.Context, k *Kube) error
- func (s *Service) Delete(ctx context.Context, name string) error
- func (s *Service) Get(ctx context.Context, name string) (*Kube, error)
- func (s *Service) GetCerts(ctx context.Context, kname, cname string) (*Bundle, error)
- func (s *Service) GetKubeResources(ctx context.Context, kname, resource, ns, name string) ([]byte, error)
- func (s *Service) ListAll(ctx context.Context) ([]Kube, error)
- func (s *Service) ListKubeResources(ctx context.Context, kname string) ([]byte, error)
Constants ¶
View Source
const (
DefaultCertsPath = "/etc/kubernets/ssl"
)
Default variables for certs.
View Source
const DefaultStoragePrefix = "/kube/"
Variables ¶
View Source
var ( ErrInvalidRunner = errors.New("provided invalid runner") ErrEmptyName = errors.New("empty name") )
Certs specific errors.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Username string `json:"username"` Token string `json:"token"` CA string `json:"ca"` Cert string `json:"cert"` Key string `json:"key"` }
Auth holds all possible auth parameters.
type Certs ¶
type Certs struct {
// contains filtered or unexported fields
}
Certs handles keys and certificates for kube components.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a http controller for a kube entity.
func NewHandler ¶
NewHandler constructs a Handler for kubes.
type Interface ¶
type Interface interface { Create(ctx context.Context, k *Kube) error Get(ctx context.Context, name string) (*Kube, error) ListAll(ctx context.Context) ([]Kube, error) Delete(ctx context.Context, name string) 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) }
Interface represents an interface for a kube service.
type Kube ¶
type Kube struct { Name string `json:"name" valid:"required"` Version string `json:"version"` RBACEnabled bool `json:"rbacEnabled"` AccountName string `json:"accountName"` APIAddr string `json:"apiAddr"` Auth Auth `json:"auth"` SSHUser string `json:"sshUser"` SSHKey []byte `json:"sshKey"` }
Kube represents a kubernetes cluster.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages kubernetes clusters.
func (*Service) GetKubeResources ¶
func (s *Service) GetKubeResources(ctx context.Context, kname, resource, ns, name string) ([]byte, error)
GetKubeResources returns raw representation of the kubernetes resources.
Click to show internal directories.
Click to hide internal directories.