Pin the default client image with digest (#227)

This changes the default client image from latest to a pinned digest. It
also enforces that the default image version tag matches the version of
the Netbird dependency.

This makes testing a lot easier and also ensures that we wont get
untested behavior introduced if the client makes a breaking change.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-05-05 11:12:37 +02:00
committed by GitHub
parent ebe21492bb
commit f8a383f533
5 changed files with 48 additions and 2 deletions
+6 -1
View File
@@ -48,6 +48,7 @@ import (
nbv1 "github.com/netbirdio/kubernetes-operator/api/v1"
nbv1alpha1 "github.com/netbirdio/kubernetes-operator/api/v1alpha1"
"github.com/netbirdio/kubernetes-operator/internal/controller"
"github.com/netbirdio/kubernetes-operator/internal/version"
nbwebhookv1 "github.com/netbirdio/kubernetes-operator/internal/webhook/v1"
)
@@ -84,7 +85,7 @@ func main() {
)
flag.StringVar(&runtimeNamespace, "runtime-namespace", "", "Namespace the controller is running in")
flag.StringVar(&managementURL, "netbird-management-url", "https://api.netbird.io", "Management service URL")
flag.StringVar(&clientImage, "netbird-client-image", "netbirdio/netbird:latest", "Image for netbird client container")
flag.StringVar(&clientImage, "netbird-client-image", "", "Image for netbird client container")
flag.StringVar(
&clusterName,
"cluster-name",
@@ -148,6 +149,10 @@ func main() {
os.Exit(1)
}
if clientImage == "" {
clientImage = version.ClientImage()
}
defaultLabelsMap := make(map[string]string)
if defaultLabels != "" {
for s := range strings.SplitSeq(defaultLabels, ",") {