Skip to content

Commit

Permalink
remove leftover maintenancemode addon config
Browse files Browse the repository at this point in the history
Signed-off-by: Umanga Chapagain <[email protected]>
  • Loading branch information
umangachapagain committed Jul 1, 2024
1 parent b669e51 commit 1dc3319
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 1dc3319

Please sign in to comment.