Documentation ¶
Overview ¶
traefik functions related to deployment
Index ¶
- func CheckContainer(_, containerName string) (string, error)
- func CopyToContainer(ctx context.Context, name string, meta v1.UploadFileData, ...) error
- func CreateNetwork(ctx context.Context, name, driver string) error
- func DeleteContainer(containerName string) error
- func DeleteContainerByName(ctx context.Context, preName, name string) error
- func DeployImage(ctx context.Context, dog *dogger.DeploymentLogger, ...) error
- func DraftRelease(instance string, versionData v1.VersionData, ...)
- func EnvMapToSlice(envs map[string]string) []string
- func EnvPipeSeparatedToStringMap(envIn *[]string) map[string]string
- func ExecTraefik(ctx context.Context, traefikDeployReq model.TraefikDeployRequest, ...) error
- func ExecWatchtowerOneShot(ctx context.Context, cfg *config.Configuration) error
- func ExecWatchtowerPoll(ctx context.Context, cfg *config.Configuration) error
- func FilterContainerByName(containers []types.Container, name string) (ret []types.Container)
- func GetContainer(name string) []types.Container
- func GetContainerLogs(name string, skip, take uint) []string
- func GetContainersByName(name string) []types.Container
- func GetContainersByNameCrux(ctx context.Context, name string) []*common.ContainerStateItem
- func GetImageLabels(fullyQualifiedImageName string) (map[string]string, error)
- func GetNetworks() ([]types.NetworkResource, error)
- func GetOrganizationLabel(labels map[string]string, key string) (string, bool)
- func GetServiceName(instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, ...) string
- func GetTraefikGoTemplate() string
- func GetTraefikLabels(instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, ...) map[string]string
- func InspectContainer(name string) types.ContainerJSON
- func ListContainers() ([]types.Container, error)
- func MergeStringMapToUniqueSlice(src, dest map[string]string) []string
- func MergeStringMapUnique(src, dest map[string]string) map[string]string
- func PreflightChecks(cfg *config.Configuration)
- func ReadDockerLogsFromReadCloser(logs io.ReadCloser, skip, take int) []string
- func SecretList(ctx context.Context, prefix, name string) ([]string, error)
- func SetOrganizationLabel(key, value string) (map[string]string, error)
- func WithImportContainer(dc *containerbuilder.DockerContainerBuilder, importConfig *v1.ImportContainer, ...)
- func WriteContainerFile(ctx context.Context, cli *client.Client, container, filename string, ...) error
- type DockerVersion
- type ReleaseContainer
- type ReleaseDoc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContainer ¶
func CopyToContainer ¶
func CopyToContainer(ctx context.Context, name string, meta v1.UploadFileData, fileHeader *multipart.FileHeader) error
func DeleteContainer ¶
func DeleteContainerByName ¶
func DeployImage ¶
func DeployImage(ctx context.Context, dog *dogger.DeploymentLogger, deployImageRequest *v1.DeployImageRequest, versionData *v1.VersionData) error
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 EnvPipeSeparatedToStringMap ¶
TODO(nandor-magyar): refactor this into unmarshalling `[]"VARIABLE|value"` pair mapped into a string keyed map, collision is ignored, the latter value is used
func ExecTraefik ¶
func ExecTraefik(ctx context.Context, traefikDeployReq model.TraefikDeployRequest, cfg *config.Configuration) error
func ExecWatchtowerOneShot ¶
func ExecWatchtowerOneShot(ctx context.Context, cfg *config.Configuration) error
func ExecWatchtowerPoll ¶
func ExecWatchtowerPoll(ctx context.Context, cfg *config.Configuration) error
func FilterContainerByName ¶
func GetContainer ¶
func GetContainerLogs ¶
func GetContainersByName ¶
func GetContainersByNameCrux ¶
func GetContainersByNameCrux(ctx context.Context, name string) []*common.ContainerStateItem
func GetImageLabels ¶
func GetNetworks ¶
func GetNetworks() ([]types.NetworkResource, error)
func GetOrganizationLabel ¶
func GetServiceName ¶
func GetServiceName(instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, cfg *config.Configuration) string
serviceName container-name.container-pre-name.ingress.host is default
func GetTraefikGoTemplate ¶
func GetTraefikGoTemplate() string
keeping the template like this solves builds/asset management issues dev environment <-> containerization differences TODO(nandor-magyar): solve assets' relative directory issues
func GetTraefikLabels ¶
func GetTraefikLabels(instanceConfig *v1.InstanceConfig, containerConfig *v1.ContainerConfig, cfg *config.Configuration) map[string]string
generating container labels for traefik if Expose is provided we bind 80 and the given ingressName + ingressHost
func InspectContainer ¶
func InspectContainer(name string) types.ContainerJSON
func ListContainers ¶
func MergeStringMapToUniqueSlice ¶
Merging map `a` to map `b`. Keys in map `b` has precedence, if key occurs in both.
func MergeStringMapUnique ¶
func PreflightChecks ¶
func PreflightChecks(cfg *config.Configuration)
func ReadDockerLogsFromReadCloser ¶
func ReadDockerLogsFromReadCloser(logs io.ReadCloser, skip, take int) []string
func SetOrganizationLabel ¶
generating dyrector.io specific labels for containers org.dyrectorio is our official label prefix
func WithImportContainer ¶
func WithImportContainer(dc *containerbuilder.DockerContainerBuilder, importConfig *v1.ImportContainer, dog *dogger.DeploymentLogger, cfg *config.Configuration)
Types ¶
type DockerVersion ¶
func GetServerInformation ¶
func GetServerInformation() (DockerVersion, error)
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)