Documentation
¶
Overview ¶
Package deployment provides deployment management functionality for Clowder applications
Index ¶
- Constants
- Variables
- func ApplyPodAntiAffinity(t *core.PodTemplateSpec)
- func GetDeployment(c *providers.Provider) (providers.ClowderProvider, error)
- func NewDeploymentProvider(p *providers.Provider) (providers.ClowderProvider, error)
- func ProcessInitContainers(nn types.NamespacedName, c *core.Container, ics []crd.InitContainer) ([]core.Container, error)
- func ProcessResources(pod *crd.PodSpec, env *crd.ClowdEnvironment) core.ResourceRequirements
- func TestResourceDefaults(t *testing.T)
- type IDAndParams
- type Params
Constants ¶
const (
// TerminationLogPath defines the standard path for container termination logs
TerminationLogPath = "/dev/termination-log"
)
Variables ¶
var CoreDeployment = rc.NewMultiResourceIdent(ProvName, "core_deployment", &apps.Deployment{})
CoreDeployment is the deployment for the apps deployments.
var ProvName = "deployment"
ProvName sets the provider name identifier
Functions ¶
func ApplyPodAntiAffinity ¶
func ApplyPodAntiAffinity(t *core.PodTemplateSpec)
ApplyPodAntiAffinity applies pod anti affinity rules to a pod template
func GetDeployment ¶
func GetDeployment(c *providers.Provider) (providers.ClowderProvider, error)
GetDeployment returns the correct deployment provider.
func NewDeploymentProvider ¶
func NewDeploymentProvider(p *providers.Provider) (providers.ClowderProvider, error)
NewDeploymentProvider creates a new deployment provider instance
func ProcessInitContainers ¶
func ProcessInitContainers(nn types.NamespacedName, c *core.Container, ics []crd.InitContainer) ([]core.Container, error)
ProcessInitContainers returns a container object which has been processed from the container spec.
func ProcessResources ¶
func ProcessResources(pod *crd.PodSpec, env *crd.ClowdEnvironment) core.ResourceRequirements
ProcessResources takes a pod spec and a clowd environment and returns the resource requirements object.
func TestResourceDefaults ¶
TestResourceDefaults validates the default resource settings for deployments
Types ¶
type IDAndParams ¶
IDAndParams represents a structure containing an ID and associated parameters
func NewIDAndParam ¶
func NewIDAndParam(id, limitCPU, limitMemory, requestsCPU, requestsMemory string) IDAndParams
NewIDAndParam creates a new IDAndParams instance with the specified resource values