Skip to content

feat(helm): make chart names, SPIFFE identity, and authz overridable#1881

Open
ianderson-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
ianderson-nvidia:cert_dns_uri_configurable
Open

feat(helm): make chart names, SPIFFE identity, and authz overridable#1881
ianderson-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
ianderson-nvidia:cert_dns_uri_configurable

Conversation

@ianderson-nvidia
Copy link
Copy Markdown
Contributor

Every nico- string the charts emit is now an overridable value that defaults to nico, so the umbrella chart ships pure nico yet can be flipped to the legacy carbide/forge world.
This is needed because the carbide/forge -> nico rename (#1532) moved the API's SPIFFE validation to nico while machine-cert issuance is still on forge, so a deployment may need to present a carbide/forge identity until that migration completes.

Resource naming:

  • nameOverride (per subchart, default = chart name nico-<svc>) now drives every emitted resource name, label, selector, serviceAccountName, ConfigMap/Certificate name. Chart directories, Chart.yaml names, and the nico-<svc>.X helper identifiers stay nico.

Certificate identity:

  • The certificateSpec helper takes a svcName arg (the name helper) and certificate.serviceName defaults to it, so nameOverride alone also flips commonName/dnsNames/SPIFFE-URI; this is backwards compatible since the default still renders nico. Adds certificate.spiffeServiceName and certificate.identityNamespace to decouple the SPIFFE /sa/ name and namespace from the k8s service.

Cross-references and authz:

  • Clients reach the API via apiServiceName (default nico-api) in nico-dns/pxe/dhcp/ssh-console-rs.
  • The API and bmc-proxy auth config files are rendered with tpl rather than shipped verbatim, so spiffe_trust_domain tracks global.spiffe.trustDomain, the SPIFFE base-path namespace comes from auth.namespace, the casbin principals from auth.principals.*, and the bmc-proxy principal from auth.apiPrincipal. Whole-file replacement via configFiles.* is unchanged (that branch is not tpl-rendered).

Binary-read names (env vars, the Kea nico-api-url param, config keys, the /opt/nico and /etc/nico runtime paths, and the dual *-config.toml ConfigMap data keys) are deliberately left intact so the chart keeps working with either the nico or carbide image variant.

Adds helm-unittest coverage asserting both the nico default render and the carbide/forge override for naming, certificate SANs, the apiServiceName cross-refs, and the authz config.

Description

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@ianderson-nvidia ianderson-nvidia requested review from a team as code owners May 21, 2026 23:52
@ianderson-nvidia ianderson-nvidia force-pushed the cert_dns_uri_configurable branch from 30ceb00 to bb6a929 Compare May 21, 2026 23:54
@lachen-nv lachen-nv requested a review from shayan1995 May 22, 2026 01:26
Every `nico-` string the charts emit is now an overridable value that
defaults to nico, so the umbrella chart ships pure nico yet can be
flipped to the legacy carbide/forge world.
This is needed because the carbide/forge -> nico rename (NVIDIA#1532) moved
the API's SPIFFE validation to nico while machine-cert issuance is still
on forge, so a deployment may need to present a carbide/forge identity
until that migration completes.

Resource naming:

  - `nameOverride` (per subchart, default = chart name `nico-<svc>`) now
    drives every emitted resource name, label, selector,
    serviceAccountName, ConfigMap/Certificate name.
    Chart directories, `Chart.yaml`  names, and the `nico-<svc>.X`
    helper identifiers stay nico.

Certificate identity:

  - The `certificateSpec` helper takes a `svcName` arg (the name
    helper) and `certificate.serviceName` defaults to it, so
    `nameOverride` alone also flips commonName/dnsNames/SPIFFE-URI; this
    is backwards compatible since the default still renders nico. Adds
    `certificate.spiffeServiceName` and `certificate.identityNamespace`
    to decouple the SPIFFE `/sa/` name and namespace from the k8s service.

Cross-references and authz:

  - Clients reach the API via `apiServiceName` (default `nico-api`) in
    nico-dns/pxe/dhcp/ssh-console-rs.
  - The API and bmc-proxy auth config files are rendered with `tpl`
    rather than shipped verbatim, so `spiffe_trust_domain` tracks
    `global.spiffe.trustDomain`, the SPIFFE base-path namespace comes
    from `auth.namespace`, the casbin principals from
    `auth.principals.*`, and the bmc-proxy principal from
    `auth.apiPrincipal`. Whole-file replacement via `configFiles.*` is
    unchanged (that branch is not `tpl`-rendered).

Binary-read names (env vars, the Kea `nico-api-url` param, config keys,
the `/opt/nico` and `/etc/nico` runtime paths, and the dual
`*-config.toml` ConfigMap data keys) are deliberately left intact so the
chart keeps working with either the nico or carbide image variant.

Adds helm-unittest coverage asserting both the nico default render and
the carbide/forge override for naming, certificate SANs, the
`apiServiceName` cross-refs, and the authz config.
@ianderson-nvidia ianderson-nvidia force-pushed the cert_dns_uri_configurable branch from bb6a929 to 94d421f Compare May 22, 2026 02:10
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.

1 participant