Skip to content

Commit

Permalink
chore: highlight function purpose
Browse files Browse the repository at this point in the history
Signed-off-by: Armando Ruocco <[email protected]>
  • Loading branch information
armru committed Dec 17, 2024
1 parent 78ea5e7 commit ee525c5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/conditions/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import (
// OptimisticLockPatch will update a particular condition in cluster status.
// This function may update the conditions in the passed cluster
// with the latest ones that were found from the API server.
// This function is needed because Kubernetes still doesn't support strategic merge
// for CRDs (see https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
func OptimisticLockPatch(
ctx context.Context,
c client.Client,
Expand Down Expand Up @@ -60,12 +62,6 @@ func OptimisticLockPatch(
return nil
}

// Send the new conditions to the API server preventing
// this update to remove the conditions added by other
// clients.
//
// Kubernetes still doesn't support strategic merge
// for CRDs (see https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
if err := c.Status().Patch(
ctx,
updatedCluster,
Expand Down

0 comments on commit ee525c5

Please sign in to comment.