Skip to content

Commit

Permalink
problems with MOMification
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Oct 23, 2024
1 parent e401c0f commit d744251
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/operator/workload/sync_openshift_oauth_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ func (c *OAuthAPIServerWorkload) syncDeployment(ctx context.Context, operatorSpe
}
required.Spec.Replicas = masterNodeCount

// TODO MOM this call here is the one that fails. Using the return value of ApplyDeployment to make decisions doesn't work in a MOM world.
// TODO MOM workload.NewController needs to (somehow) use the data read *after* this write, without using data *in* this write.
// TODO MOM this may be possible by storing a hash of the desired content. If the hash of the desired content matches
// TODO MOM then there is no new deployment required. This would not prevent rapid writes to fields we aren't controlling.
// TODO MOM perhaps we actually need to find a way to request MOM inject a generation after a write? It is an operator standard.
deployment, _, err := resourceapply.ApplyDeployment(ctx, c.kubeClient.AppsV1(), eventRecorder, required, resourcemerge.ExpectedDeploymentGeneration(required, operatorStatus.Generations))
return deployment, err
}
Expand Down

0 comments on commit d744251

Please sign in to comment.