Skip to content

Commit

Permalink
[BugFix] Remove annotations from search service (#370)
Browse files Browse the repository at this point in the history
Signed-off-by: yandongxiao <yandongxiao@starrocks.com>
  • Loading branch information
yandongxiao authored Dec 19, 2023
1 parent 972668c commit b902bc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/k8sutils/templates/service/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
package service

import (
"github.com/StarRocks/starrocks-kubernetes-operator/pkg/apis/starrocks/v1"
corev1 "k8s.io/api/core/v1"

"github.com/StarRocks/starrocks-kubernetes-operator/pkg/apis/starrocks/v1"
)

func MakeSearchService(serviceName string, externalService *corev1.Service, ports []corev1.ServicePort) *corev1.Service {
searchSvc := &corev1.Service{}
externalService.ObjectMeta.DeepCopyInto(&searchSvc.ObjectMeta)
// some service annotations can only be used when `type` is 'LoadBalancer', e.g. service.beta.kubernetes.io/load-balancer-source-ranges
// we do not need to annotations for search service
searchSvc.Annotations = nil
searchSvc.Name = serviceName
searchSvc.Spec = corev1.ServiceSpec{
ClusterIP: "None",
Expand Down

0 comments on commit b902bc2

Please sign in to comment.