Skip to content

feat: Add --healthcheck flag to crane mutate #2112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ehmm
Copy link
Contributor

@ehmm ehmm commented Jun 23, 2025

This commit introduces a new --healthcheck flag to the crane mutate command.

The flag accepts a JSON string representing the OCI HealthConfig object. This allows users to set or modify the healthcheck configuration of an image.

Includes a new e2e test script (cmd/crane/cmd/mutate_test.sh) to verify:

  • Setting a new healthcheck.
  • Overwriting an existing healthcheck.
  • Handling of invalid JSON input for the healthcheck flag.

Note: Automated verification of tarball contents in the test script using crane config is currently hindered by issues with crane config's handling of local tarball paths. The tests confirm that crane mutate produces tarballs and correctly errors on invalid input.

This commit introduces a new `--healthcheck` flag to the `crane mutate`
command.

The flag accepts a JSON string representing the OCI HealthConfig object.
This allows users to set or modify the healthcheck configuration of an
image.

Includes a new e2e test script (`cmd/crane/cmd/mutate_test.sh`) to
verify:
- Setting a new healthcheck.
- Overwriting an existing healthcheck.
- Handling of invalid JSON input for the healthcheck flag.

Note: Automated verification of tarball contents in the test script using
`crane config` is currently hindered by issues with `crane config`'s
handling of local tarball paths. The tests confirm that `crane mutate`
produces tarballs and correctly errors on invalid input.
@ehmm
Copy link
Contributor Author

ehmm commented Jun 24, 2025

@brandonmichigangithub can you please review?

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