def create_job_owned_secret(self, job_secret: JobSecret):
        """
        This secret will be auto-deleted when the pod is Terminated
        """
        # Due to inconsistant GC in K8s the OwnerReference needs to be the pod and not the job (Found in azure)
        job_pod = self.get_single_pod()
        robusta_owner_reference = OwnerReference(
            apiVersion="v1",
            kind="Pod",
            name=job_pod.metadata.name,
            uid=job_pod.metadata.uid,
            blockOwnerDeletion=False,
            controller=True,
        )
        secret = Secret(
            metadata=ObjectMeta(name=job_secret.name, ownerReferences=[robusta_owner_reference]), data=job_secret.data
        )
        try:
            secret.createNamespacedSecret(job_pod.metadata.namespace).obj
        except Exception as e:
            logging.error(f"Failed to create secret {job_secret.name}", exc_info=True)
            raise e

        This secret will be auto-deleted when the pod is Terminated
        
src/robusta/integrations/kubernetes/custom_models.py