Documentation ¶
Index ¶
- Constants
- Variables
- type AWSPodIdentityOptions
- type AccessControlOptions
- type Balancer
- type BalancerAnnotations
- type BalancerPort
- type BalancerPorts
- type BalancerWhitelist
- type Balancers
- type Certificate
- type DefaultsSetter
- type Environment
- type Labels
- type Manifest
- func (m *Manifest) Agents() []string
- func (m *Manifest) ApplyCompatibility() error
- func (m *Manifest) ApplyDefaults() error
- func (m *Manifest) AttributeExists(name string) bool
- func (m *Manifest) Attributes() []string
- func (m *Manifest) AttributesByPrefix(prefix string) []string
- func (m *Manifest) CombineEnv() error
- func (m *Manifest) CombineLabels() error
- func (m *Manifest) Env() map[string]string
- func (m *Manifest) Resource(name string) (*Resource, error)
- func (m *Manifest) Service(name string) (*Service, error)
- func (m *Manifest) ServiceEnvironment(service string) (map[string]string, error)
- func (m *Manifest) SetAttributes(attrs []string)
- func (m *Manifest) SetEnv(env map[string]string)
- func (m *Manifest) Validate() error
- type NameGetter
- type NameSetter
- type Params
- type Resource
- type Resources
- type Service
- func (s Service) AnnotationsMap() map[string]string
- func (s Service) Autoscale() bool
- func (s Service) BuildHash(key string) string
- func (s Service) Domain() string
- func (s Service) EnvironmentDefaults() map[string]string
- func (s Service) EnvironmentKeys() string
- func (s Service) GetName() string
- func (s Service) IngressAnnotationsMap() map[string]string
- func (s Service) ResourceMap() []ServiceResource
- func (s Service) ResourcesName() []string
- func (v *Service) SetName(name string) error
- type ServiceAgent
- type ServiceAnnotations
- type ServiceBuild
- type ServiceDeployment
- type ServiceDnsConfig
- type ServiceDomains
- type ServiceHealth
- type ServiceLifecycle
- type ServiceLiveness
- type ServicePortProtocol
- type ServicePortScheme
- type ServiceResource
- type ServiceResourceLimit
- type ServiceScale
- type ServiceScaleCount
- type ServiceScaleExternalMetric
- type ServiceScaleExternalMetrics
- type ServiceScaleGpu
- type ServiceScaleMetric
- type ServiceScaleMetrics
- type ServiceScaleTargets
- type ServiceTermination
- type ServiceTls
- type Services
- func (ss Services) External() Services
- func (ss Services) Filter(fn func(s Service) bool) Services
- func (ss Services) InternalRouter() Services
- func (v Services) MarshalYAML() (interface{}, error)
- func (ss Services) Routable() Services
- func (v *Services) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Timer
- type Timers
- type VolumeEmptyDir
- type VolumeOption
Constants ¶
View Source
const (
DEFAULT_RESOURCE_ENV_NAME = "URL"
)
View Source
const (
ValidNameDescription = "must contain only lowercase alphanumeric and dashes"
)
Variables ¶
View Source
var ( DefaultCpu = 256 DefaultMem = 512 ReservedLabelKeys = map[string]bool{ "system": true, "rack": true, "app": true, "name": true, "service": true, "release": true, "type": true, } )
View Source
var ( AdditionalEnvNames = []string{ DEFAULT_RESOURCE_ENV_NAME, "USER", "PASS", "HOST", "PORT", "NAME", } )
Functions ¶
This section is empty.
Types ¶
type AWSPodIdentityOptions ¶
type AWSPodIdentityOptions struct {
PolicyArns []string `yaml:"policyArns"`
}
type AccessControlOptions ¶
type AccessControlOptions struct {
AWSPodIdentity *AWSPodIdentityOptions `yaml:"awsPodIdentity,omitempty"`
}
type Balancer ¶
type Balancer struct { Name string `yaml:"-"` Annotations BalancerAnnotations `yaml:"annotations"` Ports BalancerPorts `yaml:"ports,omitempty"` Service string `yaml:"service,omitempty"` Whitelist BalancerWhitelist `yaml:"whitelist,omitempty"` }
func (Balancer) AnnotationsMap ¶
type BalancerAnnotations ¶
type BalancerAnnotations []string
type BalancerPort ¶
type BalancerPort struct { Source int `yaml:"-"` Protocol string `yaml:"protocol,omitempty"` Target int `yaml:"port,omitempty"` }
func (*BalancerPort) SetName ¶
func (v *BalancerPort) SetName(name string) error
func (*BalancerPort) UnmarshalYAML ¶
func (v *BalancerPort) UnmarshalYAML(unmarshal func(interface{}) error) error
type BalancerPorts ¶
type BalancerPorts []BalancerPort
func (BalancerPorts) MarshalYAML ¶
func (v BalancerPorts) MarshalYAML() (interface{}, error)
func (*BalancerPorts) UnmarshalYAML ¶
func (v *BalancerPorts) UnmarshalYAML(unmarshal func(interface{}) error) error
type BalancerWhitelist ¶
type BalancerWhitelist []string
func (*BalancerWhitelist) UnmarshalYAML ¶
func (v *BalancerWhitelist) UnmarshalYAML(unmarshal func(interface{}) error) error
type Balancers ¶
type Balancers []Balancer
func (Balancers) MarshalYAML ¶
func (*Balancers) UnmarshalYAML ¶
type Certificate ¶
type Certificate struct {
Duration string `yaml:"duration,omitempty"`
}
type DefaultsSetter ¶
type DefaultsSetter interface {
SetDefaults() error
}
type Environment ¶
type Environment []string
func (*Environment) UnmarshalYAML ¶
func (v *Environment) UnmarshalYAML(unmarshal func(interface{}) error) error
type Manifest ¶
type Manifest struct { Balancers Balancers `yaml:"balancers,omitempty"` Environment Environment `yaml:"environment,omitempty"` Labels Labels `yaml:"labels,omitempty"` Params Params `yaml:"params,omitempty"` Resources Resources `yaml:"resources,omitempty"` Services Services `yaml:"services,omitempty"` Timers Timers `yaml:"timers,omitempty"` // contains filtered or unexported fields }
func (*Manifest) ApplyCompatibility ¶
func (*Manifest) ApplyDefaults ¶
func (*Manifest) AttributeExists ¶
func (*Manifest) Attributes ¶
func (*Manifest) AttributesByPrefix ¶
func (*Manifest) CombineEnv ¶
CombineEnv calculates the final environment of each service and filters m.env to the union of all service env vars defined in the manifest
func (*Manifest) CombineLabels ¶
func (*Manifest) ServiceEnvironment ¶
func (*Manifest) SetAttributes ¶
used only for tests
type NameGetter ¶
type NameGetter interface {
GetName() string
}
type NameSetter ¶
type Resource ¶
type Resource struct { Name string `yaml:"-"` Type string `yaml:"type"` Options map[string]string `yaml:"options"` }
func (Resource) DefaultEnv ¶
type Resources ¶
type Resources []Resource
func (Resources) MarshalYAML ¶
func (*Resources) UnmarshalYAML ¶
type Service ¶
type Service struct { Name string `yaml:"-"` Agent ServiceAgent `yaml:"agent,omitempty"` Annotations ServiceAnnotations `yaml:"annotations,omitempty"` Build ServiceBuild `yaml:"build,omitempty"` Certificate Certificate `yaml:"certificate,omitempty"` Command string `yaml:"command,omitempty"` Deployment ServiceDeployment `yaml:"deployment,omitempty"` DnsConfig ServiceDnsConfig `yaml:"dnsConfig,omitempty"` Domains ServiceDomains `yaml:"domain,omitempty"` Drain int `yaml:"drain,omitempty"` Environment Environment `yaml:"environment,omitempty"` GrpcHealthEnabled bool `yaml:"grpcHealthEnabled,omitempty"` Health ServiceHealth `yaml:"health,omitempty"` Liveness ServiceLiveness `yaml:"liveness,omitempty"` Image string `yaml:"image,omitempty"` Init bool `yaml:"init,omitempty"` Internal bool `yaml:"internal,omitempty"` InternalRouter bool `yaml:"internalRouter,omitempty"` IngressAnnotations ServiceAnnotations `yaml:"ingressAnnotations,omitempty"` Labels Labels `yaml:"labels,omitempty"` Lifecycle ServiceLifecycle `yaml:"lifecycle,omitempty"` Port ServicePortScheme `yaml:"port,omitempty"` Ports []ServicePortProtocol `yaml:"ports,omitempty"` Privileged bool `yaml:"privileged,omitempty"` Resources []string `yaml:"resources,omitempty"` Scale ServiceScale `yaml:"scale,omitempty"` Singleton bool `yaml:"singleton,omitempty"` Sticky bool `yaml:"sticky,omitempty"` Termination ServiceTermination `yaml:"termination,omitempty"` Test string `yaml:"test,omitempty"` Timeout int `yaml:"timeout,omitempty"` Tls ServiceTls `yaml:"tls,omitempty"` Volumes []string `yaml:"volumes,omitempty"` VolumeOptions []VolumeOption `yaml:"volumeOptions,omitempty"` Whitelist string `yaml:"whitelist,omitempty"` AccessControl AccessControlOptions `yaml:"accessControl,omitempty"` }
func (Service) EnvironmentDefaults ¶
skipcq
func (Service) IngressAnnotationsMap ¶
skipcq
type ServiceAgent ¶
type ServiceAgent struct {
Enabled bool `yaml:"enabled,omitempty"`
}
func (*ServiceAgent) UnmarshalYAML ¶
func (v *ServiceAgent) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceAnnotations ¶
type ServiceAnnotations []string
type ServiceBuild ¶
type ServiceBuild struct { Args []string `yaml:"args,omitempty"` Manifest string `yaml:"manifest,omitempty"` Path string `yaml:"path,omitempty"` }
func (ServiceBuild) MarshalYAML ¶
func (v ServiceBuild) MarshalYAML() (interface{}, error)
func (*ServiceBuild) UnmarshalYAML ¶
func (v *ServiceBuild) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceDeployment ¶
type ServiceDnsConfig ¶
type ServiceDnsConfig struct {
Ndots int
}
type ServiceDomains ¶
type ServiceDomains []string
func (*ServiceDomains) UnmarshalYAML ¶
func (v *ServiceDomains) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceHealth ¶
func (*ServiceHealth) UnmarshalYAML ¶
func (v *ServiceHealth) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceLifecycle ¶
type ServiceLiveness ¶
type ServicePortProtocol ¶
type ServicePortProtocol struct { Port int `yaml:"port,omitempty"` Protocol string `yaml:"protocol,omitempty"` }
func (*ServicePortProtocol) UnmarshalYAML ¶
func (v *ServicePortProtocol) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServicePortScheme ¶
type ServicePortScheme struct { Port int `yaml:"port,omitempty"` Scheme string `yaml:"scheme,omitempty"` }
func (ServicePortScheme) MarshalYAML ¶
func (v ServicePortScheme) MarshalYAML() (interface{}, error)
func (*ServicePortScheme) UnmarshalYAML ¶
func (v *ServicePortScheme) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceResource ¶
func (ServiceResource) GetConfigMapKey ¶
func (sr ServiceResource) GetConfigMapKey() string
type ServiceResourceLimit ¶
type ServiceScale ¶
type ServiceScale struct { Count ServiceScaleCount Cpu int Gpu ServiceScaleGpu `yaml:"gpu,omitempty"` Memory int Limit ServiceResourceLimit `yaml:"limit,omitempty"` Targets ServiceScaleTargets `yaml:"targets,omitempty"` }
func (*ServiceScale) UnmarshalYAML ¶
func (v *ServiceScale) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleCount ¶
func (ServiceScaleCount) MarshalYAML ¶
func (v ServiceScaleCount) MarshalYAML() (interface{}, error)
func (*ServiceScaleCount) UnmarshalYAML ¶
func (v *ServiceScaleCount) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleExternalMetrics ¶
type ServiceScaleExternalMetrics []ServiceScaleExternalMetric
type ServiceScaleGpu ¶
func (*ServiceScaleGpu) UnmarshalYAML ¶
func (v *ServiceScaleGpu) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleMetric ¶
type ServiceScaleMetrics ¶
type ServiceScaleMetrics []ServiceScaleMetric
func (*ServiceScaleMetrics) UnmarshalYAML ¶
func (v *ServiceScaleMetrics) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleTargets ¶
type ServiceScaleTargets struct { Cpu int Custom ServiceScaleMetrics External ServiceScaleExternalMetrics Memory int Requests int }
type ServiceTermination ¶
type ServiceTermination struct {
Grace int `yaml:"grace,omitempty"`
}
type ServiceTls ¶
type ServiceTls struct {
Redirect bool
}
type Services ¶
type Services []Service
func (Services) InternalRouter ¶
func (Services) MarshalYAML ¶
func (*Services) UnmarshalYAML ¶
type Timer ¶
type VolumeEmptyDir ¶
type VolumeEmptyDir struct { Id string `yaml:"id"` Medium string `yaml:"medium,omitempty"` MountPath string `yaml:"mountPath"` }
func (VolumeEmptyDir) Validate ¶
func (v VolumeEmptyDir) Validate() error
type VolumeOption ¶
type VolumeOption struct {
EmptyDir *VolumeEmptyDir `yaml:"emptyDir,omitempty"`
}
func (VolumeOption) Validate ¶
func (v VolumeOption) Validate() error
Click to show internal directories.
Click to hide internal directories.