Signed-off-by: Zhiwei Yin <zyin@redhat.com>
This commit is contained in:
Zhiwei Yin
2021-02-20 10:10:26 +08:00
parent f84f0f9bb5
commit 442fc666f2
4 changed files with 7 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/open-cluster-management/work/pkg/version"
)
// NewWorkloadAgent generatee a command to start workload agent
// NewWorkloadAgent generates a command to start workload agent
func NewWorkloadAgent() *cobra.Command {
o := spoke.NewWorkloadAgentOptions()
cmd := controllercmd.

View File

@@ -5,7 +5,7 @@ const (
// related appliedmanifestwork of a manifestwork are deleted before the manifestwork itself is deleted
ManifestWorkFinalizer = "cluster.open-cluster-management.io/manifest-work-cleanup"
// AppliedManifestWorkFinalizer is the name of the finalizer added to appliedmanifestwork. It is to
// ensure all resource relateds to appliedmanifestwork is deleted before appliedmanifestwork itself
// ensure all resource relates to appliedmanifestwork is deleted before appliedmanifestwork itself
// is deleted.
AppliedManifestWorkFinalizer = "cluster.open-cluster-management.io/applied-manifest-work-cleanup"
)

View File

@@ -295,7 +295,7 @@ func (m *ManifestWorkController) generateUpdateStatusFunc(newManifestConditions
}
}
// isDecodeError is to check if the error returned from resourceapply is due to that the object cannnot
// isDecodeError is to check if the error returned from resourceapply is due to that the object cannot
// be decoded or no typed client can handle the object.
func isDecodeError(err error) bool {
return err != nil && strings.HasPrefix(err.Error(), "cannot decode")
@@ -308,12 +308,12 @@ func isUnhandledError(err error) bool {
}
// isSameUnstructured compares the two unstructured object.
// The comparison ignores the metadata and status field, and check if the two objects are sementically equal.
// The comparison ignores the metadata and status field, and check if the two objects are semantically equal.
func isSameUnstructured(obj1, obj2 *unstructured.Unstructured) bool {
obj1Copy := obj1.DeepCopy()
obj2Copy := obj2.DeepCopy()
// Comapre gvk, name, namespace at first
// Compare gvk, name, namespace at first
if obj1Copy.GroupVersionKind() != obj2Copy.GroupVersionKind() {
return false
}
@@ -332,7 +332,7 @@ func isSameUnstructured(obj1, obj2 *unstructured.Unstructured) bool {
return false
}
// Compare sementically after removing metadata and status field
// Compare semantically after removing metadata and status field
delete(obj1Copy.Object, "metadata")
delete(obj2Copy.Object, "metadata")
delete(obj1Copy.Object, "status")

View File

@@ -24,7 +24,7 @@ import (
"k8s.io/klog/v2"
)
// ControllerSyncInterval is exposed so that integration tests can crank up the constroller resync speed.
// ControllerSyncInterval is exposed so that integration tests can crank up the controller resync speed.
var ControllerReSyncInterval = 30 * time.Second
// AvailableStatusController is to update the available status conditions of both manifests and manifestworks.