deployer

package
v0.0.0-...-9135743 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapApplier

type ConfigMapApplier struct {
	Context      k8s.Context
	Namespace    k8s.NamespaceName
	Name         k8s.MetadataName
	ConfigValues ConfigValues
}

func (*ConfigMapApplier) Apply

func (c *ConfigMapApplier) Apply(ctx context.Context) error

func (*ConfigMapApplier) Satisfied

func (c *ConfigMapApplier) Satisfied(ctx context.Context) (bool, error)

func (*ConfigMapApplier) Validate

func (c *ConfigMapApplier) Validate(ctx context.Context) error

type ConfigValue

type ConfigValue interface {
	Value(ctx context.Context) (string, error)
	Validate(ctx context.Context) error
}

type ConfigValueFunc

type ConfigValueFunc func(ctx context.Context) (string, error)

func (ConfigValueFunc) Validate

func (s ConfigValueFunc) Validate(ctx context.Context) error

func (ConfigValueFunc) Value

func (s ConfigValueFunc) Value(ctx context.Context) (string, error)

type ConfigValueStatic

type ConfigValueStatic string

func (ConfigValueStatic) Validate

func (s ConfigValueStatic) Validate(ctx context.Context) error

func (ConfigValueStatic) Value

func (s ConfigValueStatic) Value(ctx context.Context) (string, error)

type ConfigValues

type ConfigValues map[string]ConfigValue

func (ConfigValues) Checksum

func (c ConfigValues) Checksum() string

func (ConfigValues) Validate

func (c ConfigValues) Validate(ctx context.Context) error

type DeploymentDeployer

type DeploymentDeployer struct {
	Context            k8s.Context
	Namespace          k8s.NamespaceName
	Name               k8s.MetadataName
	Containers         []HasContainer
	Volumes            []k8s.PodVolume
	HostNetwork        k8s.PodHostNetwork
	Requirements       []world.Configuration
	DnsPolicy          k8s.PodDnsPolicy
	Annotations        k8s.Annotations
	Strategy           k8s.DeploymentStrategy
	ServiceAccountName string
}

func (*DeploymentDeployer) Applier

func (d *DeploymentDeployer) Applier() (world.Applier, error)

func (*DeploymentDeployer) Children

func (*DeploymentDeployer) Validate

func (d *DeploymentDeployer) Validate(ctx context.Context) error

func (*DeploymentDeployer) WithRecreate

func (d *DeploymentDeployer) WithRecreate() *DeploymentDeployer

func (*DeploymentDeployer) WithRollingUpdate

func (d *DeploymentDeployer) WithRollingUpdate() *DeploymentDeployer

type DeploymentDeployerContainer

type DeploymentDeployerContainer struct {
	Name            k8s.ContainerName
	Command         []k8s.Command
	Args            []k8s.Arg
	Ports           []Port
	Env             []k8s.Env
	Resources       k8s.Resources
	Mounts          []k8s.ContainerMount
	Image           docker.Image
	Requirement     world.Configuration
	LivenessProbe   k8s.Probe
	ReadinessProbe  k8s.Probe
	SecurityContext k8s.SecurityContext
}

func (*DeploymentDeployerContainer) Container

func (d *DeploymentDeployerContainer) Container() k8s.Container

func (*DeploymentDeployerContainer) Requirements

func (d *DeploymentDeployerContainer) Requirements() []world.Configuration

func (*DeploymentDeployerContainer) Validate

type HasContainer

type HasContainer interface {
	Validate(ctx context.Context) error
	Container() k8s.Container
	Requirements() []world.Configuration
}

type IngressDeployer

type IngressDeployer struct {
	Context      k8s.Context
	Namespace    k8s.NamespaceName
	Name         k8s.MetadataName
	Domains      k8s.IngressHosts
	Port         k8s.PortName
	Requirements []world.Configuration
}

func (*IngressDeployer) Applier

func (i *IngressDeployer) Applier() (world.Applier, error)

func (*IngressDeployer) Children

func (*IngressDeployer) Validate

func (t *IngressDeployer) Validate(ctx context.Context) error

type Port

