models

package
v0.0.0-...-77adf46 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name        string          `json:"name"`
	Deployments []AppDeployment `json:"deployments"`
	Env         []Env           `json:"env"`
	Cnames      CnameList       `json:"cnames"`
}

type AppDeployment

type AppDeployment struct {
	Image           string          `json:"image"`
	Version         string          `json:"version"`
	Processes       []Process       `json:"processes"`
	Labels          []Label         `json:"labels"`
	RoutingSettings RoutingSettings `json:"routingSettings"`
	DeploymentExtra DeploymentExtra `json:"extra"`
}

type ApplicationChart

type ApplicationChart struct {
	Values    Values
	Templates map[string]string
}

type CnameList

type CnameList struct {
	Http []string `json:"http"`
}

type DeploymentExtra

type DeploymentExtra struct {
	Volumes []v1.Volume `json:"volumes,omitempty"`
}

type DockerRegistry

type DockerRegistry struct {
	ImagePullSecret       string `json:"imagePullSecret"`
	CreateImagePullSecret bool   `json:"createImagePullSecret"`
	RegistryName          string `json:"registryName"`
	Username              string `json:"username"`
	Password              string `json:"password"`
}

type Env

type Env struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type IngressController

type IngressController struct {
	ClassName string   `json:"className"`
	Traefik   *Traefik `json:"traefik,omitempty"`
}

type KubernetesConfigurator

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

func NewKubernetesConfigurator

func NewKubernetesConfigurator(data ShipaYamlData, procfile Procfile) KubernetesConfigurator

func (KubernetesConfigurator) ContainerPortsForProcess

func (conf KubernetesConfigurator) ContainerPortsForProcess(process string, defaultPorts []string, defaultPort int) ([]apiv1.ContainerPort, error)

func (KubernetesConfigurator) LeanContainerCmdsWithExtra

func (conf KubernetesConfigurator) LeanContainerCmdsWithExtra(process string, workingDirectory string, extraCmds []string) []string

func (KubernetesConfigurator) Lifecycle

func (conf KubernetesConfigurator) Lifecycle() *apiv1.Lifecycle

func (KubernetesConfigurator) Probes

func (conf KubernetesConfigurator) Probes(port int32) (Probes, error)

func (KubernetesConfigurator) ProcessPortConfigs

func (conf KubernetesConfigurator) ProcessPortConfigs(process string, defaultPorts []string) ([]ShipaYamlProcessPortConfig, error)

func (KubernetesConfigurator) ServicePortsForProcess

func (conf KubernetesConfigurator) ServicePortsForProcess(process string, defaultPorts []string, defaultPort int) ([]apiv1.ServicePort, error)

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PodExtra

type PodExtra struct {
	SecurityContext      *v1.SecurityContext      `json:"securityContext,omitempty"`
	ResourceRequirements *v1.ResourceRequirements `json:"resourceRequirements,omitempty"`
	NodeSelectorTerms    []v1.NodeSelectorTerm    `json:"nodeSelectorTerms,omitempty"`
	VolumeMounts         []v1.VolumeMount         `json:"volumeMounts,omitempty"`
	ReadinessProbe       *v1.Probe                `json:"readinessProbe,omitempty"`
	LivenessProbe        *v1.Probe                `json:"livenessProbe,omitempty"`
	Lifecycle            *v1.Lifecycle            `json:"lifecycle,omitempty"`
}

type Probes

type Probes struct {
	Liveness  *apiv1.Probe
	Readiness *apiv1.Probe
}

type Process

type Process struct {
	Name              string             `json:"name"`
	Cmd               []string           `json:"cmd"`
	Units             int                `json:"units"`
	Routable          bool               `json:"routable"`
	ContainerPorts    []v1.ContainerPort `json:"containerPorts"`
	ServicePorts      []v1.ServicePort   `json:"servicePorts"`
	PublicServicePort int32              `json:"publicServicePort,omitempty"`
	Env               []Env              `json:"env"`

	PodExtra PodExtra `json:"extra"`
}

func (Process) ContainerPortByName

func (p Process) ContainerPortByName(name string) *int32

func (Process) GetMainPortName

func (p Process) GetMainPortName() *string

func (Process) PortEnvVariables

func (p Process) PortEnvVariables() []Env

func (Process) ServicePortByName

func (p Process) ServicePortByName(name string) *int32

type Procfile

type Procfile struct {
	Processes           map[string][]string
	RoutableProcessName string
}

func (*Procfile) IsRoutable

func (p *Procfile) IsRoutable(processName string) bool

type RoutingSettings

type RoutingSettings struct {
	Weight float32 `json:"weight"`
}

type ShipaYamlData

type ShipaYamlData struct {
	Hooks       *ShipaYamlHooks            `json:"hooks"`
	Healthcheck *ShipaYamlHealthcheck      `json:"healthcheck"`
	Kubernetes  *ShipaYamlKubernetesConfig `json:"kubernetes"`
}

type ShipaYamlHealthcheck

type ShipaYamlHealthcheck struct {
	Path            string            `json:"path"`
	Method          string            `json:"method"`
	Status          int               `json:"status"`
	Scheme          string            `json:"scheme"`
	Headers         map[string]string `json:"headers" bson:",omitempty"`
	Match           string            `json:"match"`
	RouterBody      string            `json:"router_body"`
	UseInRouter     bool              `json:"use_in_router"`
	ForceRestart    bool              `json:"force_restart"`
	AllowedFailures int               `json:"allowed_failures"`
	IntervalSeconds int               `json:"interval_seconds"`
	TimeoutSeconds  int               `json:"timeout_seconds"`
}

type ShipaYamlHooks

type ShipaYamlHooks struct {
	Restart ShipaYamlRestartHooks `json:"restart"`
	Build   []string              `json:"build"`
}

type ShipaYamlKubernetesConfig

type ShipaYamlKubernetesConfig struct {
	Processes map[string]ShipaYamlProcessConfig `json:"processes,omitempty"`
}

type ShipaYamlProcessConfig

type ShipaYamlProcessConfig struct {
	Ports []ShipaYamlProcessPortConfig `json:"ports"`
}

type ShipaYamlProcessPortConfig

type ShipaYamlProcessPortConfig struct {
	Name       string `json:"name,omitempty"`
	Protocol   string `json:"protocol,omitempty"`
	Port       int    `json:"port,omitempty"`
	TargetPort int    `json:"target_port,omitempty"`
}

type ShipaYamlRestartHooks

type ShipaYamlRestartHooks struct {
	Before []string `json:"before" bson:",omitempty"`
	After  []string `json:"after" bson:",omitempty"`
}

type Traefik

type Traefik struct {
	EntryPoints []string `json:"entryPoints"`
}

type Values

type Values struct {
	App               *App               `json:"app"`
	DockerRegistry    *DockerRegistry    `json:"dockerRegistry"`
	IngressController *IngressController `json:"ingressController"`
}

Jump to

Keyboard shortcuts

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