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

[chore] unexport type #3636

Merged
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
11 changes: 6 additions & 5 deletions internal/openshift/dashboards/dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/controller-runtime/pkg/manager"
)

// The dashboard is created manually following the syntax from Grafana 5. For development purposes, this dashboard can be created just by loading the JSON file
Expand All @@ -35,17 +36,17 @@ const (
configMapName = "opentelemetry-collector"
)

type DashboardManagement struct {
type dashboardManagement struct {
clientset kubernetes.Interface
}

func NewDashboardManagement(clientset kubernetes.Interface) DashboardManagement {
return DashboardManagement{
func NewDashboardManagement(clientset kubernetes.Interface) manager.Runnable {
return dashboardManagement{
clientset: clientset,
}
}

func (d DashboardManagement) Start(ctx context.Context) error {
func (d dashboardManagement) Start(ctx context.Context) error {
cm := corev1.ConfigMap{
ObjectMeta: v1.ObjectMeta{
Name: configMapName,
Expand All @@ -69,6 +70,6 @@ func (d DashboardManagement) Start(ctx context.Context) error {
return d.clientset.CoreV1().ConfigMaps(openshiftDashboardsNamespace).Delete(ctx, configMapName, metav1.DeleteOptions{})
}

func (d DashboardManagement) NeedLeaderElection() bool {
func (d dashboardManagement) NeedLeaderElection() bool {
return true
}
Loading