Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Flotta podman sock#1

Open
TheRealSibasishBehera wants to merge 22 commits intoproject-flotta:mainfrom
TheRealSibasishBehera:flotta-kep-main
Open

Flotta podman sock#1
TheRealSibasishBehera wants to merge 22 commits intoproject-flotta:mainfrom
TheRealSibasishBehera:flotta-kep-main

Conversation

@TheRealSibasishBehera
Copy link
Copy Markdown

Adding Podman support for Kepler

  1. added new package pkg/container_lister
  2. implemented an interface for working of both cluster environment and only container environment

@eloycoto eloycoto changed the title Flotta kep main Flotta podman sock Aug 18, 2022
.idea/.gitignore Outdated
@@ -0,0 +1,8 @@
# Default ignored files
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .idea folder should be deleted.

@@ -0,0 +1,21 @@
make --dry-run --always-make --keep-going --print-directory
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this .vscode files should be deleted and added to .gitignore.

cmd/exporter.go Outdated
address = flag.String("address", "0.0.0.0:8888", "bind address")
metricsPath = flag.String("metrics-path", "/metrics", "metrics path")
enableGPU = flag.Bool("enable-gpu", false, "whether enable gpu (need to have libnvidia-ml installed)")
isOnlyContainer = flag.Bool("only-container", true, "whether isOnlyContainer to implement container_lister")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be default false.

cmd/exporter.go Outdated
}
})

//
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover, should bne deleted

cmd/exporter.go Outdated
if err != nil {
log.Fatalf("failed to bind on %s: %v", *address, err)
}
fmt.Println("exporter call over")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these pfmt.Println should be removed

podEnergy[podName].Disks = disks
podEnergy[podName].CurrBytesRead = rBytes
podEnergy[podName].CurrBytesWrite = wBytes
// rBytes := totalReadBytes - aggBytesRead
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment shouild be removed, as the fmt.Printf() commands.


}

func (k *PodmanList) GetPodNameSpaceFromcGgroupID(cGroupID uint64) (string, error) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should return an empty string ehre? I do not think so.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh no, nevermind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants