Skip to content

Commit

Permalink
Remove upgrades from kubeactions and the admin API (Azure#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl authored Aug 30, 2023
1 parent a47f06b commit 286e65a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 338 deletions.
51 changes: 0 additions & 51 deletions pkg/frontend/admin_openshiftcluster_upgrade.go

This file was deleted.

17 changes: 4 additions & 13 deletions pkg/frontend/adminactions/kubeactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"net/http"

"github.com/Azure/go-autorest/autorest/to"
configclient "github.com/openshift/client-go/config/clientset/versioned"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -37,7 +36,6 @@ type KubeActions interface {
DrainNode(ctx context.Context, nodeName string) error
ApproveCsr(ctx context.Context, csrName string) error
ApproveAllCsrs(ctx context.Context) error
Upgrade(ctx context.Context, upgradeY bool) error
KubeGetPodLogs(ctx context.Context, namespace, name, containerName string) ([]byte, error)
// kubeWatch returns a watch object for the provided label selector key
KubeWatch(ctx context.Context, o *unstructured.Unstructured, label string) (watch.Interface, error)
Expand All @@ -49,9 +47,8 @@ type kubeActions struct {

mapper meta.RESTMapper

dyn dynamic.Interface
configcli configclient.Interface
kubecli kubernetes.Interface
dyn dynamic.Interface
kubecli kubernetes.Interface
}

// NewKubeActions returns a kubeActions
Expand All @@ -71,11 +68,6 @@ func NewKubeActions(log *logrus.Entry, env env.Interface, oc *api.OpenShiftClust
return nil, err
}

configcli, err := configclient.NewForConfig(restConfig)
if err != nil {
return nil, err
}

kubecli, err := kubernetes.NewForConfig(restConfig)
if err != nil {
return nil, err
Expand All @@ -87,9 +79,8 @@ func NewKubeActions(log *logrus.Entry, env env.Interface, oc *api.OpenShiftClust

mapper: mapper,

dyn: dyn,
configcli: configcli,
kubecli: kubecli,
dyn: dyn,
kubecli: kubecli,
}, nil
}

Expand Down
59 changes: 0 additions & 59 deletions pkg/frontend/adminactions/upgrade.go

This file was deleted.

199 changes: 0 additions & 199 deletions pkg/frontend/adminactions/upgrade_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ func (f *frontend) chiAuthenticatedRoutes(router chi.Router) {

r.With(f.maintenanceMiddleware.UnplannedMaintenanceSignal).Post("/startvm", f.postAdminOpenShiftClusterStartVM)

r.With(f.maintenanceMiddleware.UnplannedMaintenanceSignal).Post("/upgrade", f.postAdminOpenShiftUpgrade)

r.Get("/skus", f.getAdminOpenShiftClusterVMResizeOptions)

// We don't emit unplanned maintenance signal for resize since it is only used for planned maintenance
Expand Down
14 changes: 0 additions & 14 deletions pkg/util/mocks/adminactions/adminactions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 286e65a

Please sign in to comment.