Documentation
¶
Overview ¶
traefik functions related to deployment
Index ¶
- Constants
- Variables
- func ContainerCommand(ctx context.Context, command *common.ContainerCommandRequest) error
- func ContainerInspect(ctx context.Context, request *agent.ContainerInspectRequest) (string, error)
- func ContainerLog(ctx context.Context, request *agent.ContainerLogRequest) (*grpc.ContainerLogStream, error)
- func ContainerStateStream(ctx context.Context, prefix string, sendInitalStates bool) (*grpc.ContainerStatusStream, error)
- func CopyToContainer(ctx context.Context, name string, meta v1.UploadFileData, ...) error
- func DeleteContainerByPrefixAndName(ctx context.Context, prefix, name string) error
- func DeleteContainers(ctx context.Context, request *common.DeleteContainersRequest) error
- func DeployImage(ctx context.Context, dog *dogger.DeploymentLogger, ...) error
- func DeploySharedSecrets(ctx context.Context, prefix string, secrets map[string]string) error
- func DraftRelease(instance string, versionData v1.VersionData, ...)
- func EnvMapToSlice(envs map[string]string) []string
- func ExecTraefik(ctx context.Context, traefikDeployReq TraefikDeployRequest, ...) error
- func FindVolumeInMountMap(name string, mountMap map[string]mount.Mount) *mount.Mount
- func GetContainerByPrefixAndName(ctx context.Context, cli client.APIClient, prefix, name string) (*types.Container, error)
- func GetImageLabels(expandedImageName string) (map[string]string, error)
- func GetOrganizationLabel(labels map[string]string, key string) (string, bool)
- func GetOwnContainer(ctx context.Context, cli client.APIClient) (*types.Container, error)
- func GetOwnContainerImage(cli client.APIClient) (*types.ImageInspect, error)
- func GetRules(containerConfig *v1.ContainerConfig, instanceConfig *v1.InstanceConfig, ...) []string
- func GetTraefikLabels(instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, ...) (map[string]string, error)
- func MergeStringMapToUniqueSlice(src, dest map[string]string) []string
- func MergeStringMapUnique(src, dest map[string]string) map[string]string
- func MountListToMap(in []mount.Mount) map[string]mount.Mount
- func ParseCGroupFile() (string, error)
- func PreflightChecks()
- func SecretList(ctx context.Context, prefix, name string) ([]string, error)
- func SetOrganizationLabel(key, value string) (map[string]string, error)
- func WatchContainersByPrefix(ctx context.Context, cli client.APIClient, prefix string, ...) (*grpc.ContainerStatusStream, error)
- func WithInitContainers(dc dockerbuilder.Builder, containerConfig *v1.ContainerConfig, ...)
- func WriteContainerFile(ctx context.Context, cli *client.Client, cont, filename string, ...) error
- type DockerContainerLogReader
- type DockerVersion
- type InitContainerConfig
- type PrefixFile
- type PrefixFileParamError
- type ReleaseContainer
- type ReleaseDoc
- type TraefikDeployRequest
- type UnknownContainerError
Constants ¶
View Source
const ( TraefikHTTPPort = 80 TraefikHTTPSPort = 443 )
View Source
const ( ContainerHealthyStatus = "healthy" ContainerStateWaitSeconds = 120 TypeContainer = "container" )
View Source
const CGroupFile = "/proc/self/cgroup"
View Source
const DockerLogHeaderLength = 8
View Source
const TraefikTrue = "true"
Variables ¶
Functions ¶
func ContainerCommand ¶
func ContainerCommand(ctx context.Context, command *common.ContainerCommandRequest) error
func ContainerInspect ¶
func ContainerLog ¶
func ContainerLog(ctx context.Context, request *agent.ContainerLogRequest) (*grpc.ContainerLogStream, error)
func ContainerStateStream ¶
func CopyToContainer ¶
func CopyToContainer(ctx context.Context, name string, meta v1.UploadFileData, fileHeader *multipart.FileHeader) error
func DeleteContainers ¶
func DeleteContainers(ctx context.Context, request *common.DeleteContainersRequest) error
func DeployImage ¶
func DeployImage(ctx context.Context, dog *dogger.DeploymentLogger, deployImageRequest *v1.DeployImageRequest, versionData *v1.VersionData, ) error
func DeploySharedSecrets ¶
func DraftRelease ¶
func DraftRelease(instance string, versionData v1.VersionData, deployResponse v1.DeployVersionResponse, cfg *config.Configuration)
DraftRelease writes release information to disk Into the instance folder @release directory, file with a release name yml extension the file containing release data
func EnvMapToSlice ¶
EnvMapToSlice converts key:value map into ["key=value"] array
func ExecTraefik ¶
func ExecTraefik(ctx context.Context, traefikDeployReq TraefikDeployRequest, cfg *config.Configuration) error
func FindVolumeInMountMap ¶
func GetOrganizationLabel ¶
func GetOwnContainer ¶
func GetOwnContainerImage ¶
func GetOwnContainerImage(cli client.APIClient) (*types.ImageInspect, error)
func GetRules ¶
func GetRules(containerConfig *v1.ContainerConfig, instanceConfig *v1.InstanceConfig, cfg *config.Configuration) []string
serviceName container-name.container-pre-name.ingress.host is default
func GetTraefikLabels ¶
func GetTraefikLabels( instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, cfg *config.Configuration, ) (map[string]string, error)
generating container labels for traefik if Expose is provided we bind 80 and the given (domainName or (containerName + prefix)) + RootDomain
func MergeStringMapToUniqueSlice ¶
Merging map `a` to map `b`. Keys in map `b` has precedence, if key occurs in both.
func MergeStringMapUnique ¶
func ParseCGroupFile ¶
func PreflightChecks ¶
func PreflightChecks()
func SetOrganizationLabel ¶
generating dyrector.io specific labels for containers org.dyrectorio is our official label prefix
func WatchContainersByPrefix ¶
func WithInitContainers ¶
func WithInitContainers(dc dockerbuilder.Builder, containerConfig *v1.ContainerConfig, dog *dogger.DeploymentLogger, envMap map[string]string, cfg *config.Configuration, )
Types ¶
type DockerContainerLogReader ¶
type DockerContainerLogReader struct { EventChannel chan grpc.ContainerLogEvent Reader io.ReadCloser grpc.ContainerLogReader }
func (*DockerContainerLogReader) Close ¶
func (dockerReader *DockerContainerLogReader) Close() error
func (*DockerContainerLogReader) Next ¶
func (dockerReader *DockerContainerLogReader) Next() <-chan grpc.ContainerLogEvent
type DockerVersion ¶
type InitContainerConfig ¶
type PrefixFile ¶
func NewSecretsPrefixFile ¶
func NewSecretsPrefixFile(dataRoot, prefix string) PrefixFile
func NewSharedEnvPrefixFile ¶
func NewSharedEnvPrefixFile(dataRoot, prefix string) PrefixFile
func (*PrefixFile) ReadVariables ¶
func (pf *PrefixFile) ReadVariables() (map[string]string, error)
func (*PrefixFile) WriteVariables ¶
func (pf *PrefixFile) WriteVariables(in map[string]string) error
type PrefixFileParamError ¶
type PrefixFileParamError struct {
// contains filtered or unexported fields
}
func NewErrPrefixFileParamEmpty ¶
func NewErrPrefixFileParamEmpty(param string) PrefixFileParamError
func (PrefixFileParamError) Error ¶
func (e PrefixFileParamError) Error() string
type ReleaseContainer ¶
type ReleaseDoc ¶
type ReleaseDoc struct { Version string ReleaseNotes string Date time.Time Containers []ReleaseContainer }
func GetVersions ¶
func GetVersions(instance string, cfg *config.Configuration) ([]ReleaseDoc, error)
type TraefikDeployRequest ¶
type UnknownContainerError ¶
type UnknownContainerError struct{}
func (*UnknownContainerError) Error ¶
func (err *UnknownContainerError) Error() string
Click to show internal directories.
Click to hide internal directories.