type Port struct {
	Name     k8s.PortName
	Port     k8s.PortNumber
	HostPort k8s.PortNumber
	Protocol k8s.PortProtocol
}

func (Port) ContainerPort

func (p Port) ContainerPort() k8s.ContainerPort

func (Port) ServicePort

func (p Port) ServicePort() k8s.ServicePort

func (*Port) Validate

func (p *Port) Validate(ctx context.Context) error

type Ports

type Ports []Port

func (Ports) ContainerPort

func (p Ports) ContainerPort() []k8s.ContainerPort

func (Ports) ServicePort

func (p Ports) ServicePort() []k8s.ServicePort

type SecretApplier

type SecretApplier struct {
	Context      k8s.Context
	Namespace    k8s.NamespaceName
	Name         k8s.MetadataName
	Secrets      Secrets
	Requirements []world.Configuration
}

func (*SecretApplier) Apply

func (s *SecretApplier) Apply(ctx context.Context) error

func (*SecretApplier) Children

func (s *SecretApplier) Children(ctx context.Context) (world.Configurations, error)

func (*SecretApplier) Satisfied

func (s *SecretApplier) Satisfied(ctx context.Context) (bool, error)

func (*SecretApplier) Validate

func (s *SecretApplier) Validate(ctx context.Context) error

type SecretFromFile

type SecretFromFile struct {
	Path string
}

func (SecretFromFile) Validate

func (s SecretFromFile) Validate(ctx context.Context) error

func (*SecretFromFile) Value

func (s *SecretFromFile) Value(ctx context.Context) ([]byte, error)

type SecretFromTeamvaultFile

type SecretFromTeamvaultFile struct {
	TeamvaultConnector teamvault.Connector
	TeamvaultKey       teamvault.Key
}

func (SecretFromTeamvaultFile) Validate

func (s SecretFromTeamvaultFile) Validate(ctx context.Context) error

func (SecretFromTeamvaultFile) Value

func (s SecretFromTeamvaultFile) Value(ctx context.Context) ([]byte, error)

type SecretFromTeamvaultHtpasswd

type SecretFromTeamvaultHtpasswd struct {
	TeamvaultConnector teamvault.Connector
	TeamvaultKey       teamvault.Key
}

func (SecretFromTeamvaultHtpasswd) Validate

func (SecretFromTeamvaultHtpasswd) Value

type SecretFromTeamvaultPassword

type SecretFromTeamvaultPassword struct {
	TeamvaultConnector teamvault.Connector
	TeamvaultKey       teamvault.Key
}

func (SecretFromTeamvaultPassword) Validate

func (SecretFromTeamvaultPassword) Value

type SecretFromTeamvaultUser

type SecretFromTeamvaultUser struct {
	TeamvaultConnector teamvault.Connector
	TeamvaultKey       teamvault.Key
}

func (SecretFromTeamvaultUser) Validate

func (s SecretFromTeamvaultUser) Validate(ctx context.Context) error

func (SecretFromTeamvaultUser) Value

func (s SecretFromTeamvaultUser) Value(ctx context.Context) ([]byte, error)

type SecretValue

type SecretValue interface {
	Value(ctx context.Context) ([]byte, error)
	Validate(ctx context.Context) error
}

type SecretValueStatic

type SecretValueStatic []byte

func (SecretValueStatic) Validate

func (s SecretValueStatic) Validate(ctx context.Context) error

func (SecretValueStatic) Value

func (s SecretValueStatic) Value(ctx context.Context) ([]byte, error)

type Secrets

type Secrets map[string]SecretValue

func (Secrets) Validate

func (s Secrets) Validate(ctx context.Context) error

type ServiceDeployer

type ServiceDeployer struct {
	Context      k8s.Context
	Namespace    k8s.NamespaceName
	Name         k8s.MetadataName
	Ports        []Port
	ClusterIP    k8s.ClusterIP
	Labels       k8s.Labels
	Annotations  k8s.Annotations
	Requirements []world.Configuration
}

func (*ServiceDeployer) Applier

func (s *ServiceDeployer) Applier() (world.Applier, error)

func (*ServiceDeployer) Children

func (*ServiceDeployer) Validate

func (t *ServiceDeployer) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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