Skip to content

Commit 22cfea2

Browse files
🌱 Expose WithUpdaters func in addonfactory (#313)
Updaters can be used to instruct the addon-framework how to update certain resources Signed-off-by: Joao Marcal <[email protected]>
1 parent fb6b4eb commit 22cfea2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎pkg/addonfactory/addonfactory.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ func (f *AgentAddonFactory) WithManagedClusterClient(c clusterclientset.Interfac
148148
return f
149149
}
150150

151+
// WithUpdaters defines which type of update opration should by used for specific resources.
152+
func (f *AgentAddonFactory) WithUpdaters(updater []agent.Updater) *AgentAddonFactory {
153+
f.agentAddonOptions.Updaters = updater
154+
return f
155+
}
156+
151157
// WithAgentDeployTriggerClusterFilter defines the filter func to trigger the agent deploy/redploy when cluster info is
152158
// changed. Addons that need information from the ManagedCluster resource when deploying the agent should use this
153159
// function to set what information they need, otherwise the expected/up-to-date agent may be deployed delayed since the

0 commit comments

Comments
 (0)