Skip to content

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

@carolynvs

Description

@carolynvs

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),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions