Skip to content

Commit

Permalink
Merge pull request #216 from umangachapagain/cleanup-maintenancemode
Browse files Browse the repository at this point in the history
remove leftover maintenancemode addon config
  • Loading branch information
openshift-merge-bot[bot] authored Jul 2, 2024
2 parents fbb58eb + 1dc3319 commit 652c5ef
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions addons/setup/addon_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ type TokenExchangeAddon struct {
Addons
}

type MaintainenceAddon struct {
Addons
}

// Manifests generates manifestworks to deploy the token exchange addon agent on the managed cluster
func (a *Addons) Manifests(cluster *clusterv1.ManagedCluster, addon *addonapiv1alpha1.ManagedClusterAddOn) ([]runtime.Object, error) {
objects := []runtime.Object{}
Expand Down
1 change: 0 additions & 1 deletion addons/setup/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
)

const (
MaintainAgentName = "maintenance"
TokenExchangeName = "tokenexchange"
)

Expand Down
19 changes: 0 additions & 19 deletions controllers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ func (o *ManagerOptions) runManager() {
logger.Info("Failed to get owner reference (falling back to namespace)", "error", err)
}
teEventRecorder := events.NewKubeRecorder(kubeClient.CoreV1().Events(namespace), setup.TokenExchangeName, controllerRef)
mEventRecorder := events.NewKubeRecorder(kubeClient.CoreV1().Events(namespace), setup.MaintainAgentName, controllerRef)

agentImage := os.Getenv("TOKEN_EXCHANGE_IMAGE")

Expand All @@ -189,19 +188,6 @@ func (o *ManagerOptions) runManager() {
AddonName: setup.TokenExchangeName},
}

maintainenceModeAddon := setup.MaintainenceAddon{
Addons: struct {
KubeClient kubernetes.Interface
Recorder events.Recorder
AgentImage string
AddonName string
}{
KubeClient: kubeClient,
Recorder: mEventRecorder,
AgentImage: agentImage,
AddonName: setup.MaintainAgentName},
}

err = (&multiclusterv1alpha1.MirrorPeer{}).SetupWebhookWithManager(mgr)

if err != nil {
Expand All @@ -219,11 +205,6 @@ func (o *ManagerOptions) runManager() {
logger.Error("Failed to add token exchange addon to addon manager", "error", err)
}

err = addonMgr.AddAgent(&maintainenceModeAddon)
if err != nil {
logger.Error("Failed to add maintainence addon to addon manager", "error", err)
}

if err = (&DRPolicyReconciler{
HubClient: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Expand Down

0 comments on commit 652c5ef

Please sign in to comment.