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

fix: yurt-iot-dock cannot be dynamically deployed in platformadmin #1679

Merged
Merged
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 @@ -777,12 +777,6 @@ func (r *ReconcilePlatformAdmin) initFramework(ctx context.Context, platformAdmi
r.calculateDesiredComponents(platformAdmin, platformAdminFramework, nil)
}

yurtIotDock, err := newYurtIoTDockComponent(platformAdmin, platformAdminFramework)
if err != nil {
return err
}
platformAdminFramework.Components = append(platformAdminFramework.Components, yurtIotDock)

// For better serialization, the serialization method of the Kubernetes runtime library is used
data, err := runtime.Encode(r.yamlSerializer, platformAdminFramework)
if err != nil {
Expand Down Expand Up @@ -862,6 +856,16 @@ func (r *ReconcilePlatformAdmin) calculateDesiredComponents(platformAdmin *iotv1
}
}

// The yurt-iot-dock is maintained by openyurt and is not obtained through an auto-collector.
// Therefore, it needs to be handled separately
if addedComponentSet.Has(util.IotDockName) {
yurtIotDock, err := newYurtIoTDockComponent(platformAdmin, platformAdminFramework)
if err != nil {
klog.Errorf(Format("newYurtIoTDockComponent error %v", err))
}
desiredComponents = append(desiredComponents, yurtIotDock)
}

// TODO: In order to be compatible with v1alpha1, we need to add the component from annotation translation here
if additionalComponents != nil {
desiredComponents = append(desiredComponents, additionalComponents...)
Expand Down