@Override public Namespace create(String namespace, Map<String, String> annotations) { logger.status("Creating namespace: " + namespace + "..."); Namespace result = client.namespaces().createNew().withNewMetadata() .withName(namespace) .withAnnotations(annotations) .addToLabels(labelProvider.getLabels()) .addToLabels(PROJECT_LABEL, client.getNamespace()) .addToLabels(FRAMEWORK_LABEL, ARQUILLIAN_FRAMEWORK) .addToLabels(COMPONENT_LABEL, ITEST_COMPONENT) .endMetadata() .done(); logger.info( "To switch to the new namespace: kubectl config set-context `kubectl config current-context` --namespace=" + namespace); return result; }
@Override public Namespace create(String namespace, Map<String, String> annotations) { logger.status("Creating namespace: " + namespace + "..."); Namespace result = client.namespaces().createNew().withNewMetadata() .withName(namespace) .withAnnotations(annotations) .addToLabels(labelProvider.getLabels()) .addToLabels(PROJECT_LABEL, client.getNamespace()) .addToLabels(FRAMEWORK_LABEL, ARQUILLIAN_FRAMEWORK) .addToLabels(COMPONENT_LABEL, ITEST_COMPONENT) .endMetadata() .done(); logger.info( "To switch to the new namespace: kubectl config set-context `kubectl config current-context` --namespace=" + namespace); return result; }
@Override public Namespace annotate(String namespace, Map<String, String> annotations) { return client.namespaces().withName(namespace).edit() .editMetadata() .addToAnnotations(annotations) .endMetadata().done(); }
@Override public Namespace annotate(String namespace, Map<String, String> annotations) { return client.namespaces().withName(namespace).edit() .editMetadata() .addToAnnotations(annotations) .endMetadata().done(); }