Skip to content

Commit 460f780

Browse files
committed
lint
On-behalf-of: @SAP christoph.mewes@sap.com
1 parent 623ae87 commit 460f780

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/resources/resources.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ const (
5252
// the certificate also has system:masters as an organization, which is what ultimately
5353
// grants the operator its permissions.
5454
OperatorUsername = "system:kcp-operator"
55+
56+
defaultClusterDomain = "cluster.local"
5557
)
5658

5759
func GetImageSettings(imageSpec *operatorv1alpha1.ImageSpec) (string, []corev1.LocalObjectReference) {
@@ -129,7 +131,7 @@ func GetCacheServerResourceLabels(s *operatorv1alpha1.CacheServer) map[string]st
129131
func GetRootShardBaseHost(r *operatorv1alpha1.RootShard) string {
130132
clusterDomain := r.Spec.ClusterDomain
131133
if clusterDomain == "" {
132-
clusterDomain = "cluster.local"
134+
clusterDomain = defaultClusterDomain
133135
}
134136

135137
return fmt.Sprintf("%s-kcp.%s.svc.%s", r.Name, r.Namespace, clusterDomain)
@@ -145,7 +147,7 @@ func GetRootShardBaseURL(r *operatorv1alpha1.RootShard) string {
145147
func GetShardBaseHost(s *operatorv1alpha1.Shard) string {
146148
clusterDomain := s.Spec.ClusterDomain
147149
if clusterDomain == "" {
148-
clusterDomain = "cluster.local"
150+
clusterDomain = defaultClusterDomain
149151
}
150152

151153
return fmt.Sprintf("%s-shard-kcp.%s.svc.%s", s.Name, s.Namespace, clusterDomain)
@@ -161,7 +163,7 @@ func GetShardBaseURL(s *operatorv1alpha1.Shard) string {
161163
func GetCacheServerBaseHost(s *operatorv1alpha1.CacheServer) string {
162164
clusterDomain := s.Spec.ClusterDomain
163165
if clusterDomain == "" {
164-
clusterDomain = "cluster.local"
166+
clusterDomain = defaultClusterDomain
165167
}
166168

167169
return fmt.Sprintf("%s-cache-server.%s.svc.%s", s.Name, s.Namespace, clusterDomain)

0 commit comments

Comments
 (0)