Skip to content

Commit

Permalink
clustermesh: fix CEP status patch
Browse files Browse the repository at this point in the history
In 0681343 (from PR cilium#15632), we changed
CEP CRD schema and removed the `status` subresource.

This broke clustermesh logic as it was still trying to update CEP using
the now removed `status` subresource. In particular, this resulted in
a loss of connectivity in clustermeshes with external workloads: the VM
could initially join the cluster but would immediately lose connectivity
after failing to update the CEP resource (see cilium#16984 for full context).

We change the clustermesh logic to adhere to the new CEP update CRD
schema.

Fixes: 0681343

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
  • Loading branch information
nbusseneau authored and Gobinath Krishnamoorthy committed Oct 20, 2021
1 parent 25da2d2 commit e890d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clustermesh-apiserver/vmmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func (m *VMManager) UpdateCiliumEndpointResource(name string, id *identity.Ident
log.WithError(err).Fatalf("json.Marshal(%v) failed", replaceCEPStatus)
}
localCEP, err = m.ciliumClient.CiliumV2().CiliumEndpoints(namespace).Patch(context.TODO(), name,
types.JSONPatchType, createStatusPatch, metav1.PatchOptions{}, "status")
types.JSONPatchType, createStatusPatch, metav1.PatchOptions{})
if err != nil {
if errors.IsConflict(err) {
log.WithError(err).Warn("Unable to update CiliumEndpoint resource, will retry")
Expand Down

0 comments on commit e890d8f

Please sign in to comment.