Documentation ¶
Index ¶
- Constants
- type AccessType
- type Affinity
- type AffinityMode
- type AffinityOperator
- type AffinityTemplate
- type AffinityTerm
- type AffinityToleration
- type Deployment
- type DeploymentConfig
- type DeploymentLabel
- type Envar
- type HttpGetProbe
- type Image
- type Migration
- type Port
- type PortProtocolType
- type PortSpec
- type PortTemplate
- type Project
- type Scale
- type User
- type UserType
Constants ¶
View Source
const ( AffinityMode_Required = "required" AffinityMode_Preferred = "preferred" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessType ¶
type AccessType string
const ( Access_Type_ClusterIP AccessType = "ClusterIP" Access_Type_LoadBalancer AccessType = "LoadBalancer" )
type Affinity ¶
type Affinity struct { Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` NodeAffinity []AffinityTerm `json:"node_affinity"` PodAffinity []AffinityTerm `json:"pod_affinity"` PodAntiAffinity []AffinityTerm `json:"pod_anti_affinity"` Tolerations []AffinityToleration `json:"tolerations"` CreatedBy int `json:"created_by"` }
func (Affinity) DefaultAffinity ¶
type AffinityMode ¶
type AffinityMode string
type AffinityOperator ¶
type AffinityOperator string
const ( AffinityOperator_In AffinityOperator = "In" AffinityOperator_NotIn AffinityOperator = "NotIn" AffinityOperator_Exists AffinityOperator = "Exists" AffinityOperator_DoesNotExist AffinityOperator = "DoesNotExist" AffinityOperator_Gt AffinityOperator = "Gt" AffinityOperator_Lt AffinityOperator = "Lt" )
type AffinityTemplate ¶
type AffinityTemplate struct { TemplateName string `json:"template_name"` NodeAffinity []AffinityTerm `json:"node_affinity"` PodAffinity []AffinityTerm `json:"pod_affinity"` PodAntiAffinity []AffinityTerm `json:"pod_anti_affinity"` Tolerations []AffinityToleration `json:"tolerations"` }
func (AffinityTemplate) DefaultAffinityTemplate ¶
func (AffinityTemplate) DefaultAffinityTemplate() *AffinityTemplate
func (*AffinityTemplate) ToAffinityEntity ¶
func (at *AffinityTemplate) ToAffinityEntity(env, name string) *Affinity
type AffinityTerm ¶
type AffinityTerm struct { Mode AffinityMode `json:"mode"` Key string `json:"key"` Operator AffinityOperator `json:"operator"` Values []string `json:"values"` Weight int `json:"weight"` TopologyKey string `json:"topology_key"` }
type AffinityToleration ¶
type Deployment ¶
type Deployment struct { Id int `json:"id"` Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` DeploymentImage Image `json:"image_detail"` Envar Envar `json:"variables"` Port Port `json:"ports"` Scale Scale `json:"scale"` Affinity Affinity `json:"affinity"` DeploymentConfig DeploymentConfig `json:"deployment_config"` CreatedBy int `json_name:"created_by"` }
func (*Deployment) GetK8sLabel ¶
func (d *Deployment) GetK8sLabel(additionalLabel ...DeploymentLabel) map[string]string
func (*Deployment) IsDifferentDeploymentConfig ¶
func (d1 *Deployment) IsDifferentDeploymentConfig(d2 Deployment) bool
type DeploymentConfig ¶
type DeploymentConfig struct { Id int `json:"id"` Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` LivenessProbe *HttpGetProbe `json:"liveness_probe"` ReadinessProbe *HttpGetProbe `json:"readiness_probe"` StartupProbe *HttpGetProbe `json:"startup_probe"` CreatedBy int `json:"created_by"` }
type DeploymentLabel ¶
type Envar ¶
type Envar struct { Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` Variables map[string]interface{} `json:"variables"` CreatedBy int `json:"created_by"` }
func (Envar) DefaultEnvar ¶
type HttpGetProbe ¶
type Image ¶
type Image struct { Id int `json:"id"` Digest string `json:"digest"` Image string `json:"image"` Project string `json:"project"` Repository string `json:"repository"` Description string `json:"description"` CreatedBy int `json:"created_by"` CreatedAt *time.Time `json:"created_at"` Notes string `json:"notes"` // This is for environment last deployment }
type Port ¶
type Port struct { Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` AccessType AccessType `json:"access_type"` ExternalIP string `json:"external_ip"` Ports []PortSpec `json:"ports"` CreatedBy int `json:"created_by"` }
func (Port) DefaultPort ¶
type PortProtocolType ¶
type PortProtocolType string
const ( Port_TCP PortProtocolType = "TCP" Port_UDP PortProtocolType = "UDP" Port_SCTP PortProtocolType = "SCTP" )
type PortSpec ¶
type PortSpec struct { Name string `json:"name"` Port int `json:"port"` RemotePort int `json:"remote_port"` Protocol PortProtocolType `json:"protocol"` }
type PortTemplate ¶
type PortTemplate struct { TemplateName string `json:"-"` AccessType AccessType `json:"access_type"` ExternalIP string `json:"external_ip"` Ports []PortSpec `json:"ports"` }
func (PortTemplate) DefaultPortTemplate ¶
func (PortTemplate) DefaultPortTemplate() *PortTemplate
func (*PortTemplate) ToPortEntity ¶
func (pt *PortTemplate) ToPortEntity(env, name string) *Port
type Project ¶
type Project struct { Id int `json:"id"` Name string `json:"name"` Description string `json:"description"` }
func (*Project) ValidateName ¶
type Scale ¶
type Scale struct { Project string `json:"project"` Env string `json:"env"` Name string `json:"name"` MinReplica int `json_name:"min_replica"` MaxReplica int `json_name:"max_replica"` MinCpu int `json_name:"min_cpu"` MaxCpu int `json_name:"max_cpu"` MinMemory int `json_name:"min_memory"` MaxMemory int `json_name:"max_memory"` TargetCPUUtilization int `json_name:"target_cpu"` CreatedBy int `json:"created_by"` }
func (Scale) DefaultScale ¶
Click to show internal directories.
Click to hide internal directories.