Skip to content

Commit

Permalink
Merge pull request #59 from ahinvinith/kubviz
Browse files Browse the repository at this point in the history
Modified dashboard for ketall and outdated plugins... #58
  • Loading branch information
jebinjeb authored Jun 1, 2023
2 parents 9fd3bb5 + 33b4af2 commit d648fe0
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 249 deletions.
2 changes: 2 additions & 0 deletions agent/ketall.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ func GetAllResources(js nats.JetStreamContext, wg *sync.WaitGroup, errCh chan er
if item.GetNamespace() == "" {
resource = model.Resource{
Resource: item.GetName(),
Kind: item.GetKind(),
Namespace: "Default",
Age: age,
}
} else {
resource = model.Resource{
Resource: item.GetName(),
Kind: item.GetKind(),
Namespace: item.GetNamespace(),
Age: age,
}
Expand Down
8 changes: 8 additions & 0 deletions agent/outdated.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func outDatedImages(js nats.JetStreamContext, wg *sync.WaitGroup, errCh chan err
errCh <- err
}
for _, image := range images {
namespace := image.Namespace
pod := image.Pod
checkResult, _ := ParseImage(image.Image, image.PullableImage)
repo, img, tag, err := ParseImageName(image.Image)
final := model.CheckResultfinal{}
Expand All @@ -86,6 +88,8 @@ func outDatedImages(js nats.JetStreamContext, wg *sync.WaitGroup, errCh chan err
message = checkResult.CheckError
}
final.LatestVersion = message
final.Namespace = namespace
final.Pod = pod
err := PublishOutdatedImages(final, js)
if err != nil {
errCh <- err
Expand All @@ -100,6 +104,8 @@ func outDatedImages(js nats.JetStreamContext, wg *sync.WaitGroup, errCh chan err
final.Image = img
final.LatestVersion = checkResult.LatestVersion
final.VersionsBehind = checkResult.VersionsBehind
final.Namespace = namespace
final.Pod = pod
err := PublishOutdatedImages(final, js)
if err != nil {
errCh <- err
Expand All @@ -115,6 +121,8 @@ func outDatedImages(js nats.JetStreamContext, wg *sync.WaitGroup, errCh chan err
message = checkResult.CheckError
}
final.LatestVersion = message
final.Namespace = namespace
final.Pod = pod
err := PublishOutdatedImages(final, js)
if err != nil {
errCh <- err
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ name: grafana
sources:
- https://github.com/grafana/grafana
type: application
version: 6.26.11
version: 6.26.12
Loading

0 comments on commit d648fe0

Please sign in to comment.