diff --git a/internal/worker/worker.go b/internal/worker/worker.go index 57b304a..da6f666 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -8,6 +8,7 @@ import ( "github.com/AlexGustafsson/cupdate/internal/httputil" "github.com/AlexGustafsson/cupdate/internal/models" "github.com/AlexGustafsson/cupdate/internal/oci" + "github.com/AlexGustafsson/cupdate/internal/platform/kubernetes" "github.com/AlexGustafsson/cupdate/internal/semver" "github.com/AlexGustafsson/cupdate/internal/store" "github.com/AlexGustafsson/cupdate/internal/workflow/imageworkflow" @@ -130,6 +131,18 @@ func (w *Worker) ProcessRawImage(ctx context.Context, reference oci.Reference) e } } + // Add Kubernetes namespace and Docker stack tags + for _, node := range image.Graph.Nodes { + switch node.Domain { + case "kubernetes": + if node.Type == kubernetes.ResourceKindCoreV1Namespace { + data.InsertTag(node.Name) + } + case "docker": + // Not implemented + } + } + result := models.Image{ Reference: data.ImageReference.String(), Created: data.Created,