def has_all_pod_properties(): for uid in uids: if not has_dim_prop(backend, dim_name="kubernetes_pod_uid", dim_value=uid, prop_name="app", prop_value="my-app"): return False return True
def has_all_pod_properties(): for uid in uids: if not has_dim_prop( agent.fake_services, dim_name="kubernetes_pod_uid", dim_value=uid, prop_name="app", prop_value="my-app", ): return False return True
def has_all_job_props(): for _, job in jobs.items(): for pod_uid in job["pod_uids"]: if not has_dim_prop( agent.fake_services, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="job", prop_value=job["job_name"], ): return False if not has_dim_prop( agent.fake_services, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="job_uid", prop_value=job["job_uid"], ): return False return True
def has_all_replica_set_props(): for _, replica_set in replica_sets.items(): for pod_uid in replica_set["pod_uids"]: if not has_dim_prop( agent.fake_services, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="replicaSet", prop_value=replica_set["rs_name"], ): return False if not has_dim_prop( agent.fake_services, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="replicaSet_uid", prop_value=replica_set["rs_uid"], ): return False return True
def has_all_deployment_props(): for _, replica_set in replica_sets.items(): for pod_uid in replica_set["pod_uids"]: if not has_dim_prop( backend, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="deployment", prop_value=replica_set["dp_name"], ): return False if not has_dim_prop( backend, dim_name="kubernetes_pod_uid", dim_value=pod_uid, prop_name="deployment_uid", prop_value=replica_set["dp_uid"], ): return False return True