Skip to content

Bugfix: make kind-up on darwin platform#825

Open
titanlien wants to merge 2 commits into
open-component-model:masterfrom
titanlien:bugfix/make-kind-up-on-darwin-os
Open

Bugfix: make kind-up on darwin platform#825
titanlien wants to merge 2 commits into
open-component-model:masterfrom
titanlien:bugfix/make-kind-up-on-darwin-os

Conversation

@titanlien

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
fix(kind-up): fix make kind-up running on Darwin platform

5 files changed to fix make kind-up / make kind-update on macOS:

1. values-delivery-service.yaml — Added ingress section
The service-ingress.yaml template dereferences .Values.ingress.annotations without a nil guard → Helm nil pointer error. Added ingress.hosts, ingress.annotations: {}, ingress.disableTls: true.

2. values-delivery-dashboard.yaml — Added ingress section
Same issue in dashboard-ingress.yaml — without ingress.hosts, the rendered Ingress has no rules and no defaultBackend → Kubernetes rejects it as invalid.

3. values-delivery-db.yaml — Replaced volumePermissions with custom init container
volumePermissions: enabled: true injects a Bitnami init container using docker.io/bitnami/os-shell:12-debian-12-r41, which doesn't exist on Docker Hub (manifest unknown on macOS). Replaced with a custom primary.initContainers entry that reuses the already-mirrored europe-docker.pkg.dev/gardener-project/releases/odg/postgres:16.8.0 to chown -R 1001:1001 /data.

4. values-bootstrapping.yaml — Two fixes for compatibility with installed image 0.1212.0

  • crypto.mappings: [] — The installed odg/extensions_cfg.py dacite-deserializes CryptoMapping whose __post_init__ calls shared_cfg_lookup(). Dacite tries SharedCfgGitHubReference first (requires repository) → MissingValueError. Empty list avoids constructing any CryptoMapping objects.
  • ocm_repo_mappings — The installed lookups.py uses cnudie.retrieve.OcmRepositoryMappingEntry (only repository + prefix supported). Old config had type: virtual (no repository field) and prefixes (plural). Fixed by removing the virtual entry and renaming prefixesprefix.

5. kind-update.sh — Added || true to port-forward kill command
xargs kill exits with code 1 on macOS when no existing kubectl port-forward is running → make fails. || true suppresses the error when there's nothing to kill.
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

category: bugfix|improvement
target_group: operator|developer

@titanlien titanlien requested a review from a team as a code owner May 27, 2026 16:02
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates local kind cluster Helm values and scripts: clears bootstrap crypto mappings and simplifies OCM repo mapping, adds ingress for delivery services, replaces DB chart volumePermissions with an initContainer to chown /data, includes secrets values in helm calls, makes port cleanup tolerant, updates extensions toggles, and adds Podman/macOS docs.

Changes

Local Setup Configuration and Documentation

Layer / File(s) Summary
Bootstrap configuration simplification
local-setup/kind/cluster/values-bootstrapping.yaml
Crypto mapping is cleared to mappings: [] and OCM repository mapping for ghcr.io/open-component-model/ocm is simplified to a single prefix: ocm.software/ocmcli.
Service ingress and host configuration
local-setup/kind/cluster/values-delivery-dashboard.yaml, local-setup/kind/cluster/values-delivery-service.yaml
Adds ingress blocks with empty annotations, hosts: [localhost], and disableTls: true for both charts; delivery-service also gets host: delivery-service.
Database volume permissions initialization
local-setup/kind/cluster/values-delivery-db.yaml
Adds initContainers.volume-permissions to run chown -R 1001:1001 /data using a mirrored Postgres image with runAsUser: 0, sets volumePermissions.enabled: false, and retains persistence.existingClaim.
Extensions toggles
local-setup/kind/cluster/values-extensions.yaml
Updates extension enablement flags (e.g., access-manager, artefact-enumerator, cache-manager, backlog-controller, bdba).
Helm values inclusion in scripts
local-setup/kind/kind-up.sh, local-setup/kind/kind-update.sh
Adds ${CHART}/secrets-bootstrapping.yaml as an additional --values file to the bootstrapping helm upgrade -i invocation in both scripts.
kind-update resilience and gitignore
local-setup/kind/kind-update.sh, .gitignore
Makes the port 5000 cleanup tolerant by appending `
Podman and macOS docs
local-setup/local-setup.md
Adds Podman-specific make kind-up instructions, systemd Delegate=yes notes for rootless Linux, macOS rootful Podman steps, and Known Limitations (including crypto.mappings and ocm_repo_mappings notes).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

kind/chore

Suggested reviewers

  • zkdev

Poem

🐰 I hopped through YAML, tidy and neat,
Cleared crypto crumbs and trimmed mapping meat,
Gave delivery hosts a localhost door,
Chowned DB data, then fixed port-kill chore,
Podman notes and macOS lore—hop, test, restore!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers all required template sections with clear explanations, but the release note section is incomplete with conflicting category/target_group values. Complete the release note by selecting a single category (bugfix or improvement, not both) and target_group(s), following the template format exactly.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing make kind-up compatibility on the Darwin (macOS) platform.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@8R0WNI3

8R0WNI3 commented May 29, 2026

Copy link
Copy Markdown
Member

@titanlien, thank you for your contribution!

However, it appears these changes are only necessary because the OCM component named ocm.software/ocm-gear (which is used for the deployment -> see) is not updated any longer and does not feature the changes which were meanwhile done in this repository.
We are currently working on a larger restructuring of our OCM component and artefacts setup (see related EPIC) which includes a successor for the stale ocm.software/ocm-gear component.
Therefore, I would suggest to put this PR on hold until said restructuring is completed, so that we can discuss the future of this local setup using KinD afterwards.

@8R0WNI3 8R0WNI3 added the lifecycle/icebox Temporarily on hold (will not age; may have dependencies, lack priority, miss feedback, etc.) label May 29, 2026
@titanlien titanlien force-pushed the bugfix/make-kind-up-on-darwin-os branch from 8ced905 to 1c88fbb Compare May 29, 2026 08:51
@titanlien

Copy link
Copy Markdown
Contributor Author

@8R0WNI3 thanks for sharing your road map with, I will keep an eye on it. If you can share release schedule with me as well. That will be great.

@8R0WNI3

8R0WNI3 commented May 29, 2026

Copy link
Copy Markdown
Member

You'll find the start and the estimated target date in the linked EPIC :-)

@titanlien titanlien force-pushed the bugfix/make-kind-up-on-darwin-os branch 2 times, most recently from 21c9906 to 30c2e34 Compare May 29, 2026 11:26
On Linux, rootless Podman requires kind to run inside a systemd scope
with `Delegate=yes` to manage cgroups. Wrap `kind create cluster` with
`systemd-run --scope --user -p "Delegate=yes"` when
`KIND_EXPERIMENTAL_PROVIDER=podman` and `systemd-run` is available.

On macOS, Podman Desktop runs rootless by default inside its Linux VM,
which triggers the same error. Document the fix: switch the Podman
machine to rootful mode via `podman machine set --rootful`.

Update local-setup.md with a dedicated "Using Podman as container
engine" section covering both platforms.

Signed-off-by: Titan Lien <6195019+titanlien@users.noreply.github.com>
@titanlien titanlien force-pushed the bugfix/make-kind-up-on-darwin-os branch from 30c2e34 to 28c165a Compare May 29, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/icebox Temporarily on hold (will not age; may have dependencies, lack priority, miss feedback, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EPIC: Restructure ODG repository/artefact setup

3 participants