fixup: Remove unused code created when copying the configuration code for services
@@ -3,7 +3,6 @@ package application
import (
"context"
"fmt"
- "sort"
"strings"
"github.com/epinio/epinio/helpers/kubernetes"
@@ -137,41 +136,6 @@ func DecodeServiceKey(key string) (string, string) {
return parts[0], parts[1]
}
-// BoundServiceNameSet returns the service names for the services bound to the application by a
-// user, as a map/set
-func BoundServiceNameSet(ctx context.Context, cluster *kubernetes.Cluster, appRef models.AppRef) (NameSet, error) {
- svcSecret, err := svcLoad(ctx, cluster, appRef)
- if err != nil {
- return nil, err
- }
-
- result := NameSet{}
- for name := range svcSecret.Data {
- result[name] = struct{}{}
- }
-
- return result, nil
-}
-
-// BoundServiceNames returns the service names for the services bound to the application by a user,
-// as a slice. Ordered by name.
-func BoundServiceNames(ctx context.Context, cluster *kubernetes.Cluster, appRef models.AppRef) ([]string, error) {
- svcSecret, err := svcLoad(ctx, cluster, appRef)
- if err != nil {
- return nil, err
- }
-
- result := []string{}
- for name := range svcSecret.Data {
- result = append(result, name)
- }
-
- // Normalize to lexicographic order.
- sort.Strings(result)
-
- return result, nil
-}
-
// BoundServicesSet replaces or adds the specified service names to the named application. When the
// function returns the service set will be extended. Adding a known service is a no-op.
func BoundServicesSet(ctx context.Context, cluster *kubernetes.Cluster, appRef models.AppRef, serviceNames []string, replace bool) error {
