mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Add feature to add default labels to all resources (#62)
Fixes #41 Thanks to @mhartmann-jaconi for the Helm changes in #42
This commit is contained in:
@@ -67,6 +67,7 @@ var _ = Describe("Service Controller", func() {
|
||||
NamespacedNetworks: false,
|
||||
ClusterDNS: "svc.cluster.local",
|
||||
ControllerNamespace: "default",
|
||||
DefaultLabels: map[string]string{"dog": "bark"},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -144,6 +145,7 @@ var _ = Describe("Service Controller", func() {
|
||||
Expect(res.RequeueAfter).NotTo(BeZero())
|
||||
nbrp := &netbirdiov1.NBRoutingPeer{}
|
||||
Expect(k8sClient.Get(ctx, types.NamespacedName{Namespace: typeNamespacedName.Namespace, Name: "router"}, nbrp)).To(Succeed())
|
||||
Expect(nbrp.Labels).To(HaveKeyWithValue("dog", "bark"))
|
||||
res, err = controllerReconciler.Reconcile(ctx, reconcile.Request{
|
||||
NamespacedName: typeNamespacedName,
|
||||
})
|
||||
@@ -203,6 +205,7 @@ var _ = Describe("Service Controller", func() {
|
||||
Expect(nbResource.Spec.PolicyName).To(BeEmpty())
|
||||
Expect(nbResource.Spec.TCPPorts).To(BeEmpty())
|
||||
Expect(nbResource.Spec.UDPPorts).To(BeEmpty())
|
||||
Expect(nbResource.Labels).To(HaveKeyWithValue("dog", "bark"))
|
||||
})
|
||||
})
|
||||
When("policy is specified", func() {
|
||||
|
||||
Reference in New Issue
Block a user