Skip to content
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

Make owner reference configurable for resources created by the kubernetes driver #300

Open
carolynvs opened this issue Apr 27, 2023 · 0 comments

Comments

@carolynvs
Copy link
Contributor

The k8s driver has CLEANUP_JOBS which controls if the job and secret created by the driver should be immediately deleted after the job completes. I would like to have another setting, OWNER_REFERENCES, which allows me manage resource cleanup via cascading deletes and have more control over when they are deleted, giving me time to troubleshoot failed jobs for example.

Resources created by the driver (jobs, secrets) should include the specified owner references.

The format of the OWNER_REFERENCES environment variable should be a json serialized representation of metav1.OwnerReference. For example,

[]metav1.OwnerReference{
{
	APIVersion:         "getporter.org/v1",
	Kind:               "AgentAction",
	Name:               "install-a-bundle",
	UID:                "someuid",
	Controller:         pointer.Bool(true),
	BlockOwnerDeletion: pointer.Bool(true),
}
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

No branches or pull requests

1 participant