Skip to content

bug: Replace initContainer if Favor of client-registration and spiffy-helper Containers #3

Description

@cwiklik

Description

The toolhive-webhook should inject client-registration and spiffy-helper containers into pods that require SPIFFE identity and Keycloak client registration. This replaces the previous pattern of using initContainer, which is incompatible with the long running nature of spiffy-helper process.

Background

Previously, MCP Server CR used initContainer to handle client registrations with Keycloak as part of identity setup. However, this approach has fundamental limitation:

  • initContainers run sequentially and must terminate before main container can start
  • spiffy-helper is a long-running process that manages SPIFFY identities and certificate rotation.
  • client-registration depends on spiffy-helper being available to obtain SPIFFY credentials.

These requirements are incompatible with the initContainer model, which expects containers to complete and exit.

Solution

The toolhive-webhook should automatically inject sidecar containers into MCP Server pod:

  1. spiffy-helper
  2. client-registration

Both containers run as sidecar containers alongside the main MCP Server application container

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions