Skip to content

Commit 2b0ea5e

Browse files
authored
Remove .cluster.local from host in default-user secret. (#778)
Cluster name is configurable and not fixed.
1 parent 825be3e commit 2b0ea5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/resource/default_user_secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (builder *DefaultUserSecretBuilder) Build() (client.Object, error) {
5555
return nil, err
5656
}
5757

58-
host := fmt.Sprintf("%s.%s.svc.cluster.local", builder.Instance.Name, builder.Instance.Namespace)
58+
host := fmt.Sprintf("%s.%s.svc", builder.Instance.Name, builder.Instance.Namespace)
5959

6060
// Default user secret implements the service binding Provisioned Service
6161
// See: https://k8s-service-bindings.github.io/spec/#provisioned-service

internal/resource/default_user_secret_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var _ = Describe("DefaultUserSecret", func() {
9191
By("Setting a host that corresponds to the service address", func() {
9292
host, ok = secret.Data["host"]
9393
Expect(ok).NotTo(BeFalse(), "Failed to find a key \"host\" in the generated Secret")
94-
expectedHost := "a name.a namespace.svc.cluster.local"
94+
expectedHost := "a name.a namespace.svc"
9595
Expect(host).To(BeEquivalentTo(expectedHost))
9696
})
9797

0 commit comments

Comments
 (0)