Skip to content

Commit

Permalink
Merge pull request #5395 from emissary-ingress/rlane/crd-update-status
Browse files Browse the repository at this point in the history
Include CRD status updates
  • Loading branch information
rick-a-lane-ii committed Oct 30, 2023
2 parents c316a95 + 28ff281 commit ac19ea6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/apiext/internal/inject.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ func updateCRD(
}
dlog.Infof(ctx, "Configuring conversion for %q", crd.ObjectMeta.Name)
crd.Spec.Conversion = conversionConfig
_, err := crdsClient.Update(ctx, &crd, k8sTypesMetaV1.UpdateOptions{})
if err != nil && !k8sErrors.IsConflict(err) {
if _, err := crdsClient.Update(ctx, &crd, k8sTypesMetaV1.UpdateOptions{}); err != nil && !k8sErrors.IsConflict(err) {
return err
}

if _, err := crdsClient.UpdateStatus(ctx, &crd, k8sTypesMetaV1.UpdateOptions{}); err != nil && !k8sErrors.IsConflict(err) {
return err
}

return nil
}

0 comments on commit ac19ea6

Please sign in to comment.