use of io.fabric8.certmanager.api.model.v1beta1.CertificateList in project kubernetes-client by fabric8io.
the class V1VerticalPodAutoscalerCrudTest method shouldListAndGetVerticalPodAutoscaler.
@Test
void shouldListAndGetVerticalPodAutoscaler() {
VerticalPodAutoscaler vpa2 = new VerticalPodAutoscalerBuilder().withNewMetadata().withName("vpa2").endMetadata().build();
client.v1().verticalpodautoscalers().inNamespace("ns2").create(vpa2);
VerticalPodAutoscalerList certificateList = client.v1().verticalpodautoscalers().inNamespace("ns2").list();
assertNotNull(certificateList);
assertEquals(1, certificateList.getItems().size());
}
use of io.fabric8.certmanager.api.model.v1beta1.CertificateList in project kubernetes-client by fabric8io.
the class V1CertificateCrudTest method shouldListAndGetCertificate.
@Test
void shouldListAndGetCertificate() {
Certificate certificate2 = new CertificateBuilder().withNewMetadata().withName("cert2").endMetadata().build();
client.v1().certificates().inNamespace("ns2").create(certificate2);
CertificateList certificateList = client.v1().certificates().inNamespace("ns2").list();
assertNotNull(certificateList);
assertEquals(1, certificateList.getItems().size());
}
use of io.fabric8.certmanager.api.model.v1beta1.CertificateList in project kubernetes-client by fabric8io.
the class V1beta1CertificateCrudTest method shouldReturnEmptyList.
@Test
void shouldReturnEmptyList() {
CertificateList certificateList = client.v1beta1().certificates().inNamespace("ns1").list();
assertNotNull(certificateList);
assertTrue(certificateList.getItems().isEmpty());
}
use of io.fabric8.certmanager.api.model.v1beta1.CertificateList in project kubernetes-client by fabric8io.
the class CertificateCreate method main.
public static void main(String[] args) {
try (NamespacedCertManagerClient certManagerClient = new DefaultCertManagerClient()) {
String namespace = "default";
Certificate certificate = new CertificateBuilder().build();
// Create Certificate
certManagerClient.v1beta1().certificates().inNamespace(namespace).create(certificate);
System.out.println("Created: " + certificate.getMetadata().getName());
// List Certificate
CertificateList certificateList = certManagerClient.v1beta1().certificates().inNamespace(namespace).list();
System.out.println("There are " + certificateList.getItems().size() + " TaskRun objects in " + namespace);
}
}
use of io.fabric8.certmanager.api.model.v1beta1.CertificateList in project kubernetes-client by fabric8io.
the class CertificateCreate method main.
public static void main(String[] args) {
try (NamespacedCertManagerClient certManagerClient = new DefaultCertManagerClient()) {
String namespace = "default";
Certificate certificate = new CertificateBuilder().build();
// Create Certificate
certManagerClient.v1().certificates().inNamespace(namespace).create(certificate);
System.out.println("Created: " + certificate.getMetadata().getName());
// List Certificate
CertificateList certificateList = certManagerClient.v1().certificates().inNamespace(namespace).list();
System.out.println("There are " + certificateList.getItems().size() + " TaskRun objects in " + namespace);
}
}
Aggregations