model

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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"`
}

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"`

	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"`
	// DEPRECATED
	SshUser string `json:"sshUser"`
	// DEPRECATED
	SshPublicKey []byte `json:"sshKey"`
	// DEPRECATED
	BootstrapPublicKey []byte `json:"bootstrapPublicKey"`
	// DEPRECATED
	BootstrapPrivateKey []byte `json:"bootstrapPrivateKey"`
}

Kube represents a kubernetes cluster.

type KubeState

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

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"`

	Size      string       `json:"size"`
	PublicIp  string       `json:"publicIp"`
	PrivateIp string       `json:"privateIp"`
	State     MachineState `json:"state"`
	Name      string       `json:"name"`
	// contains filtered or unexported fields
}

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

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