From ff76512e63c5f4ce0bdf0abf24bf0c46b6ca5956 Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Fri, 18 Jun 2021 12:59:17 +0200 Subject: [PATCH] move defaults for images to new file --- pkg/types/images.go | 15 +++++++++++++++ pkg/types/types.go | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/types/images.go b/pkg/types/images.go index 713ab0a7..d6d6c7a9 100644 --- a/pkg/types/images.go +++ b/pkg/types/images.go @@ -29,6 +29,21 @@ import ( log "github.com/sirupsen/logrus" ) +// DefaultK3sImageRepo specifies the default image repository for the used k3s image +const DefaultK3sImageRepo = "docker.io/rancher/k3s" + +// DefaultLBImageRepo defines the default cluster load balancer image +const DefaultLBImageRepo = "docker.io/rancher/k3d-proxy" + +// DefaultToolsImageRepo defines the default image used for the tools container +const DefaultToolsImageRepo = "docker.io/rancher/k3d-tools" + +// DefaultRegistryImageRepo defines the default image used for the k3d-managed registry +const DefaultRegistryImageRepo = "docker.io/library/registry" + +// DefaultRegistryImageTag defines the default image tag used for the k3d-managed registry +const DefaultRegistryImageTag = "2" + func GetLoadbalancerImage() string { if img := os.Getenv("K3D_IMAGE_LOADBALANCER"); img != "" { log.Infof("Loadbalancer image set from env var $K3D_IMAGE_LOADBALANCER: %s", img) diff --git a/pkg/types/types.go b/pkg/types/types.go index d6a83e6e..d47e1cd7 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -41,21 +41,6 @@ const DefaultClusterName = "k3s-default" // ... and still stay within the 64 character limit (e.g. of docker) const DefaultClusterNameMaxLength = 32 -// DefaultK3sImageRepo specifies the default image repository for the used k3s image -const DefaultK3sImageRepo = "docker.io/rancher/k3s" - -// DefaultLBImageRepo defines the default cluster load balancer image -const DefaultLBImageRepo = "docker.io/rancher/k3d-proxy" - -// DefaultToolsImageRepo defines the default image used for the tools container -const DefaultToolsImageRepo = "docker.io/rancher/k3d-tools" - -// DefaultRegistryImageRepo defines the default image used for the k3d-managed registry -const DefaultRegistryImageRepo = "docker.io/library/registry" - -// DefaultRegistryImageTag defines the default image tag used for the k3d-managed registry -const DefaultRegistryImageTag = "2" - // DefaultObjectNamePrefix defines the name prefix for every object created by k3d const DefaultObjectNamePrefix = "k3d"