diff --git a/api/v1alpha1/rrset_types.go b/api/v1alpha1/rrset_types.go index b2348ef..954e5cc 100644 --- a/api/v1alpha1/rrset_types.go +++ b/api/v1alpha1/rrset_types.go @@ -42,7 +42,7 @@ type RRsetStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Zone",type="string",JSONPath=".spec.zoneIdRef.name" +// +kubebuilder:printcolumn:name="Zone",type="string",JSONPath=".spec.zoneRef.name" // +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type" // +kubebuilder:printcolumn:name="TTL",type="integer",JSONPath=".spec.ttl" // +kubebuilder:printcolumn:name="Records",type="string",JSONPath=".spec.records" diff --git a/config/crd/bases/dns.cav.enablers.ob_rrsets.yaml b/config/crd/bases/dns.cav.enablers.ob_rrsets.yaml index 49fa9f5..9b9ae2d 100644 --- a/config/crd/bases/dns.cav.enablers.ob_rrsets.yaml +++ b/config/crd/bases/dns.cav.enablers.ob_rrsets.yaml @@ -15,7 +15,7 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .spec.zoneIdRef.name + - jsonPath: .spec.zoneRef.name name: Zone type: string - jsonPath: .spec.type diff --git a/internal/controller/rrset_controller_test.go b/internal/controller/rrset_controller_test.go index 061c413..31015bb 100644 --- a/internal/controller/rrset_controller_test.go +++ b/internal/controller/rrset_controller_test.go @@ -41,7 +41,7 @@ var _ = Describe("RRset Controller", func() { resourceTTL = uint32(300) resourceType = "A" resourceComment = "Just a comment" - zoneIdRef = zoneName + zoneRef = zoneName testRecord1 = "127.0.0.1" testRecord2 = "127.0.0.2" @@ -108,7 +108,7 @@ var _ = Describe("RRset Controller", func() { _, err = controllerutil.CreateOrUpdate(ctx, k8sClient, resource, func() error { resource.Spec = dnsv1alpha1.RRsetSpec{ ZoneRef: dnsv1alpha1.ZoneRef{ - Name: zoneIdRef, + Name: zoneRef, }, Type: resourceType, TTL: resourceTTL, @@ -178,7 +178,7 @@ var _ = Describe("RRset Controller", func() { Expect(getMockedTTL(resourceName, resourceType)).To(Equal(resourceTTL)) Expect(getMockedComment(resourceName, resourceType)).To(Equal(resourceComment)) Expect(createdResource.GetOwnerReferences()).NotTo(BeEmpty(), "RRset should have setOwnerReference") - Expect(createdResource.GetOwnerReferences()[0].Name).To(Equal(zoneIdRef), "RRset should have setOwnerReference to Zone") + Expect(createdResource.GetOwnerReferences()[0].Name).To(Equal(zoneRef), "RRset should have setOwnerReference to Zone") Expect(createdResource.GetFinalizers()).To(ContainElement(FINALIZER_NAME), "RRset should contain the finalizer") }) })