Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Remove gvk hack from deferred patch #124

Merged
merged 1 commit into from
Aug 13, 2019
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
6 changes: 0 additions & 6 deletions controllers/kubeadmconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,9 @@ func (r *KubeadmConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

func (r *KubeadmConfigReconciler) patchConfig(ctx context.Context, config *cabpkv1alpha2.KubeadmConfig, patchConfig client.Patch) error {
// TODO(ncdc): remove this once we've updated to a version of controller-runtime with
// https://github.com/kubernetes-sigs/controller-runtime/issues/526.
gvk := config.GroupVersionKind()
if err := r.Patch(ctx, config, patchConfig); err != nil {
return err
}
// TODO(ncdc): remove this once we've updated to a version of controller-runtime with
// https://github.com/kubernetes-sigs/controller-runtime/issues/526.
config.SetGroupVersionKind(gvk)
if err := r.Status().Patch(ctx, config, patchConfig); err != nil {
return err
}
Expand Down