Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/freezer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/installer/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -73,15 +73,15 @@ imports = ["/etc/containerd/foo_*.toml", "./bar*.toml"]
version = 2
imports = ["/etc/containerd/foo_*.toml", "runtime_zeropod.toml"]
`
configWithMulitlineImports = `
configWithMultilineImports = `
version = 2

imports = [
"/etc/containerd/foo_*.toml",
"./bar*.toml",
]
`
configWithMulitlineImportsZeropod = `
configWithMultilineImportsZeropod = `
version = 2

imports = [
Expand Down Expand Up @@ -124,7 +124,7 @@ func TestConfigureContainerd(t *testing.T) {
expectedRestart: true,
},
"with multiline-imports already defined": {
containerdConfig: configWithMulitlineImports,
containerdConfig: configWithMultilineImports,
runtime: runtimeContainerd,
expectedRestart: true,
},
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion manager/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions manager/pod_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down