@Test public void shouldHandleResourceWithLabel() { KubernetesCrudAttributesExtractor extractor = new KubernetesCrudAttributesExtractor(); Map<String, String> labels = new HashMap<>(); labels.put("name", "myname"); Pod pod = new PodBuilder().withNewMetadata().withLabels(labels).endMetadata().build(); AttributeSet attributes = extractor.extract(pod); AttributeSet expected = new AttributeSet(); expected = expected.add(new Attribute("labels:name", "myname")); assertTrue(attributes.matches(expected)); }
@Override public AttributeSet extract(HasMetadata hasMetadata) { return extractMetadataAttributes(hasMetadata); }
KubernetesCrudAttributesExtractor extends KubernetesAttributesExtractor { @Override public AttributeSet extract(HasMetadata hasMetadata) { return extractMetadataAttributes(hasMetadata); } }
KubernetesCrudAttributesExtractor extends KubernetesAttributesExtractor { @Override public AttributeSet extract(HasMetadata hasMetadata) { return extractMetadataAttributes(hasMetadata); } KubernetesCrudAttributesExtractor();  KubernetesCrudAttributesExtractor(List<CustomResourceDefinitionContext> crdContexts); }
KubernetesCrudAttributesExtractor extends KubernetesAttributesExtractor { @Override public AttributeSet extract(HasMetadata hasMetadata) { return extractMetadataAttributes(hasMetadata); } KubernetesCrudAttributesExtractor();  KubernetesCrudAttributesExtractor(List<CustomResourceDefinitionContext> crdContexts); @Override AttributeSet extract(HasMetadata hasMetadata); }
KubernetesCrudAttributesExtractor extends KubernetesAttributesExtractor { @Override public AttributeSet extract(HasMetadata hasMetadata) { return extractMetadataAttributes(hasMetadata); } KubernetesCrudAttributesExtractor();  KubernetesCrudAttributesExtractor(List<CustomResourceDefinitionContext> crdContexts); @Override AttributeSet extract(HasMetadata hasMetadata);  }