@@ -3,12 +3,13 @@ package controllers
33import (
44 "context"
55 "fmt"
6- "github.com/jodevsa/wireguard-operator/pkg/api/v1alpha1"
7- "sigs.k8s.io/controller-runtime/pkg/client"
86 "strconv"
97 "strings"
108 "time"
119
10+ "github.com/jodevsa/wireguard-operator/pkg/api/v1alpha1"
11+ "sigs.k8s.io/controller-runtime/pkg/client"
12+
1213 . "github.com/onsi/ginkgo"
1314 . "github.com/onsi/gomega"
1415 appsv1 "k8s.io/api/apps/v1"
@@ -371,8 +372,8 @@ DNS = %s, %s.svc.cluster.local
371372
372373[Peer]
373374PublicKey = %s
374- AllowedIPs = 0.0.0.0/0
375- Endpoint = %s:%s"` , peerKey .Name , peer .Spec .Address , dnsServiceIp , peer .Namespace , wgPublicKey , expectedAddress , expectedNodePort ),
375+ AllowedIPs = %s
376+ Endpoint = %s:%s"` , peerKey .Name , peer .Spec .AllowedIPs , peer . Spec . Address , dnsServiceIp , peer .Namespace , wgPublicKey , expectedAddress , expectedNodePort ),
376377 Status : "ready" ,
377378 Message : "Peer configured" ,
378379 }))
@@ -500,8 +501,8 @@ DNS = %s, %s.svc.cluster.local
500501
501502[Peer]
502503PublicKey = %s
503- AllowedIPs = 0.0.0.0/0
504- Endpoint = %s:%s"` , peerKey .Name , peer .Spec .Address , dnsServiceIp , peer .Namespace , wgPublicKey , expectedExternalHostName , wg .Status .Port ),
504+ AllowedIPs = %s
505+ Endpoint = %s:%s"` , peerKey .Name , peer .Spec .AllowedIPs , peer . Spec . Address , dnsServiceIp , peer .Namespace , wgPublicKey , expectedExternalHostName , wg .Status .Port ),
505506 Status : "ready" ,
506507 Message : "Peer configured" ,
507508 }))
@@ -515,7 +516,7 @@ Endpoint = %s:%s"`, peerKey.Name, peer.Spec.Address, dnsServiceIp, peer.Namespac
515516 for _ , useWgUserspace := range []bool {true , false } {
516517 testTextPrefix := "uses"
517518 if ! useWgUserspace {
518- testTextPrefix = "does not use"
519+ testTextPrefix = "does not use"
519520 }
520521
521522 It (fmt .Sprintf ("%s userspace implementation of wireguard if spec.useWgUserspaceImplementation is set to %t" , testTextPrefix , useWgUserspace ), func () {
0 commit comments