Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 remove duplicate controller and installstrategy #252

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: hello-template
annotations:
addon.open-cluster-management.io/lifecycle: "addon-manager"
spec:
addOnMeta:
description: hello-template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: helloworld
annotations:
"addon.open-cluster-management.io/lifecycle": "addon-manager"
spec:
addOnMeta:
displayName: helloworld
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: kubernetes-dashboard
annotations:
addon.open-cluster-management.io/lifecycle: "addon-manager"
spec:
addOnMeta:
description: kubernetes-dashboard
Expand Down
14 changes: 0 additions & 14 deletions pkg/addonfactory/addonfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func NewAgentAddonFactory(addonName string, fs embed.FS, dir string) *AgentAddon
agentAddonOptions: agent.AgentAddonOptions{
AddonName: addonName,
Registration: nil,
InstallStrategy: nil,
HealthProber: nil,
SupportedConfigGVRs: []schema.GroupVersionResource{},
},
Expand All @@ -83,19 +82,6 @@ func (f *AgentAddonFactory) WithGetValuesFuncs(getValuesFuncs ...GetValuesFunc)
return f
}

// WithInstallStrategy defines the installation strategy of the manifests prescribed by Manifests(..).
// Deprecated: add annotation "addon.open-cluster-management.io/lifecycle: addon-manager" to ClusterManagementAddon
// and define install strategy in ClusterManagementAddon spec.installStrategy instead.
// The migration plan refer to https://github.com/open-cluster-management-io/ocm/issues/355.
func (f *AgentAddonFactory) WithInstallStrategy(strategy *agent.InstallStrategy) *AgentAddonFactory {
if strategy.InstallNamespace == "" {
strategy.InstallNamespace = AddonDefaultInstallNamespace
}
f.agentAddonOptions.InstallStrategy = strategy

return f
}

// WithAgentRegistrationOption defines how agent is registered to the hub cluster.
func (f *AgentAddonFactory) WithAgentRegistrationOption(option *agent.RegistrationOption) *AgentAddonFactory {
f.agentAddonOptions.Registration = option
Expand Down
138 changes: 0 additions & 138 deletions pkg/addonmanager/controllers/addoninstall/controller.go

This file was deleted.

Loading
Loading