Skip to content

Commit d497366

Browse files
committed
remove useless func GetInitJobBuilder
1 parent 4d436c2 commit d497366

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

internal/resources/storage_init_job.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"sigs.k8s.io/controller-runtime/pkg/client"
1111

1212
api "github.com/ydb-platform/ydb-kubernetes-operator/api/v1alpha1"
13-
"github.com/ydb-platform/ydb-kubernetes-operator/internal/labels"
1413
"github.com/ydb-platform/ydb-kubernetes-operator/internal/ptr"
1514
)
1615

@@ -56,29 +55,6 @@ func (b *StorageInitJobBuilder) Placeholder(cr client.Object) client.Object {
5655
}
5756
}
5857

59-
func GetInitJobBuilder(storage *api.Storage) ResourceBuilder {
60-
jobName := fmt.Sprintf(InitJobNameFormat, storage.Name)
61-
jobLabels := labels.Common(storage.Name, make(map[string]string))
62-
jobAnnotations := make(map[string]string)
63-
64-
if storage.Spec.InitJob != nil {
65-
if storage.Spec.InitJob.AdditionalLabels != nil {
66-
jobLabels.Merge(storage.Spec.InitJob.AdditionalLabels)
67-
}
68-
if storage.Spec.InitJob.AdditionalAnnotations != nil {
69-
jobAnnotations = CopyDict(storage.Spec.InitJob.AdditionalAnnotations)
70-
}
71-
}
72-
73-
return &StorageInitJobBuilder{
74-
Storage: storage,
75-
76-
Name: jobName,
77-
Labels: jobLabels,
78-
Annotations: jobAnnotations,
79-
}
80-
}
81-
8258
func (b *StorageInitJobBuilder) buildInitJobPodTemplateSpec() corev1.PodTemplateSpec {
8359
dnsConfigSearches := []string{
8460
fmt.Sprintf(api.InterconnectServiceFQDNFormat, b.Storage.Name, b.GetNamespace()),

0 commit comments

Comments
 (0)