* refactor(controller): reduce the kubernetes_version migration to its schema change
The backfill populated existing node pools and node sets from OS profile
metadata on disk. It is no longer needed: every database with rows to populate
applied this migration long ago, and the only database that still runs it is a
new one, which has no node pools or node sets.
Dropping it removes the last production caller of internal/utils/osprofiles.go.
Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>
* refactor(controller): drop the filesystem OS profile path
OS images and releases are resolved from MachineImage, ClusterRelease and
NodePoolRelease custom resources. The filesystem tree they replaced had no
reader left, so it goes along with the tool that converted it:
- hack/osprofiles-to-crs and its make target, fixture-releases
- internal/utils/osprofiles.go
- the osProfiles trees under test/fixtures/profiles and profiles/example
PROFILES_DIR stays. It still carries config profiles and the runbooks their
hooks reference, which have no custom-resource equivalent.
test/fixtures/releases is now maintained by hand. The converter's --check test
was what held it to the profile tree; with no tree to compare against, the
remaining cover is go test ./internal/clients/nico, which renders bootstrap
user-data from the nodepoolrelease manifests.
Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>
---------
Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>
On the current node image, unattended-upgrades and the apt-daily timers
start a few seconds after cloud-init reaches runcmd. When one of them
holds /var/lib/dpkg/lock-frontend while cloud-init runs
`apt-get install -y nke-agent nke-kubeadm-distro-...`, apt fails at once:
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2173 (unattended-upgr)
cloud-init still reports done, nke-kubeadm-distro is never installed, and
every kubeadm join on that node fails with `exec: "kubeadm": executable
file not found in $PATH` until the e2e spec runs out its wait.
Pass `-o DPkg::Lock::Timeout=600` on every apt-get call that runs on a node
during bootstrap, so apt waits up to ten minutes for the lock instead of
failing. Covers the e2e OS profile and release fixtures (nico-vms amd64 and
arm64, and the test fixtures), the example OS profile, the kubeadm-bringup
harness renderer, and the install-chrony runbook. setup-ci-host.sh already
uses the same flag for the same reason.
#1212 removes the first-boot upgrade burst from the image; this keeps the
bootstrap alive on images that still run it.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
- load and validate an externally managed controller client identity
- inject the controller CA and agent flag through CAPI and NICo bootstrap data
- add chart configuration and real TLS integration coverage
Signed-off-by: Vivin Wilson <vwilson@nvidia.com>
getUserData computed only the CNI images package, so a Forge node booted with
the images deb and never the charts deb.
InstallCNI needs the charts deb before it runs helm. chartsDebPresenceDefault
calls dpkg-query --show and returns errCNIChartsDebNotInstalled when the
package is absent, and the chart directory is then read out of that package's
own file list. A node carrying only the images package fails the activity
before helm starts, which is why INSTALL_CNI_AFTER_INIT ships off.
The charts names are not symmetric with the images names. OVN uses
nke-cni-ovn-charts-<stream> and Calico uses nke-cni-calico-manifests-<stream>.
Both come from the CHARTS role of nkeCniAptSpec in agent/internal/agent/cni.go,
which is the code that performs the lookup. That function is unexported in an
internal package of another module and cannot be imported here, so the names
are duplicated and a comment on each side names the other.
The test asserts both packages on one apt line, so it fails when either one is
missing or misnamed.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>