profile

package
v2.0.0-beta.12+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const DefaultKubeProfilePreifx = "/supergiant/profile"

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthUser

type BasicAuthUser struct {
	Password string   `json:"password"`
	Name     string   `json:"name"`
	ID       string   `json:"id"`
	Groups   []string `json:"groups"`
}

BasicAuthUser represents an entry of the static password file. https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-password-file

type CloudSpecificSettings

type CloudSpecificSettings map[string]string

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) CreateProfile

func (h *Handler) CreateProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) GetProfile

func (h *Handler) GetProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) GetProfiles

func (h *Handler) GetProfiles(w http.ResponseWriter, r *http.Request)

func (*Handler) Register

func (h *Handler) Register(r *mux.Router)

type NodeProfile

type NodeProfile map[string]string

type Profile

type Profile struct {
	ID string `json:"id" valid:"required"`

	MasterProfiles []NodeProfile `json:"masterProfiles" valid:"-"`
	NodesProfiles  []NodeProfile `json:"nodesProfiles" valid:"-"`

	// StaticAuth represents tokens and basic authentication credentials that
	// would be set to kube-apiserver on start.
	StaticAuth StaticAuth `json:"staticAuth" valid:"-"`

	// TODO: get rid of its usage
	// DEPRECATED: should be a part of the static auth
	User string `json:"user" valid:"-"`
	// DEPRECATED: should be a part of the static auth
	Password string `json:"password" valid:"-"`

	// TODO(stgleb): In future releases arch will probably migrate to node profile
	// to allow user create heterogeneous cluster of machine with different arch
	Provider               clouds.Name           `json:"provider" valid:"in(aws|digitalocean|packet|gce|openstack)" valid:"-"`
	Region                 string                `json:"region" valid:"-"`
	Zone                   string                `json:"zone" valid:"-"`
	Arch                   string                `json:"arch" valid:"-"`
	OperatingSystem        string                `json:"operatingSystem" valid:"-"`
	UbuntuVersion          string                `json:"ubuntuVersion" valid:"-"`
	DockerVersion          string                `json:"dockerVersion" valid:"-"`
	K8SVersion             string                `json:"K8SVersion" valid:"-"`
	FlannelVersion         string                `json:"flannelVersion" valid:"-"`
	NetworkType            string                `json:"networkType" valid:"-"`
	CIDR                   string                `json:"cidr" valid:"-"`
	HelmVersion            string                `json:"helmVersion" valid:"-"`
	RBACEnabled            bool                  `json:"rbacEnabled" valid:"-"`
	CloudSpecificSettings  CloudSpecificSettings `json:"cloudSpecificSettings" valid:"-"`
	PublicKey              string                `json:"publicKey" valid:"-"`
	LogBootstrapPrivateKey bool                  `json:"logBootstrapPrivateKey" valid:"-"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(prefix string, s storage.Interface) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, profile *Profile) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, profileId string) (*Profile, error)

func (*Service) GetAll

func (s *Service) GetAll(ctx context.Context) ([]Profile, error)

type StaticAuth

type StaticAuth struct {
	BasicAuth []BasicAuthUser `json:"basicAuth"`
	Tokens    []TokenAuthUser `json:"tokens"`
}

StaticAuth represents tokens and basic authentication credentials.

type TokenAuthUser

type TokenAuthUser struct {
	Token  string   `json:"token"`
	Name   string   `json:"name"`
	ID     string   `json:"id"`
	Groups []string `json:"groups"`
}

BasicAuthUser represents an entry of the static token file. https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-token-file

Jump to

Keyboard shortcuts

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