Skip to content

fix: Deploy NSO with its config in one build - #257

Draft
vvoytovych wants to merge 2 commits into
mainfrom
fix/nso-config-one-build
Draft

vvoytovych wants to merge 2 commits into
mainfrom
fix/nso-config-one-build

Conversation

@vvoytovych

Copy link
Copy Markdown
Contributor

Summary

The local bootstrap writes NSO's config under a fixed name after NSO deploys, so once NSO's bundle hashes that name, as https://github.com/datum-cloud/infra/issues/7199 plans, NSO would run on its own default config with no error.

This deploys NSO and that config in one build, so NSO mounts it under whatever name NSO's bundle gives it.

It also stops the bootstrap when an NSO step fails, and installs the Prometheus Operator CRDs that NSO's deploy had been failing on unseen. An NSO clone from before the hash does not restart on a changed config, so pull it.

Test plan

  • On kind, today's bootstrap over an NSO with the hash on runs NSO on its default config, and this branch runs NSO on the bootstrap's config with the hash on or off
  • On kind, with the hash on, a changed config rolls NSO with no other step, and an unchanged one does not
  • On kind, a failed CRD install stops the bootstrap before NSO deploys
  • CI passes on this branch

Related to https://github.com/datum-cloud/infra/issues/7199

The bootstrap deployed NSO's bundle, then applied its own
network-services-operator-config by server-side apply, and restarted NSO.
That works only while NSO's bundle names its ConfigMap with no hash. With
a hash, NSO mounts its own ConfigMap and runs on its default config, with
no error.

The nso overlay now builds NSO's config/default and replaces its config
with `behavior: replace`. The manager mounts this config under the name
the bundle gives it, hashed or not. The re-apply and the restart go.
The bootstrap ran its NSO steps joined with `;`, so only the last
step's status counted. NSO's deploy always failed on its ServiceMonitor,
because the kind upstream has no ServiceMonitor CRD, and nothing showed
it.

The NSO steps now run under `set -e`, as go-install-tool does, so a
failed step stops the bootstrap. The bootstrap installs the Prometheus
Operator CRDs first, at the version infra runs, and NSO deploys whole.
@vvoytovych
vvoytovych marked this pull request as ready for review October 20, 2026 06:39
@vvoytovych
vvoytovych requested a review from a team as a code owner October 20, 2026 06:39
@vvoytovych
vvoytovych marked this pull request as draft October 20, 2026 13:43
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