Skip to content

Commit

Permalink
Remove -svc suffix in Service name for more consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit authored Sep 6, 2024
1 parent 4d196ce commit f3e75eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/convert/workloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func ConvertWorkload(state *project.State, workloadName string) ([]machineryMeta
case WorkloadKindStatefulSet:

// need to allocate a headless service here
headlessServiceName := fmt.Sprintf("%s-headless-svc", workloadName)
headlessServiceName := fmt.Sprintf("%s-headless", workloadName)
manifests = append(manifests, &coreV1.Service{
TypeMeta: machineryMeta.TypeMeta{Kind: "Service", APIVersion: "v1"},
ObjectMeta: machineryMeta.ObjectMeta{
Expand Down Expand Up @@ -280,7 +280,7 @@ func ConvertWorkload(state *project.State, workloadName string) ([]machineryMeta
}

func WorkloadServiceName(workloadName string) string {
return fmt.Sprintf("%s-svc", workloadName)
return fmt.Sprintf("%s", workloadName)
}

func buildProbe(input scoretypes.HttpProbe) coreV1.ProbeHandler {
Expand Down
2 changes: 1 addition & 1 deletion internal/convert/workloads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
app.kubernetes.io/instance: example-abcdef
app.kubernetes.io/managed-by: score-k8s
app.kubernetes.io/name: example
name: example-svc
name: example
spec:
ports:
- name: web
Expand Down

0 comments on commit f3e75eb

Please sign in to comment.