Skip to content

Commit 0da2baf

Browse files
committed
fix label
1 parent 294398d commit 0da2baf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

internal/controller/gateway_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/api7/gopkg/pkg/log"
1111
"github.com/go-logr/logr"
1212
corev1 "k8s.io/api/core/v1"
13+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1314
"k8s.io/apimachinery/pkg/runtime"
1415
"k8s.io/apimachinery/pkg/types"
1516
ctrl "sigs.k8s.io/controller-runtime"
@@ -56,6 +57,11 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
5657
gateway.Namespace = req.Namespace
5758
gateway.Name = req.Name
5859

60+
gateway.TypeMeta = metav1.TypeMeta{
61+
Kind: KindGateway,
62+
APIVersion: gatewayv1.GroupVersion.String(),
63+
}
64+
5965
if err := r.Provider.Delete(ctx, gateway); err != nil {
6066
return ctrl.Result{}, err
6167
}

internal/provider/controlplane/controlplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func NewDashboard() (provider.Provider, error) {
2929
if err := control.AddCluster(context.TODO(), &dashboard.ClusterOptions{
3030
Name: "default",
3131
Labels: map[string]string{
32-
"controller_name": config.ControllerConfig.ControllerName,
32+
"k8s/controller-name": config.ControllerConfig.ControllerName,
3333
},
3434
ControllerName: config.ControllerConfig.ControllerName,
3535
BaseURL: gc.ControlPlane.Endpoints[0],

0 commit comments

Comments
 (0)