mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-04 08:51:27 +01:00
cmd/k8s-operator: use stable image for k8s-nameserver (#17985)
This commit modifies the kubernetes operator to use the "stable" version of `k8s-nameserver` by default. Updates: https://github.com/tailscale/corp/issues/19028 Signed-off-by: David Bond <davidsbond93@gmail.com>
This commit is contained in:
parent
a0d059d74c
commit
86a849860e
@ -26,6 +26,7 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||||
"sigs.k8s.io/yaml"
|
"sigs.k8s.io/yaml"
|
||||||
|
|
||||||
tsoperator "tailscale.com/k8s-operator"
|
tsoperator "tailscale.com/k8s-operator"
|
||||||
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
|
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
|
||||||
"tailscale.com/kube/kubetypes"
|
"tailscale.com/kube/kubetypes"
|
||||||
@ -45,10 +46,7 @@ const (
|
|||||||
messageMultipleDNSConfigsPresent = "Multiple DNSConfig resources found in cluster. Please ensure no more than one is present."
|
messageMultipleDNSConfigsPresent = "Multiple DNSConfig resources found in cluster. Please ensure no more than one is present."
|
||||||
|
|
||||||
defaultNameserverImageRepo = "tailscale/k8s-nameserver"
|
defaultNameserverImageRepo = "tailscale/k8s-nameserver"
|
||||||
// TODO (irbekrm): once we start publishing nameserver images for stable
|
defaultNameserverImageTag = "stable"
|
||||||
// track, replace 'unstable' here with the version of this operator
|
|
||||||
// instance.
|
|
||||||
defaultNameserverImageTag = "unstable"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NameserverReconciler knows how to create nameserver resources in cluster in
|
// NameserverReconciler knows how to create nameserver resources in cluster in
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||||
"sigs.k8s.io/yaml"
|
"sigs.k8s.io/yaml"
|
||||||
|
|
||||||
operatorutils "tailscale.com/k8s-operator"
|
operatorutils "tailscale.com/k8s-operator"
|
||||||
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
|
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
|
||||||
"tailscale.com/tstest"
|
"tailscale.com/tstest"
|
||||||
@ -182,7 +183,7 @@ func TestNameserverReconciler(t *testing.T) {
|
|||||||
dnsCfg.Spec.Nameserver.Image = nil
|
dnsCfg.Spec.Nameserver.Image = nil
|
||||||
})
|
})
|
||||||
expectReconciled(t, reconciler, "", "test")
|
expectReconciled(t, reconciler, "", "test")
|
||||||
wantsDeploy.Spec.Template.Spec.Containers[0].Image = "tailscale/k8s-nameserver:unstable"
|
wantsDeploy.Spec.Template.Spec.Containers[0].Image = "tailscale/k8s-nameserver:stable"
|
||||||
expectEqual(t, fc, wantsDeploy)
|
expectEqual(t, fc, wantsDeploy)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user