From b511933d9d2b95256a6473e7d7d11c45607ed2b8 Mon Sep 17 00:00:00 2001 From: Ashley Gau Date: Tue, 19 Jun 2018 17:03:09 -0700 Subject: [PATCH] add todos --- pkg/annotations/service.go | 6 +++++- pkg/neg/controller_test.go | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/annotations/service.go b/pkg/annotations/service.go index cdfaebada4..1977207391 100644 --- a/pkg/annotations/service.go +++ b/pkg/annotations/service.go @@ -75,7 +75,11 @@ type ExposeNegAnnotation map[int32]NegAttributes // NegAttributes houses the attributes of the NEGs that are associated with the // service. Future extensions to the Expose NEGs annotation should be added here. -type NegAttributes struct{} +type NegAttributes struct { + // Note - in the future, this will be used for custom naming of NEGs. + // Currently has no effect. + Name string `json:"name,omitempty"` +} // AppProtocol describes the service protocol. type AppProtocol string diff --git a/pkg/neg/controller_test.go b/pkg/neg/controller_test.go index f83e78e1ff..5d3fe990da 100644 --- a/pkg/neg/controller_test.go +++ b/pkg/neg/controller_test.go @@ -303,7 +303,8 @@ func TestGatherPortMappingUsedByIngress(t *testing.T) { func TestSyncNegAnnotation(t *testing.T) { t.Parallel() - + // TODO: test that c.serviceLister.Update is called whenever the annotation + // is changed. When there is no change, Update should not be called. controller := newTestController(fake.NewSimpleClientset()) defer controller.stop() controller.serviceLister.Add(newTestService(false, []int32{}))