INNER CODE UNIT · Python

_should_list_resource

robusta-dev/krr · robusta_krr/core/integrations/kubernetes/__init__.py:269

    def _should_list_resource(self, resource: str) -> bool:
        if settings.resources == "*":
            return True
        return resource in settings.resources

    def _is_job_owned_by_cronjob(self, job: V1Job) -> bool:
        """Check if a job is owned by a CronJob."""
        return any(owner.kind == "CronJob" for owner in job.metadata.owner_references or [])

    def _is_job_grouped(self, job: V1Job) -> bool:
        """Check if a job has any of the grouping labels."""
        if not settings.job_grouping_labels or not job.metadata.labels:
            return False
        return any(label in job.metadata.labels for label in settings.job_grouping_labels)

    async def _list_namespaced_or_global_objects_batched(
        self,
        kind: KindLiteral,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…