model

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 15

Documentation

Index

Constants

View Source
const (
	MachineStatePlanned      MachineState = "planned"
	MachineStateBuilding     MachineState = "building"
	MachineStateProvisioning MachineState = "provisioning"
	MachineStateError        MachineState = "error"
	MachineStateActive       MachineState = "active"
	MachineStateDeleting     MachineState = "deleting"

	RoleMaster Role = "master"
	RoleNode   Role = "node"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username  string `json:"username"`
	Password  string `json:"token"`
	CAKey     string `json:"caKey"`
	CACert    string `json:"caCert"`
	AdminCert string `json:"adminCert"`
	AdminKey  string `json:"adminKey"`
	SAKey     string `json:"saKey"`
	SAPub     string `json:"saPub"`
}

Auth holds all possible auth parameters.

type ChartData

type ChartData struct {
	Metadata *chart.Metadata `json:"metadata"`
	Readme   string          `json:"readme"`
	Values   string          `json:"values"`
}

ChartData is a simplified representation of the helm chart.

type ChartInfo

type ChartInfo struct {
	Name        string         `json:"name"`
	Repo        string         `json:"repo"`
	Icon        string         `json:"icon"`
	Description string         `json:"description"`
	Versions    []ChartVersion `json:"versions"`
}

ChartInfo contains a list of available chart versions and description/icon info for the latest one.

type ChartVersion

type ChartVersion struct {
	Version    string    `json:"version"`
	AppVersion string    `json:"appVersion"`
	Created    time.Time `json:"created"`
	Digest     string    `json:"digest"`
	URLs       []string  `json:"urls"`
}

type CloudAccount

type CloudAccount struct {
	Name        string            `json:"name" valid:"required, length(1|32)"`
	Provider    clouds.Name       `json:"provider" valid:"in(aws|digitalocean|gce|azure)"`
	Credentials map[string]string `json:"credentials" valid:"optional"`
}

CloudAccount is settings of account in public or private cloud (e.g. AWS, vCenter) Name should be unique.

type Kube

type Kube struct {
	ID           string      `json:"id" valid:"-"`
	State        KubeState   `json:"state"`
	Name         string      `json:"name" valid:"required"`
	Provider     clouds.Name `json:"provider" valid:"in(aws|digitalocean|packet|gce|openstack)"`
	RBACEnabled  bool        `json:"rbacEnabled"`
	AccountName  string      `json:"accountName"`
	Region       string      `json:"region"`
	Zone         string      `json:"zone" valid:"-"`
	ServicesCIDR string      `json:"servicesCIDR"`
	DNSIP        string      `json:"dnsIp"`
	APIPort      string      `json:"apiPort"`
	Auth         Auth        `json:"auth"`

	User     string `json:"user" valid:"-"`
	Password string `json:"password" valid:"-"`

	Arch                   string            `json:"arch"`
	OperatingSystem        string            `json:"operatingSystem"`
	OperatingSystemVersion string            `json:"operatingSystemVersion"`
	DockerVersion          string            `json:"dockerVersion"`
	K8SVersion             string            `json:"K8SVersion"`
	HelmVersion            string            `json:"helmVersion"`
	Networking             Networking        `json:"networking"`
	Subnets                map[string]string `json:"subnets"`

	ExternalDNSName string `json:"externalDNSName"`
	InternalDNSName string `json:"internalDNSName"`
	BootstrapToken  string `json:"bootstrapToken"`

	CloudSpec profile.CloudSpecificSettings `json:"cloudSpec" valid:"-"`

	ProfileID string `json:"profileId"`

	Masters map[string]*Machine `json:"masters"`
	Nodes   map[string]*Machine `json:"nodes"`
	// Store taskIds of tasks that are made to provision this kube
	Tasks map[string][]string `json:"tasks"`

	SSHConfig SSHConfig `json:"sshConfig"`

	ExposedAddresses []profile.Addresses `json:"exposedAddresses"`
}

Kube represents a kubernetes cluster.

type KubeState

type KubeState string
const (
	StateProvisioning KubeState = "provisioning"
	StateFailed       KubeState = "failed"
	StateOperational  KubeState = "operational"
	StateDeleting     KubeState = "deleting"
	StateImporting    KubeState = "importing"
)

type Machine

type Machine struct {
	ID               string       `json:"id" valid:"required"`
	TaskID           string       `json:"taskId"`
	Role             Role         `json:"role"`
	CreatedAt        int64        `json:"createdAt" valid:"required"`
	Provider         clouds.Name  `json:"provider" valid:"required"`
	Region           string       `json:"region" valid:"required"`
	AvailabilityZone string       `json:"az" valid:"-"`
	Size             string       `json:"size"`
	PublicIp         string       `json:"publicIp"`
	PrivateIp        string       `json:"privateIp"`
	State            MachineState `json:"state"`
	Name             string       `json:"name"`
	SelfLink         string       `json:"selfLink"`
}

func (Machine) String

func (m Machine) String() string

type MachineState

type MachineState string

type Networking

type Networking struct {
	Manager string `json:"manager"`
	Version string `json:"version"`
	Type    string `json:"type"`
	CIDR    string `json:"cidr"`
}

type ReleaseInfo

type ReleaseInfo struct {
	Name         string `json:"name"`
	Namespace    string `json:"namespace"`
	Version      int32  `json:"version"`
	CreatedAt    string `json:"createdAt"`
	LastDeployed string `json:"lastDeployed"`
	Chart        string `json:"chart"`
	ChartVersion string `json:"chartVersion"`
	Status       string `json:"status"`
}

ReleaseInfo is a simplified representations of the helm release.

type RepositoryInfo

type RepositoryInfo struct {
	Config repo.Entry  `json:"config"`
	Charts []ChartInfo `json:"charts"`
}

RepositoryInfo holds authorization details and shortened charts info.

type Role

type Role string

func ToRole

func ToRole(isMaster bool) Role

func (Role) String

func (r Role) String() string

type SSHConfig

type SSHConfig struct {
	User                string `json:"user"`
	Port                string `json:"port"`
	BootstrapPrivateKey string `json:"bootstrapPrivateKey"`
	BootstrapPublicKey  string `json:"bootstrapPublicKey"`
	PublicKey           string `json:"publicKey"`
	Timeout             int    `json:"timeout"`
}

Jump to

Keyboard shortcuts

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