Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Remove annotations from search service #370

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading