Skip to content

Ensure init is idempotent and doesn't overwrite repo list. #524

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

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

calebbrown
Copy link
Contributor

When a pod is restarted an initContainer can be run again.

The documentation says:

Because init containers can be restarted, retried, or re-executed, init container code should be idempotent. In particular, code that writes to files on EmptyDirs should be prepared for the possibility that an output file already exists.

This PR ensures that the collect_signals init script is idempotent so that the pod can be safely restarted.

@calebbrown calebbrown merged commit cf823f1 into main Jan 24, 2024
@calebbrown calebbrown deleted the init_is_idempotent branch January 24, 2024 02:22
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