Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zhang committed Oct 9, 2023
1 parent c95eb4e commit da1001c
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apis/cluster/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/placement/v1beta1/commons.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ const (

// PreviousBindingStateAnnotation is the annotation that records the previous state of a binding.
// This is used to remember if an "unscheduled" binding was moved from a "bound" state or a "scheduled" state.
PreviousBindingStateAnnotation = fleetPrefix + "PreviousBindingState"
PreviousBindingStateAnnotation = fleetPrefix + "previous-binding-state"
)
2 changes: 1 addition & 1 deletion apis/placement/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/controllers/workgenerator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (r *Reconciler) syncAllWork(ctx context.Context, resourceBinding *fleetv1be
// generate a work object for the manifests if there are still any non enveloped resources
newWork = append(newWork, generateSnapshotWorkObj(workNamePrefix, resourceBinding, snapshot, simpleManifests))
} else {
klog.V(2).InfoS("Skip generating work for the snapshot since there is no none-enveloped resource in the snapshot", "snapshot", klog.KObj(snapshot))
klog.V(2).InfoS("the snapshot contains enveloped resource only", "snapshot", klog.KObj(snapshot))
}
// issue all the create/update requests for the corresponding works for each snapshot in parallel
for i := range newWork {
Expand Down Expand Up @@ -393,7 +393,8 @@ func (r *Reconciler) getConfigMapEnvelopWorkObj(ctx context.Context, workNamePre
"resourceBinding", klog.KObj(resourceBinding), "configMapWrapper", klog.KObj(envelopeObj))
return nil, controller.NewUserError(err)
}
klog.V(2).InfoS("Successfully extract the enveloped resources from the configMap", "numOfResources", len(manifest), "configMapWrapper", klog.KObj(envelopeObj))
klog.V(2).InfoS("Successfully extract the enveloped resources from the configMap", "numOfResources", len(manifest),
"snapshot", klog.KObj(resourceSnapshot), "resourceBinding", klog.KObj(resourceBinding), "configMapWrapper", klog.KObj(envelopeObj))
// Try to see if we already have a work represent the same enveloped object for this CRP in the same cluster
envelopWorkLabelMatcher := client.MatchingLabels{
fleetv1beta1.ParentBindingLabel: resourceBinding.Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ data:
- UPDATE
resources:
- pods
sideEffects: None
sideEffects: None
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ data:
- UPDATE
resources:
- pods
sideEffects: None
sideEffects: None
2 changes: 1 addition & 1 deletion pkg/controllers/workgenerator/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func readTestManifests() {
Expect(err).Should(Succeed())

By("Read ResourceQuota")
rawByte, err = os.ReadFile("manifests/resourceQuota.yaml")
rawByte, err = os.ReadFile("manifests/resourcequota.yaml")
Expect(err).Should(Succeed())
testEnvelopeResourceQuota, err = yaml.ToJSON(rawByte)
Expect(err).Should(Succeed())
Expand Down

0 comments on commit da1001c

Please sign in to comment.