🐳 Add docker package to set and get Docker image and tags

This commit is contained in:
M. Mert Yildiran
2022-12-11 11:30:18 +03:00
parent 67f9c36048
commit c55b0e695c
5 changed files with 56 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/kubeshark/base/pkg/api"
"github.com/kubeshark/base/pkg/models"
"github.com/kubeshark/kubeshark/debounce"
"github.com/kubeshark/kubeshark/docker"
"github.com/kubeshark/kubeshark/utils"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
@@ -349,7 +350,7 @@ func (workerSyncer *WorkerSyncer) updateWorkers() error {
log.Debug().Strs("nodes", nodesToTarget).Msg("Updating DaemonSet to run on nodes.")
image := "kubeshark/worker:latest"
image := docker.GetWorkerImage()
if len(workerSyncer.nodeToTargettedPodMap) > 0 {
var serviceAccountName string

View File

@@ -14,6 +14,7 @@ import (
"github.com/kubeshark/base/pkg/api"
"github.com/kubeshark/base/pkg/models"
"github.com/kubeshark/kubeshark/docker"
"github.com/kubeshark/kubeshark/semver"
"github.com/kubeshark/kubeshark/utils"
"github.com/rs/zerolog"
@@ -431,7 +432,7 @@ func (provider *Provider) BuildFrontPod(opts *HubOptions, mountVolumeClaim bool,
containers := []core.Container{
{
Name: opts.PodName,
Image: "kubeshark/front:latest",
Image: docker.GetFrontImage(),
ImagePullPolicy: opts.ImagePullPolicy,
VolumeMounts: volumeMounts,
ReadinessProbe: &core.Probe{