Skip to content

Feature Request: Propagate resource-level spec from autodiscovery #7478

@loispostula

Description

@loispostula

Is your feature request related to a problem?

I'm using npm autodiscovery with a custom .npmrc file for a private registry. The npm resource plugin supports npmrcpath, url, and registrytoken fields, but there's no way to set these at the autodiscovery level.

After autodiscovery generates manifests, I have to manually edit each one to add these fields.

Solution you'd like

Allow setting resource-specific config at the autodiscovery level that propagates to all generated manifests:

autodiscovery:
  crawlers:
    npm:
      rootdir: "."
      npmrcpath: "/custom/.npmrc"
      url: "https://npm.example.com"
      registrytoken: "${NPM_TOKEN}"

Implementation would add these fields to the autodiscovery plugin's Spec struct and pass them through manifest templates (similar to how scmid/actionid already work).

Alternatives you've considered

Checked if a generic engine-level solution exists - it doesn't, and building one seems like over-engineering for the ~8 plugins that would need this.

Per-plugin implementation seems more practical and type-safe.

Anything else?

Gap analysis of all 20 autodiscovery plugins shows:

High priority (5 plugins - share identical auth pattern):

  • dockerfile, kubernetes, dockercompose, nomad, ko - all need docker registry credentials (username/password/token)

Medium priority (4 plugins):

  • npm - needs npmrcpath/url/registrytoken
  • cargo - needs registry auth config
  • helm, argocd, fleet, flux - need OCI/chart repo tokens

No need (11 plugins): golang, maven, terraform, etc - public sources

The 5 docker-based plugins could share a common ContainerRegistryAuth struct since they generate identical resource types.

Could be implemented incrementally as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions