← Back to Pull requests

feat(metadata-collector): support host-native authentication #1837

Closed
unknown closed this pull request without merging on Sep 19, 2026 08:48 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 02:13 UTC
Author

Summary

Closes #1836.

Allow metadata-collector to authenticate as a host-native process while retaining hardware inventory and pod-to-GPU mapping.

  • Add --kubeconfig for Kubernetes API access and --kubelet-kubeconfig for kubelet HTTPS access.

  • Keep endpoints, credentials, and CA trust separate. Explicit configurations require authenticated, verified HTTPS.

  • Preserve in-cluster defaults and existing constructor calls. Do not implicitly load a home-directory kubeconfig.

  • Keep inventory and annotation schemas unchanged. Do not add an inventory-only mode.

  • Wait for delayed PodResources socket availability within bounded, cancellable requests. Retain the existing consecutive-poll failure limit.

  • Test token and certificate file rotation, certificate validation, authorization errors, socket recovery, and annotation changes.
  • ADR-058 records the proposed design and extends the deployment options described in ADR-010. It does not change publisher authentication from ADR-052. Maintainer acceptance is pending.

    Credential provisioning, RBAC changes, packaging, release workflows, and remediation are outside this PR.

    Type of Change

  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected

  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing

  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • make -C metadata-collector lint-test passes: 104 tests with the race detector, no lint findings. The integration test uses a real local API server and RBAC. It verifies annotation addition, changes, removal, no-op updates, and permission denial. The Linux AMD64 executable builds and exposes both new flags.

    The complete metadata-collector suite also passes on Linux AMD64 with go test -race -count=1 -timeout 5m ./....

    The full make lint-test-all check passes on Linux AMD64 with the pinned build tools. This includes protobuf generation, license headers, all 33 Go module checks, module lint and tests, Helm lint, and script lint. Existing skipped tests remain unchanged. No test assertions or version pins were changed to obtain this result.

    Live GPU-node/systemd integration remains untested for this change.

    Checklist

  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

  • New Features

  • - Added separate configuration options for Kubernetes API server and kubelet authentication.
    - Supports bearer tokens, client certificates, exec providers, and authentication plugins.
    - Preserves in-cluster authentication when explicit configuration is omitted.
    - Refreshes kubelet credentials between requests and retries.

  • Bug Fixes

  • - Improved validation for incomplete credentials, unsafe endpoints, invalid certificates, and missing token files.
    - Clarified permissions required to update pod GPU annotations.

  • Documentation

  • - Added guidance and an architecture decision record covering authentication, TLS, permissions, and failure handling.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 430 lines (+322 / -108) across 5 files Reviewer: natherz97 Review duration: 6154m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.68) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 430 lines diff across 5 files
    0.68
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #1837"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 68.3% (HIGH) · Higher = larger blast radius
    68.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.5% · Safe to merge
    29.5%