Skip to content

feat(ironic): complete Kubernetes console provider support - #4232

Open
Rico Lin (ricolin) wants to merge 7 commits into
mainfrom
feature/production-ironic-kubernetes-console-provider
Open

feat(ironic): complete Kubernetes console provider support#4232
Rico Lin (ricolin) wants to merge 7 commits into
mainfrom
feature/production-ironic-kubernetes-console-provider

Conversation

@ricolin

@ricolin Rico Lin (ricolin) commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • complete the Ironic Kubernetes VNC console provider integration
  • stage noVNC browser assets without modifying application JavaScript at runtime
  • provide the dynamic console Pod/Secret template, dedicated-namespace RBAC, and an enabled-by-default RFB NetworkPolicy when the feature is selected
  • install kubectl in conductor Pods when the Kubernetes provider is enabled
  • expose a distinct noVNC endpoint and role configuration through Atmosphere variables
  • require operator-supplied console backend overrides to be complete digest references
  • make dynamic Pod scheduling, image-pull, probe, resource, and scratch-volume controls configurable
  • fail safely when disabling the feature while provider-owned Pods or Secrets remain, and remove the role-owned noVNC Ingress when disable is safe

The feature remains disabled by default. No image catalog entry or image build input is changed by this pull request.

Why the original design is insufficient

The original provider integration was functional but did not establish a safe production contract:

  1. Dynamic BMC credential Secrets and console Pods could fall back to the shared Helm release namespace. The chart now requires an explicit namespace; Atmosphere creates and selects {{ ironic_helm_release_namespace }}-ironic-vnc by default.
  2. The RFB NetworkPolicy existed but the role did not enable it, leaving TCP/5900 reachable according to the cluster's ambient policy. It is now enabled by default whenever the Kubernetes console provider is enabled, with an explicit opt-out.
  3. The noVNC hostname inherited the Ironic API hostname, allowing two Ingresses to claim the same host and path. The default is now derived as a distinct baremetal-console hostname and the role validates endpoint separation.
  4. Pod existence did not prove that the backend was listening. The generic template now provides TCP startup and readiness probes on the RFB port.
  5. Private registries and topology-constrained BMC networks could not be expressed. Image pull secrets, annotations, node selection, affinity, tolerations, topology spread, priority/runtime classes, resources, and scratch volumes are now configurable.
  6. Disabling the feature only skipped the noVNC Ingress task. The role now reconciles that Ingress absent and refuses disable while labelled dynamic Pods or Secrets remain.
  7. Digest validation previously accepted any string containing @sha256:. It now requires a complete 64-character lowercase SHA-256 reference for console backend and overridden browser-assets images.
  8. The checked-in chart and its consolidated vendor patch could drift. The patch is regenerated from the chart baseline and verified to reproduce charts/ironic byte-for-byte.

The NetworkPolicy is deliberately ingress-only. It permits the Ironic noVNC proxy Pods to connect to dynamic RFB Pods; it does not define OpenStack console authorization or make a console read-only. OpenStack/Ironic authorization remains above this Kubernetes transport boundary.

Stack and ownership

Validation

  • git diff --check
  • go test ./roles/ironic/...
  • helm lint charts/ironic
  • Helm 3 strict unit tests: 2 console tests, 2 priority-class tests, and 2 runtime-class tests passed
  • default-disabled render contains no console Pod template, console RBAC, or console NetworkPolicy
  • missing namespace is rejected when the Kubernetes provider is enabled
  • separate-namespace render verifies Secret, Pod, Role, RoleBinding, and NetworkPolicy placement and the application=ironic,component=novncproxy source selector
  • consolidated Ironic chart patch applies to its recorded baseline and reproduces the checked-in chart byte-for-byte
  • chart image tags, Atmosphere image catalog inputs, and image-build inputs are unchanged
  • ansible-lint roles/ironic reports no failures or warnings

The repository-wide Go test was also run locally. Changed packages passed; unrelated image-manifest tests assume a Linux target and fail on Darwin/arm64, and Prometheus rule tests require promtool, which was not installed on the workstation. CI remains authoritative for those platform/tool-dependent suites.

@ricolin
Rico Lin (ricolin) force-pushed the feature/production-ironic-kubernetes-console-provider branch from 621eec2 to d930bd8 Compare July 31, 2026 21:39
@ricolin
Rico Lin (ricolin) marked this pull request as ready for review August 1, 2026 01:49
@ricolin
Rico Lin (ricolin) force-pushed the feature/production-ironic-kubernetes-console-provider branch 3 times, most recently from 9b3510c to a2267e3 Compare August 5, 2026 14:30
@ricolin
Rico Lin (ricolin) force-pushed the feature/production-ironic-kubernetes-console-provider branch from 9111954 to 17efdb8 Compare August 13, 2026 02:05
Reapply the focused ironic-novncproxy implementation from the scope of
VEXXHOST Atmosphere PR 3811 on current main, aligned with merged
OpenStack-Helm change 983954.

Exclude the OpenStackSDK and Keycloak pip retry changes, which are already
owned by merged Atmosphere PR 3812.

Change-Id: If5446850cd804d80f426335d2ccf57e51043e6ba
Signed-off-by: Rico Lin <rlin@vexxhost.com>
Assisted-By: Codex <noreply@openai.com>
Add the OpenStack-Helm Kubernetes VNC console provider integration and wire
its endpoint and images through the Atmosphere role. Select the dynamic
console backend from the centralized atmosphere image catalog and require a
digest-pinned deployment override when graphical consoles are enabled.

Keep browser assets replaceable without mutating noVNC JavaScript at runtime.

Change-Id: I59860a52e6587aecaeb64062f97a1daade6e3bb6
Signed-off-by: Rico Lin <rlin@vexxhost.com>
Assisted-By: Codex <noreply@openai.com>
Ensure charts/patches/ironic/0002-add-novncproxy-support.patch is synchronized with charts/ironic.

Change-Id: I524cdc5a4232ca3be5b561e0e0c26fbd163eb4fc
Signed-off-by: Rico Lin <rlin@vexxhost.com>
Assisted-By: Gemini <noreply@google.com>
@ricolin
Rico Lin (ricolin) force-pushed the feature/production-ironic-kubernetes-console-provider branch from 17efdb8 to d3e6d9c Compare August 13, 2026 08:28
@ricolin
Rico Lin (ricolin) changed the base branch from feat/ironic-novncproxy to main August 13, 2026 08:41
@ricolin

Copy link
Copy Markdown
Member Author

recheck

Keep the noVNC patch based on the chart after the configured Gerrit and local prerequisite patches. Retain the corrected Ironic NetworkPolicy selector without duplicating service-user or database changes.

Signed-off-by: Rico Lin <rlin@vexxhost.com>
@ricolin
Rico Lin (ricolin) force-pushed the feature/production-ironic-kubernetes-console-provider branch from 9f598b4 to e0f040c Compare August 13, 2026 08:42
Require and create a dedicated namespace for dynamic console resources, enable its RFB NetworkPolicy by default, and validate endpoint and digest contracts before deployment.

Make dynamic Pod scheduling, image-pull, probe, resource, and scratch-volume controls configurable. Reconcile the public ingress on disable and refuse to proceed while provider-owned Pods or Secrets remain.

Keep the console feature opt-in and preserve existing proxy priority/runtime support and image mappings. Synchronize the full generated Ironic chart patch with the checked-in chart.

Signed-off-by: Rico Lin <rlin@vexxhost.com>
@ricolin

Copy link
Copy Markdown
Member Author

The latest commit hardens the generic provider contract without adding deployment-specific information or changing image inputs.

Key failure modes addressed are shared-namespace BMC credentials, a NetworkPolicy that was rendered but not selected by the role, API/noVNC hostname collision, lack of protocol-level readiness, missing private-registry and scheduling controls, stale ingress on disable, and weak digest validation. The disable path is intentionally fail-safe: it will not remove the public endpoint while labelled provider resources still exist.

Compatibility was checked explicitly. The feature remains opt-in; existing proxy priority-class and runtime-class tests still pass; default-disabled rendering emits no console provider resources; and the chart and Atmosphere image maps are unchanged. The consolidated vendor patch was regenerated and compared byte-for-byte with the checked-in chart.

The companion OpenStack-Helm review still needs a new Gerrit patch set for the explicit namespace contract. Provider-side wait-for-listen and partial-apply cleanup remain correctly owned by upstream Ironic rather than being hidden in this role.

Keep the vendored chart and its adapted 0.2.17 backport aligned with
OpenStack-Helm change 997340. Pin the purpose-built kubectl image, add the
upstream chart lint values, and assert the configured init image in the
Atmosphere chart tests.

Signed-off-by: Rico Lin <rlin@vexxhost.com>
Assisted-By: Codex <noreply@openai.com>
Change-Id: Ifab420d2a1fcc89c0fe20f4a8dd76c8b7b55dbf4
Refresh the stacked provider branch for current CI while preserving its
existing ancestry. Keep current-main service image digests and retain the
digest-pinned kubectl, noVNC proxy, and noVNC assets catalog entries.

Change-Id: I3ebb006c753f7f8d0d958081298933964a1dbb5e
Signed-off-by: Rico Lin <rlin@vexxhost.com>
Assisted-By: Codex <noreply@openai.com>
@ricolin

Copy link
Copy Markdown
Member Author

recheck

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