Skip to content

⭐️ discover k8s applications #5424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

chris-rock
Copy link
Member

@chris-rock chris-rock commented Apr 7, 2025

Adds a new resource to make it easy to detect installed applications in k8s:

cnquery> k8s.apps { * }
k8s.apps: [
  0: {
    version: "1.12.0"
    partOf: "ingress-nginx"
    managedBy: "Helm"
    name: "ingress-nginx"
    components: [
      0: "controller"
    ]
    instance: "ingress-nginx"
  }
]

Copy link
Contributor

github-actions bot commented Apr 7, 2025

Test Results

3 694 tests  ±0   3 690 ✅ ±0   1m 44s ⏱️ -3s
  400 suites ±0       4 💤 ±0 
   30 files   ±0       0 ❌ ±0 

Results for commit a0d5fc2. ± Comparison against base commit da56dae.

♻️ This comment has been updated with latest results.

@chris-rock chris-rock force-pushed the chris-rock/k8s-apps branch from 6fbb79c to 1892a53 Compare April 7, 2025 10:53
@chris-rock chris-rock force-pushed the chris-rock/k8s-apps branch from 1892a53 to a0d5fc2 Compare April 7, 2025 10:55
@chris-rock chris-rock marked this pull request as ready for review April 8, 2025 03:55
Copy link
Contributor

@czunker czunker left a comment

Choose a reason for hiding this comment

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

Something isn't working like I would expect it:

cnquery run kubernetes -c "k8s.apps{ * }"
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
k8s.apps: [
  0: {
    version: "1.12.1"
    partOf: "ingress-nginx"
    managedBy: "Helm"
    name: "ingress-nginx"
    components: [
      0: "controller"
    ]
    instance: "nginx"
  }
]
k8s.apps: [
  0: {
    version: "1.12.1"
    partOf: "ingress-nginx"
    managedBy: "Helm"
    name: "ingress-nginx"
    components: [
      0: "controller"
    ]
    instance: "nginx"
  }
]
...

The same app repeats multiple times, but I only installed it once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants