@@ -22,17 +22,17 @@ import (
2222 "k8s.io/klog/v2"
2323)
2424
25- // RevisionController is a controller that watches a set of configmaps and secrets and them against a revision snapshot
26- // of them. If the original resources changes, the revision counter is increased, stored in LatestAvailableRevision
27- // field of the operator config and new snapshots suffixed by the revision are created .
25+ // RevisionController monitors configmaps and secrets, comparing them against their revision snapshots.
26+ // When these resources change, it increments the revision counter, updates the LatestAvailableRevision
27+ // field in the operator config, and creates new revision- suffixed snapshots .
2828type RevisionController struct {
2929 controllerInstanceName string
3030
3131 targetNamespace string
32- // configMaps is the list of configmaps that are directly copied.A different actor/controller modifies these.
32+ // configMaps is the list of configmaps that are directly copied. A different actor/controller modifies these.
3333 // the first element should be the configmap that contains the static pod manifest
3434 configMaps []RevisionResource
35- // secrets is a list of secrets that are directly copied for the current values. A different actor/controller modifies these.
35+ // secrets is a list of secrets that are directly copied for the current values. A different actor/controller modifies these.
3636 secrets []RevisionResource
3737
3838 operatorClient v1helpers.OperatorClient
@@ -97,7 +97,7 @@ func NewRevisionController(
9797}
9898
9999// createRevisionIfNeeded takes care of creating content for the static pods to use.
100- // returns whether or not requeue and if an error happened when updating status. Normally it updates status itself.
100+ // returns whether or not requeue and if an error happened when updating status. Normally it updates status itself.
101101func (c RevisionController ) createRevisionIfNeeded (ctx context.Context , recorder events.Recorder , currentLastAvailableRevision int32 ) error {
102102 isLatestRevisionCurrent , requiredIsNotFound , reason := c .isLatestRevisionCurrent (ctx , currentLastAvailableRevision )
103103
@@ -367,9 +367,9 @@ func (c RevisionController) sync(ctx context.Context, syncCtx factory.SyncContex
367367 }
368368
369369 // If the operator status's latest available revision is not the same as the observed latest revision, update the operator.
370- // This needs to be done even if the revision precondition is not required because it ensures our operator status is
370+ // This needs to be done even if the revision precondition is not met because it ensures our operator status is
371371 // correct for all consumers.
372- // This is what is going to allow us to move where the state is stored in authentications.openshift.io .
372+ // This ensures the operator status accurately reflects the latest revision .
373373 latestObservedRevision , err := c .getLatestAvailableRevision (ctx )
374374 if err != nil {
375375 return err
0 commit comments