Skip to content

Commit

Permalink
Update string function of cluster to return name directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ranatrk committed Dec 21, 2023
1 parent 8aa9a9d commit 403d665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions api/v1alpha1/automatedclusterdiscovery_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ limitations under the License.
package v1alpha1

import (
"fmt"

"github.com/fluxcd/pkg/apis/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand All @@ -45,7 +43,7 @@ type Cluster struct {

// String returns the string representation of the Cluster
func (c Cluster) String() string {
return fmt.Sprintf("%v", c.Name)
return c.Name
}

// AutomatedClusterDiscoverySpec defines the desired state of AutomatedClusterDiscovery
Expand Down
2 changes: 1 addition & 1 deletion config/samples/capi_discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
interval: 10m
capi:
currentClusterRef:
name: testcapicluster
name: management-cluster

0 comments on commit 403d665

Please sign in to comment.