Skip to content

feat: Add init containers#13

Merged
joli-sys merged 6 commits intomainfrom
add_initContainers
Jan 29, 2026
Merged

feat: Add init containers#13
joli-sys merged 6 commits intomainfrom
add_initContainers

Conversation

@joli-sys
Copy link
Contributor

Add initContainers support to components

Summary

This MR adds support for defining init containers at the component level. Init containers run before the main application container starts, enabling
common initialization patterns like waiting for dependencies, running migrations, or setting up configuration.

Changes

  • values.schema.json: Added initContainers property to both HTTP and consumer component definitions. Init containers are defined as a map of container
    objects, reusing the existing container schema definition
  • deployment.yaml: Updated the pod.spec template include to pass initContainers from the component configuration
  • README.md: Added documentation section explaining init containers usage with examples

Usage Example

components:
api:
type: http
ports:
- port: 3000
initContainers:
wait-for-db:
image:
repository: busybox
tag: "1.36"
command:
- sh
- -c
- |
until nc -z postgres-service 5432; do
echo "Waiting for database..."
sleep 2
done
resources:
requests:
cpu: "50m"
memory: "64M"

Supported Properties

Init containers support the same configuration as regular containers:

  • image.repository / image.tag / image.pullPolicy
  • command and args
  • envs.values, envs.from.configMaps, envs.from.secrets
  • resources
  • volumeMounts

@joli-sys joli-sys requested a review from jindraj January 28, 2026 16:12
@joli-sys joli-sys self-assigned this Jan 28, 2026
Copy link
Contributor

@jindraj jindraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joli-sys joli-sys merged commit d4c0e49 into main Jan 29, 2026
4 checks passed
@joli-sys joli-sys deleted the add_initContainers branch January 29, 2026 08:26
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.

2 participants