mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
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:
+6
-1
@@ -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, ",") {
|
||||
|
||||
Reference in New Issue
Block a user