diff --git a/cmd/freezer/main.go b/cmd/freezer/main.go index 330eb2c..2e69639 100644 --- a/cmd/freezer/main.go +++ b/cmd/freezer/main.go @@ -26,7 +26,7 @@ var ballast []byte // amount of memory and constantly stores a timestamp in memory. If the last // timestamp is older than 50 Milliseconds it will detect that as a "freeze". It // also exposes a simple HTTP API to get the last freeze and duration and an -// endpoint to set some string data, used to store aribtrary state. +// endpoint to set some string data, used to store arbitrary state. func main() { mem := flag.Int("memory", 0, "memory to allocate in MiB") flag.Parse() @@ -95,7 +95,7 @@ func main() { func allocateMemory(mem int) { slog.Info("allocating memory", "bytes", mem<<20) // we don't really care about the randomness too much, we want something - // quick that isn't so easily compressable. + // quick that isn't so easily compressible. r := rand.New(rand.NewPCG(rand.Uint64(), rand.Uint64())) ballast = make([]byte, mem<<20) for i := range len(ballast) { diff --git a/cmd/installer/main_test.go b/cmd/installer/main_test.go index f3e5e63..1442150 100644 --- a/cmd/installer/main_test.go +++ b/cmd/installer/main_test.go @@ -32,7 +32,7 @@ version = 2 [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] # set default runtime handler to v2, which has a per-pod shim runtime_type = "io.containerd.runc.v2" - # Generated by "ctr oci spec" and modified at base container to mount poduct_uuid + # Generated by "ctr oci spec" and modified at base container to mount product_uuid base_runtime_spec = "/etc/containerd/cri-base.json" [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] # use systemd cgroup by default @@ -73,7 +73,7 @@ imports = ["/etc/containerd/foo_*.toml", "./bar*.toml"] version = 2 imports = ["/etc/containerd/foo_*.toml", "runtime_zeropod.toml"] ` - configWithMulitlineImports = ` + configWithMultilineImports = ` version = 2 imports = [ @@ -81,7 +81,7 @@ imports = [ "./bar*.toml", ] ` - configWithMulitlineImportsZeropod = ` + configWithMultilineImportsZeropod = ` version = 2 imports = [ @@ -124,7 +124,7 @@ func TestConfigureContainerd(t *testing.T) { expectedRestart: true, }, "with multiline-imports already defined": { - containerdConfig: configWithMulitlineImports, + containerdConfig: configWithMultilineImports, runtime: runtimeContainerd, expectedRestart: true, }, @@ -135,7 +135,7 @@ func TestConfigureContainerd(t *testing.T) { expectedRestart: false, }, "with zeropod multiline-imports already defined": { - containerdConfig: configWithMulitlineImportsZeropod, + containerdConfig: configWithMultilineImportsZeropod, runtime: runtimeContainerd, preCreateZeropodConfig: true, expectedRestart: false, diff --git a/manager/pod_controller.go b/manager/pod_controller.go index 8e56709..960336f 100644 --- a/manager/pod_controller.go +++ b/manager/pod_controller.go @@ -165,7 +165,7 @@ func (r podReconciler) prepareMigrationTarget(ctx context.Context, pod *corev1.P mig.Claim(pod.Name, pod.Spec.NodeName) if err := r.kube.Update(ctx, &mig); err != nil { if errors.IsConflict(err) { - log.Warn("conflict claiming migration, requeueing") + log.Warn("conflict claiming migration, requeuing") return true, nil } return false, fmt.Errorf("failed to claim migration: %w", err) diff --git a/manager/pod_scaler.go b/manager/pod_scaler.go index 2a498a0..b9a12d6 100644 --- a/manager/pod_scaler.go +++ b/manager/pod_scaler.go @@ -109,8 +109,8 @@ func (ps *PodScaler) initialRequests(container corev1.Container, podAnnotations } containerMemory := containerResource{} - if memortReq, ok := podAnnotations[MemoryAnnotationKey]; ok { - if err := json.Unmarshal([]byte(memortReq), &containerMemory); err != nil { + if memoryReq, ok := podAnnotations[MemoryAnnotationKey]; ok { + if err := json.Unmarshal([]byte(memoryReq), &containerMemory); err != nil { return nil, err } }