Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit a66ee3f

Browse files
authored
Linked services: add label to resulting ExternalName Service (#1529)
Signed-off-by: Grant Linville <[email protected]>
1 parent 6d30b92 commit a66ee3f

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

pkg/controller/appdefinition/testdata/depends-ready/expected.yaml.d/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
external: foo
1313
appName: app-name
1414
appNamespace: app-namespace
15+
labels:
16+
acorn.io/link-name: foo

pkg/controller/appdefinition/testdata/depends/expected.yaml.d/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
appName: app-name
1313
appNamespace: app-namespace
1414
external: foo
15+
labels:
16+
acorn.io/link-name: foo

pkg/controller/appdefinition/testdata/link/expected.yaml.d/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
appName: app-name
1313
appNamespace: app-namespace
1414
external: con-link
15+
labels:
16+
acorn.io/link-name: con-link

pkg/services/acorn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ func forLinkedServices(app *v1.AppInstance) (result []kclient.Object) {
187187
PublishMode: publishMode(app),
188188
Publish: ports2.PortPublishForService(link.Target, app.Spec.Publish),
189189
External: link.Service,
190+
Labels: map[string]string{
191+
labels.AcornLinkName: link.Service,
192+
},
190193
},
191194
}
192195
result = append(result, newService)

0 commit comments

Comments
 (0)