Skip to content

Commit

Permalink
Migrate managed fields to flux-operator owner
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Jun 20, 2024
1 parent a7d71e0 commit 246e88c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/entitlement_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func (r *EntitlementReconciler) InitEntitlementSecret(ctx context.Context) (*cor
}
}

exitingVendor, found := secret.Data[entitlement.VendorKey]
if !found || string(exitingVendor) != r.EntitlementClient.GetVendor() {
definedVendor, found := secret.Data[entitlement.VendorKey]
if !found || string(definedVendor) != r.EntitlementClient.GetVendor() {
secret.Data = make(map[string][]byte)
secret.Data[entitlement.VendorKey] = []byte(r.EntitlementClient.GetVendor())
if err := r.Client.Update(ctx, secret); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions internal/controller/fluxinstance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ func (r *FluxInstanceReconciler) apply(ctx context.Context,
Name: "kubectl",
OperationType: metav1.ManagedFieldsOperationUpdate,
},
{
Name: "flux-controller",
OperationType: metav1.ManagedFieldsOperationApply,
},
},
}

Expand Down

0 comments on commit 246e88c

Please sign in to comment.